Page 1 of 2
Mac OS Workflow to rename
Posted: 24 Mar 2020, 18:45
by MeddlBosdler
Hello
i want to get the workflow work, which is in the new 4.9 version of FileBot to rename.
i installed the script
Code: Select all
/usr/local/bin/filebot -rename -r "$@" --format "{plex.name}" -non-strict --log-file context-menu.log
but there must be an error in "" it says.
I think it's the plex.name
how can i fix this problem?
Do i have to change it to {n} - {s00e00} - {t} for series?
{n.colon(' - ')} ({y}) for movie
{pi.pad(2)} - {t} - {n} for music
but when i change this and it's a movie or a Music-Title, does it work too, or can i enter something else to get this itself.
i was thinking about something like that for long time and saw it today. i want to integrate this workflow in a keyboard maestro macro, to rename automatically when a movie file gets in a File ( with Hazel ) to automated rename it, and then gets exported again with Hazel in the right place.
this is what i wanted to do, but i am absolutely new with this script thing, and also have keyboard maestro for a few days now.
can you please help me? i read the hole day through forums and google search to find the right way, but i didn't.
i read that in keyboard maestro you can tell the inbox and outbox for renaming.
Re: Mac OS Workflow to rename
Posted: 24 Mar 2020, 19:00
by rednoah
Your command looks good to me on first glance. What's the problem?
Is your script called?
What does the log say?
Please read
Shell Script Debugging for Beginners.
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 05:34
by MeddlBosdler
i read this
but also this doesn't work.
i always get the error
Code: Select all
„-: /path/to/log.txt: No such file or directory“
filebot script is called
says
Bei der Aktion „Shell-Skript ausführen“ ist ein Fehler aufgetreten: „“
at the action "execute shell-script" is an error: ""
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 06:35
by rednoah
Are you using Automator? Not Console? Please post screenshots so we're on the same page.
Here's a few
Automator Workflow examples for your reference:
viewtopic.php?t=3908
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 07:04
by MeddlBosdler
yes automator
he searches but then there's an error
http://gofile.me/4WzsD/dexjWgnnQ
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 10:36
by rednoah
Have you tried following the instructions for one of the reference examples yet?
rednoah wrote: ↑29 Jun 2016, 11:17
- Make sure that the filebot console tools are installed and working:
- Start Automator, click New Document and select Folder Action to create a new workflow
- Click the Choose folder combobox and select the folder you want to watch
- Drag a Run Shell Script (Utilities) action into your workflow
- Set the Pass input combobox to as arguments
- Paste following filebot command into your shell script workflow:
Code: Select all
/usr/local/bin/filebot -script fn:amc --output "$HOME/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=".excludes" unsorted=y music=y artwork=y "$@"
- Save your new workflow and close Automator
- Done! Newly added files will be processed fully automatically!
viewtopic.php?f=4&t=3908
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 15:00
by MeddlBosdler
yes i have
i did it this way, and i changed the "$HOME/Media" with the Folderadress where it lies and where it should be renamed
both the same result as i sended as screenshot
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 16:13
by rednoah
The screenshot shows that you did not do this:
rednoah wrote: ↑29 Jun 2016, 11:17
Set the Pass input combobox to as arguments
I recommend following the examples verbatim, the first time around, create a folder action, process files into
$HOME, etc. First we get the example working. Once we have the example working, then and only then can we start customizing things for our own specific use case. You'll get an easy success right way, and you'll know where the error lies when you start customizing things step by step and it stops working after some specific step.
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 16:28
by MeddlBosdler
i did this too
made the screenshot after i tried it otherwise
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 16:36
by MeddlBosdler
do i have to create a folder $Home/media?
if yes, where?
$Home will be my ssd ( christians mac mini ) right?
then i make a folder media there?
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 16:39
by rednoah
Let's try it another way around:
1. Open FileBot GUI application
2. Menu ➔ Help ➔ Quick Actions ➔ Import Media Files with FileBot ➔ Install ➔ Install
3. Find a Media File ➔ Context Menu ➔ Quick Actions ➔ Import Media Files with FileBot
We have now created an Automator / Quick Action that calls the
amc script and generally works, and so we can now use this as a reference to make similar things work.
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 16:42
by MeddlBosdler
this i tried too
this works
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 16:44
by rednoah
Well, I'll leave the rest to you then. It's just a matter of systematically figuring out what's different.
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 16:51
by MeddlBosdler
it's completely different to me
in one filebot gets opened and the media file too
in the other, it is all in the background and automated, even the "start" of the the program is different
i can't figure it out that easy
this is like apples
Code: Select all
open -a FileBot "$@" --args --mode Rename
this like bananas
Code: Select all
/usr/local/bin/filebot -script fn:amc --output "$HOME/Media" --action duplicate --conflict skip -non-strict --log-file amc.log --def excludeList=".excludes" unsorted=y music=y artwork=y "$@"
i can see the differences but don't know what to do
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 16:56
by rednoah
I wrote
Import Media Files with FileBot (Bananas) and not
Send to FileBot (Apples).
The
Import Media Files with FileBot workflow uses the following Bananas-type
Run Shell Script action:
Code: Select all
# Configuration
CONFIG_OUTPUT="$HOME/Media"
# Log Files
CONFIG_LOG="$CONFIG_OUTPUT/.log/amc.log"
CONFIG_EXCLUDES="$CONFIG_OUTPUT/.log/amc.excludes"
# Execute FileBot
/usr/local/bin/filebot -script fn:amc "$@" --output "$CONFIG_OUTPUT" --action duplicate --conflict index -non-strict --log-file "$CONFIG_LOG" --def excludeList="$CONFIG_EXCLUDES" unsorted=y music=y artwork=y -exec open -R {f} +
# Display log file on error
if [ $? -ne 0 ]; then
open "$CONFIG_LOG"
fi
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 18:09
by MeddlBosdler
ok
looked at this too
get a popup window with information, but says my license is valid, i should purchase
but i have purchased it
is it enough to replace
action duplicate
to action rename
i don't see it
haven't done something like this before
if it's a lot more to change i have to quit. i just don't see it
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 18:30
by rednoah
I'd just stick to the GUI. It's easy enough. You can always use Presets to streamline things a little bit.
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 18:56
by MeddlBosdler
thank you for trying to help me
i don't get it, i'm too dumb for this
i do it without automation
Re: Mac OS Workflow to rename
Posted: 25 Mar 2020, 20:23
by MeddlBosdler
tried a new shot
# Configuration
CONFIG_OUTPUT="$HOME/Media"
# Log Files
CONFIG_LOG="$CONFIG_OUTPUT/.log/amc.log"
CONFIG_EXCLUDES="$CONFIG_OUTPUT/.log/amc.excludes"
# Execute FileBot
/usr/local/bin/filebot -script fn:amc "$@" --output "$CONFIG_OUTPUT" --action rename -r "$@" --format "{n} - {s00e00} - {t}" --conflict index -non-strict --log-file "$CONFIG_LOG" --def excludeList="$CONFIG_EXCLUDES" unsorted=y music=y artwork=y -exec open -R {f} +
# Display log file on error
if [ $? -ne 0 ]; then
open "$CONFIG_LOG"
fi
can't tell if it's good, says it's unregistered, but it is
we'll see after restart tomorrow
am i on the right way?
but the format is now for a series
is there a preference where it knows what kind of "show" it is?
Re: Mac OS Workflow to rename
Posted: 26 Mar 2020, 00:49
by rednoah
You can't use --format if you're using the amc script. Unless your format accounts for both movies and episodes. Please read the AMC script manual for details on how to use custom formats there.
You'll need to install your license. You can do that via GUI or command-line.
What kind of "shows" are there? What kind are you dealing with?
The modifications you made to the amc script call probably will make it not work. The log will know the details.
Re: Mac OS Workflow to rename
Posted: 26 Mar 2020, 05:38
by MeddlBosdler
i installed the license
even after a restart today, it says unregistered
but i did and the popup said it was successfully
but when i import a media file it says it isn't.
i have series, movies and music to rename
is it easier to install it on the ds218+ and get it run?
Re: Mac OS Workflow to rename
Posted: 26 Mar 2020, 06:05
by rednoah
MeddlBosdler wrote: ↑26 Mar 2020, 05:38
is it easier to install it on the ds218+ and get it run?
Perhaps. Perhaps not. Depends on your particular use case and skill set.
Less tech-savvy users typically prefer the FileBot Node WebUI when running
filebot commands remotely on Synology DSM, so that'll give you the general idea of how it'd work:
viewtopic.php?t=2663
Re: Mac OS Workflow to rename
Posted: 26 Mar 2020, 14:28
by MeddlBosdler
on my DS218+ it runs
last question
what do i have to do, that i get the folders and sorted them in
for e.g.
Media/Series/Season 1/renamed files
is there something to adjust on the filebot node ?
Re: Mac OS Workflow to rename
Posted: 26 Mar 2020, 14:44
by rednoah
Isn't that default? It's default because the
amc script uses
{plex} by default.
Re: Mac OS Workflow to rename
Posted: 26 Mar 2020, 15:23
by MeddlBosdler
should be here i think
http://gofile.me/4WzsD/J74YINXHK
at plex put in default?