Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

DayOneLib

A Python library for creating DayOne entries.

Installation

pip install dayonelib

Dependencies

  • tzlocal
  • pyobjc-framework-CoreLocation
  • plistlib
  • uuid
  • arrow

About

There are numerous tools to interact with DayOne. I have used jrnl and the DayOne CLI extensively in the past. However, they were both missing a few features. I also found that I had to write a lot of redundant code to use these tools.

This lib was created to offload some of the common chores of creating entries for DayOne, to provide a fuller set of features, and to make scripts interacting with DayOne cleaner.

Each DayOneEntry is only required to have the text property populated to create the journal entry.

dayonelib features:

  • Location
    • Will use Location Services to find current location
  • Tags
  • Entry Text
  • Date
  • Starring
  • UUID

Most of these will be automatically populated by DayOneLib but can be overloaded with custom values. The location serivce will require you to allow python access to location in the MacOS Privacy settings.

Hello World

import dayonelib
journal_location = '<path to journal>'
	
dayone = dayonelib.DayOne(journal_location)
	
entry = dayonelib.DayOneEntry()
entry.text = "I tried out dayonelib today!"
dayone.save(entry)

Additional examples can be found in examples/ Heads up they are pretty dirty

Many Thanks

About

No description, website, or topics provided.

Resources

License

Packages

No packages published

Languages