Mac OS Workflow to rename

Support for macOS users and the Mac App Store package
MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Mac OS Workflow to rename

Post by MeddlBosdler » 24 Mar 2020, 18:45

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 "[email protected]" --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.

User avatar
rednoah
The Source
Posts: 18539
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Mac OS Workflow to rename

Post by rednoah » 24 Mar 2020, 19:00

Your command looks good to me on first glance. What's the problem?

:?: Is your script called?
:?: What does the log say?

:idea: Please read Shell Script Debugging for Beginners.
:idea: Please read the FAQ and How to Request Help.

MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Re: Mac OS Workflow to rename

Post by MeddlBosdler » 25 Mar 2020, 05:34

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: ""

User avatar
rednoah
The Source
Posts: 18539
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Mac OS Workflow to rename

Post by rednoah » 25 Mar 2020, 06:35

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
:idea: Please read the FAQ and How to Request Help.

MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Re: Mac OS Workflow to rename

Post by MeddlBosdler » 25 Mar 2020, 07:04

yes automator

he searches but then there's an error

http://gofile.me/4WzsD/dexjWgnnQ

User avatar
rednoah
The Source
Posts: 18539
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Mac OS Workflow to rename

Post by rednoah » 25 Mar 2020, 10:36

Have you tried following the instructions for one of the reference examples yet?
rednoah wrote:
29 Jun 2016, 11:17
  1. Make sure that the filebot console tools are installed and working:

    Code: Select all

    /usr/local/bin/filebot -version
  2. Start Automator, click New Document and select Folder Action to create a new workflow
  3. Click the Choose folder combobox and select the folder you want to watch
  4. Drag a Run Shell Script (Utilities) action into your workflow
  5. Set the Pass input combobox to as arguments
  6. 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 "[email protected]"
  7. Save your new workflow and close Automator
  8. Done! Newly added files will be processed fully automatically!
:arrow: viewtopic.php?f=4&t=3908
:idea: Please read the FAQ and How to Request Help.

MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Re: Mac OS Workflow to rename

Post by MeddlBosdler » 25 Mar 2020, 15:00

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

User avatar
rednoah
The Source
Posts: 18539
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Mac OS Workflow to rename

Post by rednoah » 25 Mar 2020, 16:13

The screenshot shows that you did not do this:
rednoah wrote:
29 Jun 2016, 11:17
Set the Pass input combobox to as arguments

:arrow: 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. ;)
:idea: Please read the FAQ and How to Request Help.

MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Re: Mac OS Workflow to rename

Post by MeddlBosdler » 25 Mar 2020, 16:28

i did this too
made the screenshot after i tried it otherwise

MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Re: Mac OS Workflow to rename

Post by MeddlBosdler » 25 Mar 2020, 16:36

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?

User avatar
rednoah
The Source
Posts: 18539
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Mac OS Workflow to rename

Post by rednoah » 25 Mar 2020, 16:39

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.
:idea: Please read the FAQ and How to Request Help.

MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Re: Mac OS Workflow to rename

Post by MeddlBosdler » 25 Mar 2020, 16:42

this i tried too
this works

User avatar
rednoah
The Source
Posts: 18539
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Mac OS Workflow to rename

Post by rednoah » 25 Mar 2020, 16:44

Well, I'll leave the rest to you then. It's just a matter of systematically figuring out what's different. ;)
:idea: Please read the FAQ and How to Request Help.

MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Re: Mac OS Workflow to rename

Post by MeddlBosdler » 25 Mar 2020, 16:51

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 "[email protected]" --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 "[email protected]"
i can see the differences but don't know what to do

User avatar
rednoah
The Source
Posts: 18539
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Mac OS Workflow to rename

Post by rednoah » 25 Mar 2020, 16:56

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 "[email protected]" --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
:idea: Please read the FAQ and How to Request Help.

MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Re: Mac OS Workflow to rename

Post by MeddlBosdler » 25 Mar 2020, 18:09

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

User avatar
rednoah
The Source
Posts: 18539
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Mac OS Workflow to rename

Post by rednoah » 25 Mar 2020, 18:30

I'd just stick to the GUI. It's easy enough. You can always use Presets to streamline things a little bit.
:idea: Please read the FAQ and How to Request Help.

MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Re: Mac OS Workflow to rename

Post by MeddlBosdler » 25 Mar 2020, 18:56

thank you for trying to help me
i don't get it, i'm too dumb for this

i do it without automation

MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Re: Mac OS Workflow to rename

Post by MeddlBosdler » 25 Mar 2020, 20:23

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 "[email protected]" --output "$CONFIG_OUTPUT" --action rename -r "[email protected]" --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?

User avatar
rednoah
The Source
Posts: 18539
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Mac OS Workflow to rename

Post by rednoah » 26 Mar 2020, 00:49

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.
:idea: Please read the FAQ and How to Request Help.

MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Re: Mac OS Workflow to rename

Post by MeddlBosdler » 26 Mar 2020, 05:38

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?

User avatar
rednoah
The Source
Posts: 18539
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Mac OS Workflow to rename

Post by rednoah » 26 Mar 2020, 06:05

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
:idea: Please read the FAQ and How to Request Help.

MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Re: Mac OS Workflow to rename

Post by MeddlBosdler » 26 Mar 2020, 14:28

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 ?

User avatar
rednoah
The Source
Posts: 18539
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Mac OS Workflow to rename

Post by rednoah » 26 Mar 2020, 14:44

Isn't that default? It's default because the amc script uses {plex} by default.
:idea: Please read the FAQ and How to Request Help.

MeddlBosdler
Posts: 16
Joined: 24 Mar 2020, 18:27

Re: Mac OS Workflow to rename

Post by MeddlBosdler » 26 Mar 2020, 15:23

should be here i think

http://gofile.me/4WzsD/J74YINXHK

at plex put in default?

Post Reply