AniDB O'Matic - Documentation: Local file renaming: Difference between revisions

m
Added TOC
mNo edit summary
m (Added TOC)
Line 12: Line 12:
* "?if(wltw, 'To watch\', <nowiki>''</nowiki>)?a?if(isMovie, if(epps>1, ' - Part '+epp+if(v>1, 'v'+v, <nowiki>''</nowiki>), if(v>1, ' - v'+v, <nowiki>''</nowiki>)), ep+if(v>1, v, <nowiki>''</nowiki>)+'- ?e') ?if(lg<><nowiki>''</nowiki>, lg+' ', <nowiki>''</nowiki>){?crc32}" -> <br />For a movie: "Anime name - v2 [Group name]{crc32}"<br />For a movie with 2 parts: "Anime name - Part 2v2 [Group name]{crc32}<br />For a normal anime, marked as "to watch in wishlist": "To watch\Anime name - 02v2 - Episode name [Group name]{crc32}
* "?if(wltw, 'To watch\', <nowiki>''</nowiki>)?a?if(isMovie, if(epps>1, ' - Part '+epp+if(v>1, 'v'+v, <nowiki>''</nowiki>), if(v>1, ' - v'+v, <nowiki>''</nowiki>)), ep+if(v>1, v, <nowiki>''</nowiki>)+'- ?e') ?if(lg<><nowiki>''</nowiki>, lg+' ', <nowiki>''</nowiki>){?crc32}" -> <br />For a movie: "Anime name - v2 [Group name]{crc32}"<br />For a movie with 2 parts: "Anime name - Part 2v2 [Group name]{crc32}<br />For a normal anime, marked as "to watch in wishlist": "To watch\Anime name - 02v2 - Episode name [Group name]{crc32}


'''Default pattern'''<br />
===Default pattern===
Split into multiple lines for easier viewing. ;)<br />
Split into multiple lines for easier viewing. ;)<br />
<code><pre>?set('V', if(v>1, 'v'+v, ''))
<code><pre>?set('V', if(v>1, 'v'+v, ''))
Line 29: Line 29:
?out(A+if(length(E)>0, ' - '+E)+TAIL)</pre></code>
?out(A+if(length(E)>0, ' - '+E)+TAIL)</pre></code>


'''Constant expressions'''<br />
===Constant expressions===
There are two ways to specify string literals:<br />
There are two ways to specify string literals:<br />
'text' - use '' to insert a ' (e.g. 'her''s')<br />
'text' - use '' to insert a ' (e.g. 'her''s')<br />
Line 42: Line 42:
false<br />
false<br />


'''Custom tags'''<br />
===Custom tags===
AOM still supports custom tags to simplify rules. Custom tags are simply new tags that contains a text or collection of subtags.
AOM still supports custom tags to simplify rules. Custom tags are simply new tags that contains a text or collection of subtags.


Line 52: Line 52:
Note that custom tags are essentially translated to ?set commands. Aka, "[?lg]" -> "?G" iq equivalent to adding "?set('G', '['+lg+']')" in front of a pattern.
Note that custom tags are essentially translated to ?set commands. Aka, "[?lg]" -> "?G" iq equivalent to adding "?set('G', '['+lg+']')" in front of a pattern.


