A command line utility to clean up the Markdown exports of Notion.
To install notion-export-cleaner, run the following command in your terminal:
npm install -g notion-export-cleaner
To use notion-export-cleaner, export your Notion space to Markdown & CSV and run the following command:
notion-export-cleaner /path/to/your/notion/markdown/export/directory /path/to/your/destination/directory
You can also use nec
as a shortcut for notion-export-cleaner
.
The first argument is the path to the directory containing the Markdown files exported from Notion. The second argument is the path to the directory where the cleaned up Markdown files should be stored.
notion-export-cleaner will create a new directory in the destination directory, containing the cleaned up Markdown files. It will iterate over all CSV files, parsing them into a Markdown table and replacing the "Name" column with a link to the corresponding Markdown file. It will also replace all links to other pages in the Notion space with links to the corresponding Markdown files. In general, filenames are cleaned up to not use the IDs generated by Notion, but instead use the names of the pages.