TracWikiPrint


NameTracWikiPrint JSON
Version 4.0.0.dev0 PyPI version JSON
download
home_pagehttp://trac-hacks.org/wiki/TracWikiPrintPlugin
SummaryCreate PDF files from Tracs wiki pages
upload_time2024-01-06 00:23:39
maintainerCinc-th
docs_urlNone
authorCinc-th
requires_python
licenseBSD
keywords pdf wiki trac plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            TracWikiPrintPlugin
===================
This plugin allows you to export to PDF (book or article format) or printable HTML format (page contents without Trac headers/footers) allowing easy printing. PDF export is based on [wkhtmltopdf](https://wkhtmltopdf.org/).

Older versions up to V3.0.0 used [xhtml2pdf](http://www.xhtml2pdf.com/) for generating PDF files. While having the advantage of being a pure Python solution it was abandoned because the output quality of [wkhtmltopdf](https://wkhtmltopdf.org/) is way better. For these unsupported older releases see [WikiPrintXhtml2pdf](https://trac-hacks.org/wiki/TracWikiPrintPlugin/WikiPrintXhtml2pdf).

Key features:

* Administration page for default settings.
* Customizable footers for PDF.
* Customizable front page for PDF book format.
* Automatic creation of Table of Contents for PDF books.
* The style of the resulting PDF or HTML can be fully customized using CSS.
* Different page sizes.
* PDF "print dialog" for altering settings prior to PDF file creation.
* Makro to specify contents and format of PDF Books with export feature.

The plugin is seamlessly integrated in the Trac user interface by adding items to the `Download in other formats` section of each wiki page.

The full documentation can be found on the homepage: [TracWikiPrintPlugin](https://trac-hacks.org/wiki/TracWikiPrintPlugin) (https://trac-hacks.org/wiki/TracWikiPrintPlugin)

### Supported Trac releases

Trac 1.4 and 1.6 are fully supported.

For older releases use TracWikiPrintPlugin V3.x.x or older.

License
-------

Releases up to V3.x.x were licensed as GPL.

With V4.0.0 the plugin was rewritten from scratch and is now BSD licensed.

Download
--------
Download the zipped source from [here](https://trac-hacks.org/browser/tracwikiprintplugin?format=zip).

Source
------
You can check out [TracWikiPrintPlugin](https://trac-hacks.org/wiki/TracWikiPrintPlugin) from [here](https://trac-hacks.org/svn/tracwikiprintplugin) using Subversion, or [browse the source](https://trac-hacks.org/browser/tracwikiprintplugin) with Trac.

Installation
------------
To install the plugin from trunk:

    $ pip install https://trac-hacks.org/svn/tracwikiprintplugin/trunk

To install the older `V3.0.0` release:

    $ pip install https://trac-hacks.org/svn/tracwikiprintplugin/tags/V3.0.0

Install [wkhtmltopdf](https://wkhtmltopdf.org/). 

*Note:* [wkhtmltopdf](https://wkhtmltopdf.org/) must be in your path or more precisely in the path used by Trac.

Enable the plugin using Tracs plugin administration page or by adding `wikiprint.* = enabled` in the components section of your `trac.ini` file:

```
[components]
...
wikiprint.* = enabled
```

Usage
-----

After the plugin is enabled, a new administration panel will be available under the `Wikiprint` section, and 4 new download formats will be available in the `Download in other formats` section at the end of each wiki page:

* Printable HTML
* PDF Page
* PDF Page (custom settings)
* PDF Book

A new makro `PdfBook` can be used to create PDF books from any number of wiki pages.

### Administration page

The default configuration for page exports may be provided using the `Wikiprint` administration page. These settings apply when not overriden by the user while exporting a PDF. While most settings are related to PDF files the style page specified here also applies when generating the `Printable HTML` page.

### Printable HTML

The wiki page is stripped from Tracs footer, header and navigation. The resulting page only contains the wiki content.

Styling of the page is according to the style page selected using the administration panel.

### PDF Page

`PDF Page` creates a PDF file out of the wiki page, with no cover page. Styles will be used from the style page defined in the global configuration set with the administration panel.

Table of contents macros in the wiki page like `[[PageOutline()]]` or others are not stripped from the page.

### PDF Page (custom settings)

The wiki page is exported as a PDF file. This is like normal `PDF Page` export but it is possible to override the global configuration while generating the PDF file. A settings page similar to a "print dialog" is presented to the user before the actual export happens.

### PDF Book

This will create a book-like PDF document. While exporting the user is presented with a settings page to specify a cover page and whether a table of contents should be added. Styling may be changed by selecting one of the available style page. The cover page used for the book may be any wiki page.

Common table of contents macros in the wiki page like `[[PageOutline()]]` or `[[TracGuideToc()]]` are removed from each wiki page.

### PdfBook makro

Using the makro it is possible to define PDF books with any number of wiki pages a cover page and table of contents. The configuration specified in the makro may always be overriden by the user while creating the book. This way one may for example change the predefined cover page or omitt the table of contents. Note that you can't add or remove pages while creating the book.

The configuration from the makro is rendered to the user and a button added to create the PDF book. Note that only one PdfBook makro on a wiki page is supported.

The makro must be specified in WikiProcessors syntax:

```
{{{#!PdfBook
...
}}}
```

The contents must be formatted like an INI file. The following sections are defined:

* `[parameters]`: specify cover page and table of contents
* `[pages]`: list of wiki pages to add to the book.

```
{{{#!PdfBook
[parameters]
# Name of a wiki page to be used as the cover page
cover = CoverPage
# Set to 1 for a table of contents, else set to 0
toc = 1

[pages]
# Names of wiki pages to be added to the PDF book.
WikiStart
WikiFormatting
}}}
```

            

Raw data

            {
    "_id": null,
    "home_page": "http://trac-hacks.org/wiki/TracWikiPrintPlugin",
    "name": "TracWikiPrint",
    "maintainer": "Cinc-th",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "PDF wiki trac plugin",
    "author": "Cinc-th",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/e1/e0/857450d79cec996b1329ebb44e0f6bb55c9beadba97a57aac879b249eea8/TracWikiPrint-4.0.0.dev0.tar.gz",
    "platform": null,
    "description": "TracWikiPrintPlugin\n===================\nThis plugin allows you to export to PDF (book or article format) or printable HTML format (page contents without Trac headers/footers) allowing easy printing. PDF export is based on [wkhtmltopdf](https://wkhtmltopdf.org/).\n\nOlder versions up to V3.0.0 used [xhtml2pdf](http://www.xhtml2pdf.com/) for generating PDF files. While having the advantage of being a pure Python solution it was abandoned because the output quality of [wkhtmltopdf](https://wkhtmltopdf.org/) is way better. For these unsupported older releases see [WikiPrintXhtml2pdf](https://trac-hacks.org/wiki/TracWikiPrintPlugin/WikiPrintXhtml2pdf).\n\nKey features:\n\n* Administration page for default settings.\n* Customizable footers for PDF.\n* Customizable front page for PDF book format.\n* Automatic creation of Table of Contents for PDF books.\n* The style of the resulting PDF or HTML can be fully customized using CSS.\n* Different page sizes.\n* PDF \"print dialog\" for altering settings prior to PDF file creation.\n* Makro to specify contents and format of PDF Books with export feature.\n\nThe plugin is seamlessly integrated in the Trac user interface by adding items to the `Download in other formats` section of each wiki page.\n\nThe full documentation can be found on the homepage: [TracWikiPrintPlugin](https://trac-hacks.org/wiki/TracWikiPrintPlugin) (https://trac-hacks.org/wiki/TracWikiPrintPlugin)\n\n### Supported Trac releases\n\nTrac 1.4 and 1.6 are fully supported.\n\nFor older releases use TracWikiPrintPlugin V3.x.x or older.\n\nLicense\n-------\n\nReleases up to V3.x.x were licensed as GPL.\n\nWith V4.0.0 the plugin was rewritten from scratch and is now BSD licensed.\n\nDownload\n--------\nDownload the zipped source from [here](https://trac-hacks.org/browser/tracwikiprintplugin?format=zip).\n\nSource\n------\nYou can check out [TracWikiPrintPlugin](https://trac-hacks.org/wiki/TracWikiPrintPlugin) from [here](https://trac-hacks.org/svn/tracwikiprintplugin) using Subversion, or [browse the source](https://trac-hacks.org/browser/tracwikiprintplugin) with Trac.\n\nInstallation\n------------\nTo install the plugin from trunk:\n\n    $ pip install https://trac-hacks.org/svn/tracwikiprintplugin/trunk\n\nTo install the older `V3.0.0` release:\n\n    $ pip install https://trac-hacks.org/svn/tracwikiprintplugin/tags/V3.0.0\n\nInstall [wkhtmltopdf](https://wkhtmltopdf.org/). \n\n*Note:* [wkhtmltopdf](https://wkhtmltopdf.org/) must be in your path or more precisely in the path used by Trac.\n\nEnable the plugin using Tracs plugin administration page or by adding `wikiprint.* = enabled` in the components section of your `trac.ini` file:\n\n```\n[components]\n...\nwikiprint.* = enabled\n```\n\nUsage\n-----\n\nAfter the plugin is enabled, a new administration panel will be available under the `Wikiprint` section, and 4 new download formats will be available in the `Download in other formats` section at the end of each wiki page:\n\n* Printable HTML\n* PDF Page\n* PDF Page (custom settings)\n* PDF Book\n\nA new makro `PdfBook` can be used to create PDF books from any number of wiki pages.\n\n### Administration page\n\nThe default configuration for page exports may be provided using the `Wikiprint` administration page. These settings apply when not overriden by the user while exporting a PDF. While most settings are related to PDF files the style page specified here also applies when generating the `Printable HTML` page.\n\n### Printable HTML\n\nThe wiki page is stripped from Tracs footer, header and navigation. The resulting page only contains the wiki content.\n\nStyling of the page is according to the style page selected using the administration panel.\n\n### PDF Page\n\n`PDF Page` creates a PDF file out of the wiki page, with no cover page. Styles will be used from the style page defined in the global configuration set with the administration panel.\n\nTable of contents macros in the wiki page like `[[PageOutline()]]` or others are not stripped from the page.\n\n### PDF Page (custom settings)\n\nThe wiki page is exported as a PDF file. This is like normal `PDF Page` export but it is possible to override the global configuration while generating the PDF file. A settings page similar to a \"print dialog\" is presented to the user before the actual export happens.\n\n### PDF Book\n\nThis will create a book-like PDF document. While exporting the user is presented with a settings page to specify a cover page and whether a table of contents should be added. Styling may be changed by selecting one of the available style page. The cover page used for the book may be any wiki page.\n\nCommon table of contents macros in the wiki page like `[[PageOutline()]]` or `[[TracGuideToc()]]` are removed from each wiki page.\n\n### PdfBook makro\n\nUsing the makro it is possible to define PDF books with any number of wiki pages a cover page and table of contents. The configuration specified in the makro may always be overriden by the user while creating the book. This way one may for example change the predefined cover page or omitt the table of contents. Note that you can't add or remove pages while creating the book.\n\nThe configuration from the makro is rendered to the user and a button added to create the PDF book. Note that only one PdfBook makro on a wiki page is supported.\n\nThe makro must be specified in WikiProcessors syntax:\n\n```\n{{{#!PdfBook\n...\n}}}\n```\n\nThe contents must be formatted like an INI file. The following sections are defined:\n\n* `[parameters]`: specify cover page and table of contents\n* `[pages]`: list of wiki pages to add to the book.\n\n```\n{{{#!PdfBook\n[parameters]\n# Name of a wiki page to be used as the cover page\ncover = CoverPage\n# Set to 1 for a table of contents, else set to 0\ntoc = 1\n\n[pages]\n# Names of wiki pages to be added to the PDF book.\nWikiStart\nWikiFormatting\n}}}\n```\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Create PDF files from Tracs wiki pages",
    "version": "4.0.0.dev0",
    "project_urls": {
        "Homepage": "http://trac-hacks.org/wiki/TracWikiPrintPlugin"
    },
    "split_keywords": [
        "pdf",
        "wiki",
        "trac",
        "plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "158831a88449baa0667563e59fe833faf24b7d352ac7f6087cbd53bf06804cd6",
                "md5": "8e918838f8b6828d6a25d713d06ba382",
                "sha256": "56f3aac003b40ff98ccc8541b7f238186de03bb05f86e99863d388a96b7a2fda"
            },
            "downloads": -1,
            "filename": "TracWikiPrint-4.0.0.dev0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8e918838f8b6828d6a25d713d06ba382",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 20329,
            "upload_time": "2024-01-06T00:23:37",
            "upload_time_iso_8601": "2024-01-06T00:23:37.445919Z",
            "url": "https://files.pythonhosted.org/packages/15/88/31a88449baa0667563e59fe833faf24b7d352ac7f6087cbd53bf06804cd6/TracWikiPrint-4.0.0.dev0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e1e0857450d79cec996b1329ebb44e0f6bb55c9beadba97a57aac879b249eea8",
                "md5": "1e73e4e570de12cf96be5ea2f2ef0343",
                "sha256": "0b130bbe5fc6edb8c034ab0a9601b56e6e93d5add51e31253581913cee92d3ea"
            },
            "downloads": -1,
            "filename": "TracWikiPrint-4.0.0.dev0.tar.gz",
            "has_sig": false,
            "md5_digest": "1e73e4e570de12cf96be5ea2f2ef0343",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 14605,
            "upload_time": "2024-01-06T00:23:39",
            "upload_time_iso_8601": "2024-01-06T00:23:39.426169Z",
            "url": "https://files.pythonhosted.org/packages/e1/e0/857450d79cec996b1329ebb44e0f6bb55c9beadba97a57aac879b249eea8/TracWikiPrint-4.0.0.dev0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-06 00:23:39",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "tracwikiprint"
}
        
Elapsed time: 2.78929s