work-journal-cli


Namework-journal-cli JSON
Version 2.1.0 PyPI version JSON
download
home_pagehttps://github.com/hank-chouu/work-journal-cli
SummaryA CLI tool to schedule for writing a work journal with cron.
upload_time2023-10-26 15:29:11
maintainer
docs_urlNone
authorHeng-Tse Chou
requires_python
licenseMIT
keywords cron cli
VCS
bugtrack_url
requirements click cron-descriptor croniter python-crontab python-dateutil six
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
```

2. Make sure your machine has `virtualenv` on it.

```
pip install virtualenv
```

3. 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
```

4. 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](https://crontab.guru/) 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hank-chouu/work-journal-cli",
    "name": "work-journal-cli",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Cron CLI",
    "author": "Heng-Tse Chou",
    "author_email": "hengtse.me@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "# Work Journal CLI Tool\n\nSome 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. \n\nThe idea is to pop up the editor window every day before leaving work, make it effortless to maintain the habit.\n\nThis project is bulit on Linux Ubuntu, and is presumed to be only run on a Linux system, with text editor `gedit` installed.\n\n## Setup \n\n1. Clone the repo.\n\n```\ngit clone https://github.com/hank-chouu/work-journal-cli.git\ncd work-journal-cli\n```\n\n2. Make sure your machine has `virtualenv` on it.\n\n```\npip install virtualenv\n```\n\n3. 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.\n\n```\nvirtualenv venv\nsource ./venv/bin/activate\n(venv) pip install -r requirements.txt\n```\n\n4. Run this command, and you should be good to go!\n\n```\n(venv) pip install --editable .\n```\n\n\n## Usage \n\nAfter finishing the above steps, you may run the following commands to setup your journaling schedule:\n\n```\n(venv) work-journal setup \"0 18 * * 1,2,3,4,5\" --dir /home/user/path/for/journals\n```\n\nIn this `setup` command, you need to pass a [cron schedule expression](https://crontab.guru/) 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.\n\nIf you want to modify or remove the previous created job, simply run\n\n```\n(venv) work-journal remove\n```\n\nand setup a new job if you want. \n\nTo check for the existing job, you can run \n\n```\ncrontab -l\n```\n\nthe 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. \n\nAnd to check when will the next journal will be created, run\n\n```\n(venv) work-journal next-run\n```\n\n## Help command\n\nYou can run\n```\n(venv) work-journal --help\n```\n\nto see the help available.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A CLI tool to schedule for writing a work journal with cron.",
    "version": "2.1.0",
    "project_urls": {
        "Homepage": "https://github.com/hank-chouu/work-journal-cli"
    },
    "split_keywords": [
        "cron",
        "cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dde81baa25b9c59f3b982c45333248fa9bc9d0eef6cbd064f95338f2b5832cbc",
                "md5": "ef921fedb5864310e115ca4171c5f873",
                "sha256": "49b8229bd43769b40e71c77c2d52cc0d71457e8ae14edd57ad034066443cf927"
            },
            "downloads": -1,
            "filename": "work_journal_cli-2.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ef921fedb5864310e115ca4171c5f873",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7709,
            "upload_time": "2023-10-26T15:29:11",
            "upload_time_iso_8601": "2023-10-26T15:29:11.873521Z",
            "url": "https://files.pythonhosted.org/packages/dd/e8/1baa25b9c59f3b982c45333248fa9bc9d0eef6cbd064f95338f2b5832cbc/work_journal_cli-2.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-26 15:29:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hank-chouu",
    "github_project": "work-journal-cli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "click",
            "specs": [
                [
                    "==",
                    "8.1.6"
                ]
            ]
        },
        {
            "name": "cron-descriptor",
            "specs": [
                [
                    "==",
                    "1.4.0"
                ]
            ]
        },
        {
            "name": "croniter",
            "specs": [
                [
                    "==",
                    "1.4.1"
                ]
            ]
        },
        {
            "name": "python-crontab",
            "specs": [
                [
                    "==",
                    "3.0.0"
                ]
            ]
        },
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.8.2"
                ]
            ]
        },
        {
            "name": "six",
            "specs": [
                [
                    "==",
                    "1.16.0"
                ]
            ]
        }
    ],
    "lcname": "work-journal-cli"
}
        
Elapsed time: 0.12555s