Hi Folks
I currently use the amc.groovy to automate the renaming and moving of Movies and TV Shows.
Is there a way to edit this so that it just moves *.epub, *.pdf to a particular folder when it has downloaded?
I am using Ubuntu Linux with Transmission and the latest FileBot.
Thanks.
Paully
Groovy for Books and Comics
Re: Groovy for Books and Comics
You can try enabling --def unsorted=y and see if you like it.
The unsorted format can't be modified currently without editing the script, but that'd be an easy fix.
The unsorted format can't be modified currently without editing the script, but that'd be an easy fix.
-
- Posts: 101
- Joined: 09 Mar 2014, 19:15
Re: Groovy for Books and Comics
Hi Rednoah
Thanks for that.
Sorry, bit of a newbie, how do I integrate that with my current script and tell it to put certain files in certain places?
e.g.
*.epub --> ~/Downloads/Books
*.pdf --> ~/Downloads/Magazines
*.cbr --> ~/Downloads/Comics
My current script which is run when Transmission completes a download is...
...which puts all the Movies and TV Shows in their folders in my ~/Videos directory.
Thanks for your expertise.

Paully
Thanks for that.
Sorry, bit of a newbie, how do I integrate that with my current script and tell it to put certain files in certain places?
e.g.
*.epub --> ~/Downloads/Books
*.pdf --> ~/Downloads/Magazines
*.cbr --> ~/Downloads/Comics
My current script which is run when Transmission completes a download is...
Code: Select all
/usr/bin/filebot -script "/home/paully/Bin/amc_paully.groovy" --output "/home/paully/Videos" --log-file "/home/paully/.filebot/logs/amc_paully.log" --action copy --conflict override -non-strict --def subtitles=en artwork=y clean=y xbmc=localhost "ut_dir=$TR_TORRENT_DIR/$TR_TORRENT_NAME" "ut_kind=multi" "ut_title=$TR_TORRENT_NAME"
Thanks for your expertise.

Paully
-
- Posts: 101
- Joined: 09 Mar 2014, 19:15
Re: Groovy for Books and Comics
...and the part of the groovy script which does the magic is...
Paully
Code: Select all
def format = [
tvs: tryQuietly{ seriesFormat } ?: '''TV/{n}/{n} {s00e00}''',
anime: tryQuietly{ animeFormat } ?: '''Anime/{n}/{n} - {sxe} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'").replacePart(', Part $1')}''',
mov: tryQuietly{ movieFormat } ?: '''Movies/{n} ({y})/{n} ({y}){" CD$pi"}{".$lang"}''',
music: tryQuietly{ musicFormat } ?: '''Music/{n}/{album+'/'}{pi.pad(2)+'. '}{artist} - {t}'''
]
-
- Posts: 101
- Joined: 09 Mar 2014, 19:15
Re: Groovy for Books and Comics
Having thought about it, I could just write a BASH script to do what I want at a specific time of the day... it would be nice if FileBot did it - like defining entries for 'books', 'comics' and 'magazines' then not doing any fancy renaming and just copy them to a specific folder... but I don't know enough about groovy to do it 
I guess this would work in the meantime...
What do you think?
Paully

I guess this would work in the meantime...
Code: Select all
find ~/Downloads/transmission -type f -name *.epub -exec cp {} ~/Downloads/Books/ \;
Paully
Re: Groovy for Books and Comics
Running your own scripts first to deal with those files is probably easiest.
Alternatively you can change the format that is used for unsorted files, which by default is just Unsorted/{fn}.{ext} but could easily be changed to some other logic of your choosing.
Alternatively you can change the format that is used for unsorted files, which by default is just Unsorted/{fn}.{ext} but could easily be changed to some other logic of your choosing.
-
- Posts: 101
- Joined: 09 Mar 2014, 19:15
Re: Groovy for Books and Comics
Thanks rednoah for your suggestions - my own script is working just fine 
