MyList Export Templates

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

Moderator: AniDB

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

MyList Export Templates

Post by exp » Sat Jun 21, 2003 9:48 pm

Official AniDB Export Template SDK:

The export template SDK information is now officially located on the wiki.
This thread is deprecated.

More information:

http://wiki.anidb.info/w/Mylist_export_ ... guidelines

http://wiki.anidb.info/w/Mylist_export_SDK_changelog





-----------------------------------------------------------
OLD:
------------------------------------------------------------

http://static.anidb.net/files/anidb_tem ... _0.11b.tgz

You should find everything you need in this package plus the docs on the wiki.

Read documentation on the Wiki for up to date information.


BYe!
EXP
Last edited by exp on Thu Jun 28, 2007 8:00 am, edited 18 times in total.

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

Post by exp » Sat Jun 21, 2003 9:50 pm

the csv-minimal template:

Code: Select all

Name;Year;Eps;Seen;Size
<tmpl_loop name=loop_anime><tmpl_var name=data_anime_name>;<tmpl_var name=data_anime_year>;<tmpl_var name=data_anime_my_eps> / <tmpl_var name=data_anime_eps>;<tmpl_var name=data_anime_my_watchedeps> / <tmpl_var name=data_anime_my_eps>;<tmpl_var name=data_anime_my_size_h>
</tmpl_loop>


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

Post by exp » Sat Jun 21, 2003 9:53 pm

the html-fixme template

mylist.tpl

Code: Select all

<html>
<head>
    <title>::AniDB.Net:: Export for <tmpl_var name=global_user></title>
</head>
<body link="#0000ff" alink="#ff0000" vlink="#0000ff">
<font face="arial,helvetica" size=2>
<h3>AniDB Export for <tmpl_var name=global_user></h3>
<hr>
<table>
<tr>
    <td> User: </td>
    <td> <tmpl_var name=global_user> </td>
</tr>
<tr>
    <td> Created: </td>
    <td> <tmpl_var name=global_date> </td>
</tr>
<tr>
    <td> Animes in list: </td>
    <td> <tmpl_var name=global_animecount> </td>
</tr>
<tr>
    <td> Eps in list: </td>
    <td> <tmpl_var name=global_epcount> </td>
</tr>
<tr>
    <td> Files in list: </td>
    <td> <tmpl_var name=global_filecount> </td>
</tr>
<tr>
    <td> Size: </td>
    <td> <tmpl_var name=global_bytecount> (<tmpl_var name=global_bytecount_h>) </td>
</tr>
</table>
<hr>
<b>Complete Anime Series:</b><br>
<table>
<tr>
    <td> Name </td>
    <td> Year </td>
    <td> Eps </td>
    <td> Seen </td>
    <td> Size </td>
<tr>
<tmpl_loop name=loop_anime>
<tmpl_if name=status_anime_iscomplete>
<tr>
    <td> <a href="anime/a<tmpl_var name=data_anime_id>.htm"><tmpl_var name=data_anime_name></a> </td>
    <td> <tmpl_var name=data_anime_year> </td>
    <td> <tmpl_var name=data_anime_my_eps>/<tmpl_var name=data_anime_eps> </td>
    <td> <tmpl_if name=status_anime_iswatched><b><tmpl_else><i></tmpl_if><tmpl_var name=data_anime_my_watchedeps>/<tmpl_var name=data_anime_my_eps><tmpl_if name=status_anime_iswatched></b><tmpl_else></i></tmpl_if> </td>
    <td> <tmpl_var name=data_anime_my_size_h> </td>    
</tr>
</tmpl_if>
</tmpl_loop>
</table>
<hr>
<b>Incomplete Anime Series:</b><br>
<table>
<tr>
    <td> Name </td>
    <td> Year </td>
    <td> Eps </td>
    <td> Seen </td>
    <td> Size </td>
<tr>
<tmpl_loop name=loop_anime>
<tmpl_unless name=status_anime_iscomplete>
<tr>
    <td> <a href="anime/a<tmpl_var name=data_anime_id>.htm"><tmpl_var name=data_anime_name></a> </td>
    <td> <tmpl_var name=data_anime_year> </td>
    <td> <tmpl_var name=data_anime_my_eps>/<tmpl_var name=data_anime_eps> </td>
    <td> <tmpl_if name=status_anime_iswatched><b><tmpl_else><i></tmpl_if><tmpl_var name=data_anime_my_watchedeps>/<tmpl_var name=data_anime_my_eps><tmpl_if name=status_anime_iswatched></b><tmpl_else></i></tmpl_if> </td>
    <td> <tmpl_var name=data_anime_my_size_h> </td>    
</tr>
</tmpl_unless>
</tmpl_loop>
</table>
anime.tpl:

