[Scan-Script] pfftn (formerly pass-from-file-to-nzbget.py)

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
Telman12
Posts: 16
Joined: 01 Nov 2013, 21:10

Re: [Scan-Script] pfftn (formerly pass-from-file-to-nzbget.p

Post by Telman12 » 29 Apr 2015, 05:52

you have the regex code for Windows? i need to:
copy the download folder * .nzb and {{}} REGEX. rar to destdir and unpack all the files in rar

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Scan-Script] pfftn (formerly pass-from-file-to-nzbget.p

Post by hugbug » 29 Apr 2015, 08:11

Telman12 wrote:you have the regex code for Windows?
Have you tried the script from the first post? It is written in python and should work on Windows too.

Telman12
Posts: 16
Joined: 01 Nov 2013, 21:10

Re: [Scan-Script] pfftn (formerly pass-from-file-to-nzbget.p

Post by Telman12 » 30 Apr 2015, 06:30

wusa wrote: Help
Maybe, the RegEx can be improved!? :)
Problem with some letters in filename (windows only).
i have read
correct the code works perfect in python. I need to but in Windows (bat, cmd) .All in then through a .bat - sending> .exe converter. which makes me an executable file. the copy then all * .nzb and all * {{*}} rar the download directory. (D: \ Download) into DESTDIR, and unpacks it.. without which one would have to intervene

ntropy
Posts: 15
Joined: 26 Apr 2013, 19:12

Re: [Scan-Script] pfftn (formerly pass-from-file-to-nzbget.p

Post by ntropy » 21 May 2015, 16:10

Does this script scan non-.nzb filename extensions? My NzbDir is a Bittorrent Sync folder and when files are syncing from one computer to another, then have the file extension .bts and I think these incomplete downloads/syncs are being prematurely scanned and I don't know if it is Nzbget that is doing this or the PFFTN_2X extension. Is there a way to tell the scan incoming directory process to ignore anything that isn't .nzb?

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Scan-Script] pfftn (formerly pass-from-file-to-nzbget.p

Post by hugbug » 21 May 2015, 19:00

All files are scanned and passed to scan-scripts. After processing by scan-scripts NZBGet enqueues nzb-files; files with other extensions are renamed by adding extension ".processed". Successfully scanned nzb-fiels become extensions ".queued". Nzb-files which failed to parse become extension ".error". Files with extensions ".processed", ".queued" or ".error" are never scanned.

ntropy
Posts: 15
Joined: 26 Apr 2013, 19:12

Re: [Scan-Script] pfftn (formerly pass-from-file-to-nzbget.p

Post by ntropy » 21 May 2015, 23:31

hugbug wrote:All files are scanned and passed to scan-scripts. After processing by scan-scripts NZBGet enqueues nzb-files; files with other extensions are renamed by adding extension ".processed". Successfully scanned nzb-fiels become extensions ".queued". Nzb-files which failed to parse become extension ".error". Files with extensions ".processed", ".queued" or ".error" are never scanned.
Is there a way to set Nzbget so that only .nzb files are passed to scan-scripts? These .bts files are placeholders and there doesn't seem to be a way to disable their creation in Bittorrent Sync:

http://help.getsync.com/customer/portal ... es/1908818

Code: Select all

Thu May 21 18:55:37 2015	INFO	Executing scan-script pfftn_2x.py for D1 apbrr 00065.nzb.bts
Thu May 21 18:55:37 2015	INFO	pfftn_2x: nzbget.conf(56): Invalid value for option "UnpackPassFile": /share/Download/nzbget/nzb/passwords.txt. File not found
Thu May 21 19:00:48 2015	INFO	Executing scan-script pfftn_2x.py for D1 apbrr 00065.nzb
Thu May 21 19:00:48 2015	INFO	pfftn_2x: nzbget.conf(56): Invalid value for option "UnpackPassFile": /share/Download/nzbget/nzb/passwords.txt. File not found
Thu May 21 19:00:51 2015	INFO	Adding collection D1 apbrr 00065.nzb to queue
Thu May 21 19:00:51 2015	ERROR	Error parsing nzb-file D1 apbrr 00065.nzb
Thu May 21 19:00:51 2015	ERROR	Could not add collection D1 apbrr 00065.nzb to queue
Thu May 21 19:10:55 2015	ERROR	Error parsing nzb-file: Document is empty
Thu May 21 19:10:55 2015	ERROR	Error parsing nzb-file: Start tag expected, '<' not found

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Scan-Script] pfftn (formerly pass-from-file-to-nzbget.p

Post by hugbug » 22 May 2015, 05:06

It's a purpose of scan-scripts to handle various file extensions, for example rar or zip archives. Therefore all files must be processed. However from your log it doesn't look like bts files causing problems, they are not added anyway. The problem is the nzb file is empty, probably not yet transferred. Try increasing NzbDirAge option.

HenryCo
Posts: 21
Joined: 23 Nov 2015, 13:16

Re: [Scan-Script] pfftn (formerly pass-from-file-to-nzbget.p

Post by HenryCo » 23 Nov 2015, 14:17

wusa wrote:What is this?
This script is filling the Unpack-password from the filename and removes it from NZB Name: file*{{password}}*.nzb

Installation, usage:
x. pfftn_2x, pfftn_3x tested with: nzbget v13, Python v2.7.4, v3.4.1 @ Win8 x64 and Python 2.6.2 @ NSA325 (Linux 2.6.31.8)
1. safe file to ScriptDir and set chown/chmod (for linux only)
2. adjust first line for your OS! (ex. WIN: #!c:/python/python.exe --- LINUX/NAS: #!/usr/local/zy-pkgs/bin/python2.6 or #!/usr/bin/env python)
3. start/restart nzbget (PFFTN_2X or/and PFFTN_3X should appear on left side in settings page of nzbget)
4. nzbget settings -> EXTENSION SCRIPTS -> ScanScript -> Choose (Python v3: pfftn_3x.py / Python v2: pfftn_2x.py)
Hello guys.

I need some help :/

I own a new Zyxel NAS540 with FW V5.04(AATB.0).
I not install ffp yet, because I dont need at the moment. under putty python -V give me "Python 2.7.6".

I see this Scan-Script here and I really need it. Sound so great!

The problem I can not get it to run!
My NZBGet ist the default package from Zyxel: 14.1zypkg003
In the settings in Web-Service the path for ScriptDir is: /i-data/a8f545e5/.PKG/NZBGet/bin/scripts

So I copy with putty pfftn_2x.py to /i-data/a8f545e5/.PKG/NZBGet/bin/scripts
Then I open it with vi and change the first line (#!/usr/local/zy-pkgs/bin/python2.6) to the following:

Code: Select all

#!/usr/bin/python
#!/usr/bin/env python
#!/usr/lib/python2.7
None of them work. Can somebody tell me What I do wrong?
I reload and also shutdown NZGget. Everytime I change this line. Also play with "chmod a+x" & "chmod 0777", without success.

Would be thanfull about some hints.

Greetings by HenryCo

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [Scan-Script] pfftn (formerly pass-from-file-to-nzbget.p

Post by hugbug » 23 Nov 2015, 21:17

Have you selected the script in option ScanScript?

HenryCo
Posts: 21
Joined: 23 Nov 2015, 13:16

Re: [Scan-Script] pfftn (formerly pass-from-file-to-nzbget.p

Post by HenryCo » 24 Nov 2015, 08:00

hugbug wrote:Have you selected the script in option ScanScript?
Of course I read the how-to from the first post.

But there is nothing in the left-side neither something to choose in ScanScript Window :-(

In the LOG-Area are no messages from not loaded or loaded scripts. Should they are there?

Any more ideas?

Greetings by HenryCo

Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests