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
- Clone the repo.
git clone https://github.com/hank-chouu/work-journal-cli.git
cd work-journal-cli
- Make sure your machine has
virtualenv
on it.
pip install virtualenv
- 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
- 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for work_journal_cli-2.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49b8229bd43769b40e71c77c2d52cc0d71457e8ae14edd57ad034066443cf927 |
|
MD5 | ef921fedb5864310e115ca4171c5f873 |
|
BLAKE2b-256 | dde81baa25b9c59f3b982c45333248fa9bc9d0eef6cbd064f95338f2b5832cbc |