# QOwnNotes: Lifeboat and Speedboat ## Author: Steve Litt ## Presented at GoLUG, 8/3/2021 ## This presentation was created with QOwnNotes and Pandoc ## No Warranty: Use at your own risk # This Slide Deck Was Made With QOwnNotes ~~~ #!/bin/sh rm temp.pdf cp -p aaa_golug_qownnotes.md temp.md pandoc -V indent=true -V colorlinks=true \ -t beamer -o temp.pdf temp.md ~~~~~ * Easy, quick. * Not as configurable as I'd like, but I needed it quick. * Much easier and quicker than LaTeX/Beamer, and much less error prone than LibreOffice. * Could probably be greatly improved with a better knowledge of Pandoc. # Lifeboat * The Lifeboat part of the presentation gives QOwnNotes essentials. # What is QOwnNotes? * QOwnNotes is a GUI authoring tool optimized for authoring speed. * Optimized for keyboard use. * QOwnNotes understands and works with Markdown. * QOwnNotes stores modified notes to file every 10 seconds. * Overwrites the file each time. * Onto disk as Markdown files. * You can back them up from there. * QOwnNotes has a semi-WYSIWYG window and an almost completely WYSIWYG window. # QOwnNotes Properties * Trivially easy to start using productively within 1/2 hour or less. * No File->Save, but auto-saves every 10 seconds. * Can cause problems as discussed later. * CAUTION: I don't know all the settings and features!!! # What is Markdown? * Markdown is a lightweight markup language. * Optimized for quick and dirty HTML authoring. * Often used in Wikis * Ultra fast authoring for the touch-typist. * Optimized to produce quick and dirty HTML web pages. * But can author books, articles, presentations, etc. * If you're willing to live with some restrictions on styles=>formatting. * I created this presentation in QOwnNotes->Markdown->Pandoc->Beamer. * Hopefully soon, QOwnNotes can author moderately complex books. * With a software stack I'll create. # QOwnNotes Gotchas * No working folder tree on many versions. * Extremely featureful with sometimes inobvious settings. * Undo/backup problems: Discussed next slide. # QOwnNotes Backup Problems * All backups for a note go to the same on-disk Markdown file. * So within 10 seconds the "backup" is the same as the note. * No obvious Undo facility. * Easy to delete a note (Document) with no QOwnNote-provided safety net, unless you're interfacing to OwnCloud or NextCloud. * The preceding 2 Gotchas can be overcome by a little custom programming outside of QOwnNotes. # Adding a Backup Facility * [This continuous backup program](http://troubleshooters.com/linux/presentations/qownnotes/qobackup.sh.txt) is a step in the right direction. * Better if it diffed before copy * Could be made a daemon that backs up everything in \~/qownNotes * Be careful: If this is running while a note is unencrypted, that note is backup-saved unencrypted. # QOwnNotes Tips * Enable embedded HTML. * Enable having different filename than title. * For a nice life, put no space or punctuation other than underscore in the filename. * Refer often to the Preview. * Set up a hotkey for it (I use Ctrl+semicolon). * Make the preview wide. * Spend a couple hours going through the entire menu hierarchy. * Spend an hour going over the Markdown Cheatsheet that ships with QOwnNotes, and refer to it often. # Speedboat ## Some fancy stuff you can do with QOwnNotes. # Encrypt a Note * Edit=>Encryption=>Encrypt note * To encrypt the screen representation and the backing Markdown * Enter your encryption password twice * Edit=>Encryption=>Edit encrypted note * To edit it unencrypted, even though the underlying Markdown file remains encrypted. * Edit=>Encryption=>Decrypt Note * Decrypt both on screen and on the backing Markdown * Password required unless already editing encrypted note * Be careful with this: Periodic backup or sync can store the unencrypted file. # QOwnNote to Presentation Slide Deck * Each slide is a 1st level, meaning preceded by \"# \" * Each bullet point is an unordered list item preceded by \"* \" * Bullet lists can be multilevel. * Command to convert QOwnNote `stevelitt.md` to `stevelitt.pdf` slideshow is: ~~~ #!/bin/sh rm temp.md rm temp.pdf cp -p aaa_golug_qownnotes.md temp.md pandoc -V colorlinks=true \ -t beamer -o stevelitt.pdf stevelitt.md ~~~ * Use ~~~ above and below code to make it unindented. * Highlight whole code block and use Tab and Shift+Tab to customize indentation. # Make Simple HTML Page Direct From QOwnNotes * Superior to Pandoc's HTML generation, in my opinion * Note=>Export=>Export as HTML. * Choose location and name to put the HTML file. * This accepts all of QOwnNotes\' CSS assumptions. * The resulting HTML page is well formed XML. * For ease of further handling. * Be sure to backslash-quote all single and double quote marks. # Make Simple HTML Page Via Pandoc ~~~ #!/bin/sh rm junk.pdf cp -p stevelitt.md temp.md pandoc -V indent=true -V colorlinks=true -t html \ -o stevelitt.html temp.md ~~~ = = = = = = = = = = = = = = = = * Produces only the body code. * Therefore easy to tweak with automated line editing. * Becomes well formed XML once ``, `` and `` are added. # The Power of XML * QOwnNotes converts to well formed XML. * Pandoc converts Markdown to something easily made into well formed XML. * Any old XML parser can therefore be used make pretty much any modification. * Any old XML parser can be used to convert to different formats. * I like Python's XML parsers. # Future Power * Software stacks * Markdown with arbitrary styles * Write once, read in HTML, ePub and PDF # Software Stacks * A software stack is several programs working in cooperation. * The stack works with QOwnNotes exactly as QOwnNotes operates. * No programming changes to QOwnNotes required. * Such stacks can add markdown language capabilities. * Easy to type sequence at the beginning of a paragraph: Paragraph style. * Different easy to type sequence surrounding a phrase: Character style. * Such stacks can convert between formats. * xHTML to CSS template. * xHTML to ePub. * xHTML plus CSS to LaTeX to PDF # Markdown With Arbitrary Styles * Allow a specifically formatted text string, at the very start of a code like

or , etc, to identify id and class. * Write XML parser based software to read those strings and modify the DOM object's ID or Class accordingly. * Choose one of these: * Convert to PDF with Pandoc converting XML (xHTML) to LaTeX, using a custom CSS file written by you. * Write your own XML to LaTeX converter, using a custom LaTeX Layout file written by you. * Remember to have the conversion process make a CSS template file with preliminary definitions for each arbitrary style introduced. # Wrapup * QOwnNotes is an extremely productive interface for writing: * Notes * Books * Web pages * QOwnNotes enables you to write markdown easily. * QOwnNotes translates your Markdown to well formed XML (xHTML) * Once it's XML, you can use an XML parser to have your way with it. * QOwnNotes is trivially easy to start using, and productive within the first half hour.