[[PageOutline(2-5,Contents,pullout)]] = Export Trac wiki pages to MS Word == Description This plugin allows you to export Trac wiki pages for import into MS Word. The output of this feature makes the wiki pages import-ready using the HTML import capability of MS Word. After that, a format template can be applied, and the text might be copied into a MS Word document template. Once installed, a new entry shows up below the '''Download in other formats''' section at the end of the wiki page. Click and save to disk. Extract and open with Word. The plugin works as follows: * Asks Trac to generate the HTML. * Cleanup and validation using HTML Tidy. * Transformation using a XSLT stylesheet. * Offering a zip file with wiki page and images for downloading. Similar plugins: DocRenderPlugin, PandocPlugin. == Bugs/Feature Requests Existing bugs and feature requests for !PageToDocIntegration are [report:9?COMPONENT=PageToDocIntegration here]. If you have any issues, create a [/newticket?component=PageToDocIntegration new ticket]. [[TicketQuery(component=PageToDocIntegration&group=type,format=progress)]] == Download Download the zipped source from [export:pagetodocintegration here]. == Source You can check out PageToDocIntegration from [/svn/pagetodocintegration here] using Subversion, or [source:pagetodocintegration browse the source] with Trac. == Installation === Dependencies * '''HTML Tidy''' Install [http://tidy.sourceforge.net/ HTML Tidy] (Windows: www.paehl.com/open_source/?download=tidy.zip). * '''XSLTProc''' Make sure xsltproc is available. If not, install from [http://xmlsoft.org/XSLT/xsltproc2.html] (Windows: www.zlatkovic.com/pub/libxml/) * From the linked page Click Downloads and download iconv, libxslt, libxml2, zlib. * Test that it has been installed correctly by running xsltproc: it should output a help page. * On windows - the binaries for all the XSLTProc tools either need to be in one directory; if this directory is not on the search path then please specify the `xsltprocpath` configuration setting. === Installation steps * Use easy_install.py !PageToDocIntegration * or * Download or checkout the source * Compile the plugin setup.py bdist_egg * Copy the .egg file into your Trac Environment plugins directory * Save the [source:/pagetodocintegration/html_filtered.xslt XSLT stylesheet] onto your disk. * Create the following section in your `trac.ini` file (modify path): {{{#!ini [pagetodoc] xsltfile = /path/to/your/xsltfile.xslt }}} * Install plugin. * To enable this plugin, add the following to your `trac.ini` file: {{{#!ini [components] PageToDoc.* = enabled }}} Please enter feedback and bugs (good idea to email me also - see my email address at the bottom of this page). == Configuration Configuration options are applied in `trac\environment\path\conf\trac.ini` and the parameters are in the `[pagetodoc]` section, which you will need to add as documented in the installation instructions. || `xsltfile` || '''(Required)''' The path to the XSLT file to use for transforming the wiki HTML output. Specify the filepath of `html_filtered.xslt` shipped with !PageToDocIntegration. || || `tidypath` || ''(Optional)'' Path to tidy executable. If left empty then the executable search path is used. [[BR]]Added in [5406] hoping it helps to resolve issues like #4396. || || `xsltprocpath` || ''(Optional)'' Path to xlstproc executable. If left empty then the executable search path is used. [[BR]]Added in [5406] hoping it helps to resolve issues like #4396. || || `replace_host` || ''(Optional)'' Two strings separated by a comma. A replace operation is performed on the image URL finding the first part and replacing with the 2nd part.[[BR]]Added in [5401] hoping it fixes #3507. || || `img_max_x` || ''(Optional)'' Maximum image width. Used to calculate if image needs to be resized. Default is 0. || || `img_max_y` || ''(Optional)'' Maximum image height. Used to calculate if image needs to be resized. Default is 0. || || `dpi` || ''(Optional)'' Dots per inch. Used to calculate if image needs to be resized. Default is 96. || An example `[pagetodoc]` section would look as follows: {{{#!ini [pagetodoc] xsltfile = /path/to/your/xsltfile.xslt replace_host = man-wwl-sw, localhost xsltprocpath = path/to/xsltproc.exe tidypath = /path/to/tidy.exe img_max_x = 500 img_max_y = 200 dpi = 96 }}} == Recent Changes [[ChangeLog(pagetodocintegration, 3)]] == Author/Contributors '''Author:''' [wiki:lei] [[BR]] '''Maintainer:''' markm (mark dot m dot mcmahon at gmail dot com) (please email me if you encounter a bug) [[BR]] '''Contributors:''' [[BR]]