main
dozens 2024-02-01 18:11:30 -07:00
parent 61261eb41d
commit f6ff834952
2 changed files with 42 additions and 15 deletions

View File

@ -12,18 +12,12 @@ I decided to use recutils for this because, why not.
You don't need to install anything if you don't want to. You can just edit the rec file.
But if you want to use the TUI, then `npm i` and `just new` (or `node bin/cli.js`) to create a new entry using the interative prompt.
## Dependencies
- GNU recutils
- node (optional)
- just (optional)
- csvkit (optional)
## Considerations
What kind of stuff am I interested in keeping track of?
@ -37,21 +31,53 @@ What kind of stuff am I interested in keeping track of?
You should probably just read the recfile because that will always be the source of truth, but at the time of this writing, the schema is as follows.
Game:
```
%rec: Game
%doc: a ttrpg game I have played or am playing
%key: Id
%type: Id int
%type: System,Module,Format line
%type: Updated,Started date
%type: Started date
%typedef: Role enum DM Player
%typedef: Length enum Campaign Adventure Oneshot
%typedef: Status enum Ongoing Complete Hiatus Dead
%auto: Id Updated
%mandatory: Id System Module Format Notes Updated Started Role Length Status
%auto: Id Started
%mandatory: Id System Module Format Started Role Length Status
%unique: Id
```
Note: `Notes` (arguably the most important field) does not have a type because there is no valid type for multi-line entries in recfiles. Thus is remains untyped, uncheckable by recins, and undocumented in the schema. I consider this a bug of the recutils.
Game Update:
```
%rec: Update
%doc: an update for a game!
%type: Game rec Game
%key: Id
%type: Id int
%type: Created date
%auto: Id Created
%mandatory: Id Created Text
%allowed: Id Created Text Game
%unique: Id
%sort: Id
```
This database originally just had the one `Game` record with updates to games unofficially recorded in the Notes field.
This lead to the primary datatype being the campaign, or the adventure, or the oneshot.
And individual session logs didn't really exist anywhere.
I didn't like this because it meant I never new how many actual games I've played.
For example, I had been playing Strixhaven on a weekly basis for months,
but still to this day only have three 'updates' for it.
So I migrated all notes and updates for each game to a new `Update` type.
And the new goal is to create and retire Games as needed,
and to create a new Update for every session played.
So I actually know how many games I've played for real.
Note that after doing this,
I am still not using `recsel`'s "join" feature,
because recsel joins are messy.
## Learnings
@ -59,15 +85,16 @@ check out [doc/learnings.md](doc/learnings.md)
## Recsel examples
- `recsel -e "Role = 'Player'" games.rec`
- `recsel -t Game -e "Role = 'Player'" games.rec`
See `justfile` for more examples
## Todo
- [x] Add types/enums
- [x] ~~tui?~~ run `just new` (or `node bin/cli.js`)
- [ ] add Update to CLI
- [x] ~~tui?~~ run `just new`
- [x] add Update to CLI
- [ ] refactor edit/update search functions
## Resources

View File

@ -841,9 +841,9 @@ Text: one of my players no-showed during our regular D&D campaign so we busted o
+
+ Amassing wealth and spreading their new religion became their new mission.
Id: 28
Created: Fri, 09 Sep 2022 09:23:12 -0600
Game: 34
Id: 28
Text: a quick true fkr game with me and erika, sean running
+
+ mad fun.
@ -862,9 +862,9 @@ Text: a quick true fkr game with me and erika, sean running
+
+ Sean pointed out afterwards that there were no dice rolls whatsoever, which I find delightful.
Id: 29
Created: Tue, 30 Aug 2022 07:16:51 -0600
Game: 33
Id: 29
Text: almost forgot about this one!
+
+ sean ran a game of dragonfly d6 for me and tibbius