[Solved (sort of)] Working with an XML file
Posted: 24 Feb 2020, 16:37
Hello,
I want to change my FileBot workflow a bit to have FileBot automatically organize media files in appropriate folders.
However I have my TV Shows split up into different paths (/some/path/Shows; /some/other/path/Shows;)
So I made a map in the form of a csv file:
And this does work as expected using the following format:
however I'm also using a filter for those shows that causes detection issues:
This file is just a list of show names:
(As explained in this post --filter and fine-tuning)
So far everything works as expected, but, I just discovered that FileBot can also work with xml files. Which lead me to the idea of combining the filter and map files into a single xml file.
However, I don't know how exactly to work with xml files with FileBot...
Only example I was able to find was in this post and that is just a very simple example. (granted i might have missed a post here on the forum)
What I'm imagining is an xml file like this:
My current cli command for renaming looks like this:
So finally to my actual question:
Does anyone have an idea as to how I can achieve this?
And is this at all feasible?
I want to change my FileBot workflow a bit to have FileBot automatically organize media files in appropriate folders.
However I have my TV Shows split up into different paths (/some/path/Shows; /some/other/path/Shows;)
So I made a map in the form of a csv file:
Code: Select all
ShowName;some/path/Shows
AnotherShowName;some/other/path/Shows
...
Code: Select all
--format "{csv('path/to/map.csv').get(n) ?: 'New'}/{n.upperInitial().space('.')}.{S00E00}.{t.upperInitial().space('.')}"
Code: Select all
--filter "!readLines('path/to/Filebot_Excludes.txt').contains(n)"
Code: Select all
Watchmen (2017)
Watchmen: Motion Comic
Magnum, P.I.
Vekterne
Vekterne
So far everything works as expected, but, I just discovered that FileBot can also work with xml files. Which lead me to the idea of combining the filter and map files into a single xml file.
However, I don't know how exactly to work with xml files with FileBot...
Only example I was able to find was in this post and that is just a very simple example. (granted i might have missed a post here on the forum)
What I'm imagining is an xml file like this:
Code: Select all
<root>
<map>
<path>
<path>some/path/Shows</path>
<items>
<item>ShowName1</item>
<item>ShowName2</item>
<item>ShowName3</item>
</items>
</path>
<path>
<path>some/other/path/Shows</path>
<items>
<item>AnotherShowName1</item>
<item>AnotherShowName2</item>
<item>AnotherShowName3</item>
</items>
</path>
</map>
<blacklist>
<item>Watchmen (2017)</item>
<item>Watchmen: Motion Comic</item>
<item>Magnum, P.I.</item>
<item>Vekterne</item>
<item> Vekterne</item>
</blacklist>
</root>
Code: Select all
filebot -rename .\*.mkv --db TheTVDB -non-strict --filter "!readLines(path/to/Filebot_Excludes.txt').contains(n)" --log FINE --format "{csv('path/to/map.csv').get(n) ?: 'New'}/{n.upperInitial().space('.')}.{S00E00}.{t.upperInitial().space('.')}"
Does anyone have an idea as to how I can achieve this?
And is this at all feasible?