This commit is contained in:
parent
49a4500bb7
commit
26b7cc782e
36 changed files with 412 additions and 281 deletions
1
.github/workflows/lint.yml
vendored
1
.github/workflows/lint.yml
vendored
|
|
@ -3,6 +3,7 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
vale:
|
||||
name: runner / vale
|
||||
|
|
|
|||
201
.github/workflows/mega-linter.yml
vendored
201
.github/workflows/mega-linter.yml
vendored
|
|
@ -1,201 +0,0 @@
|
|||
# MegaLinter GitHub Action configuration file
|
||||
# More info at https://megalinter.io
|
||||
---
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
# Comment env block if you do not want to apply fixes
|
||||
env:
|
||||
# Apply linter fixes configuration
|
||||
#
|
||||
# When active, APPLY_FIXES must also be defined as environment variable
|
||||
# (in github/workflows/mega-linter.yml or other CI tool)
|
||||
APPLY_FIXES: none
|
||||
|
||||
# Decide which event triggers application of fixes in a commit or a PR
|
||||
# (pull_request, push, all)
|
||||
APPLY_FIXES_EVENT: pull_request
|
||||
|
||||
# If APPLY_FIXES is used, defines if the fixes are directly committed (commit)
|
||||
# or posted in a PR (pull_request)
|
||||
APPLY_FIXES_MODE: commit
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.ref }}-${{ github.workflow }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
megalinter:
|
||||
name: MegaLinter
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Give the default GITHUB_TOKEN write permission to commit and push, comment
|
||||
# issues, and post new Pull Requests; remove the ones you do not need
|
||||
permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
# Git Checkout
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
|
||||
|
||||
# If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to
|
||||
# improve performance
|
||||
fetch-depth: 0
|
||||
|
||||
# MegaLinter
|
||||
- name: MegaLinter
|
||||
|
||||
# You can override MegaLinter flavor used to have faster performances
|
||||
# More info at https://megalinter.io/latest/flavors/
|
||||
uses: oxsecurity/megalinter/flavors/documentation@v9
|
||||
|
||||
id: ml
|
||||
|
||||
# All available variables are described in documentation
|
||||
# https://megalinter.io/latest/config-file/
|
||||
env:
|
||||
# Validates all source when push on main, else just the git diff with
|
||||
# main. Override with true if you always want to lint all sources
|
||||
#
|
||||
# To validate the entire codebase, set to:
|
||||
# VALIDATE_ALL_CODEBASE: true
|
||||
#
|
||||
# To validate only diff with main, set to:
|
||||
# VALIDATE_ALL_CODEBASE: >-
|
||||
# ${{
|
||||
# github.event_name == 'push' &&
|
||||
# github.ref == 'refs/heads/main'
|
||||
# }}
|
||||
VALIDATE_ALL_CODEBASE: true
|
||||
|
||||
# Disable LLM Advisor for bot PRs (dependabot, renovate, etc.)
|
||||
LLM_ADVISOR_ENABLED: >-
|
||||
${{
|
||||
github.event_name != 'pull_request' ||
|
||||
(github.event.pull_request.user.login != 'dependabot[bot]' &&
|
||||
github.event.pull_request.user.login != 'renovate[bot]' &&
|
||||
github.event.pull_request.user.login != 'github-actions[bot]' &&
|
||||
!startsWith(github.event.pull_request.user.login, 'dependabot') &&
|
||||
!startsWith(github.event.pull_request.user.login, 'renovate'))
|
||||
}}
|
||||
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# Uncomment to use ApiReporter (Grafana)
|
||||
# API_REPORTER: true
|
||||
# API_REPORTER_URL: ${{ secrets.API_REPORTER_URL }}
|
||||
# API_REPORTER_BASIC_AUTH_USERNAME: ${{ secrets.API_REPORTER_BASIC_AUTH_USERNAME }}
|
||||
# API_REPORTER_BASIC_AUTH_PASSWORD: ${{ secrets.API_REPORTER_BASIC_AUTH_PASSWORD }}
|
||||
# API_REPORTER_METRICS_URL: ${{ secrets.API_REPORTER_METRICS_URL }}
|
||||
# API_REPORTER_METRICS_BASIC_AUTH_USERNAME: ${{ secrets.API_REPORTER_METRICS_BASIC_AUTH_USERNAME }}
|
||||
# API_REPORTER_METRICS_BASIC_AUTH_PASSWORD: ${{ secrets.API_REPORTER_METRICS_BASIC_AUTH_PASSWORD }}
|
||||
# API_REPORTER_DEBUG: false
|
||||
|
||||
# ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF
|
||||
# .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
|
||||
|
||||
# Upload MegaLinter artifacts
|
||||
- name: Archive production artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
if: success() || failure()
|
||||
with:
|
||||
name: MegaLinter reports
|
||||
include-hidden-files: "true"
|
||||
path: |
|
||||
megalinter-reports
|
||||
mega-linter.log
|
||||
|
||||
# Create pull request if applicable
|
||||
# (for now works only on PR from same repository, not from forks)
|
||||
- name: Create Pull Request with applied fixes
|
||||
uses: peter-evans/create-pull-request@v7
|
||||
id: cpr
|
||||
if: >-
|
||||
steps.ml.outputs.has_updated_sources == 1 &&
|
||||
(
|
||||
env.APPLY_FIXES_EVENT == 'all' ||
|
||||
env.APPLY_FIXES_EVENT == github.event_name
|
||||
) &&
|
||||
env.APPLY_FIXES_MODE == 'pull_request' &&
|
||||
(
|
||||
github.event_name == 'push' ||
|
||||
github.event.pull_request.head.repo.full_name == github.repository
|
||||
) &&
|
||||
!contains(github.event.head_commit.message, 'skip fix')
|
||||
with:
|
||||
token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }}
|
||||
commit-message: "[MegaLinter] Apply linters automatic fixes"
|
||||
title: "[MegaLinter] Apply linters automatic fixes"
|
||||
labels: bot
|
||||
|
||||
- name: Create PR output
|
||||
if: >-
|
||||
steps.ml.outputs.has_updated_sources == 1 &&
|
||||
(
|
||||
env.APPLY_FIXES_EVENT == 'all' ||
|
||||
env.APPLY_FIXES_EVENT == github.event_name
|
||||
) &&
|
||||
env.APPLY_FIXES_MODE == 'pull_request' &&
|
||||
(
|
||||
github.event_name == 'push' ||
|
||||
github.event.pull_request.head.repo.full_name == github.repository
|
||||
) &&
|
||||
!contains(github.event.head_commit.message, 'skip fix')
|
||||
run: |
|
||||
echo "PR Number - ${{ steps.cpr.outputs.pull-request-number }}"
|
||||
echo "PR URL - ${{ steps.cpr.outputs.pull-request-url }}"
|
||||
|
||||
# Push new commit if applicable
|
||||
# (for now works only on PR from same repository, not from forks)
|
||||
- name: Prepare commit
|
||||
if: >-
|
||||
steps.ml.outputs.has_updated_sources == 1 &&
|
||||
(
|
||||
env.APPLY_FIXES_EVENT == 'all' ||
|
||||
env.APPLY_FIXES_EVENT == github.event_name
|
||||
) &&
|
||||
env.APPLY_FIXES_MODE == 'commit' &&
|
||||
github.ref != 'refs/heads/main' &&
|
||||
(
|
||||
github.event_name == 'push' ||
|
||||
github.event.pull_request.head.repo.full_name == github.repository
|
||||
) &&
|
||||
!contains(github.event.head_commit.message, 'skip fix')
|
||||
run: sudo chown -Rc $UID .git/
|
||||
|
||||
- name: Commit and push applied linter fixes
|
||||
uses: stefanzweifel/git-auto-commit-action@v7
|
||||
if: >-
|
||||
steps.ml.outputs.has_updated_sources == 1 &&
|
||||
(
|
||||
env.APPLY_FIXES_EVENT == 'all' ||
|
||||
env.APPLY_FIXES_EVENT == github.event_name
|
||||
) &&
|
||||
env.APPLY_FIXES_MODE == 'commit' &&
|
||||
github.ref != 'refs/heads/main' &&
|
||||
(
|
||||
github.event_name == 'push' ||
|
||||
github.event.pull_request.head.repo.full_name == github.repository
|
||||
) &&
|
||||
!contains(github.event.head_commit.message, 'skip fix')
|
||||
with:
|
||||
branch: >-
|
||||
${{
|
||||
github.event.pull_request.head.ref ||
|
||||
github.head_ref ||
|
||||
github.ref
|
||||
}}
|
||||
commit_message: "[MegaLinter] Apply linters fixes"
|
||||
commit_user_name: megalinter-bot
|
||||
commit_user_email: 129584137+megalinter-bot@users.noreply.github.com
|
||||
64
CLAUDE.md
64
CLAUDE.md
|
|
@ -1,64 +0,0 @@
|
|||
<!-- markdownlint-disable MD013 -->
|
||||
<!-- markdownlint-disable MD040 -->
|
||||
|
||||
# Site
|
||||
|
||||
Personal portfolio website at gugulet.hu. Three sections: Words, Visuals, Technical.
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
content/ Source content (Markdown, assets, templates)
|
||||
assets/css/ Per-page stylesheets
|
||||
assets/js/ JavaScript (GSAP animations, loader, protection)
|
||||
assets/fonts/ Custom fonts (ttf)
|
||||
assets/media/ Images, favicons
|
||||
overrides/ Jinja2 templates (extends Zensical theme)
|
||||
index.md Homepage
|
||||
resume.md Resume page
|
||||
deploy/ Generated static site (build output)
|
||||
zensical.toml Build config (site metadata, extensions, theme)
|
||||
minify.py Post-build CSS/JS/HTML minification
|
||||
Dockerfile Multi-stage build (Zensical builder + Caddy server)
|
||||
```
|
||||
|
||||
## Build and serve
|
||||
|
||||
```bash
|
||||
# Development
|
||||
source .venv/bin/activate
|
||||
zensical serve --watch
|
||||
|
||||
# Production build
|
||||
zensical build
|
||||
rm ./deploy/sitemap.xml
|
||||
python minify.py
|
||||
|
||||
# Docker
|
||||
docker build -t site:latest .
|
||||
docker run -p 80:80 site:latest
|
||||
```
|
||||
|
||||
## Key conventions
|
||||
|
||||
- **Zensical** (MkDocs-based) static site generator with `zensical.toml` as single config source.
|
||||
- **Markdown + YAML frontmatter** for all content. Each page declares its template, extra_css, and extra_js.
|
||||
- **Jinja2 templates** in `content/overrides/` extend the Zensical base theme.
|
||||
- **GSAP + ScrollTrigger** for homepage scroll animations. No other JS frameworks.
|
||||
- **Per-section typography:** serif (Words), monospace (Technical), display (Visuals).
|
||||
- **CSS custom properties** for theming. Responsive sizing via `clamp()` and viewport units.
|
||||
- **Post-build minification** via `minify.py` (terser for JS, clean-css for CSS, inline for HTML). Preserves `<pre>`/`<code>` blocks.
|
||||
- **No database.** Fully static output served by Caddy.
|
||||
- **Content protection:** `protect.js` prevents right-click and copying.
|
||||
- **Anti-AI crawling:** meta robots tag with `noai, noimageai`.
|
||||
|
||||
## CI/CD
|
||||
|
||||
GitHub Actions runs Vale prose linting and MegaLinter on push/PR to main. Fail on errors.
|
||||
|
||||
## Dependencies
|
||||
|
||||
```bash
|
||||
pip install -r requirements.txt # Python (Zensical, Jinja2, pymdown-extensions)
|
||||
npm install -g terser clean-css-cli # Node (minification)
|
||||
```
|
||||
6
content/technical/qself/financial/assets/index.md
Normal file
6
content/technical/qself/financial/assets/index.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: "Assets and Logistics"
|
||||
description: "An overview of the asset management and logistics features of the project."
|
||||
weight: 30
|
||||
headless: true
|
||||
---
|
||||
26
content/technical/qself/financial/index.md
Normal file
26
content/technical/qself/financial/index.md
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
---
|
||||
title: "Financial"
|
||||
description: "An overview of the financial aspect of the project."
|
||||
tags:
|
||||
- HTML
|
||||
- JavaScript
|
||||
- CSS
|
||||
- Logic
|
||||
---
|
||||
|
||||
The financial aspect of the qSelf project tracks and processes expenses, investments, income, assets, and logistics:
|
||||
|
||||
* **Expenses:** The fundamental unit tracked is transactions. For more information see the [Transactions](transactions/index.md) page.
|
||||
* **Investment:** The investment portfolio is tracked using transaction data, with extra information, and is stored in the investment table. For more information see the [Investment](investment/index.md) page.
|
||||
* **Assets and Logistics:** Records asset purchases and monitors their value, state, and location with a logistics component. For more information see the [Assets](assets/index.md) page.
|
||||
|
||||
## Reconciliation
|
||||
To keep financial information accurate, the reconciliation flows run on a set schedule to check that the liquid money available, investment portfolio value, asset value, and other balances correspond with the reality. This is the primary function of the [`4 Finances`](https://github.com/gugulet-hu/qself-process/tree/main/automate/4%20Finances) flow, which serves all the other financial subflows.
|
||||
|
||||
_TBC_
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
6
content/technical/qself/financial/investment/index.md
Normal file
6
content/technical/qself/financial/investment/index.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: "Investment"
|
||||
description: "An overview of the investment management feature of the project."
|
||||
weight: 20
|
||||
headless: true
|
||||
---
|
||||
14
content/technical/qself/financial/transactions/index.md
Normal file
14
content/technical/qself/financial/transactions/index.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: "Transactions"
|
||||
description: "An overview of the root financial feature of transaction tracking."
|
||||
---
|
||||
|
||||
|
||||
All financial tracking starts as a transaction, which has the following structure.
|
||||
|
||||
| Parameter | Type | Description | Required |
|
||||
|
||||
|
||||
The logic for collecting transactions is handled by the `4a Transactions` flow in Automate, which presents an input form, returns the data via query parameters, and enriches the data with exchange rate information, where necessary, and unit cost calculations.
|
||||
|
||||
_TBC_
|
||||
62
content/technical/qself/getting-started/index.md
Normal file
62
content/technical/qself/getting-started/index.md
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
---
|
||||
title: "Getting started"
|
||||
description: "Getting all the prerequisite tools and software needed to get the project going."
|
||||
---
|
||||
|
||||
The qSelf project is made up of a number of inter-connected components:
|
||||
|
||||
* **Logical components:** These are responsible for the logical progression of flows, moving data from screens and sensors to the database and further on to displays.
|
||||
* **Sensory components:** These components collect external data from various sensors (mostly from the smartwatch).
|
||||
* **Input and Display components:** These are responsible for receiving manually inputted data that supplements sensory data. The display components display the processed data on dashboards and reports.
|
||||
* **Analytical components:** These components take the received data and parse it into useful information.
|
||||
* **Storage and Sync components:** These components take data and store it in the SQLCipher database or in temp files for quick retrieval.
|
||||
|
||||
Components are immutable, but the tools that make them work are replaceable and interchangeable.
|
||||
|
||||
**Diagram: Topology of the qSelf system**
|
||||
|
||||
{width=750}
|
||||
|
||||
## Install
|
||||
|
||||
### 1. Install all applications and tools
|
||||
Install all applications in the toolset table. This includes CLI tools that are listed in the Termux row, and plugins for Automate.
|
||||
|
||||
### 2. Clone the project repo
|
||||
Clone the project repo to the root of your user space on your mobile device using Termux and the following commands:
|
||||
|
||||
```
|
||||
cd /storage/emulated/0/
|
||||
git clone git@github.com:gugulet-hu/qself-process.git
|
||||
```
|
||||
|
||||
### 3. Import flows into Automate and displays into Kustom
|
||||
Import the `latest.flo` files in each of the directories in the **qself-process/Automate/** folder. Inside Automate, the dot menu in the top-left corner includes the option to **Import**. Import the files in the **qself-process/Kustom/wallpapers/** folder into KLWP and import the files in the **qself-process/Kustom/watchfaces/** folder into KWCH.
|
||||
|
||||
### 4. Configure the root settings
|
||||
Configure the root settings in **qself-process/Automate/.demo-config.json** file and rename the file to **.config.json**.
|
||||
|
||||
### 5. Start the [`1 Context`](https://github.com/gugulet-hu/qself-process/tree/main/automate/1%20Context) flow in Automate
|
||||
|
||||
## Toolset
|
||||
|
||||
| Component | Tool | Device | Description | Install | Learn |
|
||||
| --- | --- | :---: | --- | --- | --- |
|
||||
| Logical | Python | [:material-laptop:](../reference/devices/index.md#laptop) | Python is a general purpose programming language used for data analysis and various scripts. | [Python](https://www.python.org/) | [TreeHouse](https://teamtreehouse.com/tracks/beginning-python) |
|
||||
| | Automate | [:material-cellphone:](../reference/devices/index.md#mobile) | Automate is a graphical code tool to create and manage logic on the mobile device. The project also requires these Tasker plugins: [AutoWear, AutoInput](https://joaoapps.com/), [Termux:Tasker](https://github.com/termux/termux-tasker), [Sleep as Android](https://docs.sleep.urbandroid.org/services/tasker_automate.html), and [Kustom](https://docs.kustom.rocks/) (the last two apps come with their respective Automate plugins). | [Google Play](https://play.google.com/store/apps/details?id=com.llamalab.automate) | [LlamaLab](https://llamalab.com/automate/doc/index.html) |
|
||||
| Sensory | wearOS device | [:material-watch:](../reference/devices/index.md#watch) | Any wearOS compatible smartwatch. The TicWatch Pro 5 is recommended for its battery life and general ease of use. It can also be rooted quite easily, unlike Samsung devices. | [TicWatch](https://www.mobvoi.com/us/pages/ticwatchpro5) | |
|
||||
| | Android smartphone | [:material-cellphone:](../reference/devices/index.md#mobile) | The smartphone is a fallback option for certain types of sensory input, such as Steps. The Pixel series is a lean option without the junkware from other Android device manufacturers. You can overlay it with [Graphene OS](https://grapheneos.org/) to somewhat protect yourself from Google tracking and annoyances. | [Pixel](https://store.google.com/category/phones) | |
|
||||
| | Sleep as Android | [:material-cellphone:](../reference/devices/index.md#mobile) [:material-watch:](../reference/devices/index.md#watch) | This app is the most reliable sleep tracker for Android. Make sure to turn off the features that send your data to the developer. It is deeply integrated into the way the sleep track flow works. | [Google Play](https://play.google.com/store/apps/details?id=com.urbandroid.sleep) | [Docs](https://www.docs.sleep.urbandroid.org/services/automation.html) |
|
||||
| Input and Display | HTML | [:material-laptop:](../reference/devices/index.md#laptop) | HTML is required foundational knowledge to create web screens to accept manual inputs. | | |
|
||||
| | CSS | [:material-laptop:](../reference/devices/index.md#laptop) | CSS is required foundational knowledge to create web screens to accept manual inputs. Better yet, Sass to manage the complexity of some of the input screens. | | |
|
||||
| | JavaScript | [:material-laptop:](../reference/devices/index.md#laptop) | JavaScript is required foundational knowledge to create web screens to accept manual inputs. Some JS is also required for using advanced Automate techniques. | | |
|
||||
| | KLWP | [:material-cellphone:](../reference/devices/index.md#mobile) | Kustom Live Wallpaper allows you to create interactive home screens and is a pretty powerful logical engine of its own. Most of the data is piped to the home screen dashboard for easy access. | [Google Play](https://play.google.com/store/apps/details?id=org.kustom.wallpaper&hl=en&gl=US) | [Kustom](https://docs.kustom.rocks/) |
|
||||
| | KWCH | [:material-cellphone:](../reference/devices/index.md#mobile) [:material-watch:](../reference/devices/index.md#watch) | Kustom Watch Face allows you to create watch faces using the Kustom interface. Like KLWP, it is also capable of doing logical operations. | [Google Play](https://play.google.com/store/apps/details?id=org.kustom.watchface&hl=en&gl=US) | [Kustom](https://docs.kustom.rocks/) |
|
||||
| Analytical | TBA | | | | |
|
||||
| Storage and Sync | SQLCipher | [:material-cellphone:](../reference/devices/index.md#mobile) [:material-laptop:](../reference/devices/index.md#laptop) | SQLCipher is the secure version of SQLite. The commands and queries are largely the same, except for the parts to access the database. | [GitHub](https://github.com/sqlcipher/sqlcipher) | [Zetetic](https://www.zetetic.net/sqlcipher/) |
|
||||
| | TablePlus | [:material-laptop:](../reference/devices/index.md#laptop) | GUI tool for relational databases. In this project used to manually edit the database when things go wrong. Also useful to create queries. | [TablePlus](https://tableplus.com/) | [Docs](https://docs.tableplus.com/) |
|
||||
| | Termux | [:material-cellphone:](../reference/devices/index.md#mobile) | Termux is a terminal for Android that allows you to send commands for many popular application. For this project it is used for git commands and a couple of advanced techniques. The following packages are installed using the `pkg install <package>` command: curl, gh, git, openssh, python, sqlcipher, termux-api, and termux-tools. | [GitHub](https://github.com/termux/termux-app/releases) | [Termux](https://termux.dev/en/) |
|
||||
| | iTerm2 | [:material-laptop:](../reference/devices/index.md#laptop) | iTerm is my preferred console for macOS. See the description for Termux for which CLI tools to install using the command `brew install <package>`. [Homebrew](https://brew.sh/) will also need to be installed. | [iTerm](https://iterm2.com/) | [Docs](https://iterm2.com/documentation.html) |
|
||||
| | Syncthing | [:material-cellphone:](../reference/devices/index.md#mobile) [:material-laptop:](../reference/devices/index.md#laptop) | Syncthing syncs folders and files across devices. Used to keep the project files updated between the laptop and the smartphone. | [Syncthing](https://syncthing.net/downloads/) | [Docs](https://docs.syncthing.net/) |
|
||||
|
||||
|
||||
1
content/technical/qself/health/exercise/index.md
Normal file
1
content/technical/qself/health/exercise/index.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Test
|
||||
3
content/technical/qself/health/index.md
Normal file
3
content/technical/qself/health/index.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
headless: true
|
||||
---
|
||||
1
content/technical/qself/health/metrics/index.md
Normal file
1
content/technical/qself/health/metrics/index.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Test
|
||||
1
content/technical/qself/health/sleep/index.md
Normal file
1
content/technical/qself/health/sleep/index.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Test
|
||||
1
content/technical/qself/mental/emotional/index.md
Normal file
1
content/technical/qself/mental/emotional/index.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Test
|
||||
3
content/technical/qself/mental/index.md
Normal file
3
content/technical/qself/mental/index.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
headless: true
|
||||
---
|
||||
1
content/technical/qself/mental/media/index.md
Normal file
1
content/technical/qself/mental/media/index.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Test
|
||||
1
content/technical/qself/mental/productivity/index.md
Normal file
1
content/technical/qself/mental/productivity/index.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
# Test
|
||||
61
content/technical/qself/qself.md
Normal file
61
content/technical/qself/qself.md
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
---
|
||||
title: "Overview"
|
||||
description: "An overview of my quantified self project, which tracks over 50 personal metrics."
|
||||
tags:
|
||||
- HTML
|
||||
- JavaScript
|
||||
- CSS
|
||||
- Python
|
||||
- Shell
|
||||
- Logic
|
||||
- Manual
|
||||
- Database
|
||||
- Collect
|
||||
- Validate
|
||||
- Display
|
||||
- Sync
|
||||
- Analyse
|
||||
- Predict
|
||||
- Watch
|
||||
- Mobile
|
||||
- Laptop
|
||||
---
|
||||
|
||||
According to legend, the first maxim of the Oracle of Delphi - said to spring from Apollo himself - is to know yourself. Or in Greek: _nosce te ipsum, temet nosce_. Repeated twice for emphasis and for nuance. Know yourself, to your own self be known. To know and have knowledge of yourself and then to process that knowledge. To know and to accept.
|
||||
|
||||
The purpose of what has been a decades-long interest for me is exactly that, but a little more. What value do the days [23 September 2004](https://en.wikipedia.org/wiki/Portal:Current_events/September_2004#2004_September_23), or [8 July 1995](https://en.wikipedia.org/wiki/July_1995), or [17 February 2017](https://en.wikipedia.org/wiki/Portal:Current_events/February_2017#2017_February_17) have if they are remembered and known nowhere. Who were you on these days? We edit our lives like film editors, cutting out the boring bits - but are these not the foundation of who we are. The accumulation of a person are the days without monumental events - where a series of small and large decisions define you, who you were, and who you will be. And in that way this project is also a data diary of a person. In an age where social media networks, search engines, and a hungry horde of algorithms know us better than we know ourselves - this project is my redoubt. I should be the expert of myself, and I should endeavour to be better for that challenge.
|
||||
|
||||
This documentation set covers the mechanism of collecting, analysing, and displaying information about myself to myself. As such, the primary reader is me - but if you find something of use, please feel free to use it. There will be typos, broken processes, and periods of inactivity - because life doesn't stop for measurements.
|
||||
|
||||

|
||||
|
||||
## Principles
|
||||
|
||||
**Own all the data exclusively**<br>
|
||||
Avoid storing any data on external services, even temporarily. This especially applies to health data.
|
||||
|
||||
**Delete nothing**<br>
|
||||
Preserve all collected and validated data, as it may have an unimagined use in the future.
|
||||
|
||||
**Automate as much as possible**<br>
|
||||
Automate as much of the collection of data as possible to avoid influencing the results. The process should not impinge on the output.
|
||||
|
||||
## Data collected
|
||||
|
||||
This list may grow and contract over time, as new data sources are added and others are hidden.
|
||||
|
||||
**Financial:** Daily transactions (amount, time, date, category, subcategory, accounts, currency, location, brand, item, liquid balance), Investments (amount, asset type, region, growth/loss), Assets (details, cost, serial, logistics)
|
||||
|
||||
**Health:** Exercise (reps, sets, exercises, bpm, location, weather), Metrics (heart rate, resting heart rate, average heart rate, weight, height, haemotocrit, haemoglobin, eosinophils, basophils, lymphocytes, monocytes, neutrophils, platelet count, red cell count, white cell count, mean cell haemoglobin, mean cell volume, mean cell volume, mean corpuscular haemoglobin, red blood width, esr, systolic, diastolic, waist circumference, body fat, chest circumference, thigh circumference, body fat mass, skeletal muscle mass, visceral fat, body water, total cholesterol, hdl cholesterol, ldl cholesterol, triglyceride, pGlucose fasting, anion gap, bicarbonate, chloride, potassium, sodium, urea, creatinine, b12, ferritin, tsh, freet4, thyroid peroxidase, eye axis, eye cylinder, eye sphere, vo2max, avgspo2, sperm motility, sperm count), Sleep (sleep phases, duration, location, weather, air pressure, ambient light, sleep time, awake time)
|
||||
|
||||
**Mental:** Media (books, movies, tv, theatre, exhibitions), Productivity (focus sessions), Activities (reading, writing, media, art, games, meditation, technical, media, piano, design)
|
||||
|
||||
**Diagram: Data cycle**
|
||||
|
||||
{width=750}
|
||||
|
||||
## Roadmap
|
||||
|
||||
Work on this project is planned and managed on this [task board](https://github.com/users/gugulet-hu/projects/1/views/5).
|
||||
|
||||
|
||||
121
content/technical/qself/reference/devices/index.md
Normal file
121
content/technical/qself/reference/devices/index.md
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
---
|
||||
title: "Devices"
|
||||
description: "Some tips and tricks for working with the devices that enable the project."
|
||||
tags:
|
||||
- Watch
|
||||
- Mobile
|
||||
- Laptop
|
||||
---
|
||||
|
||||
## :material-cellphone: Mobile
|
||||
|
||||
The mobile device used in the qSelf project needs to run the Android operating system; preferably the latest version. Most manufacturers add cruft to their devices, so the Pixel series is recommended for its focus on the pure Android experience. Furthermore, the Graphene-flavoured version of Android gives you more control of your privacy and device use compared to standard Android. The device should be unrooted, but with [Developer options](https://www.howtogeek.com/129728/how-to-enable-developer-options-menu-and-enable-and-usb-debugging-on-android/) enabled. This lets you use the Android Debug Bridge (ADB).
|
||||
|
||||
To install Graphene, see their [user guide](https://grapheneos.org/install/) for instructions.
|
||||
|
||||
## :material-watch: Watch
|
||||
|
||||
Similarly to the mobile device, the smartwatch needs to run wearOS 3+. The TicWatch series of smartwatches has good battery life and a reasonable number of sensors. You may need to disable or remove additional software added by the manufacturer to get better battery life and less interference. The device should be unrooted, but with [Developer options](https://developer.android.com/training/wearables/get-started/debugging) enabled. This lets wirelessly connect using ADB.
|
||||
|
||||
The commands that follow can help you debloat your device and make it run smoother.
|
||||
|
||||
### Connect to device
|
||||
|
||||
Once you have enabled ADB via wi-fi and you have the device's address you can connect to the device run the following command from your terminal or console.
|
||||
|
||||
=== "Code"
|
||||
|
||||
adb connect <IP-address>
|
||||
adb connect <IP-address>:<Port>
|
||||
|
||||
|
||||
=== "Example"
|
||||
adb connect 192.168.123.132
|
||||
adb connect 192.168.123.132:12345
|
||||
|
||||
| Part | Description | Required |
|
||||
| --- | --- | --- |
|
||||
| `adb` | The Android Debugging Bridge CLI tool. To install it on Termux, use: `pkg install android-tools`. To install it on macOS, using homebrew: `brew install android-tools`. | Yes |
|
||||
| `connect` | The command to connect over wi-fi to the device. | Yes |
|
||||
| `<IP-address>` | You can find the IP address on your device when you turn on ADB over wi-fi. It is usually located in **Settings** > **Developer options** > **Wireless debugging**. The command to connect without the port number may be necessary to prompt the permissions dialog, which confirms that you want to connect to this device on the first attempt. | Yes |
|
||||
| `<Port>` | The port number can usually be found in **Settings** > **Developer options** > **Wireless debugging**. The port number is required when there is more than one device connected via ADB. | No |
|
||||
|
||||
### Grant permissions to apps
|
||||
|
||||
To allow autoWear, for example, to change secure settings (such as toggling Theatre Mode) use the following command.
|
||||
|
||||
=== "Code"
|
||||
adb -s "<IP-address>:<Port>" shell pm grant <package-name> <permission>
|
||||
|
||||
=== "Example"
|
||||
adb -s "192.168.123.132:12345" shell pm grant com.joaomgcd.autowear android.permission.WRITE_SECURE_SETTINGS
|
||||
|
||||
| Part | Description | Required |
|
||||
| --- | --- | --- |
|
||||
| `adb` | The Android Debugging Bridge CLI tool. To install it on Termux, use: `pkg install android-tools`. To install it on macOS, using homebrew: `brew install android-tools`. | Yes |
|
||||
| `-s` | This flag selects a particular device when there is more than one device connected via ADB. | No |
|
||||
| `<IP-address>` | This IP address can be found in **Settings** > **Developer options** > **Wireless debugging**. The command to connect without the port number may be necessary to prompt the permissions dialog, which confirms that you want to connect to this device on the first connection. | Yes |
|
||||
| `<Port>` | The port number is in **Settings** > **Developer options** > **Wireless debugging**. The port number is required when there is more than one device connected via ADB. | No |
|
||||
| `shell` | The shell for interacting with ADB. | Yes |
|
||||
| `pm` | Short for package manager, which manages apps on an Android or wearOS device. | Yes |
|
||||
| `grant <package-name> <permission>` | Grant this package these permissions on the device. | Yes |
|
||||
|
||||
### List system apps
|
||||
|
||||
To list all the manufacturer applications installed.
|
||||
|
||||
=== "Code"
|
||||
adb -s "<IP-address>:<Port>" shell pm list packages -s -e <manufacturer-name>
|
||||
|
||||
=== "Example"
|
||||
adb -s "192.168.123.132:12345" shell pm list packages -s -e mobvoi
|
||||
|
||||
| Part | Description | Required |
|
||||
| --- | --- | --- |
|
||||
| `adb` | The Android Debugging Bridge CLI tool. To install it on Termux, use: `pkg install android-tools`. To install it on macOS, using homebrew: `brew install android-tools`. | Yes |
|
||||
| `-s` | This flag selects a particular device when there is more than one device connected via ADB. | No |
|
||||
| `<IP-address>` | This IP address can be found in **Settings** > **Developer options** > **Wireless debugging**. The command to connect without the port number may be necessary to prompt the permissions dialog, which confirms that you want to connect to this device on the first attempt. | Yes |
|
||||
| `<Port>` | The port number is in **Settings** > **Developer options** > **Wireless debugging**. The port number is required when there is more than one device connected via ADB. | No |
|
||||
| `shell` | The shell for interacting with ADB. | Yes |
|
||||
| `pm` | Short for package manager, which manages apps on an Android or wearOS device. | Yes |
|
||||
| `list packages` | List all the packages that meet the conditions that follow. | Yes |
|
||||
| `-s` | A flag to filter for system apps. | No |
|
||||
| `-e` | A flag to filter for enabled apps. To filter for disabled apps use `-d`. | No |
|
||||
|
||||
### Disable system apps
|
||||
|
||||
To disable a manufacturer's app on your device.
|
||||
|
||||
=== "Code"
|
||||
adb -s "<IP-address>:<Port>" shell pm disable-user --user 0 <package-name>
|
||||
|
||||
=== "Example"
|
||||
adb -s "192.168.123.132:12345" shell pm disable-user --user 0 com.mobvoi.wear.mcuservice.aw
|
||||
|
||||
| Part | Description | Required |
|
||||
| --- | --- | --- |
|
||||
| `adb` | The Android Debugging Bridge CLI tool. To install it on Termux, use: `pkg install android-tools`. To install it on macOS, using homebrew: `brew install android-tools`. | Yes |
|
||||
| `-s` | This flag selects a particular device when there is more than one device connected via ADB. | No |
|
||||
| `<IP-address>` | This IP address can be found in **Settings** > **Developer options** > **Wireless debugging**. The command to connect without the port number may be necessary to prompt the permissions dialog, which confirms that you want to connect to this device on the first attempt. | Yes |
|
||||
| `<Port>` | The port number is in **Settings** > **Developer options** > **Wireless debugging**. The port number is required when there is more than one device connected via ADB. | No |
|
||||
| `shell` | The shell for interacting with ADB. | Yes |
|
||||
| `pm` | Short for package manager, which manages apps on an Android or wearOS device. | Yes |
|
||||
| `disable-user --user 0` | Disable the following app on the device. | Yes |
|
||||
| `<package-name>` | The name of the package to disable. You can find the package names by [listing the packages](#list-system-apps). | Yes |
|
||||
|
||||
## :material-laptop: Laptop
|
||||
|
||||
Any laptop that can run Python is good enough for this project.
|
||||
|
||||
!!! note "Using commands in Powershell"
|
||||
|
||||
Please be aware that some terminal commands in Linux and macOS are different in Windows Powershell. There may be instances where you need to use ticks (`) to escape ceratin characters.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
4
content/technical/qself/reference/index.md
Normal file
4
content/technical/qself/reference/index.md
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
title: "Reference"
|
||||
description: "Reference lookup for data models and device info"
|
||||
---
|
||||
BIN
content/technical/qself/src/qs-data-cycle-3333x3333.webp
Normal file
BIN
content/technical/qself/src/qs-data-cycle-3333x3333.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 301 KiB |
BIN
content/technical/qself/src/qs-designs.key
Normal file
BIN
content/technical/qself/src/qs-designs.key
Normal file
Binary file not shown.
BIN
content/technical/qself/src/qs-project-history-333x1189.webp
Normal file
BIN
content/technical/qself/src/qs-project-history-333x1189.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 351 KiB |
BIN
content/technical/qself/src/qs-topology-3333x3333.webp
Normal file
BIN
content/technical/qself/src/qs-topology-3333x3333.webp
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 534 KiB |
BIN
content/technical/qself/src/qself-favicon-200x200.ico
Normal file
BIN
content/technical/qself/src/qself-favicon-200x200.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 162 KiB |
3
content/technical/qself/src/qself-logo-200x200.png
Normal file
3
content/technical/qself/src/qself-logo-200x200.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b0d669eb9e4a46862d81bc559cb58a959553fb603f02749fb4e3978c7bd5e3dd
|
||||
size 26944
|
||||
3
content/technical/qself/src/qself-logo-800x800.png
Normal file
3
content/technical/qself/src/qself-logo-800x800.png
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c00c5951243eeed001d0fbe8a89f9314c6b9ee5110a46fca7e3cc0f40f1b88aa
|
||||
size 28473
|
||||
3
content/technical/qself/src/qself-project-3462x2310.jpg
Normal file
3
content/technical/qself/src/qself-project-3462x2310.jpg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:206271e085358cec2c2182d9bb4902e19d77c9d00cbbf699cb79aaf6d3337571
|
||||
size 659933
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:33df07a2042c7e9bcf38ba851c1783e8bdb08bb404369285646e4615c8382ff2
|
||||
size 73112
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8fba0428e55f993a2ebed25522aabfadf021e9e3cbc0dd65bb28f9fafd7b8dc5
|
||||
size 134024
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8c5a7b0fe5f9dc72adcf9b16d0c7a9f48cdab6936d339d5874f9769bd0e8c6d9
|
||||
size 103775
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:809359b3b0fbc25730b0202b92c0129c6771e9392be1a65f3998519b835c2323
|
||||
size 138395
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6ed56846380c4585b945a7212bda91f9cea471bc233b8886a6c44d2323db07e3
|
||||
size 154864
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:fe1db66ef40db31991fb0bafb57718aa1fe4c7341ed2a998162006c0620355a0
|
||||
size 135476
|
||||
60
readme.md
60
readme.md
|
|
@ -1,4 +1,4 @@
|
|||
<!-- markdownlint-disable MD013 -->
|
||||
<!-- markdownlint-disable MD040 -->
|
||||
|
||||
# Site
|
||||
|
||||
|
|
@ -13,3 +13,61 @@ This repo contains the files for maintaining my personal website: [gugulet.hu](h
|
|||
3. Activate the virtual environment: `source .venv/bin/activate`
|
||||
4. Install all the packages: `pip install -r requirements.txt`
|
||||
5. Activate direnv: `direnv allow`
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
content/ Source content (Markdown, assets, templates)
|
||||
assets/css/ Per-page stylesheets
|
||||
assets/js/ JavaScript (GSAP animations, loader, protection)
|
||||
assets/fonts/ Custom fonts (ttf)
|
||||
assets/media/ Images, favicons
|
||||
overrides/ Jinja2 templates (extends Zensical theme)
|
||||
index.md Homepage
|
||||
resume.md Resume page
|
||||
deploy/ Generated static site (build output)
|
||||
zensical.toml Build config (site metadata, extensions, theme)
|
||||
minify.py Post-build CSS/JS/HTML minification
|
||||
Dockerfile Multi-stage build (Zensical builder + Caddy server)
|
||||
```
|
||||
|
||||
## Build and serve
|
||||
|
||||
```bash
|
||||
# Development
|
||||
source .venv/bin/activate
|
||||
zensical serve --watch
|
||||
|
||||
# Production build
|
||||
zensical build
|
||||
rm ./deploy/sitemap.xml
|
||||
python minify.py
|
||||
|
||||
# Docker
|
||||
docker build -t site:latest .
|
||||
docker run -p 80:80 site:latest
|
||||
```
|
||||
|
||||
## Key conventions
|
||||
|
||||
- **Zensical** (MkDocs-based) static site generator with `zensical.toml` as single config source.
|
||||
- **Markdown + YAML frontmatter** for all content. Each page declares its template, extra_css, and extra_js.
|
||||
- **Jinja2 templates** in `content/overrides/` extend the Zensical base theme.
|
||||
- **GSAP + ScrollTrigger** for homepage scroll animations. No other JS frameworks.
|
||||
- **Per-section typography:** serif (Words), monospace (Technical), display (Visuals).
|
||||
- **CSS custom properties** for theming. Responsive sizing via `clamp()` and viewport units.
|
||||
- **Post-build minification** via `minify.py` (terser for JS, clean-css for CSS, inline for HTML). Preserves `<pre>`/`<code>` blocks.
|
||||
- **No database.** Fully static output served by Caddy.
|
||||
- **Content protection:** `protect.js` prevents right-click and copying.
|
||||
- **Anti-AI crawling:** meta robots tag with `noai, noimageai`.
|
||||
|
||||
## CI/CD
|
||||
|
||||
GitHub Actions runs Vale prose linting and MegaLinter on push/PR to main. Fail on errors.
|
||||
|
||||
## Dependencies
|
||||
|
||||
```bash
|
||||
pip install -r requirements.txt # Python (Zensical, Jinja2, pymdown-extensions)
|
||||
npm install -g terser clean-css-cli # Node (minification)
|
||||
```
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
click==8.3.1
|
||||
click==8.3.2
|
||||
colorama==0.4.6
|
||||
deepmerge==2.0
|
||||
ghp-import==2.1.0
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
<!-- markdownlint-disable MD013 -->
|
||||
|
||||
# Site
|
||||
|
||||
Personal portfolio website for gugulet.hu. Showcases three domains: Words, Visuals, and Technical.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue