MyList export template guidelines: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{TOCright}}
{{TOCright}}


This page will try to give some pointers in to Mylist Export Template creation.
This page will try to give some pointers in to MyList Export Template creation.


== Frequently Asked Questions ==
== Frequently Asked Questions ==
=== What are Mylist Exports? ===
=== What are MyList Exports? ===
: Mylist exports are a way to export your mylist, providing off-line browsing capabilities, it's like a snapshot of the state of your mylist at the moment you requested the export.
: MyList exports are a way to export your MyList, providing off-line browsing capabilities, it's like a snapshot of the state of your MyList at the moment you requested the export.
=== Can i create my own template? ===
=== Can i create my own template? ===
: Yes, this page should help you starting with your own template.
: Yes, this page should help you starting with your own template.
=== What are the requirements for building a template? ===
=== What are the requirements for building a template? ===
: Well, the only true *requirement* is a text editor, though if you want to test your template before submitting you will need Perl (v5.8.8+) to use the SDK.
: Well, the only true *requirement* is a text editor, though if you want to test your template before submitting you will need Perl (v5.8.8+) to use the SDK.
=== Can I include images, external stylesheets/javascript files with my templates? ===
=== Can I include images, external stylesheets/JavaScript files with my templates? ===
: Yes, you can even include subdirectories but please try to keep the size low.
: Yes, you can even include subdirectories but please try to keep the size low.


Line 29: Line 29:


=== About this SDK ===
=== About this SDK ===
: This SDK is meant to allow you to test your templates for the AniDB mylist export function on your own pc. It should work under Windows and Linux. You might need to install some additional software (see bellow for Installing Perl).
: This SDK is meant to allow you to test your templates for the AniDB MyList export function on your own pc. It should work under Windows and Linux. You might need to install some additional software (see bellow for Installing Perl).
=== Current version and where to get ===
=== Current version and where to get ===
: Current release of the SDK is '''0.13.4''', get here: http://static.anidb.net/files/anidb_template_sdk_0.13.4.rar
: Current release of the SDK is '''0.13.4''', get here: http://static.anidb.net/files/anidb_template_sdk_0.13.4.rar
Line 75: Line 75:
: You might also want to periodically check this page for a list of the latest changes.
: You might also want to periodically check this page for a list of the latest changes.


