Skip to content

Commit

Permalink
small adjustments for #18
Browse files Browse the repository at this point in the history
  • Loading branch information
RouxRC committed Apr 30, 2017
1 parent 401d0a2 commit 1140107
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions gazouilleur/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,7 @@ def command_list(self, database, channel=None, *args):
@inlineCallbacks
def command_newsurl(self, name, channel=None, *args):
"""newsurl <name> : Displays the url of a RSS feed saved as <name> for current channel."""
# TODO Handle urls for monitor
channel = self.getMasterChan(channel)
res = yield self.db['feeds'].find({'database': 'news', 'channel': channel, 'name': name.lower().strip()}, fields=['query', 'name'], limit=1)
if res:
Expand Down
3 changes: 2 additions & 1 deletion gazouilleur/lib/webmonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ def __init__(self, name):

def check_diff(self, url, data):
# TODO:
# apply url_rewrite for '<[^>]*=['"]/([^/]|$)' et '<[^>]*=['"](!:http)'
# - handle error pages
# - apply url_rewrite for '<[^>]*=['"]/([^/]|$)' et '<[^>]*=['"](!:http)'
# - check if file -last exists
# - if so diff md5 current/last
# - check if exist and not diff
Expand Down
8 changes: 6 additions & 2 deletions web/templates/monitor.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
<title>WebMonitor by gazouilleur for {{name}}</title>
<title>WebMonitor for {{name}} powered by Gazouilleur</title>
<!-- TODO: stylify everything-->
<style>
h1 {font-size: 18px;}
#page {width: 100%; height: 800px;}
</style>
</head>
<body>
<h1>WebMonitor by gazouilleur for <a target="_blank" href="{{url}}">{{name}} at {{url}}</a></h1>
<h1>WebMonitor for <a target="_blank" href="{{url}}">{{name}} at {{url}}</a> <small>Powered by <a href="https://github.com/RouxRC/gazouilleur"></a></small></h1>
<h2>Available versions</h2>
<ul>
<li><b><a target="_blank" href="{{url}}">Actual</a></b></li>
Expand All @@ -19,9 +21,11 @@ <h2>Available versions</h2>
</ul>
<h2 id="version">Actual version</h2>
<iframe id="page" src="{{url}}"></iframe>
<!--
<h2>Diff view</h2>
<span id="old"></span> Vs. <span id="new"></span>
<div id="diff"></div>
-->
</body>
<script type="text/javascript">
// TODO: load page in iframe on click + set name in version
Expand Down

0 comments on commit 1140107

Please sign in to comment.