Activity Metrics is a tool for tracking personal activity stats. It creates CSV files from daily logs in a simple format. These files can be used in Google Sheets, Excel, or other spreadsheet apps and work with data visualization tools for custom charts and reports.
For installation & usage, you can navigate to the installation section at the bottom. Here's a simple overview of the system.
- A log is a .txt file that holds the entries for a particular day.
- An example entry could be
- 15m 8a guitar practice: minor chords. - An entry is a line that starts with a hyphen
-or dot.. - Everything else in the file gets ignored.
- There are no limits for the number of entries or files for a day.
- All logs (including their parent directories) are stored in the main
logs/directory.
In the above example, let's assume the date for the entry was Jan 1, 2024. Here are the basic rules:
- The log file would be named with the two-digit date number and a .txt extension: i.e.
01.txt. - Optional custom text after the date number is allowed (e.g.
01custom-text.txt). - The log would be inside the proper
YYYY/MM/directory, in this case:2024/01/01.txt. - And finally, the full path for the log would be:
../logs/2024/01/01.txt.
- For utility reasons, log files are also allowed to be named in the
YYYY-MM-DDformat1 2. - For example:
2024-01-01.txtor2024-01-01custom-text.txtwould be valid full date logs. - Since their name already includes the year & month, full date logs can be stored anywhere within
logs/.
Valid location structure example:
../logs/
- 2024/
- 01/
- 01.txt
- 02.txt
- 02-finance.txt
- 02/
- 2023/
- 2023-12-31-fitness.txt
- 08/
- 12/
- 16ExamStudy.txt
Additionally data can also be imported from other tracking services such as Todoist, Garmin, Apple Health, Samsung Health, Financial Services, and more. Data can also be read directly from the API's of those tracking services.
Common Categories for Activity Metrics:
- Work
- Finances
- Academics
- Assignments
- Projects
- Fitness
- Nutrition
- Lifestyle
-
Clone
activity-metrics/into your local installation directory.git clone https://github.com/ryt/activity-metrics.git -
Create an alias or symbolic link to
acme.pyto access it directly in your terminal. There are multiple ways of doing this. Replace {install} with your local installation directory.Option 1: Symbolic Link
ln -s {install}/activity-metrics/acme.py /usr/bin/acmeDepending on your system you may need to use
/usr/bin/,/opt/local/bin,/usr/share/bin/, etc. You can also use your documents folder or a custom location as long as you use a symbolic link to theacme.pyexecutable.Option 2: Creating an alias in
~/.bashrc,~/.bash_aliasesor~/.bash_profile:alias acme='{install}/activity-metrics/acme'
After editing the file make sure you restart your terminal or use the
sourcecommand to reload the configuration.source ~/.bashrc
-
To store your logs, create a directory named
Metricsor something similar in your Documents and create the following 3 directories in it:app,gen, andlogs.You can choose whatever name you want for the main folder but we'll use "Metrics" for this example.
appwill be used for application modules, API, & configuration files,genwill be used for generated files, andlogswill be used to store log files.mkdir Metrics && cd Metricsmkdir app gen logsThe structure of the link and directories should look something like this:
Metrics/ - app/ - gen/ - logs/ -
Now you can run the command
acmefrom inside theMetrics/directory. Generated files will be stored insidegen/and your logs will be read and parsed from thelogs/. Useacme helpfor the help manual.The utility script can be run as
acme util. Useacme util helpfor the utility help manual.
Some of the inspirations for this project:
- https://en.wikipedia.org/wiki/Help:Page_history
- https://en.wikipedia.org/wiki/Version_control
- https://calnewport.com/deep-habits-should-you-track-hours-or-milestones/
- https://archive.is/h3dz5
- https://gyrosco.pe/about/mission/
- https://jeffhuang.com/productivity_text_file/
- https://todoist.com/inspiration/deep-work
- https://en.wikipedia.org/wiki/Blue-green_deployment