Skip to main content

Personal Activity Log

Project description

pal

Your Personal Activity Log

Your activity log is a lightweight record of the low level tasks that you have performed over time.

Stop fishing your git log and Slack messages to remember past activities.

Quick Start

Run the pal executable to log the latest activities

$ pal

Run comes with a set of commands to manage your activities:

$ pal commit "Hey, This is a new activity"

And then you can see it with

$ pal log

Once you have already reported your current activity, you can mark them and they will not appear in later logs.

$ pal report
$ pal log

(You can always show them again with the -r/--include-reported flag)

Once you finished with a project, you can cleanup the old entries:

$ pal clean

See the Usage Guide for more information and advanced usage.

Installation

pal is distributed as a Python package. You can install it using pip at pal-log:

$ pip install pal-log

At this point you can start using pal normally.

$ pal

An alternative way is to use the github repo directly. For that, clone this repo and run:

$ pip install .

And the pal executable should be ready for use.

Development

For development you can use the dev extra, like so:

$ pip install -e '.[dev]'

Which will install pal with all the development dependencies. This project has pre-commit for automated linting / formatting.

We recommed you install it and setup in this repo. For that, follow the installation instructions, and then run the following command at the root of the repo:

$ pre-commit install

At this point, a set of automated checks will run before you can git commit your changes.

You can manually run the checks as well with:

$ pre-commit run [--all-files]

Usage Guide

Apart from the basic usage, PAL also contains other concepts that make it more useful for more complex scenarios:

  • It contains the notion of author: every entry is associated to an author. You can use -a/--author or the PAL_AUTHOR environment variable to change the author when commiting or displaying the entries.
  • It contains the notion of project: every entry is associated to an project. You can use -p/--project or the PAL_PROJECT environment variable to change the project when commiting or displaying the entries.

These two act as namespaces that make it easy to use pal when working on multiple projects. However, pal provides default values for those so that is easier to get started.

  • author: the default author is the OS username ($USER env variable). This is the one that you will be using most often. You can change it for instance to keep work and personal projects.
  • project: the default project is default. You are encouraged to use as many as you like.

If you specify both an env variable and a CLI argument, the CLI argument will have priority.

The fact that these are controlled with environment variables make this specially interesting when combined with tools like direnv or other tools that automatically change environments based on directory specific configurations.

You can have an entry so that your PAL_PROJECT is set to a given project and you can quickly log the activities for this particular project / repo. When you are ready for reporting your advances, you can just call:

$ pal

And the most recent (unreported) tasks will show up. Once you are done with them, mark them as reported:

$ pal report

And continue working.

Integrations

PAL is mainly intended as the final consumer of the information. However, you can request the log output as --json, which you can then feed to jq or other tools to build a pipeline.

$ pal log --json | jq .
[
  {
    "text": "Added new documentation",
    "author": "alvaro",
    "project": "default",
    "timestamp": "2023-10-20T23:23:58.985532",
    "reported": false,
    "created_at": "2023-10-20T23:23:58.985609+02:00",
    "updated_at": "2023-10-20T23:23:58.985609+02:00"
  },
  {
    "text": "Created a new feature",
    "author": "alvaro",
    "project": "default",
    "timestamp": "2023-10-20T23:23:42.937248",
    "reported": false,
    "created_at": "2023-10-20T23:23:42.937330+02:00",
    "updated_at": "2023-10-20T23:23:42.937330+02:00"
  },
  {
    "text": "Fixed a bug in the CLI",
    "author": "alvaro",
    "project": "default",
    "timestamp": "2023-10-20T23:23:32.699920",
    "reported": false,
    "created_at": "2023-10-20T23:23:32.700029+02:00",
    "updated_at": "2023-10-20T23:23:32.700029+02:00"
  },
  {
    "text": "Welcome to PAL",
    "author": "alvaro",
    "project": "default",
    "timestamp": "2023-10-20T23:23:07.721046",
    "reported": false,
    "created_at": "2023-10-20T23:23:07.721125+02:00",
    "updated_at": "2023-10-20T23:23:07.721125+02:00"
  }
]

How it works

PAL is just a CLI to record timestamped entries on a log.

Currently, the log is a simple SQLite database stored in your user files. You can inspect it with any SQLite compatible tool:

$ sqlite3 $(pal --show-db) 

And start querying your database.

Each entry contains a timestamp and a reported boolean flag that control how and if they are displayed with pal log.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pal-log-0.0.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pal_log-0.0.1-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file pal-log-0.0.1.tar.gz.

File metadata

  • Download URL: pal-log-0.0.1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for pal-log-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e5fe9d393e1acde7d143c4d0564af7b533a993b91e8773b1742cf114cb2b5f10
MD5 13a291626a5b53af44bd414a0105d7dd
BLAKE2b-256 9486a3a74c39f3e33313e185c7906607fd08eba80432fe1b62a1739d2781bf47

See more details on using hashes here.

File details

Details for the file pal_log-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pal_log-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for pal_log-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 09eb84ac0800f5583177052c2246bc60a0d9041485e021905572f12949001515
MD5 805e1a308c41e1bda4043cde9b9e00e5
BLAKE2b-256 f6ee1768c7dd966745a6462e6e5bb20df20c5fa2f28c611c3b330fa46ce8f833

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page