boxnotes2html

Convert Box's proprietary Box Notes to HTML, Markdown, or plain text
Log | Files | Refs | README | LICENSE

commit f6cf7945983a260104e7eabfc2f031d3ea3f1a47
parent bc4fe75148df34b5b79db9be5ddfb871f7776e93
Author: alex wennerberg <awennerberg@cloudbakers.com>
Date:   Fri,  6 Sep 2019 14:42:33 -0500

Clean up readme

Diffstat:
MREADME.md | 30+++++++++++++++++-------------
1 file changed, 17 insertions(+), 13 deletions(-)

diff --git a/README.md b/README.md @@ -8,20 +8,27 @@ boxnotes2html is a tool to convert Box Notes to html, markdown or plain text ![after](img/after.png) -# Rationale +## Rationale -Box notes are a proprietary format. According to this [support ticket](https://community.box.com/t5/Desktop-and-Mobile-Forum/Exporting-Box-Notes/td-p/14834) 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. +Box Notes are a proprietary, undocumented format, which makes them difficult to export or move to another service. According to this [support ticket](https://community.box.com/t5/Desktop-and-Mobile-Forum/Exporting-Box-Notes/td-p/14834) 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 +## Installation -No external dependencies! Just the good old Python standard library. (plus pytest for tests) +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 +## Usage `boxnotes2html -h` for help and options. @@ -40,7 +47,7 @@ You can also use boxnotes2html as an imported library: ```python from boxnotes2html import BoxNote -# from string +# From string note = BoxNote("boxnote_file_content_string") # Or from file note = BoxNote.from_file("filename.boxnote") @@ -50,7 +57,7 @@ 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](http://www.html-tidy.org/) or another tool to clean it up. You can also use [pandoc](https://pandoc.org/) to convert from html to another format, such as PDFs, markdown, microsoft word, and so on. I haven't tested all these tools, so YMMV. +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](http://www.html-tidy.org/) or another tool to clean it up. You can also use [pandoc](https://pandoc.org/) 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: @@ -58,7 +65,7 @@ Functioning: * Hyperlinks Caveats: -* Lists are a little wonky -- they are just stars with spcaes instead of HTML tags. A TBD if there is interest +* Lists are a little wonky -- they are just stars with spcaes instead of HTML tags. A TBD if there is interest. * Tables are broken and will just be converted to plaintext. If you can figure out a clean way to do this, please submit a pull request. * Images are just a link to the image in Box, converting them would require API access. * Comments and annotations are not saved. @@ -66,10 +73,7 @@ Caveats: If this tool is unsatisfactory to your needs, please contact Box and tell them to build this much-needed feature! -# Technical summary - -Box notes are formatting as a JSON. They include a bunch of text and metadata. Some of this metadata is in a long "attributes" string. This string encoded various styles to different properties, using base36 numbers. This formatting is HTML-like but not exactly HTML. Check out the code for more details. Feel free to contact me on GitHub or email me with any questions on feedback: alex@alexwennerberg.com If you use this library, I would love to know what your experience is, positive or negative. -Thanks, and enjoy! +## Feedback -Alex +Feel free to contact me on GitHub 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. Thanks, and enjoy!