https://github.com/tortitast/langkeeper
Keep track of the time you spend programming.
https://github.com/tortitast/langkeeper
actix htmx
Last synced: 11 months ago
JSON representation
Keep track of the time you spend programming.
- Host: GitHub
- URL: https://github.com/tortitast/langkeeper
- Owner: TortitasT
- Created: 2023-07-31T20:33:50.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2024-01-25T08:03:03.000Z (over 2 years ago)
- Last Synced: 2025-04-14T12:21:24.445Z (about 1 year ago)
- Topics: actix, htmx
- Language: Rust
- Homepage: https://langkeeper.tortitas.eu/
- Size: 727 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Langkeeper
[](https://github.com/TortitasT/langkeeper/actions/workflows/rust.yml)
Keep track of the time you spend on each language.
[vscode extension](https://github.com/TortitasT/vscode-langkeeper)
[neovim extension](https://github.com/TortitasT/langkeeper.nvim)

## Development
Create database and run migrations (requires diesel_cli).
```bash
diesel setup
```
Run with watch.
```bash
cargo install cargo-watch
cargo watch -x "run serve"
```
## Deploy
Clone
```bash
git clone https://github.com/tortitast/langkeeper
```
Build
```bash
cargo build --release
```
Copy service
```bash
cp ./langkeeper.service /etc/systemd/system/
```
Start service
```bash
service langkeeper start
```
## Tests
Run with logs and in single thread so sqlite database works.
```bash
cargo test -- --nocapture --test-threads=1
```
## Diesel with sqlite install on Windows for development
Install sqlite with chocolatey.
```powershell
choco install sqlite
```
Create `.lib` with the following command (needs to be run with Visual Studio Development Console for `lib` to be available) on the directory where the `dll` is.
```powershell
cd C:\ProgramData\chocolatey\lib\SQLite\tools
lib /def:sqlite3.def /out:sqlite3.lib
```
Add path to environment variable.
```powershell
$Env:SQLITE3_LIB_DIR = "C:\ProgramData\chocolatey\lib\SQLite\tools"
```
Install diesel_cli with the following command.
```powershell
cargo install diesel_cli --no-default-features --features postgres
```