Add tips and tricks for common operations

This commit is contained in:
Anthony Wang 2024-01-02 23:47:05 +00:00
parent 97722764e8
commit 479101f270
Signed by: exogit
GPG key ID: 1DDC6BC38786C595

View file

@ -27,3 +27,12 @@ Go version: ./sd < test
```
The C port is about 30% faster than the original Go code.
## Tips and tricks
- View card deck: `sqlite3 cards .dump`
- Get total number of cards: `sqlite3 cards "SELECT COUNT(*) FROM cards"`
- Get total number of cards with positive weight: `sqlite3 cards "SELECT COUNT(*) FROM cards WHERE weight>0"`
- Search for string in keys: `sqlite3 cards "SELECT * FROM cards WHERE key LIKE '%hello%'"`
- Add card to deck: [sd-add.fish](sd-add.fish)
- Edit deck: [sqlitevi.fish](sqlitevi.fish) or sqlitebrowser