Git Product home page Git Product logo

naday's Introduction

N a Day

Build Status

This is a little tool for tracking (physical) excercise of the "N repetitions a day" variant - 100 pushups per day, 10'000 steps per day etc.

Since I not only needed such a tracker, but also needed some playground project for learning rust, this is implemented as CLI tool. Plus, I suck at GUIs. I personally run it in termux on my android phone.

Installation

For now you have to compile & install it yourself, but proper release builds are planned, starting with milestone 0.1.0.

Manual builds:

git clone https://github.com/creinig/naday.git
cd naday
cargo build --release
cp target/release/naday ~/.local/bin/

Usage

naday system prints configuration settings:

Storage directory: /home/creinig/.naday
Known Categories:
  Burpees         (weight 1.5  ), aliases bu
  PlankSeconds    (weight 0.33 ), aliases pl
  Pushups         (weight 1    ), aliases pu, push
  Situps          (weight 1    ), aliases si

This shows some key points that are central to the tool's usage:

  1. All data is stored in plain text files under your home directory. Each of these files contains a description of its format at the top, so feel free to look at them and edit them manually if needed.

  2. Different types of excercises are called "categories", and the tool comes with a few of them preinstalled (in ~/.naday/categories.txt). Each category has a display name, optionally a few aliases and a weight allowing a kind of "comparison" between logged repetitions. This allows for displaying a "weighted total" if you mix different excercises over the day.

naday 18pu logs a set of reps:

Added 18 Pushups

Stats for today:
  Pushups: 18 reps

This uses the alias "pu" for Pushups defined in ~/.naday/category.txt to specify what you did. The general pattern for this argument is <repetitions><name_or_alias>, with case insensitive name_or_alias. So the same could have been written as "18Pushups", "18pushups", "18Push" etc.

naday report --day will print a little report of today's activities (the same as the info printed when logging an activity):

Stats for today:
  Burpees        : 15 reps
  Pushups        : 33 reps (16 + 17)
  PlankSeconds   : 60 reps
  Weighted total : 75

naday report --month --category=pu will print an overview of pushups for the past month. If you omit the --category option, only the weighted totals will be printed. For now this only lists the total value per day for the past 31 days, but additional options are being worked on:

Report on Pushups for the past 31 days

Wed:     0 reps (    0 total)
Thu:     0 reps (    0 total)
Fri:     0 reps (    0 total)
Sat:     0 reps (    0 total)
Sun:     0 reps (    0 total)
Mon:     0 reps (    0 total)
Tue:     0 reps (    0 total)
Wed:    23 reps (   36 total)
Thu:    16 reps (   16 total)
Fri:     0 reps (    0 total)
Sat:     0 reps (   92 total)
Sun:     0 reps (    0 total)
Mon:     0 reps (   87 total)
Tue:     0 reps (    0 total)
Wed:     0 reps (    0 total)
Thu:     0 reps (    0 total)
Fri:     0 reps (    0 total)
Sat:     0 reps (    0 total)
Sun:     0 reps (    0 total)
Mon:     0 reps (    0 total)
Tue:     0 reps (    0 total)
Wed:     0 reps (    0 total)
Thu:     0 reps (    0 total)
Fri:     0 reps (    0 total)
Sat:     0 reps (    0 total)
Sun:     0 reps (    0 total)
Mon:     0 reps (    0 total)
Tue:     0 reps (    0 total)
Wed:     0 reps (    0 total)
Thu:     0 reps (    0 total)
Fri:     0 reps (    0 total)

If you're just interested in the past 7 days, use --week instead of --month.

Additional and better reports are planned. You can also directly load the save files into a spreadsheet (they are basically plain CSV) and generate your own custom reports.

naday's People

Contributors

creinig avatar

Watchers

 avatar  avatar

naday's Issues

Improve today's report

  • add line with weighted total
  • add individual repetitions per category (eg 21 + 16 + 14 + 18)

Discussion: better reports

Collection of ideas for better reports (possible variants etc):

  • full date in first column
  • table with one column per (used) category
  • for single category: also display individual activities, similar to day report
  • bar chart in addition to numerical values
  • entry colours depending on configured targets (#10)
  • optional use of emoji (eg for target reached)
  • info for highest single reps in the month etc (marked at the respective day entry)

Add weekly & monthly report: basic version

Generic implementation for the past N days, with shortcut parameters for "sliding week" (last 7 days) and "sliding month" (last 30 days). By default report the weighted total, but add an option to select a specific category.

This should cover the most common use case(s)

Add default category "Extra"

For unplanned / one-off, not-traditional-excercise things (helping someone move, lugging bags of cement for the new driveway, ...)

Proper argument parsing

Clap should be the best choice, with some subcommand structure for most stuff. That would add a lot of power for most commands. As long as it supports using the current syntax for adding activities (or changing that to an "add" subcommand & recommend defining an alias for it).

Add 'target' to category

Add an optional 'target' attribute, indicating how many repetitions per day you want to reach.
Also add an indicator to the reports, showing whether the target was reached on a given day

Add 'unit' to categories

Depending on the type of excercise, "reps" (repetitions) just doesn't fit. The user should have the opportunity to specify a custom unit like "steps", "seconds" etc

Configurable cmdline shorthand

The current command line shorthand notation is a bit inflexible. A better solution would be a configurable mapping from shorthand to a list of commandline arguments. This would eg also enable things like mapping "rwpu" to "report --week --category Pushups"

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.