Skip to content

divyaeM/notion-to-html

 
 

Repository files navigation

Why this fork?

  • Added possibility to export other files in addition to .pdf files.
  • Added possibility to scrape additional data which could be used to
    _   __      __  _                _____                        __          __
   / | / /___  / /_(_)___  ____     / ___/____  ____ _____  _____/ /_  ____  / /_
  /  |/ / __ \/ __/ / __ \/ __ \    \__ \/ __ \/ __ `/ __ \/ ___/ __ \/ __ \/ __/
 / /|  / /_/ / /_/ / /_/ / / / /   ___/ / / / / /_/ / /_/ (__  ) / / / /_/ / /_
/_/ |_/\____/\__/_/\____/_/ /_/   /____/_/ /_/\__,_/ .___/____/_/ /_/\____/\__/
                                                    /_/

Back up your data – free yourself from the Notion lock-in.
Export with Notion Export with ✨NotionSnapshot✨ Original page

Notion's default HTML export lacks style (and even content), while our files retain the original page's appearance and remove unnecessary JavaScript resulting in smaller file sizes and faster load times.




How to use

1. Make Notion page public

To export a page from Notion to HTML and make it publicly accessible, follow these steps:

  1. Open the desired page in Notion
  2. Navigate to the Publish tab
  3. Locate the Publish to web button and click on it
  4. A link to the page will be generated. Click on the Copy web link button to save the link

Remember to store the copied link in a place where you can easily find it later.


2. Install Python and Chrome

Next, ensure that you have the necessary apps installed on your machine:

Installing Chrome on WSL/Ubuntu may require a few extra steps, but you can follow this method:

sudo apt update && sudo apt upgrade -y
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb
sudo apt --fix-broken install
rm -rf google-chrome-stable_current_amd64.deb

3. Run script

Then just run the script like so:

git clone https://github.com/sueszli/notionSnapshot.git
cd notionSnapshot
python3 notionsnapshot --dark-mode <insert your url here>

# for help run:
# python3 notionsnapshot --help

Our test pages are listed in the test.sh file.






Special thanks to:

  • Leonardo Cavaletti who laid the foundation of this project with his lovely loconotion project
  • MJDeligan the main contributor
  • Stefan Brandmair, Thomas Biedermann and Berndt Uhlig who helped me set the project up

About

notion2html export tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 80.5%
  • CSS 12.1%
  • JavaScript 6.3%
  • Shell 1.1%