Git Product home page Git Product logo

dayone2md's Introduction

Dayone To Markdown

TODO

Export Dayone to Markdown.

tag Go Version GoDoc Go report Contributors License

dayone2md is a CLI application that can create a directory a markdown files from entries in Dayone. Use either a Dayone JSON archive or read directly from the Dayone database. Currently only MacOS is supported.

Features

  • Input sources:
    • JSON export archive
    • read directly from the Dayone database
  • Photos: download embedded photos and rewrite photo links
  • Wikilinks: rewrite links to other entries as wikilinks
  • Templates: supports external templates
  • Title: separate out first line of posts as a title to format as desired
  • In-place updates to output folder
  • Conditional updates: only write files to output folder that differ from source
  • Option to keep files in the output folder that do not exist at the source
  • Flag to group posts by day in a single file
  • Flag to alter sort order within day when grouped by day
  • Installation: static binary without dependencies on external libraries

๐Ÿš€ Install

brew install kwo/tools/dayone2md

๐Ÿ’ก Usage

Usage:
  dayone2md [OPTIONS]

Application Options:
  -j, --journal=      journal name to export
  -i, --input=        input file, either the DayOne.sqlite database file or the JSON export zip file
  -o, --output=       output directory
  -t, --template=     name of the template to use, either the path of an external template file or the name of a built-in template: main or
                      full (default: main)
  -g, --group         group entries by day, one file per day, multiple entries per file
  -r, --reverse       reverse chronological sort order for entries within a file, useful only if entries are grouped by day
      --keep-orphans  do not remove files in the output directory that lack a matching entry in the input file
      --version       print version and exit
  -v, --verbose       show verbose output, list multiple times for even more verbose output

Help Options:
  -h, --help          Show this help message

Example Usage

dayone2md -i "$HOME/Library/Group Containers/5U8NS4GX82.dayoneapp2/Data/Documents/DayOne.sqlite" -o $HOME/Documents/Journal -j Journal -g -vv

OR

dayone2md -i "$HOME/Desktop/09-07-2023_8-30-PM.zip" -o $HOME/Documents/Journal -j Journal -g -vv

Input Sources

JSON Export archive

Follow these instructions to export entries from the Dayone app to a JSON archive.

Then, use the archive location as the import source, for example:

dayone2md -i "$HOME/Desktop/09-07-2023_8-30-PM.zip" ...

Database

The Dayone database on a Mac is located at

$HOME/Library/Group Containers/5U8NS4GX82.dayoneapp2/Data/Documents/DayOne.sqlite

To export entries directly from the database, use this location as the import source, like this:

dayone2md -i "$HOME/Library/Group Containers/5U8NS4GX82.dayoneapp2/Data/Documents/DayOne.sqlite" ...

The database is opened in readonly mode and an export can be performed while the Dayone app is open. Also, note that for premium users that are synchronizing data from multiple devices, the Dayone app must be run once before exporting to retrieve entries from the Dayone cloud service.

Disclaimer: be careful by keeping a backup of your data. As stated in the license, this software assumes no liability for data loss.

๐Ÿง‘โ€๐Ÿ’ป development

once:

brew install goreleaser golangci-lint
go install -v golang.org/x/vuln/cmd/govulncheck@latest

ongoing:

goreleaser release --clean --snapshot
./dist/dayone2md_darwin_arm64/dayone2md --version -vv

similar projects

dayone2md's People

Contributors

kwo avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.