From: <jj...@us...> - 2004-02-04 07:15:26
|
Update of /cvsroot/ngetsuite/ngetsuite In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10708 Modified Files: HOWTO sampleconfig Log Message: minor updates, howto improved, sampleconfig commented, added a config option to start STOPPED queues automatically Index: HOWTO =================================================================== RCS file: /cvsroot/ngetsuite/ngetsuite/HOWTO,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HOWTO 20 Jan 2004 23:15:54 -0000 1.2 --- HOWTO 4 Feb 2004 07:13:04 -0000 1.3 *************** *** 1,17 **** How to use ngetsuite : I) Launching the daemon and the web server ------------------------------------------ ! Before everything, start the daemon and optionnaly the httpd : ! ./daemon.rb >/dev/null 2>&1 & ! ./testhttpd.rb >testhttpd.log 2>&1 & disown -a - you can show the groups watched with - ./ngetsuite.rb -s - II) Add some groups ------------------- ! Add one or more groups with : ./ngetsuite.rb -a alt.binaries.pictures.linux,linux-pics,/home/me/download/abpl --- 1,30 ---- How to use ngetsuite : + 0) Before the first run + ----------------------- + Set up the config file + cp sampleconfig ~/.ngetsuite + vim ~/.ngetsuite + the most important is the login/pass for the database. + + Then set up the database + log in mysql as root, add the database and the above user with drop, create, insert, delete, update privileges. + ./resetdb.rb should set up the tables correctly inside the database + + You can now proceed to the next step. + + I) Launching the daemon and the web server ------------------------------------------ ! Before everything, start the daemon and optionnaly the httpd (see configfile) ! ./daemon.rb & disown -a II) Add some groups ------------------- ! You can list the newsgroups watched with ! ./ngetsuite.rb -s ! ! Add one or more groups with -a, like : ./ngetsuite.rb -a alt.binaries.pictures.linux,linux-pics,/home/me/download/abpl *************** *** 20,29 **** letter of each component of the full name (alt.binaries.pictures.linux => abpl). ! You can get the full list of registered newsgroup with the command : ./ngetsuite.rb -s III) Update the headers from the news server -------------------------------------------- ! you must update the news reader cache with for example a crontab like this : 10 5 * * * ~/ngetupdate.sh --- 33,42 ---- letter of each component of the full name (alt.binaries.pictures.linux => abpl). ! You can verify the operation with -s again : ./ngetsuite.rb -s III) Update the headers from the news server -------------------------------------------- ! you must regularly update the news reader cache with for example a crontab like this : 10 5 * * * ~/ngetupdate.sh *************** *** 35,48 **** This will fetch the headers from the news server, parse the cache file and ! insert the headers into the mysql database. ! you can void the output if you don't want mails from cron. - Alternatively, you can update a specific group with : - ./ngetsuite.rb -u groupid IV) Add a regexp to the download queue -------------------------------------- ! You must add a queue to download with : ./ngetsuite.rb -r groupid,regexp,prio --- 48,65 ---- This will fetch the headers from the news server, parse the cache file and ! insert the headers into the mysql database, and fetch and save the nfos as ! needed. ! You can append '>/dev/null 2>&1' to the output if you don't want mails from cron. ! ! Alternatively, you can update a specific group on demand with -u, like : ! ./ngetsuite.rb -u linux-pics IV) Add a regexp to the download queue -------------------------------------- ! The daemon will automatically retrieve the articles and build the binarie ! matching some regexp (download queue). ! You add a queue with -r : ./ngetsuite.rb -r groupid,regexp,prio *************** *** 55,62 **** regexp. ! When the nget process has finished, the queue will be marked as 'FINISHED'. If ! you want to start processing this queue again (because of a network failure), ! you just have to change the status of the queue to 'PENDING' with : ! ./ngetsuite.rb -i queueid,PENDING You can get the list of queued items with : --- 72,86 ---- regexp. ! List the queues with -t : ! ./ngetsuite.rb -t ! or ./ngetsuite.rb -t linux-pics ! ! When the nget process has finished, the queue will be marked as 'FINISHED'. ! You can remove theses queues with -x (get the index with -t) : ! ./ngetsuite.rb -x 23 ! ! If you want to start processing this queue again (because of a network failure, ! repost..), you just have to change the status of the queue to 'PENDING' with : ! ./ngetsuite.rb -i 23,PENDING You can get the list of queued items with : Index: sampleconfig =================================================================== RCS file: /cvsroot/ngetsuite/ngetsuite/sampleconfig,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** sampleconfig 2 Feb 2004 17:44:18 -0000 1.8 --- sampleconfig 4 Feb 2004 07:13:04 -0000 1.9 *************** *** 1,20 **** dbuser = 'nget' dbpass = 'cache4pdv' dbname = 'ngetcache' nget = '/home/nget/bin/nget' yydecode = '/usr/bin/yydecode' cachedir = '/home/nget/.nget4' basedir = '/home/nget/testdl' max_dls = 3 port = 12345 daemon_log = '/tmp/nget-daemon.log' debug = false extern_headers_update = '' httpd_port = 2000 ! autostart = true ! autostart_httpd = true --- 1,53 ---- + ######################### + # Database parameters + # dbuser = 'nget' dbpass = 'cache4pdv' dbname = 'ngetcache' + + ################### + # Program paths + # nget = '/home/nget/bin/nget' yydecode = '/usr/bin/yydecode' + + ################## + # Directories + # + # where nget stores its cache cachedir = '/home/nget/.nget4' + # where to download unless otherwise specified basedir = '/home/nget/testdl' + + ########################## + # Daemon configuration + # + # maximum number of nget instances in parallel max_dls = 3 + # the port for communication with the daemon port = 12345 daemon_log = '/tmp/nget-daemon.log' + # should we automatically restart downloads in state STOPPED ? + resume_downloads = false + # should the daemon look for eligible queues on startup or wait for -m + autostart = true + + ##################### + # Misc + # debug = false + # coma-separated list of the shortnames of the groups for which the program will not try to update the headers (but will still parse them and dl nfos) extern_headers_update = '' + + ##################################### + # Embedded web server configuration + # httpd_port = 2000 ! # should the daemon start the httpd ! httpd_autostart = true ! |