Git Product home page Git Product logo

doc2md's Introduction

๐Ÿ“„ doc2markdown

doc2markdown is a Python command-line tool that converts various document formats (PDF, PPTX, DOCX) to Markdown. It processes files in a given directory and its subdirectories, maintaining the original folder structure in the output.

โœจ Features

  • ๐Ÿ“‘ Converts PDF, PPTX, and DOCX files to Markdown format
  • ๐Ÿ—‚๏ธ Preserves folder structure from input to output
  • ๐Ÿ’ป Command-line interface for easy use and integration with other tools
  • ๐Ÿ” Verbose mode for detailed processing information

โš™๏ธ Installation

To install doc2markdown, run the following command:

pip install doc2markdown

This will install doc2markdown along with its dependencies.

๐Ÿš€ Usage

Basic usage:

doc2markdown /path/to/input/file.pdf /path/to/output/folder 
doc2markdown /path/to/input/folder /path/to/output/folder

With verbose output:

doc2markdown /path/to/input/folder /path/to/output/folder -v

For help and more options:

doc2markdown --help

๐Ÿ› ๏ธ Requirements

  • Python 3.6+
  • PyPDF2
  • python-pptx
  • python-docx

These dependencies will be automatically installed when you install doc2markdown using pip.

๐Ÿš€ Future Improvements

We're constantly working to improve doc2markdown. Here are some features and enhancements we're considering for future releases:

TODO:

  • Implement parallel processing for faster conversion of multiple files
  • Add a progress bar for large batches of file conversions
  • Create a plugin system for easy addition of new file format converters
  • Implement comprehensive unit tests for each converter function
  • Add logging mechanism for better debugging and user feedback
  • Implement input sanitization for enhanced security
  • Add type hints throughout the codebase for improved readability and maintainability
  • Create a CONTRIBUTING.md file with guidelines for contributors

We welcome contributions from the community to help implement these features and improve doc2markdown. If you're interested in working on any of these tasks, please check our issues page or submit a pull request.

๐Ÿ“ Changelog

[0.1.2]

  • Renamed to doc2markdown
  • Added support for encrypted PDFs

[0.1.1]

  • Added File as well as folder support
  • Improved the CLI messaging

[0.1.0]

  • Initial release
  • Basic functionality to convert PDF, PPTX, and DOCX files to Markdown
  • Command-line interface with verbose mode option

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“œ License

This project is licensed under the MIT License.

๐Ÿ™ Acknowledgements

This tool was inspired by the need for easy conversion of various document formats to Markdown for use with Large Language Models and other text processing applications.

Contributing

Bumping the Version

To bump the version of the project, use the bump_version.py script:

  1. Navigate to the project root directory.

  2. Run the script with the following command:

    python bump_version.py doc2markdown/__init__.py [major|minor|patch]

    Replace [major|minor|patch] with the type of version bump you want to perform.

  3. Commit the changes:

    git add doc2markdown/__init__.py
    git commit -m "Bump version to x.y.z"
  4. Tag the new version:

    git tag -a vx.y.z -m "Version x.y.z"
  5. Push the changes and tags:

    git push origin main
    git push --tags

This process will update the version number in the __init__.py file and create a new git tag for the release.

doc2md's People

Contributors

adam404 avatar

Watchers

 avatar

doc2md's Issues

"doc2md" output is where?

When I run the command line: doc2md XXXX.docx output -v
It shows: Processing completed, but I can't find the processed result. Where is it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.