546
edits
Epoximator (talk | contribs) |
Epoximator (talk | contribs) |
||
Line 167: | Line 167: | ||
=== Scripting === | === Scripting === | ||
For renaming and moving files WebAOM needs schemas. A schema is just a string with tags, where each tag corresponds to file/anime data. Ex: "%ann - %enr [%crc]". (See | For renaming and moving files WebAOM needs schemas. A schema is just a string with tags, where each tag corresponds to file/anime data. Ex: <tt>"%ann - %enr [%crc]"</tt>. (See [[WebAOM#Tags]]) The point with the rule system is that you can customize these schemas so different types of files can be renamed different ways, and moved to different locations. To build the schemas you have to write two simple scripts; one for renaming and one for moving. Example on rename schema: | ||
<pre> | <pre> | ||
Line 190: | Line 190: | ||
</pre> | </pre> | ||
Syntax for each line in a script: | '''Syntax for each line in a script:'''<br> | ||
<tt>[[ELSE] IF {test}/ELSE] DO ADD {part}/SET {part}/FAIL/FINISH [{last part}]/RETURN {complete schema}</tt> | |||
{|align="center" style="border: 1px solid #aaaaaa; border-collapse: collapse; background: #f9f9f9; font-size: smaller; width: 80%; text-align: center;" | |||
! style="border: 1px solid #aaaaaa; font-size: 120%; background: #f2f2f2;" | Element | |||
! style="border: 1px solid #aaaaaa; font-size: 120%; background: #f2f2f2;" | Meaning | |||
|- | |||
|ADD || += | |||
|- | |||
|SET || = (assign) | |||
|- | |||
|FAIL || return null | |||
|- | |||
|FINISH || return result (possible to add last part, not needed as last line) | |||
|- | |||
|RETURN || return complete schema (for exceptions) | |||
|- | |||
|, || or | |||
|- | |||
|; || and | |||
|- | |||
|! || not | |||
|- | |||
|- || to (range) | |||
|} | |||
'''Possible tests:''' | |||
{|align="center" style="border: 1px solid #aaaaaa; border-collapse: collapse; background: #f9f9f9; font-size: smaller; width: 80%; text-align: center;" | |||
! style="border: 1px solid #aaaaaa; font-size: 120%; background: #f2f2f2;" | Code | |||
! style="border: 1px solid #aaaaaa; font-size: 120%; background: #f2f2f2;" | Type | |||
! style="border: 1px solid #aaaaaa; font-size: 120%; background: #f2f2f2;" | Meaning | |||
|- | |||
|A | |||
|name/id | |||
|Anime id or name; romaji, kanji and english, but not synonyms and short names | |||
|- | |||
|G | |||
|name/id | |||
|Group id, name, short name or 'unknown' | |||
|- | |||
|E | |||
|text | |||
|Episode number | |||
|- | |||
|Q | |||
|text | |||
|Quality [unknown, very high, high, med, low, very low, corrupted, eyecancer] | |||
|- | |||
|R | |||
|text | |||
|Rip source [unknown, camcorder, TV, DTV, VHS, VCD, SVCD, LD, DVD, HKDVD, www] | |||
|- | |||
|T | |||
|text | |||
|Type [unknown, TV, OVA, Movie, Other, web] | |||
|- | |||
|Y | |||
|number | |||
|Year | |||
|- | |||
|D | |||
|text | |||
|Dub language (one of the audio tracks) [japanese, english, ...] | |||
|- | |||
|S | |||
|text | |||
|Sub language (one of the subtitle tracks) [japanese, english, ...] | |||
|- | |||
|P | |||
|text | |||
|File path ([http://www.regular-expressions.info/reference.html regexp]) | |||
|- | |||
|N | |||
|text | |||
|[http://anidb.info/perl-bin/animedb.pl?show=genren Category] (one of) | |||
|- | |||
|I | |||
|text | |||
|Tag is defined [%eng, %kan, %rom, ...] | |||
|- | |||
|C | |||
|text | |||
|Codec (one of the audio/video tracks) [H264, XviD, MP3 CBR, ...] | |||
|} | |||
=== Tags === | === Tags === |
edits