MyList export template guidelines: Difference between revisions

Jump to navigation Jump to search
m
 
(11 intermediate revisions by 4 users not shown)
Line 43: Line 43:
: This program needs Perl to create example html files from the templates. If you don't have Perl installed (preferably 5.8.8) you'll need to do so now.
: This program needs Perl to create example html files from the templates. If you don't have Perl installed (preferably 5.8.8) you'll need to do so now.
: Under Windows you'll need to download ActivePerl 5.8.8.820+ from activeperl.com:
: Under Windows you'll need to download ActivePerl 5.8.8.820+ from activeperl.com:
:: http://downloads.activestate.com/ActivePerl/Windows/5.8/
:: http://www.activestate.com/activeperl/downloads
:: Install it to c:\perl (or some other directory, but remember where you installed it!).
:: Install it to c:\perl (or some other directory, but remember where you installed it!).
: Under Linux it should already be installed. If not get it from:
: Under Linux it should already be installed. If not get it from the link above.
:: http://downloads.activestate.com/ActivePerl/Linux/5.8/


: If you are not using 5.8.8.820 it's possible you need to update Storable, try the following:
: If you are not using 5.8.8.820 it's possible you need to update Storable, try the following:
Line 52: Line 51:
:: install Storable
:: install Storable
:: bye
:: bye
 
{{eyecatch|1|Note|If you installed 5.8.8.820 '''don't''' overwrite Perl's copy of Storable with the one in the SDK.}}
: <b>Note:</b>If you installed 5.8.8.820 <b>don't</b> overwrite Perl's copy of Storable with the one in the SDK.


=== Additional Module HTML::Template::Expr ===
=== Additional Module HTML::Template::Expr ===
Line 66: Line 64:
: (export.pl takes one parameter which is the name of the template to use)
: (export.pl takes one parameter which is the name of the template to use)


: Note: you can get more information about the HTML::Template::Expr here: http://html-template.sourceforge.net/html_template_expr.html
{{eyecatch|1|Note|You can get more information about the HTML::Template::Expr here: http://html-template.sourceforge.net/html_template_expr.html}}
 
=== Changelog ===
=== Changelog ===
: Read here [[Mylist_export_SDK_changelog]]
: Read here [[Mylist export SDK changelog]]


== SVN Access ==
== GIT Access ==
 
[[AniDB:Mylist_export_DEV]]
: If you created your own template for AniDB and want to share it with everyone else please send a pm to [[User:Der Idiot|deridiot]] or [[User:Fahrenheit|fahrenheit]] @ AniDB<br/>
: 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/>
: By HTTP: [http://dev.anidb.net/websvn/listing.php?repname=AniDB+CSS&path=%2Ftrunk%2Fexport%2F&rev=0&sc=0 http://dev.anidb.info/websvn/]<br/>


== Template HowTo ==
== Template HowTo ==
Line 92: Line 86:
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.


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>
     (C) 2003 by EXP
     (C) 2003 by EXP
     Version: 0.01 (08.07.2003)
     Version: 0.01 (08.07.2003)
<br>
 
1. copyright of the template author, you may include your email address here<br>
1. copyright of the template author, you may include your email address here<br>
2. version number and date<br>
2. version number and date<br>
3. one empty line<br>
3. one empty line


The rest may be used for a short description of the template.<br>
The rest may be used for a short description of the template.<br>
Please do not include the changelog in your info.dat file, instead create a separate changelog.txt file and put your changelog there.<br>
Please do not include the changelog in your info.dat file, instead create a separate changelog.txt file and put your changelog there.


Please also note that the content of the info.dat will be displayed on the AniDB MyList Export Page, so please make sure that your additional info is actually of interest to AniDB users who are trying to decide which theme to use.<br>
Please also note that the content of the info.dat will be displayed on the AniDB MyList Export Page, so please make sure that your additional info is actually of interest to AniDB users who are trying to decide which theme to use.


The export script will create the file (i.e.) mylist.htm and if anime.tpl was provided a folder "anime" where for each anime a file "a<animeid>.htm" will be created.<br>
The export script will create the file (i.e.) mylist.htm and if anime.tpl was provided a folder "anime" where for each anime a file "a<animeid>.htm" will be created.<br>
This can be used to created a linked animelist instead of one huge single html file with all data in it.<br>
This can be used to created a linked animelist instead of one huge single html file with all data in it.<br>
The tpl files are simple plain text or html files. So just put normal html code in them.<br>
The tpl files are simple plain text or html files. So just put normal html code in them.


The export function uses the HTML::Template Perl module to create the output.<br>
The export function uses the HTML::Template Perl module to create the output.<br>
This means you have to use some special tags:<br>
This means you have to use some special tags:


----
----
Line 160: Line 154:
; 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 anime in MyList
; global_epcount : Number of episodes in MyList
; global_totalepcount : Total number of episodes in MyList, including both normal and special episodes
; global_epcount : Number of <u>normal</u> episodes in MyList
:''Normal excludes special episodes, such as S, C, T, O, and P episodes''
; global_spcount : Number of <u>special</u> episodes in MyList
:''Special episodes only, such as S, C, T, O, and P episodes''
; 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, <nowiki>http://..../animedb.pl</nowiki>
; 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
Line 415: Line 413:
; status_anime_iscomplete : Anime is complete (0/1)
; status_anime_iscomplete : Anime is complete (0/1)
; status_anime_iswatched : Anime is completely watched (0/1)
; status_anime_iswatched : Anime is completely watched (0/1)
; status_anime_genre_<genrename> : '''[deprecated]''' i.e. status_anime_genre_action = 1, if the anime has genre action added. Genres are all lowercase and spaces are replaced with _.
; status_anime_genre_<genrename> : '''[deprecated]''' i.e. status_anime_genre_action = 1, if the anime has genre action added. Genres are all lower case and spaces are replaced with _.
; status_anime_my_isvoted : User voted for this anime (0/1)
; status_anime_my_isvoted : User voted for this anime (0/1)
; status_anime_my_istmpvoted : User temporally voted for this anime (0/1)
; status_anime_my_istmpvoted : User temporally voted for this anime (0/1)
Line 975: Line 973:
; 100 : other
; 100 : other


[[Category:Development]][[Category:Mylist_export]]
[[Category:Development]][[Category:Mylist export]]
1

edit

Navigation menu

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