Skip to content

Commit

Permalink
fixed a couple of issues with the setting interface
Browse files Browse the repository at this point in the history
binding the web interface to a different ip and port now allowed through
command-line options
updating README with new information
  • Loading branch information
four-o-four committed Mar 26, 2012
1 parent fa696e9 commit c3745e2
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 18 deletions.
15 changes: 7 additions & 8 deletions README
@@ -1,19 +1,18 @@
OmniVerse - Automatic downloader for comic books (cbr, cbz, etc) in the tradition of Sickbeard.

* If you've installed a previous version, please uninstall before installing the current version. There have been changes to the database structure that are incompatible with the current version.

Some things to be aware of:
* Requires Python. Currently being developed and tested using Python 2.7. Some users have reported no problems using 2.6. If you find an issue that is the result of an earlier version of Python, please report it and I'll do my best to accomodate.

* This isn't a user-friendly version or even a useful version. This release is for me to get familiar with working with git and lets people test if the header download portion is working with different usenet providers.
* To run the program, use python to run omniverse.py. The first time it runs navigate to the settings page (typically http://localhost:8085/settings for a first time installation) and setup your newsgroup provider information and select what newsgroups you want archived. Currently there is only space for one newsgroup provider but a future feature will allow multiple servers.

* Requires Python. I'm using Python 2.7. It may be compatible with an earlier version but I have not tested it. I doubt its compatible with Python 3.0. I may migrate at a later date but for now I'm sticking with 2.7.
* If you need to bind to a different ip address or port for the web interface, there are command options for that: --host=[ip address] and --port=[port number]

* To run the program, use python to run omniverse.py. The first time it runs, it will save a file called config.ini in the directory then quit. Edit the config.ini file with your nntp server information. Should be self explanatory. Username, password, a 0 or a 1 for SSL, host, and port. Also there are places for what usenet newsgroups to scan. Two newsgroups are provided but you can add more. Make sure any newsgroups added following the numbering of the others in the example (0 for the first one, 1 for the second, etc).

* Run again to start the server.
* Quit the program (CTRL+C) and restart the server so that your new settings will take affect.

* Once the server gets started, you should see logging information about what headers are being downloaded. IMPORTANT: The subject lines may be NSFW or NSFL for that matter. The same goes for the web interface and the produced log file. As I'm sure we all know, there's plenty of spam on usenet. One my goals is to write a better spam/porn filter and then those messages should go away.

* To access the web interface, browse to http://localhost:8085. The web interface should be improved soon.
* To access the web interface, browse to http://localhost:8085. From there you can browse the database of available comic books and create a nzb file to feed to sabnzb.

* To quit the server and shut everything down use CTRL+C. It should quit cleanly and return to the command-line. If after a couple of minutes it doesn't, use process explorer to kill.

Expand All @@ -23,7 +22,7 @@ Some things to be aware of:

* Another thing to make sure of is to take a connection away from Sabnzb+. For example, if you provider gives you 20 connections, you'll want to change the connections to 19 in Sabnzb+ so there is no conflict.

Phew. I don't think I left out anything. Thanks for everyone's encouragement. I should have more up later in the week. Be sure to follow me on twitter (http://twitter.com/omniverse2) so you can send me any comments, rants, raves, or suggestions.
Phew. I don't think I left out anything. Thanks for everyone's encouragement. Be sure to follow me on twitter (http://twitter.com/omniverse2) so you can send me any comments, rants, raves, or suggestions.

Thanks again everyone!
404
2 changes: 1 addition & 1 deletion html/settings.tmp.htm
Expand Up @@ -20,7 +20,7 @@

$.post('/settings/save', postdata, function(data) {
// and set the title with the result
$("#title").html(data);
alert(data);
});
return false ;
});
Expand Down
27 changes: 22 additions & 5 deletions omniverse.py
Expand Up @@ -7,6 +7,7 @@
import logging
import logging.handlers
import sys
import getopt
import itertools
import ssl
import re
Expand Down Expand Up @@ -417,6 +418,8 @@ def start_article_download():

def main():

optlist, args = getopt.getopt(sys.argv[1:], '', ["host=", "port="])

global SIGNAL

startup()
Expand All @@ -427,13 +430,27 @@ def main():
t.start()

config = {'/media':
{'tools.staticdir.on': True,
'tools.staticdir.dir': build_path("html", "media"),
}
}
{'tools.staticdir.on': True,
'tools.staticdir.dir': build_path("html", "media"),
}
}

cherrypy.engine.autoreload.unsubscribe()

# default
cherrypy.server.socket_port = 8085
for option, value in optlist:
if option == "--host":
cherrypy.server.socket_host = value
elif option == "--port":
try:
cherrypy.server.socket_port = int(value)
except ValueError, e:
print e
cherrypy.server.socket_port = 8085
else:
print "Unknown options. Available options: --host=[ip address to bind interface to] --port=[port for interface to listen to]"

cherrypy.tree.mount(web.RootPages(), '/', config=config)
cherrypy.engine.start()

Expand Down Expand Up @@ -483,5 +500,5 @@ def main():
main()
except SystemExit, e:
logging.getLogger().info("Shutting Down")

5 changes: 1 addition & 4 deletions web.py
Expand Up @@ -42,7 +42,6 @@ def index(self):
@cherrypy.expose
def save(self, **kwargs):

print kwargs['is_ssl']
host = kwargs['host']
port = kwargs['port']
is_ssl = "1" if kwargs['is_ssl'] == "checked" else "0"
Expand Down Expand Up @@ -74,7 +73,7 @@ def save(self, **kwargs):
settings.set("NNTP:server.0.group.%d" % idx, "(%s:%s)" % (group, old_group_values.get(group, "0")))

settings.set("NNTP:server.0.enabled", 1)
return "success"
return "Settings Updated."

class GroupWorker(threading.Thread):

Expand Down Expand Up @@ -140,8 +139,6 @@ def save(self, ids):
if type(ids) is not type([]):
ids = [ids]

print repr(ids)

nzb_filename = "omniverse_%d" % int(time.time())

cherrypy.response.headers['Content-type'] = 'application/xml+nzb'
Expand Down

0 comments on commit c3745e2

Please sign in to comment.