Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rsarai/hq
This is the HeadQuarters of my digital info. HPI library got me inspired and I'm trying to play with the idea on a smaller scale for myself.
https://github.com/rsarai/hq
lifelogging personal-api quantified-self
Last synced: 3 months ago
JSON representation
This is the HeadQuarters of my digital info. HPI library got me inspired and I'm trying to play with the idea on a smaller scale for myself.
- Host: GitHub
- URL: https://github.com/rsarai/hq
- Owner: rsarai
- Created: 2021-02-26T00:57:46.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-22T18:10:54.000Z (12 months ago)
- Last Synced: 2024-06-21T13:31:26.407Z (5 months ago)
- Topics: lifelogging, personal-api, quantified-self
- Language: Python
- Homepage:
- Size: 653 KB
- Stars: 18
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-starred - rsarai/hq - This is the HeadQuarters of my digital info. HPI library got me inspired and I'm trying to play with the idea on a smaller scale for myself. (others)
README
# HQ
[HPI](https://github.com/karlicoss/HPI) got me inspired and I'm trying to play with the idea in smaller scale for myself.
- **What is this?** This is a library to deal with all the data that I wanna keep.
- **What can it do?** A lot of things.
- Export my personal data from external APIs
- Github notifications and events
- Nubank
- RescueTime stats
- Toggl
- Manage a import process of all my data to a single database
- All the above plus:
- Bash commands
- Chrome
- Habits
- Articles
- Daylio
- Expose the database through a simple API
- Integrates some tools to make my workflow easier- **How?**
### Web interface
Besides doing regular searches directly on the database I have also built a simple React app.### Notes
#### TIL (29/06/2021):
- Twint to export tweets:
```bash
sudo chmod 777 /var/run/docker.sock
docker build -t twint .
docker run -d twint
docker run -it bash
twint -u _rebecasarai -o my_tweets.json --json
docker cp :/root/my_tweets.json ~/my_tweets.json
```#### Full text search with Mongo
- https://docs.mongodb.com/manual/text-search/#### TIL (28/04/2021):
- You can open a sqlite dataset in readonly mode: https://docs.python.org/3/library/sqlite3.html#sqlite3.connect
- dataset: databases for lazy people: https://dataset.readthedocs.io/en/latest/#### TIL (27/02/2021):
- appdirs is a lib to help to deal with directories for storing data
- pathlib has nice abstractions to deal with paths on the system, especially checking if they exists or create new ones
- other libs also use the trick to add modules on the path
- method `isatty()` -> True if the file is connected (is associated with a terminal device) to a tty(-like) device (https://gist.github.com/rduplain/e063114479e7470db8d3)
```python
import sysif sys.stdin.isatty():
print('you are a tty')
else:
print('you are not a tty')
```
```bash
$ python isatty.py
you are a tty
$ echo foo | python isatty.py
you are not a tty
$
```#### TIL (21/03/2021):
- `os.path.expanduser(path)` On Unix and Windows, return the argument with an initial component of ~ or ~user replaced by that user’s home directory## TODO
- [ ] Refactor all modules to use pydantic (eg: `hq/modules/nubank.py`). The advantage is that it simplifies `handler.py`.