Skip to main content

boxnotes2html

boxnotes2html is a tool to convert Box Notes to html, markdown or plain text

before

to

after

Rationale

Box Notes are a proprietary, undocumented format, which makes them difficult to export or move to another service. According to this support ticket the official way in which they meet GDPR compliance is through allowing users to print the notes page as a PDF when it's open in a web browser. Another option is to Copy/paste the document into LibreOffice, Google Docs, Microsoft Word or some other text-editing program. Neither of these are very attractive options when exporting a large number of Box Notes, say, for archival/backup purposes or in the process of migrating to another platform.

Installation

No external dependencies required! Just the good old Python standard library.

Use pip install boxnotes2html to install.

To install from source:

git clone https://github.com/alexwennerberg/boxnotes2html
pip install .

Requires Python 3. Tested on >=3.5

Usage

boxnotes2html -h for help and options.

To convert a file:

boxnotes2html mynote.boxnote

Will create a file called mynote. You can optionally specify the filetype with -f, current options, in order to most to least reliable, html, md (markdown), and txt (plaintext)

You can specify one or more options. If any of the options are a directory, boxnotes2html will convert those notes and put the new file next to it in the directory path.

Box doesn't allow for you to download individual Box notes from the UI, but you can put them into a folder and download that folder, or use the API.

You can also use boxnotes2html as an imported library:

from boxnotes2html import BoxNote

# From string
note = BoxNote("boxnote_file_content_string")
# Or from file
note = BoxNote.from_file("filename.boxnote")

note.as_html() # returns an html string
note.as_markdown() # returns a markdown string
note.as_text() # returns raw text

The HTML formatted by this tool is pretty ugly -- that may not be important for a lot of cases, but you may want to use tidy or another tool to clean it up. You can also use pandoc to convert from html to another format, such as PDFs, markdown, microsoft word, and so on. I haven't tested all these tools, so I can't vouch for their effectiveness.

Functioning:

  • Text formatting (bold, underline, colors, size, etc)
  • Hyperlinks
  • Ordered, unordered, checked and unchecked lists are supported in Markdown (using Github flavoured check/uncheck syntax).
  • Tables in Markdown

Caveats:

  • HTML lists don't supported nesting
  • HTML tables are broken however it should be possible to take the approach used for Markdown and apply it - PRs welcome.
  • Images are just a link to the image in Box, converting them would require API access.
  • Comments and annotations are not saved.
  • Document history is not preserved
  • This tool is in ALPHA, bugs may exist. Please report any issues you encounter!
  • Links to other Box notes are not changed in any way

If this tool is unsatisfactory to your needs, please contact Box and tell them to build this much-needed feature!

Feedback

Feel free to open an issue or email me with any questions or feedback: alex@alexwennerberg.com If you use this library, I would love to know what your experience is, positive or negative. I do maintain this, so feel free to make feature requests or bug reports. Thanks, and enjoy!

Release files for boxnotes2html 0.1.4

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

Source distribution (sdist)

Source distribution for boxnotes2html 0.1.4
File Size Uploaded
boxnotes2html-0.1.4.tar.gz 11.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for boxnotes2html 0.1.4
File Interpreter ABI Platform
boxnotes2html-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size:23.4 kB

Release files / boxnotes2html-0.1.4.tar.gz

Download URL boxnotes2html-0.1.4.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e30889acdb665982284ee2fddefb61954b4fe5ccaebdf9ab8ccf4f1e8c66f6cb
BLAKE2b-256 checksum
How to use checksums
4536c4e2489793c39394cf029958b9797cc52ad534e3629187f7d40dcdcc47be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.3

Release files / boxnotes2html-0.1.4-py3-none-any.whl

Download URL boxnotes2html-0.1.4-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
27f0086b0811efc6212b39cc11f4a480f7da76b95f27ed7a83c65c9a5c51df5c
BLAKE2b-256 checksum
How to use checksums
2fbc0cc5757310938fe98ed83401c528b8cd565aadb12ee91394bdbeba55fd8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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