AniDB:Mylist export DEV: Difference between revisions

From AniDB
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
{{TOCright}}
{{TOCright}}


This pages content is centered around Mylist Export development via Anidb's [[Wikipedia:Subversion (software)|SVN]]. The goals of the SVN are:
This pages content is centred around MyList Export development via AniDB's [[Wikipedia:Subversion (software)|SVN]]. The goals of the SVN are:
# Keeping track of all Mylist Export templates.
# Keeping track of all MyList Export templates.
# Version control for developers.
# Version control for developers.
# Automatical upload procedure to one of anidbs server.
# Automatic upload procedure to one of AniDB's server.
# Automatical update of the export template selection on the mylist export page.
# Automatic update of the export template selection on the MyList export page.


==Getting the Source of a Template==
==Getting the Source of a Template==
Line 15: Line 15:


==Connecting to SVN==
==Connecting to SVN==
First thing you need is a client. You can of course use any svn client you want, but we recommend [http://tortoisesvn.tigris.org/ Tortoise SVN] for windows user as it nicely integrates into Explorer and makes it, as such, very easy to use. After that you specify a dir on your hdd where you want to put the files and checkout the current CVS version.
First thing you need is a client. You can of course use any SVN client you want, but we recommend [http://tortoisesvn.tigris.org/ Tortoise SVN] for windows user as it nicely integrates into Explorer and makes it, as such, very easy to use. After that you specify a dir on your HDD where you want to put the files and checkout the current CVS version.


If you don't like integration you could use [http://www.syntevo.com/smartsvn/ SmartSVN].
If you don't like integration you could use [http://www.syntevo.com/smartsvn/ SmartSVN].
Line 21: Line 21:
For Mac users we recommend [http://rapidsvn.tigris.org/ RapidSVN]. RapidSVN does not integrate with the Mac Finder as much as Tortoise does with Explorer. Instead it is a standalone app that you use to browse the files on the SVN server (Repository) as well as your local files (Working Copy).
For Mac users we recommend [http://rapidsvn.tigris.org/ RapidSVN]. RapidSVN does not integrate with the Mac Finder as much as Tortoise does with Explorer. Instead it is a standalone app that you use to browse the files on the SVN server (Repository) as well as your local files (Working Copy).


By SVN Client: svn://dev.anidb.net/svn/trunk<br/>
By SVN Client: <tt>svn://dev.anidb.net/svn/trunk</tt><br/>
For write access contact an [[User:Mods|AniDB Mod]].
For write access contact an [[User:Mods|AniDB Mod]].


Line 29: Line 29:
Here some tortoise specific notes.
Here some tortoise specific notes.


After installing a version and having picked a dir, where to put your stuff right click in the new dir and select '''checkout''' In the following dialog enter svn://dev.anidb.net/svn/trunk/ in the url field. This will download the whole content of the svn to this dir. After this is done you will notice a green thingy in the file and dirname icons. (This means your local version matches the version in the SVN Once you edit any file it will turn red)
After installing a version and having picked a dir, where to put your stuff right click in the new dir and select '''checkout''' In the following dialogue enter <tt>svn://dev.anidb.net/svn/trunk/</tt> in the URL field. This will download the whole content of the svn to this dir. After this is done you will notice a green thingy in the file and dirname icons. (This means your local version matches the version in the SVN Once you edit any file it will turn red)


To add new content you can create new files and dirs like you are used via explorer. Editing the files can be done via any editor you want as well. You will notice no green thingy turning up for anything new you created. This means the file is not in the svn and hence not recognized. You have to add them first. In the context menu you will find an option who would have guessed it named '''add'''. This only creates a placeholder in the SVN. No actual content is written yet.
To add new content you can create new files and dirs like you are used via explorer. Editing the files can be done via any editor you want as well. You will notice no green thingy turning up for anything new you created. This means the file is not in the SVN and hence not recognized. You have to add them first. In the context menu you will find an option who would have guessed it named '''add'''. This only creates a placeholder in the SVN. No actual content is written yet.
Deleting things works analog. You first have to delete the placeholder.
Deleting things works analogue. You first have to delete the placeholder.


===SVN via RapidSVN===
===SVN via RapidSVN===
To get started, run RapidSVN and go to '''Repository -&gt; Checkout''' and enter svn://dev.anidb.net/svn/trunk in the URL field and your desired local directory in the Destination Directory field.
To get started, run RapidSVN and go to '''Repository -&gt; Checkout''' and enter <tt>svn://dev.anidb.net/svn/trunk</tt> in the URL field and your desired local directory in the Destination Directory field.


You may now create/edit/delete any files or folders in your working copy dir.  Any changes you make will be automatically recognized and highlighted in the RapidSVN file browser: items edited or deleted will have a red icon,  and items created will have a question mark icon.  To add created items to the SVN right click on them and choose '''Add''' (or select them and hit '''cmd+A''').  Note that Adding only lets them be recognized by the SVN, it does not commit their creation to the server. To commit changes, select the files, right click and choose '''Commit'''. You will be given a dialog box in which you may annotate what this commit entails.  You may choose to leave this blank, but it's good practice to log your changes so others know what you've changed.
You may now create/edit/delete any files or folders in your working copy dir.  Any changes you make will be automatically recognized and highlighted in the RapidSVN file browser: items edited or deleted will have a red icon,  and items created will have a question mark icon.  To add created items to the SVN right click on them and choose '''Add''' (or select them and hit '''cmd+A''').  Note that Adding only lets them be recognized by the SVN, it does not commit their creation to the server. To commit changes, select the files, right click and choose '''Commit'''. You will be given a dialogue box in which you may annotate what this commit entails.  You may choose to leave this blank, but it's good practice to log your changes so others know what you've changed.
   
   
===Committing===
===Committing===
After you have edited, added or even deleted some things you still have to commit your changes. This will write the things to the SVN.  
After you have edited, added or even deleted some things you still have to commit your changes. This will write the things to the SVN.  


You can commit on a file or dirlevel. Meaning you can commit a big change with multiple files or folders involved or just specific files. '''To not spam us all into oblivion with SVN mails it's recommended to bundle some commits.'''
You can commit on a file or directory level. Meaning you can commit a big change with multiple files or folders involved or just specific files. '''To not spam us all into oblivion with SVN mails it's recommended to bundle some commits.'''


Take also note that you should before editing anything '''always''' update your local files with the ones in the SVN.
Take also note that you should before editing anything '''always''' update your local files with the ones in the SVN.
Line 50: Line 50:
# Add a new dir for your project in the export folder (<tt>/trunk/export/{your_template}</tt>)
# Add a new dir for your project in the export folder (<tt>/trunk/export/{your_template}</tt>)
# Name the dir whatever you want, but '''NO SPACES!''' and lower-case only.
# Name the dir whatever you want, but '''NO SPACES!''' and lower-case only.
#* The name should contain the appropriate prefix, i.e. html-XXX for an html export template, xml-XXX if the template generates xml output, ...
#* The name should contain the appropriate prefix, i.e. html-XXX for an html export template, xml-XXX if the template generates XML output, ...
# If you are using images different from the anidb ones add a <tt>/images/</tt> dir below your project (i.e. <tt>/trunk/export/{your_template}/images</tt>)
# If you are using images different from the AniDB ones add a <tt>/images/</tt> dir below your project (i.e. <tt>/trunk/export/{your_template}/images</tt>)
#* FIXME: not sure if the current export code actually supports an images directory - [[User:Exp|Exp]] 07:49, 28 June 2007 (UTC)
#* FIXME: not sure if the current export code actually supports an images directory - [[User:Exp|Exp]] 07:49, 28 June 2007 (UTC)
#* You may use subfolders below that one if you want.
#* You may use subfolders below that one if you want.
Line 59: Line 59:


==Merging & Hosting==
==Merging & Hosting==
Every template when finished, gets uploaded to 1 of anidb's server and added to the export template page selection in the [[http://anidb.net/perl-bin/animedb.pl?show=export|anidb mylist export page]].
Every template when finished, gets uploaded to one of AniDB's servers and added to the export template page selection in the {{AniDBLink|export|AniDB MyList export page}}.


[[Category:Development]]
[[Category:Development]]
[[Category:Mylist_export]]
[[Category:Mylist_export]]

Revision as of 09:13, 12 May 2009

This pages content is centred around MyList Export development via AniDB's SVN. The goals of the SVN are:

  1. Keeping track of all MyList Export templates.
  2. Version control for developers.
  3. Automatic upload procedure to one of AniDB's server.
  4. Automatic update of the export template selection on the MyList export page.

Getting the Source of a Template

If you only want to get the latest version of all files belonging to a particular template, you don't need to install an SVN client. A simpler approach would be to download the files from the SVN repository with your webbrowser.

To do that go to http://dev.anidb.net/websvn/ and click the "tarball" link next to the template you want to download. You will need a compression program which can handle ".tar.gz" or ".tgz" files, but nowadays most tools support these formats.

If you want to contribute your own templates, you will need to install an SVN client.

Connecting to SVN

First thing you need is a client. You can of course use any SVN client you want, but we recommend Tortoise SVN for windows user as it nicely integrates into Explorer and makes it, as such, very easy to use. After that you specify a dir on your HDD where you want to put the files and checkout the current CVS version.

If you don't like integration you could use SmartSVN.

For Mac users we recommend RapidSVN. RapidSVN does not integrate with the Mac Finder as much as Tortoise does with Explorer. Instead it is a standalone app that you use to browse the files on the SVN server (Repository) as well as your local files (Working Copy).

By SVN Client: svn://dev.anidb.net/svn/trunk
For write access contact an AniDB Mod.

If you have further questions feel free to ask in #anidb-dev or #anidb @irc.zirc.org or pm a mod.

SVN via Tortoise

Here some tortoise specific notes.

After installing a version and having picked a dir, where to put your stuff right click in the new dir and select checkout In the following dialogue enter svn://dev.anidb.net/svn/trunk/ in the URL field. This will download the whole content of the svn to this dir. After this is done you will notice a green thingy in the file and dirname icons. (This means your local version matches the version in the SVN Once you edit any file it will turn red)

To add new content you can create new files and dirs like you are used via explorer. Editing the files can be done via any editor you want as well. You will notice no green thingy turning up for anything new you created. This means the file is not in the SVN and hence not recognized. You have to add them first. In the context menu you will find an option who would have guessed it named add. This only creates a placeholder in the SVN. No actual content is written yet. Deleting things works analogue. You first have to delete the placeholder.

SVN via RapidSVN

To get started, run RapidSVN and go to Repository -> Checkout and enter svn://dev.anidb.net/svn/trunk in the URL field and your desired local directory in the Destination Directory field.

You may now create/edit/delete any files or folders in your working copy dir. Any changes you make will be automatically recognized and highlighted in the RapidSVN file browser: items edited or deleted will have a red icon, and items created will have a question mark icon. To add created items to the SVN right click on them and choose Add (or select them and hit cmd+A). Note that Adding only lets them be recognized by the SVN, it does not commit their creation to the server. To commit changes, select the files, right click and choose Commit. You will be given a dialogue box in which you may annotate what this commit entails. You may choose to leave this blank, but it's good practice to log your changes so others know what you've changed.

Committing

After you have edited, added or even deleted some things you still have to commit your changes. This will write the things to the SVN.

You can commit on a file or directory level. Meaning you can commit a big change with multiple files or folders involved or just specific files. To not spam us all into oblivion with SVN mails it's recommended to bundle some commits.

Take also note that you should before editing anything always update your local files with the ones in the SVN.

Adding a new project

There are a few things that needs to get done when adding a new project:

  1. Add a new dir for your project in the export folder (/trunk/export/{your_template})
  2. Name the dir whatever you want, but NO SPACES! and lower-case only.
    • The name should contain the appropriate prefix, i.e. html-XXX for an html export template, xml-XXX if the template generates XML output, ...
  3. If you are using images different from the AniDB ones add a /images/ dir below your project (i.e. /trunk/export/{your_template}/images)
    • FIXME: not sure if the current export code actually supports an images directory - Exp 07:49, 28 June 2007 (UTC)
    • You may use subfolders below that one if you want.

In the end you should end up with a structure like this:

 /trunk/export/<your project>
 /trunk/export/<your project>/images

Merging & Hosting

Every template when finished, gets uploaded to one of AniDB's servers and added to the export template page selection in the AniDB MyList export page.