MyList export template guidelines: Difference between revisions

m
no edit summary
mNo edit summary
Line 5: Line 5:
== Frequently Asked Questions ==
== Frequently Asked Questions ==
=== What are Mylist Exports? ===
=== What are Mylist Exports? ===
: Mylist exports are a way to export your mylist, providing offline browsing capabilites, 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 wan't to test your template before submiting 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 16: Line 16:
: Take a look at the csv-minimal theme. You need to create a file called extension.dat which only contains the desired extension, _without_ the dot!
: Take a look at the csv-minimal theme. You need to create a file called extension.dat which only contains the desired extension, _without_ the dot!
=== What is that info.dat file? ===
=== What is that info.dat file? ===
: It's ment to provide the user with a short info about the template. The content should not be too long but is otherwise left to the author of the template.
: It's meant to provide the user with a short info about the template. The content should not be too long but is otherwise left to the author of the template.
: However, it is strongly recommended to begin the file with 3 special lines:
: However, it is strongly recommended to begin the file with 3 special lines:
:: (C) 2003 by EXP
:: (C) 2003 by EXP
Line 29: Line 29:


=== About this SDK ===
=== About this SDK ===
: This SDK is ment 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 41: Line 41:


=== Installing Perl ===
=== Installing Perl ===
: This programm 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://downloads.activestate.com/ActivePerl/Windows/5.8/
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 sourcecode 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/>


Line 90: Line 90:
* changelog.txt - (optional)
* changelog.txt - (optional)


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>
Line 103: Line 103:


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 seperate 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.<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.<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.<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>
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 plaintext 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.<br>


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:<br>


Line 135: Line 135:


==== Example 5 ====
==== Example 5 ====
; You will also need loops to create a usefull template. What are loops?
; You will also need loops to create a useful template. What are loops?
: Well, to create html tables there will be some parts of the html code (mostly table rows) which need to be repeated over and over again and filled with anime/ep/file info.
: Well, to create html tables there will be some parts of the html code (mostly table rows) which need to be repeated over and over again and filled with anime/ep/file info.
: This is specified like this:
: This is specified like this:
1,633

edits

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