WebAOM: Difference between revisions

From AniDB
Jump to navigation Jump to search
m (1.12)
(1.13)
Line 9: Line 9:
:* WebAOM v1.08 (beta) [http://www.anidb.net/client/webaom.htm Applet] | [http://www.anidb.net/client/webaom.jar JAR] | [http://www.anidb.net/client/webaom.jnlp Webstart]
:* WebAOM v1.08 (beta) [http://www.anidb.net/client/webaom.htm Applet] | [http://www.anidb.net/client/webaom.jar JAR] | [http://www.anidb.net/client/webaom.jnlp Webstart]
<b>Current Version hosted by epoximator:</b>
<b>Current Version hosted by epoximator:</b>
:* WebAOM v1.12 (beta) [http://www.stud.ntnu.no/~jovetlea/webaom/index.htm Applet] | [http://www.stud.ntnu.no/~jovetlea/webaom/webaom.jar JAR] | [http://www.stud.ntnu.no/~jovetlea/webaom/webaom.jnlp Webstart]
:* WebAOM v1.13 (beta) [http://www.stud.ntnu.no/~jovetlea/webaom/index.htm Applet] | [http://www.stud.ntnu.no/~jovetlea/webaom/webaom.jar JAR] | [http://www.stud.ntnu.no/~jovetlea/webaom/webaom.jnlp Webstart]
<br>
<br>


Line 35: Line 35:


===Tabs===
===Tabs===
:* Rules: Definitions and Rules for renaming and moving.
:* Rules: Rule system. See Move/Rename system.
:* Options : All options.
:* Options : All options.
:* Jobs: Table of files/work.
:* Jobs: Table of files/work.
Line 49: Line 49:
::*Remote Port : Remote Port can be set here.
::*Remote Port : Remote Port can be set here.
::*Local Port : Local Port can be set here. Necessary if the default port is used by another application on your system.
::*Local Port : Local Port can be set here. Necessary if the default port is used by another application on your system.
::*Delay (sec) : Delay between each datagram sent to server. 3 secounds is minimum. Should be set higher if connection is poor or if much work is queued.
::*Delay (sec) : Delay between each datagram sent to server. 3 seconds is minimum. Should be set higher if connection is poor or if much work is queued.
::*Timeout (sec) : Timeout on receiving reply from AniDB.
::*Timeout (sec) : Timeout on receiving reply from AniDB.
:* File Options
:* File Options
Line 82: Line 82:
A new feature in 1.09 is moving and renaming of files based on rules. This is implemented to ease administration of your anime files. The system may seem confusing at first, but it is actually pretty simple. Since the system performs virtually no error checking on the input you provide, it is recommended that you understand the system fully before using it.  
A new feature in 1.09 is moving and renaming of files based on rules. This is implemented to ease administration of your anime files. The system may seem confusing at first, but it is actually pretty simple. Since the system performs virtually no error checking on the input you provide, it is recommended that you understand the system fully before using it.  


===Definitions===
Notice that the system is under development. Expect radical changes. Feel free to request changes / comment.
First step is to define at least one directory, one rename schema and one move schema. If you are using a non Windows system, remove or deselect unneeded entries in the Illegal Characters table.
:*Directories
:::Define main partitions for example.
:*Rename schema
:::Schema for renaming. Example: ren01 = "%ann - %enr [%crc]%ver_"
:*Moving schema
:::Schema for moving. Example: mov01 = "\%year\%ann - [%eps][%grp]\"
:*Illegal characters
:::For replacement of illegal characters. Applies only to %ann, %epn and %grp. Can be used to replace strings too. Examples: Anime-MX -> a-mx, Naruto -> NARUTO.


===Rules===
===Scripting===
There are two rule tables; one for renaming and one for moving. Their behavior are exactly the same. Each row in the tables consist of a test and a definition. The first row has the highest priority.
For renaming and moving files WebAOM needs schemas. A schema i 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:
Ex:
<pre>
<pre>
  IF             THEN
IF A(Naruto) DO FAIL //Do not rename file if it is Naruto
#1 T(TV,OVA)       ren01
DO ADD '%eng (%ann) - %enr - %epn ' //Add the base, same for all files
#2 REST            reb02
IF D(japanese);L(english) DO ADD '(SUB)' //Add (SUB) if the file is subbed in english
 
IF D(japanese);L(none) DO ADD '(RAW)' //Add (RAW) if the file is not subbed.
Which means:
IF G(!unknown) ADD '[%grp]' //Add group name if it is not unknown
 
DO ADD '(%CRC)' //Always add crc
if type="TV" OR type="OVA"
//this would create the schema "%eng (%ann) - %enr - %epn (SUB)[%grp](%CRC)" for a normal subbed file.
  then use ren01 schema
else
  then use ren02 schema
</pre>
</pre>
<b>Possible tests</b><br>
Note that end-of-line comments "//" are not supported atm, but "#" at beginning is. >'< around parts is not required. Example on move schema:
:* A = Anime (string) [*]
:* G = Group (string) [unknown, *]
:* Q = Quality (string) [unknown, very high, high, med, low, very low, corrupted, eyecancer]
:* S = Source (string) [unknown, camcorder, TV, DTV, VHS, VCD, SVCD, LD, DVD, HKDVD, www]
:* T = Type (string) [unknown, TV, OVA, Movie, Other, web]
:* Y = Year (int) [#]
:* D = Dub Language (Note: 'dual (jap/[lang2])' is replaced with 'jap&[lang2]')
:* L = Sub Language
As you can see, all tests except year is done on strings. The test supports no wildcards, but lists [A,B,C,D](for strings and numbers) and ranges [0-1999,2000-3000](only numbers). NOT is also supported with the use of '!'. Ex. G(!unknown).
 
It is possible to use IGNORE where you put schema. Which means do not rename or move. (Never define a schema called IGNORE/ignore.)
<pre>
<pre>
#1 Y(0-1999);T(Movie);S(DVD) ren01
IF R(DVD,HKDVD) DO ADD 'M:\dvd\'
#2 Y(2000,2002);T(TV);G(AonE) IGNORE
ELSE DO ADD 'N:\tv\'
#3 A(Naruto);S(DVD) ren03
IF Y(0-1999) DO ADD '199X\%year - %ann [%eps]'
ELSE DO ADD '%year\%ann [%eps]'
IF G(!unknown) DO ADD '[%grp]\'
ELSE DO ADD '\'
</pre>


Which means:
Syntax for each line in a script:
:* [IF {test}/ELSE] DO ADD {part}/SET {part}/FAIL/FINISH
::* ADD means +=
::* SET means =
::* FAIL means return null;
::* FINISH means return result; (Not needed as last line.)
::* DO is always required.
::* !!! CASE SENSITIVE !!!


if (0>=year>=1999) AND Type="Movie" AND Source="DVD"
<b>Possible tests</b><br>
  then use ren01 schema
:* A = Anime (text/number) [*/#] Anime Name/Title (Jap. Romaji) or aid. (E = English Title will probably be added in next version.)
else if (year=2000 OR year=2002) AND Type="TV" AND Group="AonE"
:* G = Group (text/number) [unknown, */#] Short name or gid.
  then do not rename
:* Q = Quality (text) [unknown, very high, high, med, low, very low, corrupted, eyecancer]
else if Anime="Naruto" AND Source="DVD"
:* R = ripSource (text) [unknown, camcorder, TV, DTV, VHS, VCD, SVCD, LD, DVD, HKDVD, www]
  then use ren03 schema
:* T = Type (text) [unknown, TV, OVA, Movie, Other, web]
</pre>
:* Y = Year (number) [#]
:* D = Dub Language (text) (Note: 'dual (jap/[lang2])' is replaced with 'jap&[lang2]')
:* S = Sub Language (text)
There is atm 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.


===Tags===
===Tags===
Line 158: Line 148:
%year
%year
%eps Total number of episodes
%eps Total number of episodes
%type
%type [unknown, TV, OVA, Movie, Other, web]
%fid
%fid File ID
%aid
%aid Anime ID
%eid
%eid Episode ID
%gid
%gid Group ID
</pre>
</pre>


== Changelog ==
== Changelog ==
<pre>
<pre>
1.13 26.09.2005
-Change in Rule system. Scripting. Textfield instead of table.
-Fixed two bugs in parsing code thx to egg.
-Fixed padding for specials thx to egg.
1.12 24.09.2005
1.12 24.09.2005
-Added extra '0' padding in epnr when an anime serie got more than 99 episodes. Will only work when total num of eps is known.
-Added extra '0' padding in epnr when an anime serie got more than 99 episodes.
  Will only work when total num of eps is known.
-Added support for dub language (D) and sub language (L) in tests.
-Added support for dub language (D) and sub language (L) in tests.
-Added support for NOT (!) in tests.
-Added support for NOT (!) in tests.
-Added tags %kan = Jap. Kanji Title and %eng = English Title. (If null then %ann is used.)
-Added tags %kan = Jap. Kanji Title and %eng = English Title. (If null then %ann is used.)
-Added support for hentai. (Needs to be enabled in profile: http://anidb.info/perl-bin/animedb.pl?show=profile)
-Added support for hentai (needs to be enabled in profile: http://anidb.info/perl-bin/animedb.pl?show=profile).
-Fixed minor bugs.
-Fixed some minor bugs.


1.11 22.09.2005
1.11 22.09.2005

Revision as of 09:58, 26 September 2005

Author: epoximator
OS: Java VM
Main Features:

  • ed2k, crc32, md5, sha1, tth hashing
  • file add to mylist
  • custom file renaming and moving

Current Version hosted by AniDB:

Current Version hosted by epoximator:


Introduction

WebAOM is a simple java applet/application that hash files and add them to your mylist at AniDB. It is made for those who don't want to or cannot install Anidb-O-Matic. The name may be inaccurate/misleading since it does not replace AOM in any way. It is based on the UDP-API and is therefore limited.

All questions, feature requests and bug reports can be pm'ed to epoximator.

Screenshots

Documentation

Buttons

  • Wiki : Link to this page.
  • Files... : Add specific files for hashing. (Only those with extensions specified in "Wanted File Extensions" are added.)
  • Folders... : Add folder(s) with all including files for hashing.
  • Toggle Hasher : Start/stop hashing operation (and moving).
  • Toggle Adder : Start/stop adding (communication thread).
  • Save Log : Save the Log to disk (in HTML format).
  • Save Options: Save options to "%home/.webaom".
  • Ping AniDB : Check reachability to AniDB. (UDP server that is.)

Tabs

  • Rules: Rule system. See Move/Rename system.
  • Options : All options.
  • Jobs: Table of files/work.
  • Log : The log. What's going on. History.
  • Hash : All selected checksums are printed here.
  • Info : Some info about the client. Changelog.
  • Debug : Low level communication and exceptions are printed here.

Options

  • Connection
  • Offline Mode : No communication with AniDB. Adding and renaming are disabled if checked.
  • AniDB Host : URL to AniDB can be set here.
  • Remote Port : Remote Port can be set here.
  • Local Port : Local Port can be set here. Necessary if the default port is used by another application on your system.
  • Delay (sec) : Delay between each datagram sent to server. 3 seconds is minimum. Should be set higher if connection is poor or if much work is queued.
  • Timeout (sec) : Timeout on receiving reply from AniDB.
  • File Options
  • Other
  • Hash Dirs : Default directories to hash. Checked every time Hasher starts. Directories are separated with ";".
  • Browser Path : Set path to internet browser manually here. For Linux users.
  • My Database : For later versions.
  • Renaming : Combobox for selecting renaming mode.
  • Hash functions : ED2K CRC32 MD5 SHA1 TTH
  • Wanted File Extensions : Default are avi, ogm, mkv.
  • Rename Options (removed in 1.09)
  • Combobox for custom renaming. (More schemes can be added on request.)
  • Rename files own style : Uses selected scheme in combobox. Default: {group short name}_{anime name}_{episode #}_{crc32}{file version if greater than 1}.{file extension}
  • Rename files AniDB style : Uses default AniDB scheme: {anime name} - {episode #} - {episode name} - {group short name}.{file extension}
  • Replace illegal characters : Replaces illegal characters defined in the table beneath. Also used to change ' ' to '_'.
  • Hashes in uppercase : Uppercase hashes in filename. Only possible when own style is selected.

Job Menu (Popup)

  • Show Info : Show info about a file/job. (double click)
  • Watch Now : Watch with default media player. Windows only. (alt + double click)
  • Explore Folder : Open parent folder with Explorer. Windows only.
  • Apply Rules : If the rules are changed after a job is finished, they can be applied again manually.
  • Update Status : For updating file info. For later versions.
  • Remove (DB too) : Remove file info from list and database. For later versions.

Move/rename system

A new feature in 1.09 is moving and renaming of files based on rules. This is implemented to ease administration of your anime files. The system may seem confusing at first, but it is actually pretty simple. Since the system performs virtually no error checking on the input you provide, it is recommended that you understand the system fully before using it.

Notice that the system is under development. Expect radical changes. Feel free to request changes / comment.

Scripting

For renaming and moving files WebAOM needs schemas. A schema i 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:

IF A(Naruto) DO FAIL //Do not rename file if it is Naruto
DO ADD '%eng (%ann) - %enr - %epn ' //Add the base, same for all files
IF D(japanese);L(english) DO ADD '(SUB)' //Add (SUB) if the file is subbed in english
IF D(japanese);L(none) DO ADD '(RAW)' //Add (RAW) if the file is not subbed.
IF G(!unknown) ADD '[%grp]' //Add group name if it is not unknown
DO ADD '(%CRC)' //Always add crc
//this would create the schema "%eng (%ann) - %enr - %epn (SUB)[%grp](%CRC)" for a normal subbed file.

Note that end-of-line comments "//" are not supported atm, but "#" at beginning is. >'< around parts is not required. Example on move schema:

IF R(DVD,HKDVD) DO ADD 'M:\dvd\'
ELSE DO ADD 'N:\tv\'
IF Y(0-1999) DO ADD '199X\%year - %ann [%eps]'
ELSE DO ADD '%year\%ann [%eps]'
IF G(!unknown) DO ADD '[%grp]\'
ELSE DO ADD '\'

Syntax for each line in a script:

  • [IF {test}/ELSE] DO ADD {part}/SET {part}/FAIL/FINISH
  • ADD means +=
  • SET means =
  • FAIL means return null;
  • FINISH means return result; (Not needed as last line.)
  • DO is always required.
  • !!! CASE SENSITIVE !!!

Possible tests

  • A = Anime (text/number) [*/#] Anime Name/Title (Jap. Romaji) or aid. (E = English Title will probably be added in next version.)
  • G = Group (text/number) [unknown, */#] Short name or gid.
  • Q = Quality (text) [unknown, very high, high, med, low, very low, corrupted, eyecancer]
  • R = ripSource (text) [unknown, camcorder, TV, DTV, VHS, VCD, SVCD, LD, DVD, HKDVD, www]
  • T = Type (text) [unknown, TV, OVA, Movie, Other, web]
  • Y = Year (number) [#]
  • D = Dub Language (text) (Note: 'dual (jap/[lang2])' is replaced with 'jap&[lang2]')
  • S = Sub Language (text)

There is atm 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.

Tags

%ann Anime Name / Title
%kan Jap. Kanji Title
%eng English Title
%epn Episode name
%enr Episode number
%ed2k / %ED2K
%md5 / %MD5
%sha / %SHA
%crc / %CRC
%ver Version string
%cen Censored string
%dub Dub language
%sub Sub language
%grp Group short name
%qual Quality
%src Source
%res Resolution
%vid Video codec
%aud Audio codec
%year
%eps Total number of episodes
%type [unknown, TV, OVA, Movie, Other, web]
%fid File ID
%aid Anime ID
%eid Episode ID
%gid Group ID

Changelog

1.13 26.09.2005
-Change in Rule system. Scripting. Textfield instead of table.
-Fixed two bugs in parsing code thx to egg.
-Fixed padding for specials thx to egg.

1.12 24.09.2005
-Added extra '0' padding in epnr when an anime serie got more than 99 episodes.
  Will only work when total num of eps is known.
-Added support for dub language (D) and sub language (L) in tests.
-Added support for NOT (!) in tests.
-Added tags %kan = Jap. Kanji Title and %eng = English Title. (If null then %ann is used.)
-Added support for hentai (needs to be enabled in profile: http://anidb.info/perl-bin/animedb.pl?show=profile).
-Fixed some minor bugs.

1.11 22.09.2005
-Fixed bug in rule system: Test 'A' did not work.
-Fixed some minor bugs thx to hrm.
-Added combobox 'Renaming' for selection of renaming mode.
-Change in file handler: Will not try to add files that are locked (used by another process).

1.10 15.09.2005
-Fixed bug where Job is not set to Finished (when rename/moving is enabled but not needed).
-Fixed parsing bug. (Movies has parts, not episodes.)
-Fixed minor gui bugs.
-Added slider for delay between datagrams sent to server (3-10 sec).
-Added updating of progress bar when checking crc (after move).
-Added updating of second progress bar (total progress).

1.09 09.09.2005
-Fixed rename bug when group is "raw/unknown" (gid=0). These are now just called "unknown".
-Added possibility to save options.
-Added new rule system: rename and move files based on file info.
-Significant changes in gui and underlying system.
  -File lists replaced with one table. 
  -Rename option panel replaced with Rules tab. 
  -Start and Stop buttons replaced with toggle buttons for hasher thread and communication thread.
-Added timeout slider for UDP communication (20-60 sec).
-Added "Hash Dirs", "Browser Path" and "My Database" text fields.
-Added Wiki button. (Works only on Windows systems, unless browser path is defined.)

1.08 05.07.2005
-Updated mylist file states.
-Updated file info parser (renamer was broken).

1.07 12.06.2005
-Updated the second progress bar.
-Changed comm. thread sleeping routine.
-Changed file info dialog to a text dialog.
-Added Tiger Tree Hash.
-Added possibility to choose each hash type.
-Added debug tab.
-Made 1.4.2 comp again thx to gyrojoe.

1.06 29.05.2005
-Changed the way files are hashed and added to mylist. This is now done concurrent.
-Changes in the status and logging system. 
-Fixed some minor bugs. 

1.05 14.05.2005
-Added custom renaming of files thx to ExElNeT.
-Added some more checking on username and password.
-Changes in option tab.

1.04 11.05.2005
-Added extra file information thx to ExElNeT. Double click rows in 'Finished Files' to see.
-Added offline mode
-Fixed two bugs in file rename code. thx to ExElNeT and visnu

1.03 19.02.2005
-Added extensive hashing. MD5, SHA-1 and CRC32
-Changes in the error handler.
-Bugfix: Applet crash with Opera and Firefox

1.02 04.02.2005
-Added connection options.
-Added connection check.

1.01 30.01.2005
-New layout, options in own tab.
-Added "Source" and "Other" string for AniDB file info.
-Added possibility to save the log.
-Added illegal character replacement customization.
-Added recursive directory search.
-Added new filehandler.
-Bugfix in AniDBConnection.

1.00 23.01.2005
-First version.