Skip to content

al3jandr0/journalscript

Repository files navigation

Journalscript

Journal from the terminal

License: MIT Tests Homebrew

Journalscript is a cli that allows you to write journals from the terminal. It aims to reduce friction when writing a journals.

Just type journal, Enter and begin journaling.

📗 Install

Linux: debian, debian-based, ubuntu

  1. Download the the latest deb pacakge from the release page
  2. Verify the installation by running
    journal -v
    It should print the version number. Like this journalscript 0.2.0

Other Linux distributions - Install from source

For other distros, download the source or clone the repo.

  1. Move journal.sh somewhere to a directory included in your PATH, and (optionally) remove the .sh. Instal. For example:
    install -T -m 755 ./journal.sh $HOME/.local/bin/journal
  2. Copy journalscript.1 to a location where it will be found by the man command. For example:
    cp journalscript.1 /usr/share/man/man1/journalscript.1
  3. If you are running a bash shell, copy the autocomplete script to an appropriate location. For example:
    cp src/autocomplete.sh /usr/share/bash-completion/completions/journal
    Or
    cp src/autocomplete.sh .local/share/bash-completion/completions/journal

MacOS - Homebrew

Requires homebrew to be installed. You can find instructions here

Option 1. Install the formula

  1. Download the formula journalscript.rb from the release page
  2. Then run
    brew install journalscript.rb
  3. Verify the installation by running
    journal -v
    It should print the version number. Like this journalscript 0.2.0
  4. If you are running bash shell, follow the steps to enable completion for Homebrew. Then, copy the autocomplete script to an appropriate location. For example:
    cp src/autocomplete.sh "${HOMEBREW_PREFIX}/etc/bash_completion.d/journal"

Option 2. Use my tap

  1. Install tap
    brew tap al3jandr0/homebrew-tap
  2. Then install the formula
    brew install journalscript
  3. Verify the installation by running
    journal -v
    It should print the version number. Like this journalscript 0.2.0

MacOS - from source

Follow the steps to install from sournce

📗 Journal

Type journal, Enter, and begin journaling. It creates a new journal and journal entry to the life (default) journal (which can be customized)

You can choose to write to a specific journal.

Run journal --help for more information or read the manual man journalscript

📗 Customize

You can drop a journalscript.env configuration file into any of these locations

  1. $HOME/.config/journalscript/journalscript.env
  2. $HOME/.journalscript/journalscript.env

The command journalscript configure init assists you in setting up a new configuration. The command configure show (aliased just as configure) displays the resolved configuration.

In addition to customizing the configuration file journalscript.env, you can load variables into your environment to override the configuration of journalscript

You can combine this feature with tools such as direnv to have directory-level specific journalscript configurations.

Supported configurations

Name Value Default Description
JOURNALSCRIPT_EDITOR vi,vim,nvim,emacs,code,etc. $EDITOR Command to launch an editor installed in your system
JOURNALSCRIPT_JOURNAL_DIR path/to/directory $HOME/Documents/journals/ Directory where journals are stored
JOURNALSCRIPT_GROUP_BY DAY,MONTH,YEAR YEAR Specifies grouping of journal entries. One file per day, month, or year
JOURNALSCRIPT_DEFAULT_JOURNAL Any valid directory name life Name of the journal that is selected when you run journal without the write command
JOURNALSCRIPT_SYNC_BACKUP name of hook plugin Hook to invoke to synchronize and backup your journals. git is built into journalscrip. Others need to be "dropped" into the config directory