Streak.txt

Table of Contents

Introduction

Streak.txt is a simple tool to capture your streaks. Each streak is tracked in a plain text file that you can edit with your favourite text editor. You can use it to capture your streaks, habits, or anything else you want to track.

To organize the streaks better you can keep all your streak files in a "streaks" directory however this is not a requirement.

Usage

To use Streak.txt, simply create a new plain text file in your favorite text editor and start capturing your streaks.

Suggestion #1: name your streak file "streak-<activity>.txt", for example streak-jumpingjacks.txt

Suggestion #2: keep all your streak files in one directory. The reference tool assumes your default streak files folder is "~/streaks"

Each line in the file represents a day. You can use any text editor to edit the file, including Notepad, TextEdit, or any other text editor.

Entries

Each day you complete the task, add the date to the file. For example:

2021-01-01
2021-01-03
2021-01-04
    

You can see in the example above that the task was completed on January 1st, 3rd, and 4th, but not on January 2nd.

Note: The date is in ISO 8601 format (YYYY-MM-DD).

Streak Name

If you want to give a nice name to your streak, you can add a metadata block at the beginning of the file. The metadata block is a YAML front matter block. Here is an example:

---
name: Jumping Jacks
---
2021-01-01
2021-01-03
2021-01-04
    

Streakdottxt - Reference Tool

The reference tool is a simple command line tool that can be used to manage your streaks. The tool is written in Python and is available on Github.

It serves two purposes:

  1. Reference implementation: Clarifies the file format, especially any undocumented decisions which might later becom part of the file format.
  2. Utility: Provides a simple command line interface to manage your streaks.

Installation

The tool is available on Github. You can clone the repository and run the tool from the command line.

git clone https://github.com/abhishekmishra/streak-dot-txt.git
cd streak-dot-txt
pip install -r requirements.txt
python streakdottxt.py --help
        

Commands

The tool provides the following commands. You can get more information about each command by running the command with the "--help" flag.

Project

The project contains the source code for the reference tool as well as the documentation (this page) which defines the format.

License

The project (documentation and the reference implementation) is licensed under the MIT License. You can find the license in the source code repository.

Source Code

Source code repository streak-dot-txt (Github).

Project Goals

  1. Track one streak per file.
  2. Changes to file are append only.
  3. Each streak file has some metadata.
  4. We can specify a name for the streak such as "Draw daily".
  5. We can specify the period of the streak such as "Monthly" or "Weekly".
  6. We can specify the tick of the streak such as "Daily" or "Hourly". The tick has to be a smaller time measure than the period.
  7. We can specify the expected frequency of the streak such as "10 times", "7 times" etc.
  8. No entry is required when task is not done. In fact a missing entry qualifies as "Not done".
  9. We can specify an optional quantity when making an entry when task is done.
  10. We can specify an optional comment when making an entry.
  11. The comment can contain hyperlinks.

History of this page

Date Changes Author
2025-01-05 Initial version Abhishek (neolateral.in)