: The source code of all release versions of the Mylist Export templates listed on this page is [[AniDB:Mylist_export_DEV]].<br/>
: The source code of all release versions of the MyList Export templates listed on this page is [[AniDB:Mylist_export_DEV]].<br/>
: By HTTP: [http://dev.anidb.info/websvn/listing.php?repname=AniDB+CSS&path=%2Ftrunk%2Fexport%2F&rev=0&sc=0 http://dev.anidb.info/websvn/]<br/>
: By HTTP: [http://dev.anidb.info/websvn/listing.php?repname=AniDB+CSS&path=%2Ftrunk%2Fexport%2F&rev=0&sc=0 http://dev.anidb.info/websvn/]<br/>


== Template HowTo ==
== Template HowTo ==


Well, here's all you need to write templates for the mylist export function.<br>
Well, here's all you need to write templates for the MyList export function.<br>
We really need better templates!
We really need better templates!


Line 91: Line 91:


All files, if possible, in Unix format. But dos format doesn't hurt either, I'll convert them, in that case.<br>
All files, if possible, in Unix format. But dos format doesn't hurt either, I'll convert them, in that case.<br>
The export script will parse the mylist.tpl file and create one output file called i.e. mylist.htm. So mylist.tpl get's parsed only once (because you only have one mylist).<br>
The export script will parse the mylist.tpl file and create one output file called i.e. mylist.htm. So mylist.tpl get's parsed only once (because you only have one MyList).<br>
However anime.tpl will be parsed once for every anime in your mylist. And for each a unique file will be created. The default file extension for the output files is "htm", however if you create a file called "extension.dat" and put only the extension in the first line of the file, i.e. "txt" then that extension will be used.<br>
However anime.tpl will be parsed once for every anime in your MyList. And for each a unique file will be created. The default file extension for the output files is "htm", however if you create a file called "extension.dat" and put only the extension in the first line of the file, i.e. "txt" then that extension will be used.<br>


The file info.dat should contain at least the following 3 lines:<br>
The file info.dat should contain at least the following 3 lines:<br>
Line 121: Line 121:
==== Example 2 ====
==== Example 2 ====
; <tmpl_if name=status_anime_iswatched>anime is watched<tmpl_else>anime is unwatched</tmpl_if>
; <tmpl_if name=status_anime_iswatched>anime is watched<tmpl_else>anime is unwatched</tmpl_if>
: This is a simple if/else statement. This would write "anime is watched" or "anime is unwatched" into the resulting html file. Note that you can only check if a variable is defined, it is not possible to compare values. All variables begining with status_ are meant to be used in ifs. They are either 0 or 1.
: This is a simple if/else statement. This would write "anime is watched" or "anime is unwatched" into the resulting html file. Note that you can only check if a variable is defined, it is not possible to compare values. All variables beginning with status_ are meant to be used in ifs. They are either 0 or 1.


==== Example 3 ====
==== Example 3 ====
Line 160: Line 160:
; global_date : Date of creation (i.e. 02.08.2003 12:18)
; global_date : Date of creation (i.e. 02.08.2003 12:18)
; global_date_short : Short date of creation (i.e. 02.08.03)
; global_date_short : Short date of creation (i.e. 02.08.03)
; global_animecount : Number of animes in mylist
; global_animecount : Number of animes in MyList
; global_epcount : Number of episodes in mylist
; global_epcount : Number of episodes in MyList
; global_filecount : Number of files in mylist
; global_filecount : Number of files in MyList
; global_bytecount : Overall size of all files in mylist in Bytes
; global_bytecount : Overall size of all files in MyList in Bytes
; global_bytecount_h : Same as global_bytecount but in kB, MB, GB, ...
; global_bytecount_h : Same as global_bytecount but in kB, MB, GB, ...
; global_animedburl : URL to animedb, http://..../animedb.pl
; global_animedburl : URL to animedb, http://..../animedb.pl
; global_userstat_animeadded : Anime entries added by user to db
; global_userstat_animeadded : Anime entries added by user to DB
; global_userstat_epsadded : Episode entries added by user to db
; global_userstat_epsadded : Episode entries added by user to DB
; global_userstat_filesadded : Files added by user to db
; global_userstat_filesadded : Files added by user to DB
; global_userstat_groupsadded : Group entries added by user to db
; global_userstat_groupsadded : Group entries added by user to DB
; global_userstat_lamefiles : Number of lame files user owns
; global_userstat_lamefiles : Number of lame files user owns
; global_userstat_lamefilesp : Percentage of lame files in mylist
; global_userstat_lamefilesp : Percentage of lame files in MyList
; global_userstat_independencep : Percentage of independence ([[AniDB_Stats:Most_Independent_User]])
; global_userstat_independencep : Percentage of independence ([[AniDB_Stats:Most_Independent_User]])
; global_userstat_leechp : Percentage of leechness ([[AniDB_Stats:Biggest_Leech0r]])
; global_userstat_leechp : Percentage of leechness ([[AniDB_Stats:Biggest_Leech0r]])
; global_userstat_reviews : Total reviews written by user
; global_userstat_reviews : Total reviews written by user
; global_userstat_votes : Number of votes issued by user
; global_userstat_votes : Number of votes issued by user
; global_userstat_totalviewedp : Percentage of viewed episodes, from all db
; global_userstat_totalviewedp : Percentage of viewed episodes, from all DB
; global_userstat_totalownedp : Percentage of owned episodes, from all db
; global_userstat_totalownedp : Percentage of owned episodes, from all DB
; global_userstat_ownviewedp : Percentage of viewed episodes, from mylist
; global_userstat_ownviewedp : Percentage of viewed episodes, from MyList
; global_userstat_viewedepcnt : Number of viewed episodes, from mylist
; global_userstat_viewedepcnt : Number of viewed episodes, from MyList


----
----
Line 205: Line 205:
; data_anime_url : Official home page
; data_anime_url : Official home page
; data_anime_other : Anime synopsis
; data_anime_other : Anime synopsis
; data_anime_date : Date of addition to db
; data_anime_date : Date of addition to DB
; data_anime_date_short : Short date of addition to db
; data_anime_date_short : Short date of addition to DB
; data_anime_update : Last update date (in unix time format)
; data_anime_update : Last update date (in Unix time format)
; data_anime_update_short : Last update short date
; data_anime_update_short : Last update short date
; data_anime_startdate : Start airing/release date
; data_anime_startdate : Start airing/release date
Line 223: Line 223:
; data_anime_animenfoid : Old AnimeNfo ID (i.e. 954)
; data_anime_animenfoid : Old AnimeNfo ID (i.e. 954)
; data_anime_animenfoid2 : New AnimeNfo ID (i.e. klmgzk)
; data_anime_animenfoid2 : New AnimeNfo ID (i.e. klmgzk)
; data_anime_animenfourl : Complete AnimeNfo url (without <a href="">, just a plain url)
; data_anime_animenfourl : Complete AnimeNfo URL (without <a href="">, just a plain URL)
; data_anime_animenfourl_name : AnimeNfo link name as displayed at AniDB (i.e. "ID: 954" or "ID: 954,klmgzk")
; data_anime_animenfourl_name : AnimeNfo link name as displayed at AniDB (i.e. "ID: 954" or "ID: 954,klmgzk")
; data_anime_annid : Anime News Network ID
; data_anime_annid : Anime News Network ID
Line 229: Line 229:
''If only one file is present for an anime the following variables will have the same values as the ones for that file, if there is more than one file and all files have the same mystate it will match those. in any other case the mystate is undef''
''If only one file is present for an anime the following variables will have the same values as the ones for that file, if there is more than one file and all files have the same mystate it will match those. in any other case the mystate is undef''
; data_anime_mystate : State of anime files (undef=-1, unknown=0, on hdd=1, on cd=2, deleted=3)
; data_anime_mystate : State of anime files (undef=-1, unknown=0, on hdd=1, on cd=2, deleted=3)
; data_anime_mystate_string : String representation of state (i.e. "unknown" or "on cd")
; data_anime_mystate_string : String representation of state (i.e. "unknown" or "on CD")
; data_anime_mystate_icon : AniDB url to state icon (img tag already included)
; data_anime_mystate_icon : AniDB URL to state icon (img tag already included)
; data_anime_wishlist_type : Wishlist type ID (0="unknown / unfiled", 1="to watch", 2="to get", 3="blacklist"),
; data_anime_wishlist_type : Wishlist type ID (0="unknown / unfiled", 1="to watch", 2="to get", 3="blacklist"),
; data_anime_wishlist_type_name : Wishlist type name
; data_anime_wishlist_type_name : Wishlist type name
Line 244: Line 244:
; data_anime_annurl : Anime News Network url
; data_anime_annurl : Anime News Network url
; data_anime_allcinemaid : AllCinema ID
; data_anime_allcinemaid : AllCinema ID
; data_anime_allcinemaurl : AllCinema url
; data_anime_allcinemaurl : AllCinema URL
; data_anime_animeplanetid : Anime-Planet ID (i.e. 415)
; data_anime_animeplanetid : Anime-Planet ID (i.e. 415)
; data_anime_animeplaneturl : Anime-Planet Recomendation url
; data_anime_animeplaneturl : Anime-Planet Recommendation URL
; data_anime_my_eps : Number of non-special episodes in mylist
; data_anime_my_eps : Number of non-special episodes in MyList
; data_anime_my_eps_special : Number of special episodes in mylist
; data_anime_my_eps_special : Number of special episodes in MyList
; data_anime_my_eps_total : Number of non-special and special episodes in mylist
; data_anime_my_eps_total : Number of non-special and special episodes in MyList
; data_anime_my_watchedeps : Number of watched episodes
; data_anime_my_watchedeps : Number of watched episodes
; data_anime_my_watchedeps_special : Number of watched specials
; data_anime_my_watchedeps_special : Number of watched specials
Line 256: Line 256:
; data_anime_my_unwatchedeps_special : Number of unwatched specials
; data_anime_my_unwatchedeps_special : Number of unwatched specials
; data_anime_my_unwatchedeps_total : Total number of unwatched episodes and specials
; data_anime_my_unwatchedeps_total : Total number of unwatched episodes and specials
; data_anime_my_size : Overall size of all anime files in mylist in Bytes
; data_anime_my_size : Overall size of all anime files in MyList in Bytes
; data_anime_my_size_h : Same as data_anime_my_size but in kB, MB, GB, ...
; data_anime_my_size_h : Same as data_anime_my_size but in kB, MB, GB, ...
; data_anime_name : Default anime title (mostly japanese romaji), always present
; data_anime_name : Default anime title (mostly Japanese romaji), always present
; data_anime_name_langname : Language name (ie: Japanese)
; data_anime_name_langname : Language name (ie: Japanese)
; data_anime_name_langsname : Language shortname (ie: ja)
; data_anime_name_langsname : Language shortname (ie: ja)
; data_anime_title_jap_kanji : Anime title in japanese kanji, optional
; data_anime_title_jap_kanji : Anime title in Japanese kanji, optional
; data_anime_title_eng : Anime title in english, optional
; data_anime_title_eng : Anime title in English, optional
; data_anime_title_other : Other official title in another language, optional
; data_anime_title_other : Other official title in another language, optional
; data_anime_awardicons : Ready to use html string which displays the little award icons from AniDB. Empty string if no awards are present.
; data_anime_awardicons : Ready to use html string which displays the little award icons from AniDB. Empty string if no awards are present.
Line 294: Line 294:
; data_anime_company_othername : Company other name
; data_anime_company_othername : Company other name
; data_anime_company_type : Company type ID (see ids.txt)
; data_anime_company_type : Company type ID (see ids.txt)
; data_anime_company_url : Company url
; data_anime_company_url : Company URL
; data_anime_company_picurl : Company logo url
; data_anime_company_picurl : Company logo URL
; data_anime_company_aptype : Company role for the anime (see ids.txt)
; data_anime_company_aptype : Company role for the anime (see ids.txt)
; data_anime_company_type_name : company type string (company, organization, individual, etc)
; data_anime_company_type_name : company type string (company, organization, individual, etc.)
; data_anime_company_aptype_name : company relation to given anime string (production, music, etc)
; data_anime_company_aptype_name : company relation to given anime string (production, music, etc.)


----
----
Line 361: Line 361:
; data_anime_award_name : Award name
; data_anime_award_name : Award name
; data_anime_award_type : Award type
; data_anime_award_type : Award type
; data_anime_award_url : Award URL (url assigned to this award, i.e. overview over all awards of this type)
; data_anime_award_url : Award URL (URL assigned to this award, i.e. overview over all awards of this type)
; <strike>data_anime_award_picurl : URL to pic only</strike> [this was removed since Anidb v0.1.47]
; <strike>data_anime_award_picurl : URL to pic only</strike> [this was removed since AniDB v0.1.47]


----
----
Line 398: Line 398:
<tt>loops group audio languags</tt>
<tt>loops group audio languags</tt>
; data_anime_group_alang_id : audio language id (i.e.: 1)
; data_anime_group_alang_id : audio language id (i.e.: 1)
; data_anime_group_alang_name : audio language name (chinese,english, etc)
; data_anime_group_alang_name : audio language name (chinese, english, etc)
; data_anime_group_alang_sname : audio language short name (ja, ne, etc)
; data_anime_group_alang_sname : audio language short name (ja, ne, etc)


Line 419: Line 419:
; status_anime_my_istmpvoted : User temporally voted for this anime (0/1)
; status_anime_my_istmpvoted : User temporally voted for this anime (0/1)
; status_anime_mystate_undef : Has undefined state (0/1)
; status_anime_mystate_undef : Has undefined state (0/1)
; status_anime_mystate_unknown : Has unknwon state (0/1)
; status_anime_mystate_unknown : Has unknown state (0/1)
; status_anime_mystate_onhdd : Has onhdd state (0/1)
; status_anime_mystate_onhdd : Has onhdd state (0/1)
; status_anime_mystate_oncd : Has oncd state (0/1)
; status_anime_mystate_oncd : Has oncd state (0/1)
Line 442: Line 442:
; data_ep_name_romaji : Romaji episode name
; data_ep_name_romaji : Romaji episode name
; data_ep_name_kanji : Kanji episode name
; data_ep_name_kanji : Kanji episode name
; data_ep_length : Episode lenght, in minutes
; data_ep_length : Episode length, in minutes
; data_ep_aired : Date of first airing
; data_ep_aired : Date of first airing
; data_ep_aired_short : Short date of first airing
; data_ep_aired_short : Short date of first airing
Line 561: Line 561:
; data_file_update : Last update date
; data_file_update : Last update date
; data_file_update_short : Last update short date
; data_file_update_short : Last update short date
; data_file_ldate : Date when file was added to mylist
; data_file_ldate : Date when file was added to MyList
; data_file_ldate_short : Same, short version
; data_file_ldate_short : Same, short version
; data_file_storage : User defined string for storage
; data_file_storage : User defined string for storage
Line 609: Line 609:
; status_file_state_isv4 : File is fourth release (0/1)
; status_file_state_isv4 : File is fourth release (0/1)
; status_file_state_isv5 : File is fifth release (0/1)
; status_file_state_isv5 : File is fifth release (0/1)
; status_file_mystate_unknown : Has unknwon state (0/1)
; status_file_mystate_unknown : Has unknown state (0/1)
; status_file_mystate_onhdd : Has onhdd state (0/1)
; status_file_mystate_onhdd : Has onhdd state (0/1)
; status_file_mystate_oncd : Has oncd state (0/1)
; status_file_mystate_oncd : Has oncd state (0/1)
Line 934: Line 934:
----
----


=== Episode mylist status ===
=== Episode MyList status ===
; -1 : mixed
; -1 : mixed
; 0 : unknown
; 0 : unknown
Line 955: Line 955:
----
----


=== Mylist file status ===
=== MyList file status ===
; 0 : unknown
; 0 : unknown
; 1 : on hdd
; 1 : on hdd
Line 963: Line 963:
----
----


=== Mylist filestate ===
=== MyList filestate ===
; 0 : normal
; 0 : normal
; 1 : invalid crc
; 1 : invalid crc
1,633

edits

Navigation menu

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