Page 1 of 1

[CLI] How to process generic non-media files?

Posted: 03 Aug 2018, 01:50
by Ccooluke
So I’ve tried a couple times to understand how the AMC script works. I really don’t get it unfortunately. All I want to use filebot for is to automate renaming cbr/cbz (comic) files.
So, I have a preset for DC comics that I download as a batch, I place them in one folder and run this preset:

Code: Select all

Y:/Comics/DC Comics/005 Rebirth/{n.before(' [0-9]')}/{fn.replaceAll(/\(.*\)/, '')}
So this sorts and renames at the same time. I just want to be able to automatically run this after the torrent is finished downloading, but I can’t figure out the script equivalent to the preset. Can someone please help or point me in the right direction? Thank you!

Re: Can I make a preset a script?

Posted: 03 Aug 2018, 07:28
by rednoah
1.
The amc script does not support cbr/cbz (comic) files, so most likely, files will either be ignored, or processed like any other generic file that can't be sorted, depending on your options.


2.
If you're using the GUI, then this thread will be helpful:
viewtopic.php?f=3&t=2072

If you're using the CLI, either manually calling commands, or having your torrent client call commands on download complete, then you can use filebot -rename --db xattr -non-strict like so:

Code: Select all

$ filebot -rename *.cbr --db xattr -non-strict --format "{fn.upper().space('_')}" --action TEST
Rename files using [Extended Attributes]
[TEST] from [Comic 1.cbr] to [COMIC_1.cbr]
Processed 1 files
--db xattr is use for offline processing of files using previously written xattr metdata. -non-strict enables processing of plain files even if they don't have any xattr metadata.

Re: [CLI] How to process generic non-media files?

Posted: 04 Aug 2018, 03:46
by Ccooluke
Thanks this really helps out a lot.