Code: Select all

<tmpl_loop name=loop_anime>
<html>
<head>
    <title>::AniDB.Net:: Export for <tmpl_var name=global_user> - <tmpl_var name=data_anime_name></title>
</head>
<body link="#0000ff" alink="#ff0000" vlink="#0000ff">
<font face="arial,helvetica" size=2>
<h3>Anime: <tmpl_var name=data_anime_name></h3>
<hr>
<table>
<tr>
    <td> Title: </td>
    <td> <tmpl_var name=data_anime_name> </td>
</tr>
<tr>
    <td> Synonyms </td>
    <td> 
	<tmpl_loop name=loop_anime_title_alias>
	<tmpl_var name=data_anime_title_alias_name>, 
	</tmpl_loop>
    </td>
</tr>
<tr>
    <td> Short Titles </td>
    <td> 
	<tmpl_loop name=loop_anime_title_short>
	<tmpl_var name=data_anime_title_short_name>, 
	</tmpl_loop>
    </td>
</tr>
<tr>
    <td> Type: </td>
    <td> <tmpl_var name=data_anime_type_name> </td>
</tr>
<tr>
    <td> Genres: </td>
    <td> 
	<tmpl_loop name=loop_anime_genre>
	<tmpl_var name=data_anime_genre_name>, 
	</tmpl_loop>
    </td>
</tr>
<tr>
    <td> Eps: </td>
    <td> <tmpl_var name=data_anime_eps> </td>
</tr>
<tr>
    <td> Year: </td>
    <td> <tmpl_var name=data_anime_year> </td>
</tr>
<tr>
    <td> Producer: </td>
    <td> <tmpl_var name=data_anime_producer> </td>
</tr>
<tr>
    <td> url: </td>
    <td> <a href="<tmpl_var name=data_anime_url>" target="_blank"><tmpl_var name=data_anime_url></a> </td>
</tr>
<tr>
    <td> Rating: </td>
    <td> <tmpl_var name=data_anime_rating> (<tmpl_var name=data_anime_votes> votes) </td>
</tr>
<tr>
    <td> Reviews: </td>
    <td> <tmpl_var name=data_anime_reviewrating> (<tmpl_var name=data_anime_reviews> reviews) </td>
</tr>
<tr>
    <td> AniDB: </td>
    <td> <a href="<tmpl_var name=global_animedburl>?show=anime&aid=<tmpl_var name=data_anime_id>" target="_blank">AniDB AID: <tmpl_var name=data_anime_id></a> </td>
</tr>
</table>
<hr>
<tmpl_var name=data_anime_other>
<hr>
<b>Episodes:</b><br>
<table>
<tr>
    <td> EpNo </td>
    <td> Name </td>
    <td> Length </td>
    <td> Aired </td>
    <td> Status </td>
<tr>
<tmpl_loop name=loop_ep>
<tr>
    <td> <a href="<tmpl_var name=global_animedburl>?show=ep&eid=<tmpl_var name=data_ep_id>" target="_blank"><tmpl_var name=data_ep_epno></a> </td>
    <td> <tmpl_var name=data_ep_name> </td>
    <td> <tmpl_var name=data_ep_length> </td>
    <td> <tmpl_var name=data_ep_aired> </td>
    <td> <tmpl_if name=status_ep_iswatched>watched<tmpl_else>unwatched</tmpl_if> </td>
</tr>
<tmpl_if name=status_ep_hasfile>
<tr>
    <td colspan=5>
    <table border=0>
    <tr>
        <td> ID </td>
        <td> Size </td>
        <td> Group </td>
	<td> Ed2k </td>
	<td> Storage </td>
	<td> Source </td>
	<td> Status </td>
    </tr>
    <tmpl_loop name=loop_file>
    <tr>
        <td> <a href="<tmpl_var name=global_animedburl>?show=file&fid=<tmpl_var name=data_file_id>" target="_blank"><tmpl_var name=data_file_id></a> </td>
	<td> <tmpl_var name=data_file_size></a> (<tmpl_var name=data_file_size_h>) </td>
        <td> <tmpl_if name=data_file_group_id><a href="<tmpl_var name=global_animedburl>?show=group&gid=<tmpl_var name=data_file_group_id>"><tmpl_var name=data_file_group_shortname></a><tmpl_else>-</tmpl_if> </td>
	<td> <tmpl_if name=data_file_ed2k_hash><a href="<tmpl_var name=data_file_ed2k_link>"><tmpl_var name=data_file_ed2k_name></a><tmpl_else>-</tmpl_if> </td>
        <td> <tmpl_var name=data_file_storage> </td>
        <td> <tmpl_var name=data_file_source> </td>
	<td> <tmpl_if name=status_file_iswatched>watched on <tmpl_var name=data_file_viewdate><tmpl_else>unwatched</tmpl_if> </td>
    </tr>
    </tmpl_loop>
    </table>
    </td>
