Skip to content

ikus060/odt2md

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License Build

odt2md

odt2md is a small script designed to quickly convert ODT (Open Document Text) files to Markdown text files. It utilizes the powerful pandoc library and odt2html with additional filters to generate well-formatted Markdown output.

Features

  • Fixes list item formatting by removing unnecessary <p> tags from <li> elements.
  • Fixes table formatting by removing unnecessary <p> tags from table cells.
  • Removes various obsolete styles (e.g., {.western}).
  • Exports embedded images along with the converted Markdown file.

Installation

Dependencies

Before installing odt2md, make sure you have the following dependencies installed on your system:

  • pandoc
  • python3-pandocfilters
  • unoconv
  • zenity
sudo apt-get install pandoc python3-pandocfilters unoconv zenity

Install as Nautilus Script

To install odt2md as a Nautilus script for easy access, follow these steps:

  1. Download the script:

    curl https://raw.githubusercontent.com/ikus060/odt2md/master/odt2md > /usr/local/bin/odt2md
  2. Make the script executable:

    chmod +x /usr/local/bin/odt2md
  3. And create a symlink to the scripts directory in your Nautilus configuration folder:

    ln -s /usr/local/bin/odt2md "$HOME/.local/share/nautilus/scripts/odt2md"

Usage

Once odt2md is installed, you can use it to convert ODT files to Markdown format. Simply open a terminal and navigate to the location of the ODT file you want to convert. Then run the following command:

odt2md "My file.odt"

This command will generate a Markdown file named My file.md in the same location as the original ODT file.

Contributing

Contributions to odt2md are always welcome. If you encounter any issues or have suggestions for improvement, please feel free to open an issue or submit a pull request on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

Custom script to convert odt (and any supported OpenOffice Text document) into mardown

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages