Package: pal-log
palYour Personal Activity LogYour activity log is a lightweight record of the low level tasks that you have performed
over time.Stop fishing yourgit logand Slack messages to remember past activities.Quick StartRun thepalexecutable to log the latest activities$palRun comes with a set of commands to manage your activities:$palcommit"Hey, This is a new activity"And then you can see it with$pallogOnce you have already reported your current activity, you can mark them and they
will not appear in laterlogs.$palreport$pallog(You can always show them again with the-r/--include-reportedflag)Once you finished with a project, you can cleanup the old entries:$palcleanSee theUsage Guidefor more information and advanced usage.Installationpalis distributed as a Python package. You can install it usingpipatpal-log:$pipinstallpal-logAt this point you can start usingpalnormally.$palAn alternative way is to use the github repo directly. For that, clone this repo and run:$pipinstall.And thepalexecutable should be ready for use.DevelopmentFor development you can use thedevextra, like so:$pipinstall-e'.[dev]'Which will installpalwith all the development dependencies.
This project haspre-commitfor automated linting / formatting.We recommed you install it and setup in this repo. For that, follow theinstallation instructions, and then run the following command at the root of the repo:$pre-commitinstallAt this point, a set of automated checks will run before you cangit commityour changes.You can manually run the checks as well with:$pre-commitrun[--all-files]Usage GuideApart from the basic usage, PAL also contains other concepts that make it more
useful for more complex scenarios:It contains the notion ofauthor: every entry is associated to anauthor. You can use-a/--authoror thePAL_AUTHORenvironment variable to change the author when commiting or displaying the entries.It contains the notion ofproject: every entry is associated to anproject. You can use-p/--projector thePAL_PROJECTenvironment variable to change the project when commiting or displaying the entries.These two act as namespaces that make it easy to usepalwhen working on multiple projects.
However,palprovides default values for those so that is easier to get started.author: the default author is the OS username ($USERenv 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 isdefault. 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 likedirenvor other tools that automatically change environments based on directory specific configurations.You can have an entry so that yourPAL_PROJECTis 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:$palAnd the most recent (unreported) tasks will show up.
Once you are done with them, mark them as reported:$palreportAnd continue working.IntegrationsPAL is mainly intended as the final consumer of the information.
However, you can request the log output as--json, which you can then feed
tojqor other tools to build a pipeline.$pallog--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 worksPAL 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 atimestampand areportedboolean flag that control how
and if they are displayed withpal log.