WebAOM: Difference between revisions

586 bytes added ,  27 July 2006
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 tag chart below.) 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:
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>
* [[ELSE] IF {test}/ELSE] DO ADD {part}/SET {part}/FAIL/FINISH [{last part}]/RETURN {complete schema}
:* '''ADD''' means +=
:* '''SET''' means =
:* '''FAIL''' means return null;
:* '''FINISH''' means return result; Also possible to add last part. (Not needed as last line.)
:* '''RETURN''' means return complete schema (for exceptions).
:* '''DO''' is always required.


'''Possible tests'''
<tt>[[ELSE] IF {test}/ELSE] DO ADD {part}/SET {part}/FAIL/FINISH [{last part}]/RETURN {complete schema}</tt>
* '''A''' = Anime (text/number) [*/#] Anime Name/Title (Romaji/Kanji/English) or aid. (Synonyms and short names is NOT supported.)
 
* '''G''' = Group (text/number) [unknown, */#] Short name or gid.
 
* '''Q''' = Quality (text) [unknown, very high, high, med, low, very low, corrupted, eyecancer]
{|align="center" style="border: 1px solid #aaaaaa; border-collapse: collapse; background: #f9f9f9; font-size: smaller; width: 80%; text-align: center;"
* '''R''' = Rip source (text) [unknown, camcorder, TV, DTV, VHS, VCD, SVCD, LD, DVD, HKDVD, www]
! style="border: 1px solid #aaaaaa; font-size: 120%; background: #f2f2f2;" | Element
* '''T''' = Type (text) [unknown, TV, OVA, Movie, Other, web]
! style="border: 1px solid #aaaaaa; font-size: 120%; background: #f2f2f2;" | Meaning
* '''Y''' = Year (number) [#]
|-
* '''D''' = Dub language (text) (means 'one of' if multiple dubs/subs)
|ADD || +=
* '''S''' = Sub language (text)
|-
* '''P''' = file Path ([http://www.regular-expressions.info/reference.html regexp]).
|SET ||  = (assign)
* '''N''' = geNre (text, one of).
|-
* '''I''' = tag Is defined (text). (IF I(%eng) DO ADD %eng)
|FAIL || return null
* '''C''' = Codec (text) (checks all codecs, audio/video, all streams)
|-
* '''E''' = Episode number (text)
|FINISH || return result (possible to add last part, not needed as last line)
There is no support for wildcards, but lists (A,B,C,D), for strings and numbers, and ranges (0-1999,2001-3000), on numbers, is supported. ',' means OR. '!' means NOT. ';' means AND.
|-
|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 ===
546

edits

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