habiter


Namehabiter JSON
Version 0.8.0 PyPI version JSON
download
home_pagehttps://github.com/kemzeb/habiter
SummaryQuantifiy and keep tabs on habits.
upload_time2023-06-21 21:12:32
maintainer
docs_urlNone
authorKemal Zebari
requires_python>=3.9
licenseMIT
keywords productivity cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
<img src="https://raw.githubusercontent.com/kemzeb/habiter/main/docs/img/habiter.gif" height = 180 width = 450>
</p>

---

habiter quantifies and keeps track of habits within the command line.

It essentially addresses the problem of managing our habits (whether good or bad) by making it out in the open for us to see by simply tracking the number of occurrences we notice with our habits per day. This data can then be viewed at any time as well manipulated by using particular math concepts (e.g. Poisson approximation) to provide some means to visualize these habits.

## Features

- CLI interaction using the [click](https://github.com/pallets/click) library
- Addition, deletion, updating of habits through the cooperation of the `sqlite3` library
- Persistent data storage onto ***your local machine***; your data is **yours** to own and use **alone**
- Poisson probability is utilized to act upon your data (more mathematical concepts to come)
- Ability to print summary information of your habits

## Installation

`pip install habiter`

Alternatively, you can **clone the repository**, though all interaction must take place at the root directory of the repo (usage explained below for both).

## To Do's

- [ ] Provide a configuration command to allow, as one may guess, the ability to configure habiter
- [ ] "Pretty" up the list command print-outs ([rich](https://github.com/Textualize/rich) looks pretty neat!)
- [ ] Implement an "undoing" feature to restore the habit record to previous states
- [ ] Introduce more math concepts that work nicely with the data under consideration

## Usage

If you installed habiter with pip, simply call `habiter` anywhere to get started.

If you cloned the repo, use the following (assuming you're in the project root directory and 'python3' command is your Python intrepreter):

`python3 -m habiter.internal.run`

```
➜  habiter -h
[habiter]  Last accessed: 15 Jan, 1505 1:21AM

Usage: habiter [OPTIONS] COMMAND [ARGS]...

  Quantifies and keeps tabs on unwanted habits you have developed over time.

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  add     add new habit(s) into record
  list    list all habits on record
  remove  delete habit(s) from record
  reset   reset some habit(s) from record
  tally   increment the number of occurrences for some habit(s)

  For more information, visit the code repository at
  https://github.com/kemzeb/habiter.
```

This is what is printed out after the `-h` option is requested (just typing `habiter` also does the trick). We will analyze each subcommand found above and any of its optional arguments.

#

`tally` subcommand allows for incrementing the occurrence of one or more habits that exists within the record. It keeps track of daily and total habit occurrence (aka 'tallies') day by day. It holds the following options:

- `-z, --zero` for informing habiter that you have had no tallies for that day for some habit(s)
- `-n, --num` for providing a particular number of occurrences for that day for some habit(s) (**please note that** it applies to all habits that you currently inputted)

The reason why the `-z, --zero` option exists in the first place is because habiter doesn't run as a daemon, where habit data could be updated automatically based on meeting certain time constraints. You could supply `-n 0` as input and this is essentally the same thing, but since there is a good chance that you have had no tallies for a habit on a particular day it becomes too cumbersome. The zero option simply informs habiter that the habits you supplied as input should be considered `active` today. **If you tally afterward** you won't find any trouble but you will exit with an error if you attempt to use this option again for that particular habit.

#

`add` subcommand allows for the addition of one or more habits into the record. If a habit already exists in the record, it will exit with an error but will not hinder the addition of any other inputted habit names.

#

`remove` subcommand allows for the deletion of one or more habits from the record. Similar to `add`, a habit ***that does not exist*** within the record will exit with an error but will not hinder the deletion of any other inputted habit names.

#

`reset` subcommand allows resetting one or more habits from the record to the initial state. Recorded total and daily tallies, number of days captured, and other information will no longer exist, but the habit will remain in the record.

#

`list` subcommand allows for the printing of all existing habits within the record. Its functionality can be extended using the following option:

- `-l, --less` for listing only the habit names in the record

The following provides an example of the list command in action:

```
➜  habiter list
Habit + Attributes                    Value
-------------------                   -----
[mirror-writing]
  | P(Occurrences >= 2 today):        91.717%
  | Today's daily tally:              15
  | Total tally:                      1452
  | # of days captured:               352
  | Last updated:                     0 day(s) ago
  | Date added:                       15 Jan, 1505 1:21AM

[sculpting]
  | P(Occurrences >= 2 today):        48.854%
  | Today's daily tally:              15
  | Total tally:                      578
  | # of days captured:               352
  | Last updated:                     0 day(s) ago
  | Date added:                       15 Jan, 1505 1:22AM

-------------------                   -----
[habiter]  Note: More data captured = increased statistical accuracy!
```

You can also be more ***specific by passing habit names***. For example:

```
➜  habiter list mirror-writing
Habit + Attributes                    Value
-------------------                   -----
[mirror-writing]
  | P(Occurrences >= 2 today):        91.717%
  | Today's daily tally:              15
  | Total tally:                      1452
  | # of days captured:               352
  | Last updated:                     0 day(s) ago
  | Date added:                       15 Jan, 1505 1:21AM

-------------------                   -----
[habiter]  Note: More data captured = increased statistical accuracy!
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kemzeb/habiter",
    "name": "habiter",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "productivity,cli",
    "author": "Kemal Zebari",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/43/91/3b754d6d09d54abdf93926dc2092f495d4e4df73c25ddb31224dbd62ba9d/habiter-0.8.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n<img src=\"https://raw.githubusercontent.com/kemzeb/habiter/main/docs/img/habiter.gif\" height = 180 width = 450>\n</p>\n\n---\n\nhabiter quantifies and keeps track of habits within the command line.\n\nIt essentially addresses the problem of managing our habits (whether good or bad) by making it out in the open for us to see by simply tracking the number of occurrences we notice with our habits per day. This data can then be viewed at any time as well manipulated by using particular math concepts (e.g. Poisson approximation) to provide some means to visualize these habits.\n\n## Features\n\n- CLI interaction using the [click](https://github.com/pallets/click) library\n- Addition, deletion, updating of habits through the cooperation of the `sqlite3` library\n- Persistent data storage onto ***your local machine***; your data is **yours** to own and use **alone**\n- Poisson probability is utilized to act upon your data (more mathematical concepts to come)\n- Ability to print summary information of your habits\n\n## Installation\n\n`pip install habiter`\n\nAlternatively, you can **clone the repository**, though all interaction must take place at the root directory of the repo (usage explained below for both).\n\n## To Do's\n\n- [ ] Provide a configuration command to allow, as one may guess, the ability to configure habiter\n- [ ] \"Pretty\" up the list command print-outs ([rich](https://github.com/Textualize/rich) looks pretty neat!)\n- [ ] Implement an \"undoing\" feature to restore the habit record to previous states\n- [ ] Introduce more math concepts that work nicely with the data under consideration\n\n## Usage\n\nIf you installed habiter with pip, simply call `habiter` anywhere to get started.\n\nIf you cloned the repo, use the following (assuming you're in the project root directory and 'python3' command is your Python intrepreter):\n\n`python3 -m habiter.internal.run`\n\n```\n\u279c  habiter -h\n[habiter]  Last accessed: 15 Jan, 1505 1:21AM\n\nUsage: habiter [OPTIONS] COMMAND [ARGS]...\n\n  Quantifies and keeps tabs on unwanted habits you have developed over time.\n\nOptions:\n  --version  Show the version and exit.\n  --help     Show this message and exit.\n\nCommands:\n  add     add new habit(s) into record\n  list    list all habits on record\n  remove  delete habit(s) from record\n  reset   reset some habit(s) from record\n  tally   increment the number of occurrences for some habit(s)\n\n  For more information, visit the code repository at\n  https://github.com/kemzeb/habiter.\n```\n\nThis is what is printed out after the `-h` option is requested (just typing `habiter` also does the trick). We will analyze each subcommand found above and any of its optional arguments.\n\n#\n\n`tally` subcommand allows for incrementing the occurrence of one or more habits that exists within the record. It keeps track of daily and total habit occurrence (aka 'tallies') day by day. It holds the following options:\n\n- `-z, --zero` for informing habiter that you have had no tallies for that day for some habit(s)\n- `-n, --num` for providing a particular number of occurrences for that day for some habit(s) (**please note that** it applies to all habits that you currently inputted)\n\nThe reason why the `-z, --zero` option exists in the first place is because habiter doesn't run as a daemon, where habit data could be updated automatically based on meeting certain time constraints. You could supply `-n 0` as input and this is essentally the same thing, but since there is a good chance that you have had no tallies for a habit on a particular day it becomes too cumbersome. The zero option simply informs habiter that the habits you supplied as input should be considered `active` today. **If you tally afterward** you won't find any trouble but you will exit with an error if you attempt to use this option again for that particular habit.\n\n#\n\n`add` subcommand allows for the addition of one or more habits into the record. If a habit already exists in the record, it will exit with an error but will not hinder the addition of any other inputted habit names.\n\n#\n\n`remove` subcommand allows for the deletion of one or more habits from the record. Similar to `add`, a habit ***that does not exist*** within the record will exit with an error but will not hinder the deletion of any other inputted habit names.\n\n#\n\n`reset` subcommand allows resetting one or more habits from the record to the initial state. Recorded total and daily tallies, number of days captured, and other information will no longer exist, but the habit will remain in the record.\n\n#\n\n`list` subcommand allows for the printing of all existing habits within the record. Its functionality can be extended using the following option:\n\n- `-l, --less` for listing only the habit names in the record\n\nThe following provides an example of the list command in action:\n\n```\n\u279c  habiter list\nHabit + Attributes                    Value\n-------------------                   -----\n[mirror-writing]\n  | P(Occurrences >= 2 today):        91.717%\n  | Today's daily tally:              15\n  | Total tally:                      1452\n  | # of days captured:               352\n  | Last updated:                     0 day(s) ago\n  | Date added:                       15 Jan, 1505 1:21AM\n\n[sculpting]\n  | P(Occurrences >= 2 today):        48.854%\n  | Today's daily tally:              15\n  | Total tally:                      578\n  | # of days captured:               352\n  | Last updated:                     0 day(s) ago\n  | Date added:                       15 Jan, 1505 1:22AM\n\n-------------------                   -----\n[habiter]  Note: More data captured = increased statistical accuracy!\n```\n\nYou can also be more ***specific by passing habit names***. For example:\n\n```\n\u279c  habiter list mirror-writing\nHabit + Attributes                    Value\n-------------------                   -----\n[mirror-writing]\n  | P(Occurrences >= 2 today):        91.717%\n  | Today's daily tally:              15\n  | Total tally:                      1452\n  | # of days captured:               352\n  | Last updated:                     0 day(s) ago\n  | Date added:                       15 Jan, 1505 1:21AM\n\n-------------------                   -----\n[habiter]  Note: More data captured = increased statistical accuracy!\n```\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Quantifiy and keep tabs on habits.",
    "version": "0.8.0",
    "project_urls": {
        "Homepage": "https://github.com/kemzeb/habiter"
    },
    "split_keywords": [
        "productivity",
        "cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "00368eeba4f4183feb588ccba25b66b213f691afff27be4a406dddfecc842806",
                "md5": "38f74fac65f844e0910fe01715c5b734",
                "sha256": "8a06af4e0ece29f2a9033c0bafbb75bc1efc4f38645a4140dec118bf862d9bb7"
            },
            "downloads": -1,
            "filename": "habiter-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "38f74fac65f844e0910fe01715c5b734",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 17124,
            "upload_time": "2023-06-21T21:12:31",
            "upload_time_iso_8601": "2023-06-21T21:12:31.273444Z",
            "url": "https://files.pythonhosted.org/packages/00/36/8eeba4f4183feb588ccba25b66b213f691afff27be4a406dddfecc842806/habiter-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "43913b754d6d09d54abdf93926dc2092f495d4e4df73c25ddb31224dbd62ba9d",
                "md5": "aea5c0eb5db7108d38038595570d10a5",
                "sha256": "71fb29f98edf84edcba4c0bafaecdb79ec9475f505e78d129be366300570cc50"
            },
            "downloads": -1,
            "filename": "habiter-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "aea5c0eb5db7108d38038595570d10a5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 14735,
            "upload_time": "2023-06-21T21:12:32",
            "upload_time_iso_8601": "2023-06-21T21:12:32.668697Z",
            "url": "https://files.pythonhosted.org/packages/43/91/3b754d6d09d54abdf93926dc2092f495d4e4df73c25ddb31224dbd62ba9d/habiter-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-21 21:12:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kemzeb",
    "github_project": "habiter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "habiter"
}
        
Elapsed time: 0.07925s