Activity Metrics is a text-based tracking and analysis tool for personal & business activity logs.
Logs can be formatted with custom grammar and be defined as schemas to be processed as data sources.
The data can then be converted to CSV and other formats. They can be used in Google Sheets, Excel, or other spreadsheet apps and work with data visualization tools for custom charts and reports.
Basic Log Types:
- Timesheets: (Work, Projects, Academics, Assignments)
- Fitness: (Workouts, Weight, Body Metrics)
- Nutrition: (Macros, Supplements, Diet)
- Finance: (Accounting, Balance Sheets, Investments)
- Business: (Inventory, Markets, Operations)
-
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.Option 1: Symbolic Link
ln -s /path/to/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='/path/to/activity-metrics/acme.py'
After editing the file make sure you restart your terminal or use the
sourcecommand to reload the configuration.source ~/.bashrc
A workspace is any folder that contains logs and data for analysis.
-
For a basic workspace, create a directory named
Metricsor something similar in your Documents and create the following 3 directories in it:apps,gen, andlogs.You can choose whatever name you want for the workspace but we'll use "Metrics" for this example.
appswill be used for app modules, scripts, and extensions to the application,genwill be used for generated files (csv, etc.), andlogswill be used to store log files.mkdir Metrics && cd Metrics mkdir apps gen logs
The structure of the basic workspace should look something like this:
Metrics/ - apps/ - gen/ - logs/ - workspace_config.yaml -
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.
Common utilities & commands for various applications. API access is required if applicable.
Config Files:
- The main application config file is stored in:
~/.acmeconf/acme_config.yaml - The
~/.acmeconf/directory is also used for API & integration config files. - Workspace config files are stored inside the workspace as:
/path/to/workspace/workspace_config.yaml
You can copy the default .acmeconf/ template into your home directory from the tests directory found in /path/to/activity-metrics/tests/.acmeconf/.
cp -r /path/to/activity-metrics/tests/.acmeconf/ ~/.acmeconf/You can update settings for the web dashboard (acme dash) or API integrations in ~/.acmeconf/acme_config.yaml.
Timesheet Util Helpers
Make Files: create default date files (01-31.txt) and default month directories (01-12/)
acme util makefiles dir/
makefiles dir/ apply
makedirs dir/
makedirs dir/ apply
Clean Logs: clean up the gen directory of generated csv logs older than 1 week.
acme util cleangenHTTP Options: retrieve and save the output from an http(s) request as a log file.
acme util http .api_json {date_input}
http .api_json {date_input} save=2026/01/01.txt
http .api_json {date_input} (saveauto|autosave)
- The default name of the http api file is (
.api_json). It can be changed to any name.- The file contains a json dictionary of the http request data.
- Options: In the http api file,
{date_input}can be used to insert the entered date input in aYYYY-MM-DDformat anywhere in the keys or values. (e.g.{"url":"http://api.url/{date_input}"}){date_input}can be any valid date input listed in the main manual (acme --help).
Example .api_json file (located in ~/.acmeconf/.api_json):
{
"url" : "https://api.app.url/log?date={date_input}",
"method" : "POST",
"data" : {
"Auth": "0f3x83ndja0dk3Dx03co28id983h3"
}
}
Todoist Commands
Retrieve and save Todoist tasks that have valid log file names (e.g. 01/01.txt)
acme, Utility, Todoist, Action, Id/Date/Keyword, Save/Filename
acme util todoist get-task (12345|{date_input})
todoist get-task (12345|{date_input}) save=2024/01/01.txt
todoist get-task (12345|{date_input}) (saveauto|autosave)The Todoist api token is required and shoud be stored in ~/.acmeconf/.api_todoist.
Garmin Commands
If Garmin csv logs exist, merge them into gencsv logs of given year (plus today and yesterday if applicable).
acme util garmin merge-gencsv {year}Activity Metrics is an ongoing personal and business study project aimed at exploring various aspects of activity tracking. You can find a live workspace directory example at the /ryt/Metrics repository.
This repository includes scripts, modules, and examples of personal and general activity logs across a range of categories. If you're interested in accessing it, please feel free to request access on GitHub.