</tr>
</tmpl_if>
</tmpl_loop>
</table>
<br>
<a href="../mylist.htm">Back</a>
</font>
</body>
</html>
</tmpl_loop>

killy1999
Posts: 3
Joined: Sun Jun 29, 2003 7:52 am

Post by killy1999 » Sun Jun 29, 2003 7:55 pm

The report feature looks very nice. Just a question : how can I test a format file?

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

Post by exp » Sun Jun 29, 2003 9:37 pm

unfortunatly there isn't any way you can test your templates ATM.
if i get way too much free time on my hands i might write a little test app for local testing, atm all you can do is mail me the template and i'll check it and include it if it does not show any obvious errors.

BYe!
EXP

zaufany
Posts: 127
Joined: Sat Apr 05, 2003 9:50 pm
Location: Poland

Post by zaufany » Tue Jul 01, 2003 11:12 pm

I have two questions.
1.
Why don't we add some graphic into themes?
2.
I want create a genre-sensitive theme. I need something like <tmpl_if name=data_anime_genre_ecchi> for all genres. Can it be implemented?

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

Post by exp » Wed Jul 02, 2003 7:11 pm

1.
that is no problem, simply use grafix as you like and zip them with a short readme telling ppl that they need to copy the files/directories into the extracted mylist export directory.
I would then link that additional zip file on the export page.
However i do not plan to include the images directly into the tgz export file.

2.
i guess that could be done, dunno when i'll get around to implement it though.

BYe!
EXP

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

Post by exp » Tue Jul 08, 2003 9:32 pm

First official version of a AniDB Export Template SDK available:

http://www.anidb.net/files/anidb_template_sdk_0.01.zip

This allows you to try your templates on your own pc too!

BYe!
EXP

User avatar
DonGato
Posts: 1296
Joined: Sun Nov 17, 2002 9:08 pm
Location: The Pampas, The land of the Gaucho!
Contact:

Post by DonGato » Wed Jul 09, 2003 12:11 am

Very nice.
Now I need only time to do some new templates. :)

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

Post by exp » Sat Aug 02, 2003 10:51 am

The mylist export feature has been expanded in order to cover more of the new infos in anidb.
The new version of the template SDK is now available.
(see first post)

BYe!
EXP

User avatar
darkfader
Posts: 15
Joined: Thu Jan 09, 2003 12:11 am
Location: Netherlands

Post by darkfader » Sun Aug 10, 2003 4:13 am

"install Sharable"... shouldn't this be "Storable" ?
(and it would have been Shareable otherwise anyway)

Kind of scary updating it with Cygwin :?
Some DLL in the \cygwin\lib\perl5\5.8.0\cygwin-multi-64int\auto\Storable directory had read-only permissions, so might need to fix that first (or just delete all files in there) before issueing the install command. Prepend "force" if necessary.
If you get a error about byte order or sth, add the following like to export.pm:

Code: Select all

$Storable::interwork_56_64bit = "true";
I will now toy a bit with those templates but I get easily drifted away unfortunately, so maybe I end up learning Perl or something :x

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

Post by exp » Sun Aug 10, 2003 11:15 am

yeah,

that's a random feature in the readme, it is of course Storable.
however you do realise that you don't actually need to use cygwin, do you?
the simplest way is simply to download activeperl, install it and overwrite the Storable module files with the ones from the SDK tgz.

uploaded a new version of the SDK with that typo fixed and with an additional big data file which allows you to test your template for a very large mylist too.

BYe!
EXP

User avatar
darkfader
Posts: 15
Joined: Thu Jan 09, 2003 12:11 am
Location: Netherlands

Post by darkfader » Sun Aug 10, 2003 3:25 pm

Me again...
Check out http://darkfader.net/temp/xml.zip :)
It's a template to XML wrapper with some ugly stylesheet.
Extract into themes folder and then export 'xml'.
After exporting, open index.html in the xml and not the out folder.
This is a frameset.

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

Post by exp » Sun Aug 10, 2003 4:08 pm

quite interesting aproach, though plz note that the xml specification does require you to put your <?xml strings in the first line of the file.
it's not allowed to have a comment before them (you did that in anime.tpl) this causes an error in mozilla.
i'll also see what i can do @ additional files lile stylesheets.
maybe i'll simply copy all additional files in the theme dir directly to the output dir.

BYe!
EXP

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

Post by exp » Tue Aug 12, 2003 7:36 pm

added new version of the SDK.

BYe!
EXP

Locked