This is a boxnote converter to HTML and Docx.
This is suitable for the new format of BoxNotes after August 2022 (see this issue).
- Clone this repo
- Setup the repo using poetry:
python3 -m pip install poetry
poetry install- Put the new boxnotes folder into your desired work directory
- If you want the converter to download image automatically with only a
.boxnotefile, you need to pass a validbox_access_tokento the tool. If yourbox_access_tokenis from Box Business, you also need auser_idfor representing - Run
poetry run python boxnote-converter/html_parser.py <example.boxnote> -d <work_dir> [-t] [box_access_token] [-u] [user_id] [-o] [output_file_name]to convert to html - Or, run
poetry run python boxnote-converter/docx_parser.py <example.boxnote> -d <work_dir> [-t] [box_access_token] [-u] [user_id] [-o] [output_file_name]to convert to docx (this will automatically create a html conversion in middle) - Check result in
work_dir
- Use similar method as in CLI to setup
- Use
docx_parser.parse_docxorhtml_parser.parseto do the conversion.
- Please check the current example files in
example/directory - the new boxnote have a folder contains all their images calledBox Notes Images/which have<BoxNote Title> Images/directory in it. - There is a predefined css in
boxnote-converter/html_mapper.py, feel free to edit it as you wish.
- Text
- Table
- Headings
- Ordered Lists
- Unordered Lists
- Checklists (by manual checkbox)
- Formatting
- Bold
- Italic
- Underline
- Strikethrough
- fort-size
- font-color
- highlight
- alignment
- Image
- Hyperlink
- Block Quote
- Divider Line (Horizontal Rule)
- Code Block
- Callout
- File preview
- Table of Contents
- Annotation
- pqzx/html2docx for the customized html to docx converter.