boxnotes2html

Convert Box's proprietary Box Notes to HTML, Markdown, or plain text
git clone git://git.alexwennerberg.com/boxnotes2html
Log | Files | Refs | README | LICENSE

README.md (3797B)


      1 # boxnotes2html
      2 
      3 boxnotes2html is a tool to convert Box Notes to html, markdown or plain text
      4 
      5 ![before](img/before.png)
      6 
      7 *to*
      8 
      9 ![after](img/after.png)
     10 
     11 If you or your institution got value out of this script, please consider making a [donation](https://www.buymeacoffee.com/alexwennerberg)! I created and maintain this script for free in my free time.
     12 
     13 ## Rationale
     14 
     15 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.
     16 
     17 
     18 ## Installation
     19 
     20 No external dependencies required! Just the good old Python standard library.
     21 
     22 Use `pip install boxnotes2html` to install.
     23 
     24 To install from source:
     25 
     26 ```
     27 git clone https://github.com/alexwennerberg/boxnotes2html
     28 pip install .
     29 ```
     30 
     31 Requires Python 3. Tested on >=3.5
     32 
     33 ## Usage
     34 
     35 `boxnotes2html -h` for help and options.
     36 
     37 To convert a file:
     38 
     39 `boxnotes2html mynote.boxnote`
     40 
     41 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)
     42 
     43 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.
     44 
     45 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.
     46 
     47 You can also use boxnotes2html as an imported library:
     48 
     49 ```python
     50 from boxnotes2html import BoxNote
     51 
     52 # From string
     53 note = BoxNote("boxnote_file_content_string")
     54 # Or from file
     55 note = BoxNote.from_file("filename.boxnote")
     56 
     57 note.as_html() # returns an html string
     58 note.as_markdown() # returns a markdown string
     59 note.as_text() # returns raw text
     60 ```
     61 
     62 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.
     63 
     64 
     65 Functioning:
     66 * Text formatting (bold, underline, colors, size, etc)
     67 * Hyperlinks
     68 * Ordered, unordered, checked and unchecked lists are supported in Markdown (using Github flavoured check/uncheck syntax).
     69 * Tables in Markdown
     70 
     71 Caveats:
     72 * HTML lists don't supported nesting
     73 * HTML tables are broken however it should be possible to take the approach used for Markdown and apply it - PRs welcome.
     74 * Images are just a link to the image in Box, converting them would require API access.
     75 * Comments and annotations are not saved.
     76 * Document history is not preserved
     77 * This tool is in ALPHA, bugs may exist. Please report any issues you encounter!
     78 * Links to other Box notes are not changed in any way
     79 
     80 If this tool is unsatisfactory to your needs, please contact Box and tell them to build this much-needed feature!
     81 
     82 
     83 ## Feedback
     84 
     85 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!