Code Monkey home page Code Monkey logo

one2html's Introduction

one2html

one2html lets you convert OneNote® files (sections or whole notebooks) into HTML.

Installation

At the moment only installation from source is supported. This requires the latest stable Rust compiler. Once you've installed the Rust toolchain run:

cargo install one2html

Note: By default, One2HTML has support for printing stack traces when errors occur during OneNote file parsing. This however requires a nightly compiler. To compile with a stable compiler instead, add the --no-default-features flag to the cargo install command.

Usage

Download OneNote files from OneDrive

OneNote files can be retrieved using one of two methods: Either by using onedrive-cli or by downloading a notebook via the OneDrive web UI. To do this first install onedrive-cli following its instructions. After logging in using onedrive-cli login, you can download a section (a single .one file), or a notebook (a folder that contains a .onetoc2 file along with other .one files):

# Download a notebook
onedrive-cli ls Documents/
onedrive-cli cp -R :/Documents/Notebook .

# Download a section
onedrive-cli cp -R :/Documents/Notebook/Section.one .

Alternatively, to download OneNote notebooks via the OneDrive web UI, follow these steps:

  1. Visit https://onedrive.live.com/
  2. Select the folder that contains your notebooks. Typically this is the Documents folder.
  3. Use the Download button from the toolbar to download a ZIP file that contains all of your OneNote notebooks.

Convert OneNote files to HTML

OneNote sections are stored in .one files. To convert a section to HTML run:

one2html -i Section.one -o ./output_dir/

OneNote notebooks are stored as folders that contain a .onetoc2 file along with the notebook's sections stored as .one files. To convert a notebook to HTML run:

one2html -i 'Notebook/Open Notebook.onetoc2' -o ./output_dir/

Limitations

  • Due to limitations of the OneNote parser only files downloaded from OneDrive are supported. This means you can't convert files created by the OneNote 2016 desktop application using this tool.
  • Ink drawings are not supported at the moment.
  • Math formulas are not rendered properly at the moment.

Disclaimer

This project is neither related to nor endorsed by Microsoft in any way. The author does not have any affiliation with Microsoft.

one2html's People

Contributors

msiemens avatar dependabot[bot] avatar

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.