Call a file's contents (i.e. How do I read a file in Groovy?)
Call a file's contents (i.e. How do I read a file in Groovy?)
I have a file named Episodes name in text format .
The replace param may be used .
Do i assign a variable to each of the titles?
How to read the file and use the n.replace to use replace what filebot read to whats in the file
Ie:
N.replace ("The Bullwinkle show", this is from the file ) .
Jtm
The replace param may be used .
Do i assign a variable to each of the titles?
How to read the file and use the n.replace to use replace what filebot read to whats in the file
Ie:
N.replace ("The Bullwinkle show", this is from the file ) .
Jtm
Re: Call a file's contents
e.g.
https://docs.groovy-lang.org/latest/htm ... #getText()
[Plain File Mode] Batch Rename any type of file might be start. The Rename files based on sibling XML files examples seems to be somewhat similar to your use case, though not exactly the same.
[SNIPPET] Use Custom Series Names / Force Series Name / Hardcode Series Name might be useful as well since it covers reading a map (e.g. for replacement) from an external *.tsv file.
Groovy: Select all
File.getText()



Re: Call a file's contents (i.e. How do I read a file in Groovy?)
I use TVDB and l am trying to truncate a file name from <The Bulllwinkle show - peabody's improbable history -alexander graham bell to alexander graham bell . Is there a parameter called truncate? Ie n.truncate?
Re: Call a file's contents (i.e. How do I read a file in Groovy?)
e.g.
Format: Select all
{
"The Bulllwinkle show - peabody's improbable history -alexander graham bell".after(/-\b/)
}
Code: Select all
alexander graham bell
Re: Call a file's contents (i.e. How do I read a file in Groovy?)
If i use this line n-s00e00-t, how do Use the .after parameter if i dont know the string after the peabodys improbable history?
In the GUI. Thank you for all your help.
In the GUI. Thank you for all your help.
Re: Call a file's contents (i.e. How do I read a file in Groovy?)
Then the task at hand is impossible. However, presumably, you somehow know which bits and pieces you want to select & copy over, so you could start by analyzing your own thought process, and analyze what exactly allows you to know what you want and what you don't want, and then express that in code. This may or may not be feasible.
Re: Call a file's contents (i.e. How do I read a file in Groovy?)
Here is the code
n="The Bullwinkle Show "
t="fractured Fairy Tales-Repunzal"
Now I would to have it read :
Fractured Fairy Tales s01e01 Repunzal
And work for a series of files !
each shows fractured fairy tales -s01e01 -Roudolph
"" -s01e2 -Sammy
etc.,
John
Code: Select all
{n}-s00e00-{t}
n="The Bullwinkle Show "
t="fractured Fairy Tales-Repunzal"
Now I would to have it read :
Fractured Fairy Tales s01e01 Repunzal
And work for a series of files !
each shows fractured fairy tales -s01e01 -Roudolph
"" -s01e2 -Sammy
etc.,
John
Re: Call a file's contents (i.e. How do I read a file in Groovy?)
e.g.

Note that this episode is S01E02 so if you want to invent your own Series / Episode numbering by "first part of episode title" than that will likely require coding skills (i.e. custom code that groups and counts episodes via the {episodelist} or {model} bindings) that far surpass your capabilities, so unfortunately out of luck for the "make it s01e01 and so on" part:
EDIT:
viewtopic.php?t=13812
Format: Select all
{ t.before('-') } | { t.after('-') }


Code: Select all
The Bullwinkle Show - 1x02 - Fractured Fairy Tales - Rapunzel
The Bullwinkle Show - 1x07 - Fractured Fairy Tales - Puss and Boots (aka Puss in Boots)
The Bullwinkle Show - 1x12 - Fractured Fairy Tales - The Enchanted Fish
...
EDIT:

Re: Call a file's contents (i.e. How do I read a file in Groovy?)
thank you rednoah!