Skip to main content

plain-text daily notes with optional encryption

Project description

duras

License

Daily notes as plain text files, with search and optional encryption.

Optional Vim/Neovim integration: duras_bridge.

Install

pip install duras

Requires Python 3.9 or later. No dependencies. gpg optional for encrypted notes.

Quick start

duras                          # open today's note in $EDITOR
duras append "fix login bug #todo"
duras search todo
duras tags

Note format

One file per day, stored as plain UTF-8 text:

~/Documents/Notes/YYYY/MM/YYYY-MM-DD.dn

Self-describing without filename or directory context:

date: 2026-04-28

2026-04-28 09:10  started work
2026-04-28 14:32  fix null check in login handler #todo
2026-04-28 16:00  called bank re: account — follow up Thursday

Header is one line. Entries are timestamped lines separated from text by two spaces. Writes are atomic. The filesystem is the index; there is no hidden state.

Encrypted notes are stored as YYYY-MM-DD.dn.gpg via the GNU Privacy Guard.

Scope

Fits terminal workflows, grep-based retrieval, long-lived plain text, and optional encryption. Not a sync system, GUI, rich-text editor, or query engine.

Commands

open

duras               # today
duras open -1       # yesterday
duras open 2026-04-19
duras open -- +10   # pass +10 to $EDITOR (jump to line)

append

duras append "text"
duras append -d -1 "yesterday"
cat file | duras append
cmd | duras append

Text argument is optional. When omitted, stdin is read automatically.

show

duras show
duras show -1

list / stats

duras list
duras list -n 0     # all notes
duras stats

Order: by filename (ISO date), not mtime.

search / tags

duras search error
duras search todo -i    # case-insensitive
duras tags              # all tags with counts
duras tags project      # notes containing #project

Literal match, not regex. Encrypted notes excluded.

export

duras export ~/backup
duras export ~/backup --encrypt

Creates a timestamped .tar.gz. --encrypt pipes through gpg; no plaintext archive is written.

utilities

duras path          # absolute path to today's note
duras dir           # notes root directory
duras today         # print today's date
duras audit         # validate directory structure
duras echo          # notes on this date in past years
duras near          # notes within ±3 days of today
duras mv 2026-04-17 2026-04-16

Encryption

duras -c open
duras -c append "secret"
duras -c show
  • uses system gpg
  • append -c is memory-only; no plaintext temp file
  • open -c writes a temp file to /dev/shm when available
  • encrypted notes are excluded from search and tags

Dates

YYYY-MM-DD   absolute
0            today
-1           yesterday
-7           one week ago

Future dates are rejected.

Environment

variable meaning
DURAS_DIR notes directory (default: ~/Documents/Notes)
EDITOR editor (fallback: nano, vi, ed)
DURAS_GPG_KEY GPG recipient (default: self)

.editorconfig is written to the notes directory on first run. It configures supporting editors to use UTF-8, LF line endings, and 72-column line length for .dn files.

Exit codes

code meaning
0 ok
1 error
2 not found
3 invalid input
4 external failure

Documentation

Licensed under the ISC License. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

duras-1.1.3.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

duras-1.1.3-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file duras-1.1.3.tar.gz.

File metadata

  • Download URL: duras-1.1.3.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for duras-1.1.3.tar.gz
Algorithm Hash digest
SHA256 6d2bd6ab8b2f160d689c34c2557972dad83eb69b992517331d58fda616149d10
MD5 53f72c5d8571f9ba9f436c6ade1dfa74
BLAKE2b-256 95a2e13e5a7bcfa758e580e21cbbdc70e3eef5b208ff939ccbab1bef30953b5a

See more details on using hashes here.

File details

Details for the file duras-1.1.3-py3-none-any.whl.

File metadata

  • Download URL: duras-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for duras-1.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 35a3edcae17db68e881f23ff9c90618c76c1df24e23831acba476f0afb922069
MD5 3da962f21868059a9ea7077fff732c8e
BLAKE2b-256 fec3b23012c7842869a030671a379f3056d4ce1b96b5989a362eef556d4218f4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page