Skip to main content

Convert Jira wiki to DOCX format effectively

Project description

JiraWiki2Docx

JiraWiki2Docx is a Python 3 library that converts Jira wiki text to Microsoft Word (docx) format. It provides a convenient way to migrate Jira wiki content to Word documents, allowing users to preserve the formatting and structure of their Jira wiki pages.

Installation

You can install jirawiki2docx using pip:

pip install jirawiki2docx

Usage

To use jirawiki2docx, follow these steps:

  1. Import the JiraWiki2Docx class:

    from jirawiki2docx import JiraWiki2Docx
    
  2. Create an instance of the JiraWiki2Docx class, providing the Jira wiki text as input:

    jira_text = "Your Jira wiki text here..."
    converter = JiraWiki2Docx(jira_text)
    
  3. Parse the Jira wiki text and generate the Word document:

    document = converter.parseJira2Docx()
    
  4. Optionally, save the resulting document to a file:

    converter.parseJira2Docx(save_to_file=True, output_filename="output.docx")
    
  5. Alternatively, you can use an existing docx.Document object and append the converted Jira wiki text to it's content:

    existing_document = docx.Document()
    jira_converter.parseJira2Docx(existing_document)
    

Example

Here's a complete example that demonstrates the usage of JiraWiki2Docx:

from docx import Document
from jirawiki2docx import JiraWiki2Docx

# Jira wiki text
jira_text = """
h1. Heading 1

This is a paragraph.

h2. Heading 2

* Item 1
* Item 2

h3. Heading 3

||Heading 1||Heading 2||
|Cell 1|Cell 2|

This is another paragraph.
"""

# Create a Document object
document = Document()

# Create an instance of JiraWiki2Docx and parse the Jira wiki text
converter = JiraWiki2Docx(jira_text, document)

# Parse Jira markup and convert to Word document with optional arguments to save created/modified document to file or just return as object
converter.parseJira2Docx(save_to_file=True, output_filename="output.docx")

The resulting Word document will contain the converted Jira wiki content with appropriate headings, lists, and tables.

Supported Jira Wiki Syntax

JiraWiki2Docx supports the following Jira wiki syntax:

  • Headings (h1 to h6)
  • Unordered lists (*, -, #)
  • Tables (||)
  • Text effects (bold, italics, deleted, inserted, superscript, subscript, and color)

Please note that JiraWiki2Docx may not support all Jira wiki syntax and rendering options.

License

JiraWiki2Docx is released under the MIT License. See the LICENSE file for more details.

Conclusion

JiraWiki2Docx simplifies the process of converting Jira wiki markup to Word documents. Whether you need to share Jira content with stakeholders or generate printable reports, this library provides an easy-to-use solution. Give it a try and streamline your Jira content management and distribution process.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jirawiki2docx-1.0.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jirawiki2docx-1.0.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file jirawiki2docx-1.0.1.tar.gz.

File metadata

  • Download URL: jirawiki2docx-1.0.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for jirawiki2docx-1.0.1.tar.gz
Algorithm Hash digest
SHA256 30b682f7ddef7d4e58bc6bbb349d76499cff6ba7d63c16f8eb6c98f6b626d489
MD5 93a00dfe4a9abab0e4faf4594db7c9ae
BLAKE2b-256 3f9cd06bdd3a1adfc2bd1f484e27dd018112706ecda1e8c4d1bbbd3b6f063d58

See more details on using hashes here.

File details

Details for the file jirawiki2docx-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: jirawiki2docx-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.9

File hashes

Hashes for jirawiki2docx-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 695d3ab77c8c3db96bac9b39f52eae3a4cc5c15a9cb9c25e45b34006ad44bf31
MD5 eb06ec8c4fcf037f84649c13c05c24ff
BLAKE2b-256 14948198c1a196cbc4717a61954b38794bd4c88e15f593b69b558dd9fe8ba879

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page