How To Convert a UserBase Manual to Docbook/nl: Difference between revisions

From KDE TechBase
(Created page with "* Bereid de lijst van pagina's voor (u moet van de UserBase-addressen <nowiki>http://userbase.kde.org</nowiki> afhalen). Voorbeeld voor '''Amarok''':")
(Created page with "{{Tip|1=Je kunt de complete lijst met pagina's voor een applicatie verkrijgen met het volgende script:<!--}}-->")
Line 101: Line 101:
Amarok/Manual/Credits_and_License}}
Amarok/Manual/Credits_and_License}}


{{Tip|1=You can obtain the full list of pages for your application with the following script:<!--}}-->
{{Tip|1=Je kunt de complete lijst met pagina's voor een applicatie verkrijgen met het volgende script:<!--}}-->


{{Input|1=<nowiki><DPL>
{{Input|1=<nowiki><DPL>

Revision as of 12:57, 5 November 2011

Inleiding

Het beschreven proces is niet afgewerkt, de code is lelijk, niet intelligent genoeg, enzovoorts... het enige excuus is dat het werkt

.

Wil je meehelpen om het proces te verbeteren, heb je goede kennis van Python, en ken je de Docbook-standaarden, dan kun je meehelpen om de procedure te verbeteren. Contacteer Yurchor (Engels) als je kunt helpen.

Pagina's klaarmaken voor het omzetten

  • Controleer of iedere pagina een kop heeft die overeenkomt met het niveau van de pagina in de inhoudsopgave.
Referentietabel
UserBase Docbook Opmerkingen
==Section== <chapter>
===Section=== <sect1>
====Section==== <sect2>
=====Section===== <sect3>
======Section====== <sect4> Vermijd dit niveau indien mogelijk
  • Controleer of alle tabelcellen een spatie achter het verticale-streep-karakter hebben. Dit komt overeen met de traditionele Wiki-opmaak.
  • Maak de opmaak van de naam van de toepassing eenduidig (gebruik niet Amaroks, maar Amarok's).
  • Zorg ervoor dat alle afbeeldingen in PNG-formaat zijn.
  • Verwijder alle niet-afdrukbare karakters uit afbeeldingsnamen.

Het exporteren

  • Bereid de lijst van pagina's voor (u moet van de UserBase-addressen http://userbase.kde.org afhalen). Voorbeeld voor 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
Je kunt de complete lijst met pagina's voor een applicatie verkrijgen met het volgende 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 Preview. Rearrange the list according to the ToC of your manual.


  • Paste the page list into the bigger text field.
  • Click on Export.
Export of Amarok manual pages
  • Save the file. The saved file will be called Manual.xml in what follows.

Conversion

  • 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), or
    python wiki2docbook.py -s Manual.xml
    if you need not to download images.

Post-processing

  • 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.
K3b docs on UserBase in Opera and converted page in Konqueror.