MyList export template guidelines: Difference between revisions

Jump to navigation Jump to search
Line 66: Line 66:


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


A theme consist out of one or multiple tpl files. Those are called:
A theme consist out of one or multiple tpl files. Those are called:
* mylist.tpl - (mandatory)
* anime.tpl - (optional)
* extension.dat - (optional)
* info.dat - (mandatory)
* changelog.txt - (optional)


mylist.tpl - (mandatory)
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>
anime.tpl - (optional)
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>
 
extension.dat - (optional)
 
info.dat - (mandatory)
 
changelog.txt - (optional)
 
All files, if possible, in unix format. But dos format doesn't hurt either, I'll convert them, in that case.
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).
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:
    (C) 2003 by EXP
    Version: 0.01 (08.07.2003)


1. copyright of the template author, you may include your email address here
The file info.dat should contain at least the following 3 lines:<br>
2. version number and date
    (C) 2003 by EXP<br>
3. one empty line
    Version: 0.01 (08.07.2003)<br>
<br>
1. copyright of the template author, you may include your email address here<br>
2. version number and date<br>
3. one empty line<br>


The rest may be used for a short description of the template.
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 seperate changelog.txt file and put your changelog there.
Please do not include the changelog in your info.dat file, instead create a seperate changelog.txt file and put your changelog there.<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 acutally of interest to AniDB users who are trying to decide which theme to use.
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 acutally of interest to AniDB users who are trying to decide which theme to use.<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.
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.
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 plaintext or html files. So just put normal html code in them.
The tpl files are simple plaintext or html files. So just put normal html code in them.<br>


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


----
----
347

edits

Navigation menu

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