Skip to main content

Tool to convert markdown list to Excel, mael.

Motivation

Do you use Excel for summarizing some lists as tables? Isn’t it difficult to manage Excel in git? The common repositories show differences in text files between versions but not in Excel files. How can we manage spreadsheet tables with versions? CSV is one of the choices but is it really easy? What if we can manage table data as markdown file?

This tool can convert markdown files to tables in an Excel file.

Installation

This tool is installed with pip:

$ pip install mael

Usage

  1. Initialize the directory, then initial files are created based on the templates.

    $ mael init some_dir
  2. Write your data in markdown. You can put multiple markdown files in the directory.

    # List title
    
    ## Summary
    
    Please write summary of the table data.
    
    ## List
    
    ### Column 1
    
    Value 1-1
    
    ### Column 2
    
    Value 1-2
    
    ---
    
    ### Column 1
    
    Value 2-1
    
    ---
    
    ### Column 2
    
    Value 3-2

    Separate each item with ---.

  3. Build Excel, then you can get an Excel file in the directory.

    $ mael build some_dir

    There, the Excel file contains the sheet as:

    Summary

    Please write summary of the table data.

    Column 1

    Column 2

    Column 3

    Value 1-1

    Value 2-1

    Value 2-1

    Value 3-2

    If you put multiple markdown files, the Excel file contains multiple sheets.

Attention

Please write all the files in UTF-8 encoding.

Advanced use

You can use variables. Also, you can define environmental variables for each environment.

  1. Define variables in some_dir/config/variables.ini:

    VARIABLE_1=ABCDEFG
    VARIABLE_2=HIJKLMN
  2. Use the variables in markdown files. Surround the variable name with {{ and }}:

    # List title
    
    ## Summary
    
    Variable 1 is {{ VARIABLE_1 }}.
    Variable 2 is {{ VARIABLE_2 }}.
    
    ......

    Of course, you can use the variables not only in the summary but also in the list.

  3. Build Excel, then you can get an Excel file in the directory.

    $ mael build some_dir

    There, the Excel file contains the sheet as:

    Summary

    variable 1 is ABCDEFG.
    variable 2 is HIJKLMN.
    ......

To use environmental variables, define the variables in some_dir/config/variables.${env_name}.ini, such as some_dir/config/variables.dev.ini. Environmental variable file overwrite the varabiles defined in the normal variable file, variable.ini. To build the environmental file, execute mael build some_dir -e dev, and you will get the Excel file, some_dir_dev.xlsx.

PyPI package

https://pypi.org/project/mael/

Metadata

Release files for mael 0.0.3.35

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mael 0.0.3.35
File Size Uploaded
mael-0.0.3.35.tar.gz 13.1 kB Details

Release files / mael-0.0.3.35.tar.gz

Download URL mael-0.0.3.35.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b6f1113b0cb4466742253ced8d08f0c17aee0aa2255d40dd1a882c8f0115c2e8
BLAKE2b-256 checksum
How to use checksums
8165681e3e0b5c608adffb6e30f5a0ec9dc719622939ac5b8a7d913c4caa2881
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.13
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page