[PERL] Chii module programming - DISCUSSION

Want to help out? Need help accessing the AniDB API? This is the place to ask questions.

Moderator: AniDB

Locked
exp
Site Admin
Posts: 2438
Joined: Tue Oct 01, 2002 9:42 pm
Location: Nowhere

[PERL] Chii module programming - DISCUSSION

Post by exp »

Thread for all discussion about Chii module programming.
bbaab
Posts: 78
Joined: Thu Nov 20, 2003 2:13 pm

Post by bbaab »

Thanks for the files, I imported it to http://cvs.baka-sama.de/cvsweb.cgi/chii-bot/ - everyone who wants to help & needs write access to the repository, drop me a line.

The following files seems to be missing. They might be unimportant; I just grepped for require/use lines:

Code: Select all

adb_db.pm
adb_file_symbols.pm
adb_misc.pm
adb_voten.pm
adbs_all_mini.pm
anfo.pm
pelican
AniDB Staff
Posts: 234
Joined: Wed Aug 11, 2004 11:19 pm

Post by pelican »

I've been renovating Chii's randomanime function to a more decent state and found myself presented with a choice... however, it's not really my choice, so I need a decision or two here:

"!randomanime watched", "unwatched" and "all" currently return a random episode (list entry actually) and information on the anime it's attached to. This effectively assigns probabilities to anime based on how many files you have for that anime in your list (which meet the condition given), a behaviour that I felt was clearly wrong. I've changed the selection code to be a good deal simpler (hopefully a little faster too) and assign equal probabilities to anime, but my method leaves some choices regarding the episode selection:
  1. Should "!randomanime all":
    1. show no particular episode for the chosen anime
    2. (my preference) show a random episode from your list for the chosen anime
    3. show the first episode for the chosen anime
  2. Should "!randomanime watched":
    1. show no particular episode for the chosen anime
    2. show a random qualifying episode from your list for the chosen anime
    3. show the first episode for the chosen anime
    4. (my preference... probably) show the last qualifying (last (numerically) watched) episode from your list for the chosen anime
  3. Should "!randomanime unwatched":
    1. show no particular episode for the chosen anime
    2. show a random qualifying episode from your list for the chosen anime
    3. show the first episode for the chosen anime
    4. (my strong preference) show the first qualifying episode from your list for the chosen anime (next episode to watch)
Although I haven't got code for all of these, I'm near enough that implementation isn't an issue for any combination of choices from that list or probably of any other sensible alternatives. There shouldn't be any significant difference in performance between any of these options so that isn't an issue either.
Rar
AniDB Staff
Posts: 1471
Joined: Fri Mar 12, 2004 2:41 pm
Location: UK
Contact:

Post by Rar »

I'm of the Ronseal frame of mind myself, !randomanime should return just anime, not episodes. So, 1a, 2a, and 3a though 3d wouldn't hurt.

Rar
Andemon
Posts: 117
Joined: Thu Oct 14, 2004 4:12 pm

Post by Andemon »

I don't see much point in '!randomanime' returning episodes, except for unwatched. My personal preference: 1 a, 2 a, 3 d.
exp
Site Admin
Posts: 2438
Joined: Tue Oct 01, 2002 9:42 pm
Location: Nowhere

Post by exp »

new SDK version 0.02 out, includes adb_voten and adbs_all_mini.

BYe!
EXP
exp
Site Admin
Posts: 2438
Joined: Tue Oct 01, 2002 9:42 pm
Location: Nowhere

Post by exp »

SDK 0.03 out, includes changes to adb_cmd_vote and adb_cmd_mylist.
adb_irc_tools.pm and adbs_all_mini.pm were slightly modified.

BYe!
EXP
Locked