harrtho / quiver

A library to load data from the Quiver app.

Home Page:https://godoc.org/github.com/harrtho/quiver

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

quiver

A library to load data from the Quiver app.

For details see for Quiver format docs.

Getting Started

This is a basic Go lib without external dependencies.

Tested with Go 1.8, but it should work on most setups.

Installing

$ go get github.com/harrtho/quiver

Usage

import (
    "github.com/harrtho/quiver"
)

and then:

// Load contents:
lib, _ := quiver.ReadLibrary("/path/to/Quiver.qvlibrary", true)

// Then use the loaded data tree:
for _, notebook := range lib.Notebooks {
    for _, note := notebook.Notes {
        // Print the title of the note
        fmt.Println(note.Title)

        for _, cell := note.cells {
            // Print the type of cell
            fmt.Println(note.Title)

            // ...
        }
    }
}

Additional tooling

This library comes with two binaries:

  • cmd/quiver_to_json is a small tool that allows loading a full library into a single JSON file
  • cmd/quiver_to_markdown is a small tool output all the notes as a tree of Markdown files

You can install then right away with the go tool:

$ go install github.com/harrtho/quiver/cmd/quiver_to_markdown
$ go install github.com/harrtho/quiver/cmd/quiver_to_json

Contributing

Feel free to contribute anytime !

License

This project is licensed under the MIT License - see the LICENSE file for details

TODO

  • Add support for creating a valid Quiver Library from code (this version is mostly for reading)
  • Add some tests

About

A library to load data from the Quiver app.

https://godoc.org/github.com/harrtho/quiver

License:MIT License


Languages

Language:Go 100.0%