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

m
→‎E / EPISODE: fandubs are normal eps with audio track type fandub
No edit summary
m (→‎E / EPISODE: fandubs are normal eps with audio track type fandub)
 
(186 intermediate revisions by 4 users not shown)
Line 7: Line 7:
File extensions are automatically added to the end of the pattern.
File extensions are automatically added to the end of the pattern.


Here's a few sample patterns:
==Sample patterns==
* "?a - ?ep - ?e [?g]" -> <br />"Anime - 02 - Episode name [Group name]"
'''English anime title with fallback'''
* "?a - ?epv?v - ?e?if(lg<><nowiki>''</nowiki>, ' ['+lg+']', <nowiki>''</nowiki>)" -> <br />With group: "Anime - 02v1 - Episode name [Group name]"<br />Without group:"Anime - 02v1 - Episode name"
<pre>
* "?if(wltw, 'To watch\', <nowiki>''</nowiki>)?a?if(isMovie, if(moviePartCount>1, ' - Part '+partno+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}
set('atitle', at('en'))
if(length(atitle)=0, set('atitle', at('x-jat')))
if(length(atitle)=0, set('atitle', at('ja')))
if(length(atitle)=0, set('atitle', A.Name))
</pre>
'''Japanese transcription anime title with fallback'''
<pre>
set('atitle', at('x-jat'))
if(length(atitle)=0, set('atitle', at('en')))
if(length(atitle)=0, set('atitle', A.Name))
</pre>
'''Japanese kanji anime title with fallback'''
<pre>
set('atitle', at('ja'))
if(length(atitle)=0, set('atitle', at('x-jat')))
if(length(atitle)=0, set('atitle', at('en')))
if(length(atitle)=0, set('atitle', A.Name))
</pre>
'''English episode title with fallback'''
<pre>set('etitle', et('en'))
if(length(etitle)=0, set('etitle', et('x-jat')))
if(length(etitle)=0, set('etitle', et('ja')))
if(length(etitle)=0, set('etitle', E.Name))
</pre>
'''Japanese transcription episode title with fallback'''
<pre>
set('etitle', et('x-jat'))
if(length(etitle)=0, set('etitle', et('en')))
if(length(etitle)=0, set('etitle', E.Name))
</pre>
'''Japanese kanji episode title with fallback'''
<pre>
set('etitle', et('ja'))
if(length(etitle)=0, set('etitle', et('x-jat')))
if(length(etitle)=0, set('etitle', et('en')))
if(length(etitle)=0, set('etitle', E.Name))
</pre>
'''File version and censor flag
<pre>
set('censored', 'unknown')
set('version', F.Version)
set('state_map', F.State mod 4096)
if(state_map>=2048, set('version', 9) + set('state_map', state_map - 2048))
if(state_map>=1024, if(version<9,set('version', 8)) + set('state_map', state_map - 1024))
if(state_map>=512, if(version<9,set('version', 7)) + set('state_map', state_map - 512))
if(state_map>=256, if(version<9,set('version', 6)) + set('state_map', state_map - 256))
if(state_map>=128, set('censored', 'yes') + set('state_map', state_map - 128))
if(state_map>=64, set('censored', 'no') + set('state_map', state_map - 64))
set('version', if(version>1, 'v'+F.Version, ''))
set('censored',if(censored='yes','[Censored]',''))
</pre>
'''Padded episode number'''
<pre>
set('mepno', if(E.TypeId=1, max(A.TotalEpisodeCount, E.EpisodeTypeCount), E.EpisodeTypeCount))
set('epno', padl(E.EpisodeNo, max(1, length(mepno)), '0'))
if(E.TypeId=2, set('epno', 'S'+epno))
if(E.TypeId=3, set('epno', 'C'+epno))
if(E.TypeId=4, set('epno', 'T'+epno))
if(E.TypeId=5, set('epno', 'P'+epno))
if(E.TypeId=6, set('epno', 'O'+epno))
</pre>
'''First letter for organizing by letter'''
<pre>
set('head', copy(atitle, 1, 1))
if(numeric(head), set('head', '0-9'))
</pre>
'''Group name'''
<pre>
set('groupname', if(G, if(length(G.Name)>0, G.Name, G.Shortname), 'no group'))
set('groupname', if(length(groupname)>0, '['+groupname+']'))
</pre>
'''Group short name'''
<pre>
set('groupname', if(G, if(length(G.Shortname)>0, G.Shortname, G.Name), 'no group'))
set('groupname', if(length(groupname)>0, '['+groupname+']'))
</pre>
'''CRC32'''
<pre>
set('crc', if(H, H.Crc32, F.Crc))
if(length(crc)>0, set('crc', '('+uc(crc)+')')
</pre>
'''Current filename (removing the path)'''
<pre>set('path_filename', PATH)
set('path_parts', 1)
for('i', 1, length(path_filename), if(copy(path_filename, i, 1) = '\', set('path_parts', path_parts+1)))
set('path_filename', split(path_filename, '\', path_parts))</pre>
===Complex samples===
See [[AniDB O'Matic - Documentation: Local file renaming - Samples | the article with samples]]


'''Custom tags'''<br />
==Default pattern==
AOM still supports custom tags to simplify rules. Custom tags works as follows:
* Specified like a normal tag but in all uppercase, for example "?G".
* If any subpart of the tag is empty, the whole tag is skipped, except:
* If the tag contains ?if statements, these are not checked if they're empty.


With this you could simplify the group rule, for example you could write it:
'''ATTENTION!''' The default pattern has a bug. See below for instructions to fix it.
* Using ?if: "?if(lg<><nowiki>''</nowiki>, '['+lg+']', <nowiki>''</nowiki>)" -> "?G"
<pre>set('atitle', at('x-jat'))
* Simplest form: "[?lg]" -> "?G"
if(length(atitle)=0, set('atitle', at('en')))
* More advanced example: "?if(lg<><nowiki>''</nowiki>, '['+lg']', if(sg<><nowiki>''</nowiki>, '['+sg']', '[RAW]'))" -> "?G"
if(length(atitle)=0, set('atitle', A.Name))
set('atitle', replace(atitle, '\', ' '))
set('etitle', et('en'))
if(length(etitle)=0, set('etitle', et('x-jat')))
if(length(etitle)=0, set('etitle', et('ja')))
if(length(etitle)=0, set('etitle', E.Name))
set('etitle', replace(etitle, '\', ' '))
set('version', if(F.Version&gt;1, 'v'+F.Version, ''))
set('mepno', max(A.TotalEpisodeCount, E.EpisodeTypeCount))
set('epno', padl(E.EpisodeNo, max(1, length(mepno)), '0') + version)
if(E.TypeId=2, set('epno', 'S'+epno))
if(E.TypeId=3, set('epno', 'C'+epno))
if(E.TypeId=4, set('epno', 'T'+epno))
if(E.TypeId=5, set('epno', 'P'+epno))
if(E.TypeId=6, set('epno', 'O'+epno))
set('groupname', if(G, if(length(G.Shortname)>0, G.Shortname, G.Name), 'no group'))
set('groupname', if(length(groupname)>0, '['+groupname+']'))
set('groupname', replace(groupname, '\', ' '))
set('crc', if(H, H.Crc32, F.Crc))
if(length(crc)>0, set('crc', '('+uc(crc)+')'))
set('filename', limit(limit(limit(atitle, 90) + ' - ' + epno + ' - ' + etitle, 200) + ' ' + groupname, 235) + crc + '.' + F.FileType)
set('filename', replace(filename, '*', ' '))
set('filename', replace(filename, '/', ' '))
set('filename', replace(filename, '?', ' '))
set('filename', replace(filename, ':', ' '))
set('filename', replace(filename, '"', ' '))
set('filename', replace(filename, '&lt;', ' '))
set('filename', replace(filename, '&gt;', ' '))
set('filename', replace(filename, '|', ' '))
set('filename', replace(filename, '`', "'"))
set('filename', replace(filename, '  ', ' '))
filename
</pre>
'''ATTENTION!''' The default pattern has a bug. To fix it, find the following line:
<pre>set('mepno', max(A.TotalEpisodeCount, E.EpisodeTypeCount))</pre>
And replace it with:
<pre>set('mepno', if(E.TypeId=1, max(A.TotalEpisodeCount, E.EpisodeTypeCount), E.EpisodeTypeCount))</pre>


'''Default tags'''<br />
==Objects==
 
===A / ANIME===
{|
! scope="col" width="180" | Name
! scope="col" width="60" | Type
! scope="col" | Description
|-valign=top
|Category||integer||Anime Type<br>
1: Unknown<br>
2: TV Series<br>
3: OVA<br>
4: Movie<br>
5: Other<br>
6: Web<br>
7: TV Special<br>
8: Music Video
|-valign=top
|CategoryStr||string||Category text value.
|-valign=top
|Name||string||Anime main title
|-valign=top
|ReviewAverage||integer||Average review score
|-valign=top
|ReviewCount||integer||Total number of reviews
|-valign=top
|TotalEpisodeCount||integer||Number of episodes according to AniDB. 0 if unknown.
|-valign=top
|VoteAverage||integer||Average voter score
|-valign=top
|VoteCount||integer||Total number of votes
|-valign=top
|Year||string||Anime airing year(s). For example 2007-2008.
|-valign=top
|EpisodeCount||integer||Number of normal episodes according to AoM.
|-valign=top
|SpecialEpisodeCount||integer||Number of special episodes according to AoM.
|-valign=top
|DownloadState||String||Current download state according to AoM:<br>
adsIgnore: not yet calculated<br>
adsComplete: have all normal episodes<br>
adsHaveAll: have all available normal episodes<br>
adsIncomplete: have some of the available normal episodes<br>
adsHaveNone: have no files in mylist for this anime
|-valign=top
|WatchedState||string||Current watched state according to AoM:<br>
awsIgnore: not yet calculated<br>
awsAll: All episodes watched<br>
awsPartial: Some episodes watched<br>
awsNone: No episodes watched
|-valign=top
|StatusState||string||Current status of mylist entries according to AoM, my contain multiple values separated by commas:<br>
assIgnore: not yet calculated<br>
assUnknown: Uknown<br>
assOnHDD: On HDD<br>
assOnCD: On CD<br>
assDeleted: Deleted
|-valign=top
|StartYear||integer||Numeric start year from AirDate.
|-valign=top
|EndYear||integer||Numeric end year from EndDate.
|-valign=top
|AirDate||integer||Air date in unix time, AniDB format.
|-valign=top
|EndDate||integer||End date in unix time, AniDB format.
|-valign=top
|Restricted||boolean||'''Unreliable''' True for hentai, otherwise false.
|-valign=top
|MylistCurrentEpisodeCount||integer||Number of episodes in mylist.
|-valign=top
|MylistSpecialEpisodeCount||integer||Number of special episodes in mylist.
|-valign=top
|WatchedCount||integer||Number of episodes watched.
|-valign=top
|SpecialWatchedCount||integer||Number of special episodes watched.
|}
 
===E / EPISODE===
{|
! scope="col" width="180" | Name
! scope="col" width="60" | Type
! scope="col" | Description
|-valign="top"
|AirDate||integer||Episode first air date.
|-valign="top"
|EpisodeNo||integer||AniDB episode number.
|-valign="top"
|EpisodeStr||string||Episode number with type prefix.
|-valign="top"
|EpisodeStrPadded||string||Episode number with type prefix padded based on the total number of episodes of that particular type.
|-valign="top"
|EpisodeTypeCount||integer||Number of episodes in this anime with the same type.
|-valign="top"
|IsSpecial||boolean||True if not a normal episode. False otherwise.
|-valign="top"
|Length||integer||Length in minutes.
|-valign="top"
|Name||string||AniDB main title.
|-valign="top"
|Other||string||Description field from AniDB.
|-valign="top"
|TypeId||integer||Episode type:<br>
1: Regular Episode<br>
2: Special<br>
3: Opening/Ending/Credits<br>
4: Trailer/Promo/Ads<br>
5: Parody<br>
6: Other
|-valign="top"
|IsRecap||boolean||True if episode is a recap.
|}
 
===F / FILE===
{|
! scope="col" width="180" | Name
! scope="col" width="60" | Type
! scope="col" | Description
|-valign="top"
|Crc||string||AniDB CRC32 value.
|-valign="top"
|CrcStatus||string||CRC32 status according to AnIDB:<br>
crcUnknown: unkwnown<br>
crcOk: known valid<br>
crcInvalid: known invalid
|-valign="top"
|Ed2k||string||AniDB ED2K value.
|-valign="top"
|EpisodeStart||integer||Lowest related episode number of the same type within this anime.
|-valign="top"
|EpisodeEnd||integer||Highest related episode number of the same type within this anime.
|-valign="top"
|EpisodeList||string||List of episodes within this anime covered by this file.<br>Format: 1,2,3,7,17,93,O1,C3,U77
|-valign="top"
|EpisodeListDetails||string||Detailed list of episodes covered by this file.<br>Format: (EpisodeStr:EpisodeTypeId:AnimeId:EpisodeId:StartPercent:EndPercent)<br>Example:
1:1:357:95304:0:10,2:1:357:95960:0:100,6:1:357:108200:0:100,C1:3:357:108202:0:100
|-valign="top"
|FileType||string||File extension.
|-valign="top"
|Length||integer||File length in seconds.
|-valign="top"
|Md5||string||AniDB MD5 value.
|-valign="top"
|Other||string||File description.
|-valign="top"
|Quality||integer||File quality, possible values:<br>
unknown<br>
very high<br>
high<br>
med<br>
low<br>
very low<br>
corrupted<br>
eyecancer
|-valign="top"
|Released||integer||Release date in unix time.
|-valign="top"
|ResolutionHeight||integer||'''Does not work''' Video height in pixels.
|-valign="top"
|ResolutionWidth||integer||'''Does not work''' Video width in pixels.
|-valign="top"
|Sha1||string||AniDB SHA1 value.
|-valign="top"
|Size||int64||Size in bytes.
|-valign="top"
|State||integer||AniDB state bitmap.
|-valign="top"
|Source||string||Source media, possible values:<br>
unknown<br>
camcorder<br>
TV<br>
VHS<br>
DTV<br>
LD<br>
DVD<br>
SVCD<br>
VCD<br>
HKDVD<br>
www<br>
HDTV<br>
HD-DVD<br>
Blu-ray
|-valign="top"
|TypeState||integer||Source ID.
|-valign="top"
|UserCount||integer||Number of users with this file. (Wildly inaccurate.)
|-valign="top"
|Version||integer||File version from state.
|-valign="top"
|GroupShort||string||Short group name.
|-valign="top"
|GroupLong||string||Long group name.
|-valign="top"
|ResolutionString||string||'''Does not work''' Video WidthxHeight.
|}
 
===G / GROUP===
{|
{|
|?a||text||Anime name
! scope="col" width="180" | Name
! scope="col" width="60" | Type
! scope="col" | Description
|-
|-
|?ab||number||Audio bitrate
|colspan="3"|''Warning, this object might be unassigned. If so all values return False.''
|-
|-valign="top"
|?ac||text||Audio codec
|Name||string||Group name.
|-
|-valign="top"
|?aid||number||Anime ID
|Other||string||Group description.
|-
|-valign="top"
|?e||text||Episode name
|Rating||integer||Average vote rating for this group.
|-
|-valign="top"
|?eid||number||Episode ID
|Shortname||string||Short group name.
|-
|-valign="top"
|?ep||number||Episode number
|Votes||integer||Number of votes for this group.
|-
|}
|?ep2, ?ep3, ?ep4||text||Zero padded episode number, eg ?ep3 = 007
 
|-
===H / HASH===
|?fid||number||File ID
{|
|-
! scope="col" width="180" | Name
|?fs||text||File source
! scope="col" width="60" | Type
|-
! scope="col" | Description
|?g||text||Group name, long (?lg) if available, otherwise short (?sg)
|-valign="top"
|-
|colspan="3"|''Warning, this object might be unassigned. If so all values return False.''
|?gid||number||Group ID
|-valign="top"
|-
|Crc32||string||AoM CRC32 value.
|?isMovie||boolean||True if the current file belongs to a movie anime
|-valign="top"
|-
|Ed2k||string||AoM ED2K value.
|?lang||text||Shows 1-2 Audio and 1-2 Subtitle languages
|-valign="top"
|-
|Md5||string||AoM MD5 value.
|?la||text||Shows all audio languages
|-valign="top"
|-
|Sha1||string||AoM SHA1 value.
|?la1, ?la2, ?la3, ?la4||text||Shows 1-4 audio languages
|-valign="top"
|-
|Size||integer||AoM size in bytes.
|?lg||text||Long group name
|}
|-
 
|?ls||text||Shows all subtitle languages
===M / MYLIST===
|-
{|
|?ls1, ?ls2, ?ls3, ?ls4||text||Shows 1-4 subtitle languages
! scope="col" width="180" | Name
|-
! scope="col" width="60" | Type
|?mid||number||Mylist ID
! scope="col" | Description
|-
|-valign="top"
|?sg||text||Short group name
|colspan="3"|''Warning, this object might be unassigned. If so all values return False.''
|-
|-valign="top"
|?v||number||File version
|Other||string||Entry other/description text.
|-
|-valign="top"
|?vb||number||Video bitrate
|Source||string||Entry source text.
|-
|-valign="top"
|?vc||text||Video codec
|State||integer||Entry state, possible values:<br>
0: unknown<br>
1: internal storage (hdd)<br>
2: external storage (cd/dvd/...)<br>
3: deleted<br>
|-valign="top"
|Storage||string||Entry storage text.
|-valign="top"
|Watched||boolean||True if watched, otherwise false.
|-valign="top"
|WatchedDate||integer||Watched date in unixtime.
|}
 
==Properties==
 
{|
|-valign=top
|ACTIVEPATTERN||string||The current rename pattern after cleanup.
|-valign=top
|PATH||string||Current path to the file. May be ''.
|-valign=top
|BASEPATH||string||Base path of the current file manager. May be ''.
|}
 
==Functions==
{|
! scope="col" | Function
! scope="col" width="60" | Type
! scope="col" | Description
|-valign="top"
|at(lang)||text||Returns a main/official anime title in '''lang'''. '''lang''' can be either a text or a number. <br>Example: at(2) = japanese title<br>Example: at('japanese (transcription)') = japanese transcription<br>Example: at('en') = english title
|-valign="top"
|atr(id, lang)||text||Returns a main/official anime title of anime with '''id''' in '''lang'''. '''lang''' can be either a text or a number. <br>Example: at(2) = japanese title<br>Example: at('japanese (transcription)') = japanese transcription<br>Example: at('en') = english title
|-valign="top"
|contains(find, text)||boolean||Returns true if '''find''' is found in '''text'''.<br>Example: contains('bcd', 'abcdef') = true
|-valign="top"
|copy(text, start[, length])||string||Returns '''length''' letters from letter number '''start''' of '''text'''.<br>Example: copy('abcdefgh', 3, 2) = 'cd'
|-valign="top"
|et(lang)||text||Returns an episode title in '''lang'''. '''lang''' can be either a text or a number.<br>Example: et(2) = japanese title<br>Example: et('en') = english title
|-valign="top"
|etr(id, lang)||text||Returns an episode title of episode with '''id''' in '''lang'''. '''lang''' can be either a text or a number.<br>Example: et(2) = japanese title<br>Example: et('en') = english title
|-valign="top"
|for(name, start, end, task)||string||Runs '''task''' '''start''' to '''end''' times setting '''name''' to t1he current position each round.<br>Example: for('i', 1, 5, '?'+i) = '?1?2?3?4?5'
|-valign="top"
|function(name, stmt, stmt, ...)||string||Declares the function '''name''' which will execute stmt1, stmt2 etc. Parameters can be sent to function calls but there is only 1 GLOBAL scope.<br>Example: function('rreplace', set('temp', param1), for('i', 1, 10, set('temp', replace(temp, '&nbsp;&nbsp;', ' '))), temp)<br>rreplace(somevalue)
|-valign="top"
|getanime(name, id)||object||Sets the variable '''name''' to the anime object for '''id'''.<br>Example: getanime('a2', 78)
|-valign="top"
|getepisode(name, id)||object||Sets the variable '''name''' to the episode object for '''id'''.<br>Example: getepisode('e2', 8878)
|-valign="top"
|if(test, trueval[, falseval])||any||If statement, returns '''trueval''' if '''test''' is true, otherwise returns '''falseval'''.<br> Example: if(23=23, 'equal', 'not equal') = 'equal'
|-valign="top"
|in(find, text...)||boolean||Checks if '''find''' is present in a number of '''text''' parameters.<br>Example: in('bb', 'aa', 'bb', 'cc', 'dd') = true
|-valign="top"
|join(glue, text...)||string||Joins together two or more '''text'''s, empty parameters are ignored with no glue added.<br>Example: join(' ', 'a', 'b', 'c') = 'a b c'
|-valign="top"
|lc(text)||string||Converts '''text''' to lower case.<br>Example: lc('ABCDEF') = 'abcdef'
|-valign="top"
|length(text)||number||Returns the length of '''text'''.<br>Example: length('abcdef') = 6
|-valign="top"
|limit(text, length[, end])||string||Limits the length of '''text''' to at most '''length''' characters. '''End''' is optional, if specified and the text is cropped, it'll be added at the end of text.<br>Example: limit(e, 100) or limit('abcdefghijklmnop', 7, '...') = 'abcd...'
|-valign="top"
|max(number...)||number||Returns the highest supplied number<br>Example: max(1, 7, 3, 9, 2) = 9
|-valign="top"
|min(number...)||number||Returns the lowest supplied number<br>Example: min(1, 7, 3, 9, 2) = 1
|-valign="top"
|numeric(var)||boolean||Returns true if '''var''' contains a numeric value.<br>Example: numeric('11') = true
|-valign="top"
|pad(text, newlength[, padchar])||string||Pads '''text''' on both sides to make it '''length''' characters long.<br>Example ?pad('hello', 9, '_') = '__hello__'
|-valign="top"
|padl(text, newlength[, padchar])||string||Pads '''text''' on the left side to make it '''length''' characters long.<br>Example ?padl('hello', 9, '_') = '____hello'
|-valign="top"
|padr(text, newlength[, padchar])||string||Pads '''text''' on the right side to make it '''length''' characters long.<br>Example ?padr('hello', 9, '_') = 'hello____'
|-valign="top"
|replace(text, find[, replace])||string||Replaces all occurences of '''find''' with '''replace''' in '''text'''.<br>Example: replace('HELLO THERE!', 'THERE', 'TREES') = 'HELLO TREES!'
|-valign="top"
|replacei(text, find[, replace])||string||Case insensitive replace of all occurences of '''find''' with '''replace''' in '''text'''.<br>Example: replace('HELLO tHeRe!', 'ThErE', 'TREES') = 'HELLO TREES!'
|-valign="top"
|sc(text)||string||Converts '''text''' to sentence case.<br>Example: sc('HELLO THERE!') = 'Hello there!'
|-valign="top"
|set(name, data)||nothing||Declares a new variable called '''name''' containing '''data'''.<br>Example: set('temp', 'text')
|-valign="top"
|split(text, find, index)||string||Splits '''text''' on '''find''' and returns the specified '''index'''. Index starts from 1.<br>Example: split('2011-05-19', '-', 2) = 05
|-valign="top"
|start(text, find)||boolean||Checks if '''find''' matches the start of '''text'''.<br>Example: start('1999', '199') = true
|-valign="top"
|starti(text, find)||boolean||Checks if '''find''' matches the start of '''text'''. Case insensitive.<br>Example: start('1999', '199') = true
|-valign="top"
|substr(text, start[, length])||string||Alias for copy.
|-valign="top"
|tc(text)||string||Converts '''text''' to title case.<br>Example: tc('HELLO THERE!') = 'Hello There!'
|-valign="top"
|trim(text)||string||Removes leading and trailing spaces from '''text'''.
|-valign="top"
|uc(text)||string||Converts '''text''' to upper case.<br>Example: uc('abcd') = 'ABCD'
|}
|}
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 />
==Operators==
 
===Arithmetic operators===
{|
{|
|?if()||If statement.<br /> Example: ?if(a=b, 'equal', 'not equal')
|A+B || returns A plus B
|-
|-
|?lc()||Converts the supplied parameter to lower case.<br />Example ?lc(crc)
|A-B || returns A minus B
|-
|-
|?uc()||Converts the supplied parameter to upper case.<br />Example ?uc(crc)
|A*B || returns A multiplied B
|-
|A/B || returns A divided by B
|}
|}


'''Comparison operators'''<br />
===Comparison operators===
{|
{|
|A=B||true if A equals B
|A=B||true if A equals B
|-
|-
|A<>B||true if A does not equal B
|A&lt;&gt;B||true if A does not equal B
|-
|-
|A<B||true if A is smaller than B
|A&lt;B||true if A is less than B
|-
|-
|A>B||true if A is larger than B
|A&gt;B||true if A is more than B
|-
|-
|A&lt;=B||true if A is less or equal to B
|-
|A&gt;=B||true if A is more or equal to B
|}
===Logical operators===
{|
|A and B||true if both A and B are true
|A and B||true if both A and B are true
|-
|-
|A or B||true if either A or B is true
|A or B||true if either A or B is true
|-
|A xor B||true if either A or B is true but not both
|-
|-
|not A||true if A is false
|not A||true if A is false
|}
|}
==Constant expressions==
There are two ways to specify string literals:<br>
&#39;text&#39;<br>
or<br>
"text"
Number literals are simply written as numbers:<br>
1234<br>
<br>
There are also boolean constants:<br>
true<br>
false
==Comments==
Start a line with // if you wish to write a comment:<br>
<pre>// This is a comment</pre>
==File managers==
File managers are used to automatically manage file renaming / removing and adding / updating files in your MyList.
83

edits

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