Skip to main content

A CLI tool to schedule for writing a work journal with cron.

Project description

Work Journal CLI Tool

Some people consider it's a good practice to write work journals on a daily basis, to remind what you have achieved every day. In this CLI tool, we utitlize the Linux built-in tool crontab and set a schedule, to create a work journal in markdown format automatically.

The idea is to create a text file and pop up an editor window every day before leaving work, make it effortless to maintain the habit.

Linux/UNIX are theoretically all supported if you have these programs:

  1. which
  2. crontab
  3. python/python3

These programs should be installed for the user and can be invoked through command line. Otherwise, the tool may has unpredictable behaviors.

Install

pip install work-journal-cli

Usage

Usage: work-journal [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  config  Show configurations.
  info    Show the details of the scheduled info.
  new     Create a cron job for scheduling a journal.
  remove  Remove the previously created work-journal cron job.
  run     Make a journal and start writing immediately.

To schedule a new journal, run

work-journal new

The terminal will prompt you to input the required fields.

$ work-journal new
Journal name [#]: test
Schedule: 0 18 * * 1,2,3,4,5
Folder path for saving journals [/home/user/work_journals]: 
Journal is scheduled at At 06:00 PM, only on Monday, Tuesday, Wednesday, Thursday, and Friday with name test, and will be saved at /home/user/work_journals.

You need to pass a cron expression for the schedule. In the example, the expression means it's scheduled to pop out the editor every workday at 6pm. You can specify the directory you want the journals to be saved.

You can also assign the text editor you preferred, using the following line:

work-journal config --set-editor gedit

In the example, gedit is the command for calling the GNOME GUI text editor.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

work_journal_cli-2.1.1-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file work_journal_cli-2.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for work_journal_cli-2.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f93d9dd4d2c518ff8a4dc503d5882ce1d192b8bcf9acd0379b1496ba9517b2f
MD5 360d88c2db01fe6ac166e62af77a607e
BLAKE2b-256 ebdb70b7a2fa15a2c8c8e4f1be21afc09685bf9f4d363c3df1416476763b83ba

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