sab docker in unraid - bash script not running
-
- Newbie
- Posts: 17
- Joined: June 6th, 2016, 1:09 am
Re: sab docker in unraid - bash script not running
It printed the path. Now it just bugs the heck out of me as to why bash doesn't print the variable or even work at all. I'm going to run a couple test on your script and get it implemented. I'm sure it'll work without a hitch. Thank you very much for your help!!
-
- Newbie
- Posts: 17
- Joined: June 6th, 2016, 1:09 am
Re: sab docker in unraid - bash script not running
It looks like my array is too large:
IndexError: list index out of range
I'll cut it down and see if it works and then deal with that.
Edit: nvm, I was trying to run it with arg[1] in a local directory. duh....
IndexError: list index out of range
I'll cut it down and see if it works and then deal with that.
Edit: nvm, I was trying to run it with arg[1] in a local directory. duh....
-
- Newbie
- Posts: 17
- Joined: June 6th, 2016, 1:09 am
Re: sab docker in unraid - bash script not running
It worked with just the print, so now I'll try the full implementation of it.
-
- Newbie
- Posts: 17
- Joined: June 6th, 2016, 1:09 am
Re: sab docker in unraid - bash script not running
It worked like a charm Thanks again!!
Next up will be to tackle the obfuscated names. The folders seem to always get named appropriately, however the file doesn't always seem to get the naming.
Next up will be to tackle the obfuscated names. The folders seem to always get named appropriately, however the file doesn't always seem to get the naming.
bash script not running - python is the solution
Cool. If you post the script here in a CODE block, others can use it.live4soccer7 wrote:It worked like a charm Thanks again!!
-
- Newbie
- Posts: 17
- Joined: June 6th, 2016, 1:09 am
Re: sab docker in unraid - bash script not running
Of course! Here it is. Make sure to make the file executable. I did chmod 777 on it. I think you can also use chmod +x. Also, give the filename an extension of .py
This will remove all file extensions in the listnotwanted variable. Add or remove as you please. It is good for movies and tv shows, but can be tailored for any download category easily.
Code: Select all
#!/usr/bin/python
import os
import sys
listnotwanted = ['.nfo', '.sfv', '.nzb', '.srr', '.info', '.idx', '.txt', '.com', '.db', '.md5', '.par2', '.png', '.1', '.jpg', '.jpeg', '.url', '.lnk', '.html', '.ini', '.bat', '.com', '.exe', '.scr', '.sample', '.tbn', '.xml', '.dmg'] # in lower case
startdir = sys.argv[1]
for root, dirs, files in os.walk(startdir):
path = root.split('/')
for file in files:
fullpath = '/'.join(path) + '/' + file
for notwant in listnotwanted:
if fullpath.lower().endswith(notwant):
print "go away:", fullpath
os.remove(fullpath)
-
- Newbie
- Posts: 17
- Joined: June 6th, 2016, 1:09 am
Re: sab docker in unraid - bash script not running
Any input on dealing with obfuscated filenames? It seems like sab may get them sometimes and sometimes not. I did see the "Hunter" script, but that appears to be for Windows only folk.
Re: sab docker in unraid - bash script not running
check-out:live4soccer7 wrote:Any input on dealing with obfuscated filenames? It seems like sab may get them sometimes and sometimes not. I did see the "Hunter" script, but that appears to be for Windows only folk.
https://forums.sabnzbd.org/viewtopic.ph ... me#p106159
https://forums.sabnzbd.org/viewtopic.ph ... 52#p105830
Post your question there, or in a separate thread.