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 make work journal 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 file automatically.

The idea is to pop up the editor window every day before leaving work, make it effortless to maintain the habit.

This project is bulit on Linux Ubuntu, and is presumed to be only run on a Linux system, with text editor gedit installed.

Setup

  1. Clone the repo.
git clone https://github.com/hank-chouu/work-journal-cli.git
cd work-journal-cli
  1. Make sure your machine has virtualenv on it.
pip install virtualenv
  1. Make a virtual enviroment, activate it, and install the dependencies. Note that once you successfully activated your virtual enviroment, your terminal should be marked with your env's name.
virtualenv venv
source ./venv/bin/activate
(venv) pip install -r requirements.txt
  1. Run this command, and you should be good to go!
(venv) pip install --editable .

Usage

After finishing the above steps, you may run the following commands to setup your journaling schedule:

(venv) work-journal setup "0 18 * * 1,2,3,4,5" --dir /home/user/path/for/journals

In this setup command, you need to pass a cron schedule expression to initiate. In the example, the expression means it's scheduled to pop out the editor every workday at 6pm. You can specify the directory you wnat the journals to be saved. If --dir is not specified, it will be the directory where the source file (cli.py) is located on default.

If you want to modify or remove the previous created job, simply run

(venv) work-journal remove

and setup a new job if you want.

To check for the existing job, you can run

crontab -l

the cron job made with this tool will have a comment with #cron_journal. You may assign a custom job comment to label out your scheduled journaling by passing a comment name with -c or --job-comment while setting up. Note that a duplicated comment is not allowed.

And to check when will the next journal will be created, run

(venv) work-journal next-run

Help command

You can run

(venv) work-journal --help

to see the help available.

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

work_journal_cli-2.1.0-py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 3

Supported by

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