blob: bce4d33dc9eddc46936f4037dd70921c331e8be1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# booki
but in C, 'cause why not?
[many previous iterations here](https://github.com/winsbe01/booki) [and here](https://git.sr.ht/~mryouse/cbooki)
Differences between (current state) cbooki and the (current iteration) Python version:
| Feature | Current Version | cbooki |
|------------------------|------------------------|---------------------------------|
| `add` | works | works |
| `discover` | works | doesn't exist |
| sorting | by author last name | by order in file |
| styling | title underlined | no styling |
| `--show` | only at end of command | anywhere in command |
| lists | anywhere in file | on string fields |
| `search` | by author, title, on | on any field |
| accents in `search` | must be explicit | diacritic-insensitive |
| editing | preserves file order | edits brought to bottom of file |
Things that work:
- [x] `search` with arbitrary query items
- [x] multiple `search` query items
- [x] `--show` to print out ~~most~~ all attributes
Things that don't work:
- [ ] `search` with more than 5 query items
- [x] searching for a single author in a multi-author item
- [x] ~~printing any array thing~~ support for `on`, `author`, `language`, and `translator`
- [x] ~~`^` or `$` in string searching~~ should work
- [ ] sorting in any way
Things that might change:
- [ ] `--show` might want to limit by field
- [x] now parsing manually ~~currently uses [tomlc99](https://github.com/cktan/tomlc99), which is great but might be overkill for this~~
- [x] ~~maybe prefixed `<` or `>` for numeric searches~~ prefixes are `+` for greater and `~` for less
- [x] ~~format strings~~ with `--format` supports names of fields in surrounding `%` characters, i.e. the default is `%title% by %author%`
- [ ] discover endpoint
- [ ] how much lives on the stack vs the heap
|