GithubHelp home page GithubHelp logo

snickerdoodle-codes / cli-resolve Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 1.0 1.31 MB

Python CLI app to keep track of habits and make progress on New Year's resolutions

License: MIT License

Python 100.00%
command-line-app command-line-interface habit-tracking productivity python

cli-resolve's Introduction

Resolve CLI

Resolve is an open-source CLI app for people who make New Year's resolutions1 and intend to keep them. I decided to develop this tool after six years of using spreadsheets to track habits that I wanted to adopt.

You're welcome to fork and clone this repo to your heart's content. If you've found value in my work, please consider buying me a coffee.

Demo of how to log resolutions

Getting Started

  1. Install pipenv for package management if you don't already have it (instructions)
  2. Clone this repo to your local machine and navigate into the cli-resolve directory
  3. Install all dependencies: pipenv install
  4. Run the program: pipenv run python cli_resolve

Features

Core Features

Add and Log Resolutions

Keep track of your progress on existing resolutions and add new resolutions.

Graph Resolutions

Generate heatmaps from your data across multiple years and resolutions. Heatmaps are temporarily stored as PDFs in data/exports and saved over the next time you graph.

You can overlay event labels on your graph, for example, to mark days when you were traveling (see how it's stored). Resolutions heatmap overlaid with trip information

You can also generate minimaps of individual resolutions. Mini heatmaps of individual resolutions

Export Data

Export your data (stored locally as JSON) as a CSV file. Exported CSVs reside in data/exports).

Standalone Scripts

Convert Legacy Data for Graphing

If you used to keep track of your resolutions in a spreadsheet (or you want to keep using a spreadsheet) but now want to import and visualize them in Resolve, you can use convert_legacy_resolutions.py (location).

Instructions
  1. Save legacy spreadsheet as a CSV file under data/legacy (here's my actual data from 2022). In order for the conversion script to work, your data must meet the following assumptions:
    • Must have a date field under the column header of "Date" or "date"
    • Date field must be in MM/DD/YYYY format
    • Must contain columns with headers that refer to resolutions (such as "exercise")
    • Each row must correspond to a unique date, as well as contain data pertaining to whether and how a resolution was met on that date
  2. Run python convert_legacy_resolutions.py {filename}.csv from the scripts folder. The output is a cleaned CSV saved to data/cleaned which can then be used for graphing.
  3. Run the CLI tool and export graph from file.

Backpopulate App with Legacy Data

You may want to import some or all of your legacy data into the app if you are ditching spreadsheets altogether or wish to generate graphs spanning multiple years.

Instructions
  1. Follow the steps above to Convert Legacy Data for Graphing. This will generate a clean and standardized CSV in the data/cleaned folder, which can then be used to backpopulate the application data stored locally in data/resolutions.json.
  2. Run python backpopulate_data.py {filename}.csv in the scripts folder and follow the instructions.

Imaginary FAQs

Is it really that hard to use a spreadsheet?

No, but sometimes you just gotta let a gal overengineer.

Also, you can schedule a cron job to run this program or host it in the cloud to automatically run once a day.

Shouldn't this really be a web/desktop/mobile app?

It would be useful to have features X, Y, and Z.

Thing A, B, and C could do with a bit of refactoring. / Here be bugs.

Probably, possibly, and most definitely!

I do have it somewhere on my backlog to turn this into a more accessible GUI app (with additional features), but I'm just one person and my backlog never shrinks. You're welcome to contribute, though!

How do I get in touch with you?

Feel free to shoot me an email if you have any questions or are interested in collaborating.

Footnotes

  1. Or, indeed, at any time of the year. โ†ฉ

cli-resolve's People

Contributors

vickiwyang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

ajbaliga28

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.