How To Convert a UserBase Manual to Docbook/ca: Difference between revisions
(Created page with "Si voleu millorar el procediment, teniu bones habilitats amb Python, i coneixeu els principis d'autoria de docbook, podeu millorar el procediment. Si us plau, poseu-vos en contac...") |
(Created page with "* Assegureu-vos que les pàgines del vostre manual segueixen les directrius d'autor de UserBase i les [[Special:myLanguage/Typographical_Gu...") |
||
Line 8: | Line 8: | ||
==Preparar les pàgines per a la conversió== | ==Preparar les pàgines per a la conversió== | ||
* | * Assegureu-vos que les pàgines del vostre manual segueixen les [[Special:myLanguage/Tasks_and_Tools|directrius d'autor de UserBase]] i les [[Special:myLanguage/Typographical_Guidelines|directrius tipogràfiques]]. | ||
* Check if every page has its header according to the level of this page in table of contents. | * Check if every page has its header according to the level of this page in table of contents. |
Revision as of 17:38, 2 July 2011
Prefaci
El procediment actual no està polit, el codi de l'script és lleig, no prou intel·ligent, etc. L'única excusa és que funciona d'alguna manera .
Si voleu millorar el procediment, teniu bones habilitats amb Python, i coneixeu els principis d'autoria de docbook, podeu millorar el procediment. Si us plau, poseu-vos en contacte amb Yurchor si sou capaç d'ajudar.
Preparar les pàgines per a la conversió
- Assegureu-vos que les pàgines del vostre manual segueixen les directrius d'autor de UserBase i les directrius tipogràfiques.
- Check if every page has its header according to the level of this page in table of contents.
Taula de referència UserBase Docbook Comentari ==Secció== <capítol> ===Secció=== <secció1> ====Secció==== <secció2> =====Secció===== <secció3> ======Secció====== <secció4> No utilitzeu aquest últim nivell, si és posible.
- Check if all table cells have space after the pipe character. This rule conforms with traditional wiki formatting.
- Make application name formatting consistent (avoid using Amaroks, do use Amarok's).
- Ensure that all images are in PNG format.
- Remove all non-printable characters from image names.
Exportar
- Prepare the page list (strip from UserBase addresses http://userbase.kde.org). Example for Amarok:
Amarok Amarok/QuickStartGuide Amarok/QuickStartGuide/GettingStarted Amarok/QuickStartGuide/TheAmarokWindow Amarok/QuickStartGuide/TheMusicCollection Amarok/QuickStartGuide/Playlists Amarok/QuickStartGuide/TheContextView Amarok/QuickStartGuide/HowToDealWithProblems Amarok/QuickStartGuide/Glossary Amarok/Manual/AmarokWindow Amarok/Manual/AmarokWindow/Toolbar Amarok/Manual/AmarokWindow/MediaSources Amarok/Manual/AmarokWindow/ContextPane Amarok/Manual/AmarokWindow/PlaylistPane Amarok/Manual/ConfiguringAmarok Amarok/Manual/AdvancedFeatures Amarok/Manual/AdvancedFeatures/CollectionScanning Amarok/Manual/AdvancedFeatures/CoverManager Amarok/Manual/AdvancedFeatures/DynamicPlaylists Amarok/Manual/AdvancedFeatures/AutomaticPlaylistGenerator Amarok/Manual/AdvancedFeatures/ExternalDatabase Amarok/Manual/AdvancedFeatures/AFT Amarok/Manual/AdvancedFeatures/Moodbar Amarok/Manual/AdvancedFeatures/WorkingWithMediaDevices Amarok/Manual/AdvancedFeatures/SavedPlaylists Amarok/Manual/AdvancedFeatures/PlaylistFiltering Amarok/Manual/AdvancedFeatures/QueueManager Amarok/Manual/AdvancedFeatures/SearchInCollection Amarok/Manual/AdvancedFeatures/TagEditor Amarok/Manual/AdvancedFeatures/OrganizeCollection Amarok/Manual/AdvancedFeatures/Transcoding Amarok/Manual/AdvancedFeatures/ScriptManager Amarok/Manual/AdvancedFeatures/RemoteCollections Amarok/Manual/AdvancedFeatures/RemoteCollections/Ampache Amarok/Manual/AdvancedFeatures/RemoteCollections/DAAP Amarok/Manual/AdvancedFeatures/RemoteCollections/Samba Amarok/Manual/AdvancedFeatures/RemoteCollections/UPnP Amarok/Manual/MenuAndCommandReference/AmarokMenu Amarok/Manual/MenuAndCommandReference/ViewMenu Amarok/Manual/MenuAndCommandReference/Playlist Amarok/Manual/MenuAndCommandReference/Tools Amarok/Manual/MenuAndCommandReference/Settings Amarok/Manual/MenuAndCommandReference/Help Amarok/Manual/KeybindingReference Amarok/Manual/KeybindingReference/GlobalShortcuts Amarok/Manual/KeybindingReference/AmarokShortcuts Amarok/Manual/TroubleshootingAndCommonProblems Amarok/Manual/AmarokOnOtherPlatforms/Non-KDE Desktops Amarok/Manual/AmarokOnOtherPlatforms/Windows Amarok/Manual/AmarokOnOtherPlatforms/OSX Amarok/Manual/FAQ Amarok/Manual/Credits_and_License
Tip
You can obtain the full list of pages for your application with the following script:
<DPL> nottitlematch = %/__|%/zh-%|%(%) titlematch = Amarok% namespace = Main columns = 1 format = ,\n* [[%PAGE%|%TITLE%]],, </DPL>Replace Amarok with the name of your application, put it on your user page, and click on . Rearrange the list according to the ToC of your manual.
- Go to the export page.
- Paste the page list into the text field.
- Click on .
- Save the file. The saved file will be called Manual.xml in what follows.
Convertir
- Install Subversion package for your system.
- Checkout the latest version of conversion script:
svn checkout --depth=files svn://anonsvn.kde.org/home/kde/branches/work/doc/
- Copy Manual.xml to the script folder.
- Run
python wiki2docbook.py Manual.xml
if you want to download all screenshots (it takes some time to download all images from UserBase, grep and wget should be installed), orpython wiki2docbook.py -s Manual.xml
if you need not to download images.
Post-processament
- Rename Manual.xml.docbook to index.docbook.
- Check if conversion was done correctly:
checkXML index.docbook
- Fix the errors (better on UserBase pages).
- Convert docbook to HTML:
meinproc4 index.docbook
- Check HTML pages (all images should be visible, links should not lead to 404-pages).
- Replace big images by thumbnails using convert from ImageMagick
- Fix links in docbook, so they lead to docbook section, not UserBase pages.
- Fix application name according to KDE entity list.
- Copy index.docbook and images to your /doc folder and commit them to repository.