1,633
edits
(.info -> .net) |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{TOCright}} | {{TOCright}} | ||
This pages content is | This pages content is centred around CSS development via AniDB's [http://en.wikipedia.org/wiki/Subversion_(software) SVN]. The goals of the SVN are: | ||
# Keeping track of all CSS styles. | # Keeping track of all CSS styles. | ||
# Version control for developers. | # Version control for developers. | ||
# | # Automatic upload procedure to one of AniDB's server. | ||
# | # Automatic update of the drop down menu in the [[profile]]. | ||
{{eyecatch|Note|You should build your style on already existing code. Check the folder '''css/common'''. Examples can be found in '''css/sub'''.}} | {{eyecatch|Note|You should build your style on already existing code. Check the folder '''css/common'''. Examples can be found in '''css/sub'''.}} | ||
==Getting the Source of a Style== | ==Getting the Source of a Style== | ||
If you only want to get the latest version of all files belonging to a particular style, you don't need to install an SVN client. A simpler approach would be to download the files from the SVN repository with your | If you only want to get the latest version of all files belonging to a particular style, you don't need to install an SVN client. A simpler approach would be to download the files from the SVN repository with your web browser. | ||
To do that go to [http://dev.anidb.net/websvn/listing.php?repname=AniDB+CSS&path=%2Ftrunk%2Fcss%2F&rev=0&sc=0 http://dev.anidb.net/websvn/] and click the "tarball" link next to the style 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. | To do that go to [http://dev.anidb.net/websvn/listing.php?repname=AniDB+CSS&path=%2Ftrunk%2Fcss%2F&rev=0&sc=0 http://dev.anidb.net/websvn/] and click the "tarball" link next to the style 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. | ||
Line 17: | Line 17: | ||
==Connecting to SVN== | ==Connecting to SVN== | ||
First thing you need is a client. You can of course use any | 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]. | ||
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 | 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 application 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: '''svn://dev.anidb.net/svn/trunk'''<br/> | ||
Line 31: | Line 31: | ||
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 | 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) | ||
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 | 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 | Deleting things works the same way. You first have to delete the placeholder. | ||
===SVN via RapidSVN=== | ===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. | 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 | 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=== | ||
Line 50: | Line 50: | ||
==Adding a new project== | ==Adding a new project== | ||
There are a few things that needs to get done when adding a new project: | There are a few things that needs to get done when adding a new project: | ||
# Add a new dir for your project in the | # Add a new dir for your project in the CSS folder (<tt>/trunk/css/{your_style}</tt>) | ||
# Name the dir whatever you want, but '''NO SPACES!'''. | # Name the dir whatever you want, but '''NO SPACES!'''. | ||
# If you are using images different from the anidb ones add a <tt>/images/</tt> dir below your project (i.e. <tt>/trunk/css/{your_style}/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/css/{your_style}/images</tt>) | ||
#* You may use | #* You may use sub-folders below that one if you want. | ||
# Add a screenshot and a thumbnail of your style in the images folder with the following specifications: | # Add a screenshot and a thumbnail of your style in the images folder with the following specifications: | ||
#* Filename: thumbnail.png | #* Filename: thumbnail.png | ||
Line 65: | Line 65: | ||
#* status: | #* status: | ||
#* description: | #* description: | ||
# (optional) For | # (optional) For auto-processing edit the '''styleslist''' file and add a relative path for the main CSS file (the one with all your <tt>@import</tt> lines, i.e. <tt>./sub/silver/main.css</tt>) | ||
#* You can disable processing by adding a # in front of the line. | #* You can disable processing by adding a # in front of the line. | ||
Line 76: | Line 76: | ||
==Merging & Hosting== | ==Merging & Hosting== | ||
Every | Every CSS that is used this way gets merged into 1 file (to reduce http overhead), uploaded to 1 of AniDB's server and added to the style selection in the AniDB [[profile]]. To realize this a python script is used, doing the following: | ||
# read the file '''stylelist''' in the same folder as the script (ignores lines starting with #) | # read the file '''stylelist''' in the same folder as the script (ignores lines starting with #) | ||
# takes the first line from '''stylelist''' and reads the main | # takes the first line from '''stylelist''' and reads the main CSS file for this style | ||
# reads every @import line, opens the file specified behind those and copies the content to a new file | # reads every @import line, opens the file specified behind those and copies the content to a new file | ||
# repeats the procedure for the next lines aside of the # ones | # repeats the procedure for the next lines aside of the # ones | ||
# checks if there are is an /images/ folder below the | # checks if there are is an /images/ folder below the CSS folder and if yes collects a list of all gif/jpg/png files | ||
# uploads the big | # uploads the big CSS file and the images to 1 of AniDB's servers | ||
[[Category:Development]][[Category:CSS]] | [[Category:Development]][[Category:CSS]] |
edits