Saturday, March 23, 2013

Spotnab command line

All spotnab command line options are executed by running 'php spotnab.php' from within the misc/testing/ directory.

You should not *need* to run any of these at any point in time for normal functionality, they simply exist to aid in troubleshooting, or to speed up particular processes such as GID generation.

spotnab.php -g or -G

This flag by default will generate Global IDs for your 5000 most recent releases that do not currently have a GID generated for them.

The -G flag will do the same, except it will also treat broken nzb files as broken releases and delete those releases from your database automatically. (probably a good thing.)

If you would like to increase the number processed at once, you can edit spotnab.php and change the number in "$spotnab->processGID(0,5000,true);" (approx line 263) from 5000, to whatever number you please, and run with the -G flag.

If you are not sure how many GIDs you have left to create, you can simply run the following query in MySQL: 'select count(*) from releases where gid IS NULL;'

spotnab.php -t

This flag allows you to perform several tests to ensure that you have the correct PHP libraries, and that the UTC/Local time conversions are happening properly.

If the SSL Key generator fails, likely you do not have the OpenSSL extension enabled in PHP, or the OpenSSL config file is not readable.

spotnab.php -d

This flag forces a discovery of sources. This generally should not be necessary it already happens during update_releases, but can be useful when troubleshooting.

spotnab.php -b

Forces a broadcast of your discovery message.  Again, this should not be necessary unless your broadcast message is not showing up for some reason.

This will only function properly if your Usenet Service Provider allows posting from your account.

spotnab.php -f

Forces a fetch of Spotnab messages for your enabled sources.  If you have not enabled any sources in Admin/View Spotnab sources, you will receive zero messages.

spotnab.php -p

Forces posting of new comments posted to your site since the last time you posted comments. Again, this is already performed during update_releases, and requires posting permission from your USP if they don't automatically grant it.

And last but not least....

spotnab.php -k or -K

This generates a public/private key pair for posting purposes and should already have generated automatically if you enabled posting from Admin/Site Edit.  If for some reason your keys did not generate, you should probably run with the -t flag first, then if everything checks out try -k.

The -K flag will generate completely new keys for you, overwriting your existing information. USE THIS ONE WITH CAUTION!

Stay tuned for more helpful NN posts, and of course if you have any questions come join the IRC channel. (You know where it is.)


No comments:

Post a Comment