'''Default tags'''<br />
===Default tags===
{|
{|
|?a||text||Anime name
|?a||text||Anime name
Line 150: Line 150:
Note that all tags are greedy, that means that ?ep2 will always be read as ep2, never as ?e or ?ep. If you need a tag to not be greedy you can use ?out(ep).
Note that all tags are greedy, that means that ?ep2 will always be read as ep2, never as ?e or ?ep. If you need a tag to not be greedy you can use ?out(ep).


'''Function tags'''<br />
===Function tags===
{|
{|
|?if(test, trueval, falseval)||any||If statement, returns trueval if test is true, otherwise returns falseval.<br /> Example: ?if(a=b, 'equal', 'not equal')
|?if(test, trueval, falseval)||any||If statement, returns trueval if test is true, otherwise returns falseval.<br /> Example: ?if(a=b, 'equal', 'not equal')
Line 183: Line 183:
|}
|}


'''Arithmetic operators'''<br />
===Arithmetic operators===
{|
{|
|A+B || returns A plus B
|A+B || returns A plus B
Line 194: Line 194:
|}
|}


'''Comparison operators'''<br />
===Comparison operators===
{|
{|
|A=B||true if A equals B
|A=B||true if A equals B
Line 224: Line 224:
File managers are used to automatically manage file renaming / removing and adding / updating files in your MyList.
File managers are used to automatically manage file renaming / removing and adding / updating files in your MyList.


'''Source paths'''<br />
===Source paths===
Each file manager can have multiple source folders. File managers can be set to search these folders recursively or only the folder itself for files.
Each file manager can have multiple source folders. File managers can be set to search these folders recursively or only the folder itself for files.
While it's possible adding a source path to multiple file managers is strongly discouraged.
While it's possible adding a source path to multiple file managers is strongly discouraged.


'''Rename pattern'''<br />
===Rename pattern===
Each file manager can have 1 renaming pattern. To use multiple patterns you need to specify multiple patterns. The rename pattern can contain a part of a path or a full path to indicate where the file should be stored. The path part of a rename might be ignored under certain circumstances however, see below.
Each file manager can have 1 renaming pattern. To use multiple patterns you need to specify multiple patterns. The rename pattern can contain a part of a path or a full path to indicate where the file should be stored. The path part of a rename might be ignored under certain circumstances however, see below.


'''Target paths'''<br />
===Target paths===
A file manager can have one or more target paths for moving files. If no target path is specified the folder the file was found in will be used instead. If there are multiple target paths the file manager will try to figure out where the file has the most related files. This is determined by a) the anime the file belongs to and b) the anime group the file belongs to. If there's not enough space available on the target drive it'll check the next preferred target if there's enough space and so on. If no space is available in any target path the file will be renamed in it's current location, but with any path part of the file removed, aka the filename part of the rename pattern will be used but the file will remain in the folder it was found in.
A file manager can have one or more target paths for moving files. If no target path is specified the folder the file was found in will be used instead. If there are multiple target paths the file manager will try to figure out where the file has the most related files. This is determined by a) the anime the file belongs to and b) the anime group the file belongs to. If there's not enough space available on the target drive it'll check the next preferred target if there's enough space and so on. If no space is available in any target path the file will be renamed in it's current location, but with any path part of the file removed, aka the filename part of the rename pattern will be used but the file will remain in the folder it was found in.


'''Only move known files'''<br />
===Only move known files===
This will make the file manager ignore files which are not in AniDB, they'll be visible on the known files page, but they will never be moved or renamed.
This will make the file manager ignore files which are not in AniDB, they'll be visible on the known files page, but they will never be moved or renamed.


'''Automatically remove deleted files'''<br />
===Automatically remove deleted files===
This will make the file manager remove files it can't find any more from the known files page. This rule ignores files stored on removable media.
This will make the file manager remove files it can't find any more from the known files page. This rule ignores files stored on removable media.


'''Don't remove files if the volume can't be found'''<br />
===Don't remove files if the volume can't be found===
This will prevent the file manager from removing files it can't find when the whole volume is gone, this rule would for example prevent your known files from being cleared if your network cable is unplugged or a HDD is disconnected.
This will prevent the file manager from removing files it can't find when the whole volume is gone, this rule would for example prevent your known files from being cleared if your network cable is unplugged or a HDD is disconnected.


'''Add new files to AniDB'''<br />
===Add new files to AniDB===
This will make the file manager automatically add found files to your MyList.
This will make the file manager automatically add found files to your MyList.


'''Automatically update the storage field of MyList entries'''<br />
===Automatically update the storage field of MyList entries===
This will make the file manager automatically update the storage field of MyList entries based on the volume it's stored on. This field currently only works for files on a removable storage such as a DVD. The label used will be the label of the removable media, eg. DVD #013.
This will make the file manager automatically update the storage field of MyList entries based on the volume it's stored on. This field currently only works for files on a removable storage such as a DVD. The label used will be the label of the removable media, eg. DVD #013.


'''Automatically mark found files as OnHDD or OnRemovable in MyList'''<br />
===Automatically mark found files as OnHDD or OnRemovable in MyList===
This will make the file manager update your MyList to OnHDD if the file was found on a HDD or Network drive, or OnRemovable if the file is on a CD/DVD.
This will make the file manager update your MyList to OnHDD if the file was found on a HDD or Network drive, or OnRemovable if the file is on a CD/DVD.


'''Automatically mark removed files as Deleted in MyList'''<br />
===Automatically mark removed files as Deleted in MyList===
This will make the file manager update your MyList to indicate the file has been deleted if removed by the above rule.
This will make the file manager update your MyList to indicate the file has been deleted if removed by the above rule.
1,633

edits

MediaWiki spam blocked by CleanTalk.
MediaWiki spam blocked by CleanTalk.