Markdown to CSV Converter is a command-line tool that facilitates the conversion of Markdown documents into CSV files.
Ensure that you have Python 3.x installed on your system.
Run the following command to install the required dependencies:
pip3 install -r requirements.txtConvert Markdown files to CSV with ease and customization using the following options:
usage: main.py [-h] [-o OUTPUT] [-p {markdown,pypandoc}] [-v] input
Convert Markdown file to CSV.
positional arguments:
input Markdown file to convert
options:
-h, --help show this help message and exit
-o OUTPUT, --output OUTPUT
Name of output file, if unset it converts file.md to out-<ISO 8601>.csv
-p {markdown,pypandoc}, --parser {markdown,pypandoc}
Markdown parser to use
-v, --verbose Increase output verbosity
Convert README.md to a CSV file using the default pypandoc parser:
python3 main.py README.mdSave the converted CSV file as output.csv:
python3 main.py input.md -o output.csvYou can choose between two parser options:
- Markdown parser (
markdown): Utilizes the Python markdown library. Sample Output - Pypandoc parser (
pypandoc): Utilizes the pypandoc library, which wraps Pandoc. Sample Output
The choice of parser may vary depending on the specific structure and content of the Markdown file you are converting. We recommend trying both options and choosing the one that provides the best results for your particular document.
Example usage:
# Using the markdown parser
python3 main.py input.md --parser markdown
# Or using the pypandoc parser (default)
python3 main.py input.md --parser pypandocEnable verbose logging with the -v flag:
python3 main.py input.md -vFound a bug or have suggestions for improvements? Feel free to open an issueor submit a pull request.