Changes

Jump to: navigation, search

Manual Generation 3.0

4,539 bytes added, 06:55, 24 December 2012
m
not true
[[Category:Documentation]]Creation of the GRAMPS manual (docbook/pdf/html) starting from the [[Gramps 3.0 Wiki Manual]].
==How creating a manual starting from wiki ?==
===MediaWiki to OpenDocument===
*[http://www.mediawiki.org/wiki/Extension:OpenDocument_Export OpenDocument Export] extension makes possible to export single pages or [http://www.mediawiki.org/wiki/Extension:Collection collections] from MediaWiki in OpenDocument Text format (.odt).
 
===MediaWiki to PDF===
*[http://www.mediawiki.org/wiki/Extension:PDF_Writer PDF writer] extension makes possible to export single pages or [http://www.mediawiki.org/wiki/Extension:Collection collections] from MediaWiki in PDF format (.pdf).
*[[Manual Generation 3.0 Prince|Conversion using Prince XML]]
===XML to XML===
# Wikipedia use [http://metawww.wikimediamediawiki.org/wiki/Wikipedia_DTD Wikimedia DTD], a format based on XML, for sharing his data. SGML, docbook are based on XML too.# We can [[Rollover_for_the_manual|make a test ]] for [http://meta.wikimedia.org/wiki/Help:Export exporting our wiki data to Wikimedia DTD].# To generate a script (XSLT, python, perl, sh ?) for parsing data from Wikimedia DTD to docbook/SGML. * [http://johnmacfarlane.net/pandoc/ Pandoc] will convert files from one markup format into another. ===Text to XML===* All wiki pages are saved as txt: ''header.txt, preface.txt, chapter_01.txt, ...'', which could be included into one [http://txt2tags.sourceforge.net/userguide/includecommand.html#5_9 file] later.[http://txt2tags.sourceforge.net/index.html txt2tags] supports [http://txt2tags.wordpress.com/2008/07/26/7-years-of-txt2tags/ Wikipedia].* Output will be a full gramps.xml/gramps.sgml file with utf8 encoding to avoid non-ASCII characters issues. The present Makefiles in GRAMPS can create html/manual/pdf from these xml files. Possible solution for keeping docbook : [http://openjade.sourceforge.net/ OpenJade] + [http://en.wikipedia.org/wiki/DSSSL DSSSL]. Note that yelp may open xhtml too.
We should keep an eye on official developments here: [http://www.mediawiki.org/wiki/DocBook_XML_export]
===Text to XMLWikibooks===# All wiki pages are saved An alternative is to proceed as txt[http: ''header//en.txt, prefacewikibooks.txt, chapter_01org/wiki/Wikibooks:Print_versions Wikibooks] do.txt, ===PHP===* [http://tools.wikimedia.de/~magnus/wiki2xml/w2x.'', which could be included into one php wiki2xml] is a [http://txt2tagssvn.sourceforgewikimedia.netorg/svnroot/mediawiki/trunk/wiki2xml/userguidephp/includecommandwiki2xml.html#5_9 filephp GPL script] laterfor parsing MediaWiki. # We make * [http://wikirenderer.berlios.de/en/ WikiRenderer] is a php component which can parse a python script wiki content, and transform it to XHTML content, to any other markup language, or to do the conversion for working an other wiki content with a different syntax. Sounds correct with [http://txt2tagswww.sourceforgedokuwiki.netorg/index.html txt2tagssyntax dokuwiki syntax], maybe sed commands according to txt2tags which is not far away (headline rule inversed) from Mediawiki syntax ! => [http://txt2tagswikirenderer.sourceforgeberlios.netde/en/sampledemo.t2t samplephp Demo] and current  ===wt2db===[http://www.mediawikitldp.org/wt2db/ wt2db] converts a text file in a special format similar to that used in WikiWikiWebs into DocBook XML/SGML ===wiki/Help:Formatting Mediawiki grammartext to html===[[Manual Html Generation|A Python program]] or can be used to modify generate html from the GPL script for working with mediawiki codetext of the Gramps manual wiki pages. ===xhtml to ODT===[http://gitorious. Also, there is possible output filter org/xhtml2odt xhtml2odt] stylesheets convert namespaced XHTML to [http://txt2tagsen.wikipedia.org/wiki/OpenDocument ODT]. ===html to html translation=== * Translate toolkit We can try to translate generated html by using [http://sourceforge.net/userguideprojects/PostProctranslate/ translate toolkit] html2po <html> > <pot> msgmerge --no-wrap <po> <pot> > <new_po> po2html -t <html> -i <new_po> -o <new_html> where <x> is the file format, use your names. * GNUnited Nations [http://www.gnu.html#8_5 functionorg/software/gnun/ GNUnited Nations (GNUN)] on txt2tags is a build system for www.gnu.org translations. It generates a PO template (.pot) for an original HTML article, and merges the changes into all translations, which could help usare maintained as PO (.po) files. Finally, it regenerates the translations in HTML format.# Output will be The goal of GNUN is to make maintenance of gnu.org translations easier and to avoid the effect of seriously outdated translations when a full grampsparticular team becomes inactive.xml ===[[Manual_Html_Generation|html]] to docbook===* [http:/gramps/wiki.sgml file with utf8 encoding to avoid non-ASCII characters issuesdocbook. The present Makefiles in GRAMPS can create htmlorg/manualtopic/pdf Html2DocBook Html2Docbook] converts project documentation from these xml filesHTML to DocBook. Possible solution for keeping docbook : # Convert all of your HTML to XHTML using [http://openjadetidy.sourceforge.net/ OpenJadeTidy] + . Enable 'enclose-block-text' in the configfile, else any unenclosed text (where this is allowed under XHTML Transitional but not under XHTML Strict) will vanish.# Use the XSL stylesheet (below) to convert the XHTML into [http://enwiki.wikipediadocbook.org/topic/DocBook DocBook] (There's no way to merge the multiple XHTML files into a single document, so the stylesheet converts each HTML page into a ''section''). Be sure to pass in the filename (minus the extension) as a parameter. This will become the section id.# Combine the multiple [http://wiki.docbook.org/DSSSL DSSSLtopic/DocBook DocBook]''section'' files into a single file, and re-arrange the sections into the proper order# Correct any validity errors. Note (At this point, there are likely to be a few, depending on how good the original HTML was.)# Peruse the now valid [http://wiki.docbook.org/topic/DocBook DocBook] document, and look for the following:Broken links ''xref'' elements that yelp may open xhtml tooshould be ''link''s Missing headers (the heading logic isn't perfect. You'll lose at most 1 header per page, though, and most pages come through with all headers intact.) Overuse of ''emphasis'' and ''emphasis role="bold"''
We should keep an eye on official developments here: *[http://metasearch.wikimediacpan.org/wikidist/html2dbk/DocBook_XML_exportHTML::ToDocBook]is CPAN perl module who converts an XHTML file into DocBook.
==Manual Text Guidelines==
*# <nowiki>{{grampsmanualcopyright}}</nowiki>: the copyright template. This will be stripped out on manual generation.
*# <nowiki>{{man label|Labels}}</nowiki>: template for GUI elements, example: {{man label|Labels}}
*# <nowiki>{{man button|Buttons}}</nowiki>: template for GUI buttons , example {{man button|Buttons}}
*# <nowiki>{{man tip| 1=title |2=text.}}</nowiki>: template to add a tip in the text
*# <nowiki>{{man note| title |text}}</nowiki>: template to add a note to the text
*# <nowiki>{{man warn| title |text}}</nowiki>: template to add a warning to the text
*# <nowiki>{{man index|prevpage|nextpage}}</nowiki>: template to add the bottom index bar. This will be stripped out on manual generation.
*#<nowiki>{{man menu|Edit->Preferences}}</nowiki>: template for the menu items sequence, example {{man menu|Edit->Preferences}}
*# <nowiki>{{languages}}</nowiki>: template to add language bar. This will be stripped out on manual generation.
*The following markup code may be used:
*#<nowiki>''' bold '''</nowiki>: for bold or menuselections in GRAMPS, eg. '''Edit->PreferencesGramps'''
*#<nowiki>'' italic ''</nowiki>: for italic or filenames in GRAMPS, eg. ''filename''
*#<nowiki><code> code sections</code></nowiki>: for commands you type in the command line.
===xmlto (need PassiveTeX and TeX)===
[http://cyberelk.net/tim/software/xmlto/ xmlto] pdf mydoc.xml
Is it [http://www.gramps-project.org/wiki/index.php?title=Gramps-about Tim Waugh], a gramps contributors ?[[media:Ancestors.xsl.gz|Ancestors.xsl]] [[media:Birthday.xsl.gz|Birthday.xsl]]
===FOP (need Java)===
see [http://www.gramps-project.org/wiki/index.php?title=Manual_Generation Manual generation]
 
==A Test==
There is a user request for a {{bug|2132}}:''downloadable text format users manual'' on bug manager.
 
Steps:
# go to webpages of the manual (wiki), and save full local copies.
# create an empty file and Ctrl+c/Ctrl+v with HTML <body> codes (1.) without scripts or javascript
# copy all images into one directory, change href links on code
# make some href links as relative links
# add/clean anchors
# using [http://tidy.sourceforge.net/ Tidy]
 
[[Category:Documentation]]
[[Category:Translators/Categories]]

Navigation menu