Skip to content

rjof/logme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Python package to collect some logs of my personal life.

Installation

  • Clone the repo
  • Install requirements.txt: pip install requirements.txt
  • Create the file .env with your credentials, for example:
aTimeLogger_user = [email protected]
aTimeLogger_pass = your_password

Usage

To create the database python -m logme init

The file config.ini should be created. For example in linux it is in /home/<your_user>/.config/logme/config.ini

Insert configuration for processing data. For example:

[Sources]
src = aTimeLogger                                                                                                                                                                       
[LocalPaths]
storage = /home/<your_user>/logme_data
[aTimeLogger]
connection = api
days_to_retrieve_api = 7

To process data in your aTimeLogger account:

python -m logme source aTimeLogger

Sources

aTimeLogger app

@todo: description

duolingo unofficial api

As an example of the use of the api and to use it in the roadmap of this package it's only saved the achievements which is when you gain a crown.

The intervals between achievements will be used to generate rules.

Storage

The collected data is saved in a sqlite database in the table logme with the structure:

A hash of the row, not in use for the time being

Column('hash', String, primary_key = True),

The activity to which a group belongs, i.e. this book, belongs to the group reading

Column('in_group', String),

The activity

Column('activity', String),

Any comment

Column('comment', String),

Duration in seconds of the activity

Column('duration_sec', Integer),

Beginning unix timestamp of the activity

Column('ts_from', Integer),

Finishing unix timestamp of the activity

Column('ts_to', Integer),

Notes

The code base is the application Build a Command-Line To-Do App With Python and Typer and this project is full legacy to be cleaned (I've done this to learn some python).

You can see this printing the help.

python -m logme --help

Usage: logme [OPTIONS] COMMAND [ARGS]...
Options:
  -v, --version         Show the application's version and exit.
  --install-completion  Install completion for the current shell.
  --show-completion     Show completion for the current shell, to copy it or
                        customize the installation.
  --help                Show this message and exit.

Commands:
  add       Add a new to-do with a DESCRIPTION.
  clear     Remove all to-dos.
  complete  Complete a to-do by setting it as done using its TODO_ID.
  init      Initialize the logme database.
  list      List all to-dos.
  remove    Remove a to-do using its TODO_ID.
  source    Process a source.

About

Collect and analyze some logs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages