UDP API Clients
Moderator: AniDB
OKAY. I'm in, too.
Title: CocoaAOM (Super tentative working title, with apologies to PetriW)
OS: Mac OS X
Lang: Objective-C
Details: Notify and message observing. File hashing, identification, renaming, addition to mylist.
A mockup is available here
Title: CocoaAOM (Super tentative working title, with apologies to PetriW)
OS: Mac OS X
Lang: Objective-C
Details: Notify and message observing. File hashing, identification, renaming, addition to mylist.
A mockup is available here
http://www.w3.org/XML/PetriW wrote:Check out sqlite (www.sqlite.org) for storing local data. Way better than flatfile imho.
That's what I'd use.
-
- AniDB Staff
- Posts: 379
- Joined: Sun Nov 07, 2004 11:05 am
ame v0.1 (beta) Simple Hasher | Mylist-File-Add Util written in C++
- commandline based
- ed2k hashing
- file add to mylist
- platform independent code, but only win build for now
- commandline based
- ed2k hashing
- file add to mylist
- platform independent code, but only win build for now
Re: UDP API Clients
Target OS: win32
Programming language: mIRC script
Using client name "testproto" since the time I was poking around the api first, doesn't let me change it to anything, weird...
The release name would probably be "mIRCaDBcSc"
for "mIRC AniDB Client Script"
I am reached by email in the profile or on the deltaanime/quakenet irc networks, same name.
Now working:
Log on, log off, PUSH, PUSHACK.
Displays *NEW MSG* / *NEW FILE*, beeps, flashes on the events.
The 30 min keepalive with NOTIFY.
Auto relog on disconnected.
All using the edit box commands for now.
To do list:
Window for login/pass, settings, etc.
Local notify list, available on command/window.
Get messages, file notifies from the list on command/window.
ed2k hashing dll for mIRC (tough one, we'll see)
If previous, then adding (freshly acquired) files.
Think that's about it for now.
Programming language: mIRC script
Using client name "testproto" since the time I was poking around the api first, doesn't let me change it to anything, weird...
The release name would probably be "mIRCaDBcSc"
for "mIRC AniDB Client Script"
I am reached by email in the profile or on the deltaanime/quakenet irc networks, same name.
Now working:
Log on, log off, PUSH, PUSHACK.
Displays *NEW MSG* / *NEW FILE*, beeps, flashes on the events.
The 30 min keepalive with NOTIFY.
Auto relog on disconnected.
All using the edit box commands for now.
To do list:
Window for login/pass, settings, etc.
Local notify list, available on command/window.
Get messages, file notifies from the list on command/window.
ed2k hashing dll for mIRC (tough one, we'll see)
If previous, then adding (freshly acquired) files.
Think that's about it for now.
AniDBCmdC
anidb commandline client written in java for all those who love shells
- hashing (all types)
- renaming (100% customable with more than just the api infos)
- mylist adding
- add files and dirs various wildcards are allowed
- moving hashed, checked and mylistadded files in their own animename dirs
- remove illegal strings from filenames (100% customable)
those things will be finished in a few days ... (started yesterday hehe)
if you have any ideas send a pm
if i am allowed i would add the source to the bin under gpl
have fun!
anidb commandline client written in java for all those who love shells
- hashing (all types)
- renaming (100% customable with more than just the api infos)
- mylist adding
- add files and dirs various wildcards are allowed
- moving hashed, checked and mylistadded files in their own animename dirs
- remove illegal strings from filenames (100% customable)
those things will be finished in a few days ... (started yesterday hehe)
if you have any ideas send a pm
if i am allowed i would add the source to the bin under gpl
have fun!
there is one thing i dont understand about the udp api ...
why does the api send the sessionid inside of an errormessage?
in FILE does the api send the message after a \n
that just doesnt fit and is inconsequent ;/
and it would be nice if FILE would send all infos about the file ...
everything else is just fine thanks exp
ExElNeT
why does the api send the sessionid inside of an errormessage?
Code: Select all
200 {str session_key} LOGIN ACCEPTED
Code: Select all
220 FILE
{int4 fid}|{int4 aid}|{int4 eid}|{int4 gid}|{int4 state}|{int4 size}|{str ed2k}|{str anidbfilename}
and it would be nice if FILE would send all infos about the file ...
everything else is just fine thanks exp
ExElNeT
Please note 200 to 299 codes are _not_ error messages, they are success messages.
200-299: Request accepted
300-399: Not found but not an error
400-499: Not found, this is an error
500-599: Server error replies
601: API down
Anyway, the 200 message was probably never multiline and I' guess that when an extra field was needed it was added to the reply message instead to not break earlier clients. (Eventhough there probably were none then! )
Or the thinking comes from the TCP API where all non multiline replies are returned with eventual additional data on the same row as the message. The UDP api kinda inheririts from the TCP api I think and while almost all UDP api commands are twoline (aka, status + reply line) in the TCP api all those replies are "unknownlines", aka (startcode + lines with data + endcode).
/me goes to hide under his rock again.
200-299: Request accepted
300-399: Not found but not an error
400-499: Not found, this is an error
500-599: Server error replies
601: API down
Anyway, the 200 message was probably never multiline and I' guess that when an extra field was needed it was added to the reply message instead to not break earlier clients. (Eventhough there probably were none then! )
Or the thinking comes from the TCP API where all non multiline replies are returned with eventual additional data on the same row as the message. The UDP api kinda inheririts from the TCP api I think and while almost all UDP api commands are twoline (aka, status + reply line) in the TCP api all those replies are "unknownlines", aka (startcode + lines with data + endcode).
/me goes to hide under his rock again.
AniDBCmdC first version. 1.0 beta
So thats the first version of my java commandline client. 1.0 beta
http://user.cs.tu-berlin.de/~exelnet/anidbcmdc.jar
I hope everything will work ... Its really late
some basic features are:
- hashing files
- checking them at anidb
- getting more informations about a file than the api provides
- adding the file to mylist
- renaming the file 100% customable
something i really like
- filenames can contain wildcards
- filenames can even contain regular expressions
here is a small example for regexes:
anidbcmdc.jar -Rx -l=name -p=pass /path/.*\.avi|.*\.ogm|.*\.mpg
for windows users:
anidbcmdc.jar -Rx -l=name -p=pass c:\anime\.*\.avi|.*\.ogm|.*\.mpg
this will hash all files with the endings .avi ogm and .mpg in all subdirs of /path and add them to your mylist
additional features are planed ... like moving finished files creating for each anime his own dir under a given dir and so on ...
here is the output of anidbcmdc.jar --help
I have included all docs and sources in the jar.
Have fun!
ExElNeT
http://user.cs.tu-berlin.de/~exelnet/anidbcmdc.jar
I hope everything will work ... Its really late
some basic features are:
- hashing files
- checking them at anidb
- getting more informations about a file than the api provides
- adding the file to mylist
- renaming the file 100% customable
something i really like
- filenames can contain wildcards
- filenames can even contain regular expressions
here is a small example for regexes:
anidbcmdc.jar -Rx -l=name -p=pass /path/.*\.avi|.*\.ogm|.*\.mpg
for windows users:
anidbcmdc.jar -Rx -l=name -p=pass c:\anime\.*\.avi|.*\.ogm|.*\.mpg
this will hash all files with the endings .avi ogm and .mpg in all subdirs of /path and add them to your mylist
additional features are planed ... like moving finished files creating for each anime his own dir under a given dir and so on ...
here is the output of anidbcmdc.jar --help
Code: Select all
Usage: anidbcmdc.jar [OPTION]... login=LOGIN pass=PASSWORD DIRECTORY
or: anidbcmdc.jar [OPTION]... login=LOGIN pass=PASSWORD --files=DIRECTORY_LIST
or: anidbcmdc.jar [OPTION]... login=LOGIN pass=PASSWORD --recursive-files=DIRECTORY_LIST
Hash files in DIRECTORY(s), add them to AniDB - MyList and rename them.
Mandatory arguments to long options are mandatory for short options too.
-f, --files=DIRECTORY_LIST processes files in the listed DIRECTORY(s)
-g --gui will start the gui-mode (no gui available yet)
-h, --help print this help
-i, --ip-address=IP-ADDRESS:PORT specify the IP-ADDRESS and PORT of AniDB
-l, --login=LOGINNAME specifiy AniDB LOGINNAME
-p, --password=PASSWORD specifiy AniDB PASSWORD
-c --clientport=PORT the localport on which anidbcmdc is working
-r, --recursive-files=DIRECTORY_LIST processes files recursive in the listed DIRECTORY(s) (incl subdirs)
-n --name-replace=REPLACE_LIST replaces SOURCE string with DEST string of the anime filename
-R processes files recursive in DIRECTORY(s) (incl subdirs)
syntax: SOURCE->DEST,SOURCE->DEST,...
-s, --style=STYLE renames files after STYLE
available templates: %animenamepart1,%animenamepart2,
%epnamepart1,%epnamepart2,%epnr,%group,%dublang,
%crc,%resolution,%quality,%vidcodec,%audcodec,%md5,
%censored,%version,%ed2k,%sha1,%sublang,%ripsource
-x enables regular expressions in filenames
example: anidbcmdc.jar -R -l=name -p=pass
'/path/.*\.avi|.*\.ogm|.*\.mpg' will add all
.avi,.ogm,.mpg files in all subdirs of /path
more information: http://java.sun.com/j2se/1.4.2/docs/
api/java/util/regex/Pattern.html
NOTE: Wildcards '*' and '?' are always enabled.
AniDBCmdC will use the default localport 44444 and the anidb ip-address api.anidb.info:9000
AniDBCmdC will use the default style: %animenamepart1_%animenamepart2_-_%epnr_-_%epnamepart1_
%epnamepart2_[%group](%crc)[AniDB]
Report bugs to <exelnet@web.de>.
Have fun!
ExElNeT
Code: Select all
Exception in thread "main" java.lang.NoSuchMethodError: java.lang.String.replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
at anidbcmdc.impl.AniDBUdpApiConnection.evaluateReplyMessage(AniDBUdpApiConnection.java:138)
at anidbcmdc.impl.AniDBUdpApiConnection.auth(AniDBUdpApiConnection.java:161)
at anidbcmdc.ui.Console.start(Console.java:118)
at anidbcmdc.ui.AniDBCmdC.parseOptions(AniDBCmdC.java:162)
at anidbcmdc.ui.AniDBCmdC.main(AniDBCmdC.java:56)
Dosn't seem to work
my WM is:
Code: Select all
java version "1.4.2-01"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-01)
Java HotSpot(TM) 64-Bit Server VM (build Blackdown-1.4.2-01, mixed mode)
Your code only works in a 1.5 WM - but some folks (like me) still use 1.4 WM.
You can't use String.replace(CharSecunece, CharSequence) use String.replaceAll(String, String) and escepe the regex.
You can't use String.contains(CharSequnece) use String.indexOf(String) != -1