Package: rvo
rvoI uservofor managing my text data.NotesDocs (personal wiki)BookmarksJournalQuotesand the like.MotivationsWhen I started writing rvo, my goal was designing an utility that feels
a little like markdown. It should be usable very easily. A handy program
the user likes to use. At the same time it should be easy to
integrate with other tools. Taking the typical unix approach. Make it
read and write to stdin/out. Have it fully configurable with commandline
parameters.It basically should not matter if a human or a machine is interacting
withrvo.FeaturesRich search capabilitiesStatistics about the documentsEncryption of single documents using Salsa20 and Blake2bInteracts withvimFetching the title of a link to be the title of your documentMail an article to a friend of yours.Easily interact with other programs using stdin / stdoutInstallationCurrently, rvo only works in python2.7pip install rvoAfter that, setup a mongodb. You may use your favorite packagemanager.
For me it’s OpenBSDs “pkg_add”./etc/init.d/mongod startConfigurationAdd this to the config file~/.rvo.conf[General]
MongoDB = mongodb://localhost/
DB = rvo
Editor = vim
Pager = vim
PagerOptions = -R
MailFrom = user@example.netAfter it was successfully configured, run ping to verfiy
the connection to mongodb works.$ rvo ping
>>> Trying to connect to database...
>>> Connection SUCCESSFUL
>>> Trying to write, read, delete to test_collection...
>>> Interactions were SUCCESSFULQuickstartrvois a really friendly piece of software. It helps you whereever it needs to.
You may start with a simple$ rvo --helpTo add a document, just$ rvo addand tada, your very first document is created. Add content from whatever you like. As said before,
you can store notes, write diary. After that, check out your documents.$ rvo listThats all. Just kidding. Have a look into all the the other commands!add       Add a document.
analyze   Text analysis on a document
append    Append content to a document.
delete    Deletes a document.
edit      Edit the content of an document.
export    Exports all document
info      Shows metadata of a document
list      List documents from store
log       Show transactions
mail      Mails a document to a recipient for your choice
memories  Some nostalgia by showing documents some years ago
modify    Modifies a documents metadata
ping      Verifys the connection to the database
show      Shows a document
stats     Show statistics about categories and tagsDocument titlesThe title from a normal document is generated from the first line of the
content. Leading whitespace and#will be stripped away.$ rvo add -t javascript -c notes
# Meeting Notes

* We should probably throw away our .js applications
* ...So “Meeting Notes” will be the document title. This also happens when you edit
a document. So if you want to change the title, edit the content and after
saving the title gets updated.StdoutNormally,rvoopens your favoritePAGER. If output redirection
is detected it just outputs plain content to whatever file you like.$ rvo list -c meeting
$ rvo show 1 > /tmp/meeting.mdAlso without redirection the content is beingcated by using the-sflag$ rvo show -s 2StdinRead content from stdin$ echo foo | rvo add -t test -c notesExportYou can easily export all what you’ve inserted.rvo export -c twitter --to json | python -m json.tool
rvo export -t work --to markdownOr just loop over the outputrvo list -l 5000
for x in {1..5000} ; do rvo show --stdout $x ; doneDocument identificationAs a typical workflow, you do a list query and You can either use the
full mongodb objectid or a shortid.Everytime you do a list query, a resultset will be built. Every result
gets a shortid assigned to it and this mapping is being saved in
mongodb.I’ve implemented shortids because they are easier to use. You dont have
to copy the full objectid using copy with mouse.shortidsare easier
to use!CryptoThe crypto used is written withSalsa20andblake2b. When the first
document is created and being encrypted, rvo prompts for the initial password.
Keep this password save. You will need it more often.The password you set is used to encrypt a randomly generated character long
password. Its stored within the database. Most important. The generated password
is used to encrypt and decrypt every document (when encryption is set).Basically that means: there is one password (chosen by you) that unlocks
another generated password, that encrypts your document.This ensures a lot of stuff. For example easy password changes for the user.
Or setting a slightly different password accidentially for one document.LinksLinks: If the content is just an url, it gets automatically the categorylinksand its html title will be fetched to be used astitlewithin the document.DevelopmentWording.docid is what is being used to identify a document. It can be both, a
shortid or a ObjectId (MongoDB)Documentstore basically means mongodb at the momentAll commands have to be stored in submodule commands and can contain
only 1 command that has to be named exactly as the filename is. This
is required for click to parse all commands.Data StructureThe native json document that goes into MongoDB looks like this{
  "_id" : ObjectId("568d344c6815b45596d1c7ad"),
  "title": "My very first entry"
  "content" : "<Markdown Content goes here>",
  "created": ISODate("2014-09-03T07:37:52Z"),
  "updated": ISODate("2015-09-03T07:37:52Z"),
  "tags": [ "mongodb", "markdown" ],
  "category": ["notes"],
  "encrypted": false,
}Since rvo usespymongo, its way easier dealing with documents.
Python native types are automatically converted to the corresponding
types in json/mongodb. The following is a native python dictionary.{
  'title': '2-Factor-Auth',
  'content': '<Markdown Content goes here>',
  'created': datetime.datetime(),
  'updated': datetime.datetime(),
  'tags': ['markdown, 'mongodb'],
  'encrypted': False,
  'categories': ['notes'],
}MissingThere are also features, that rvo does not have and probably never gets.Version control for your documentsMultiple users or an “author” field.Last but not leastDo not confuservowithhttp://www.rvo.nl. Rijksdienst voor Ondernemend Nederland.
It has nothing to do with it. Still, I really like their logo.