blob: 6ade2e26afb980706c0e2db724324411c404bd41 (
plain) (
blame)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# 📰 `suzuri`
Command-line Interface to sumi.news
Who is Suzuri? Sumi Sakurasawa's dog.
## Usage
You can download the script and run it locally, but I'd recommend fetching and
running it from GitHub to ensure that you are always on the latest version:
```shell
bash <(curl -s "https://raw.githubusercontent.com/Fuwn/suzuri/main/suzuri")
```
> Hint: Alias this in your shell profile: `alias suzuri="bash <(curl -s "https://raw.githubusercontent.com/Fuwn/suzuri/main/suzuri")"`
### Token
Obtain your sumi.news token via the `s` cookie on sumi.news.
### `--help`
```text
usage: suzuri token [folder]
positional arguments:
token sumi.news session token
folder sumi.news feed folder
environment variables:
SUZURI_TOKEN substitution for token
SUZURI_FOLDER substitution for folder
SUZURI_REVERSE reverse the output feed
SUZURI_MINIMAL output only linked titles
SUZURI_RAW output raw markdown
SUZURI_RSS output raw application/rss+xml
```
Optionally, omit the token and folder arguments and export the environment
variables `SUZURI_TOKEN` and `SUZURI_FOLDER`.
### Dependencies
- [curl](https://curl.se/)
- [pup](https://github.com/ericchiang/pup)
- [html2md](https://github.com/suntong/html2md)
- [glow](https://github.com/charmbracelet/glow)
### Cool Ideas
- Pipe it into [`gum`'s](https://github.com/charmbracelet/gum) `choose` subcommand
- Display the most recent feed item in your status-bar
- Echo out the most recent feed item when you start your shell
- Generate an RSS feed of your feeds to read with local tooling; e.g.,
[newsboat](https://newsboat.org/).
### [newsboat](https://newsboat.org/) Integration
```
# ~/.config/newsboat/urls
"exec:SUZURI_RSS=1 SUZURI_MINIMAL=1 SUZURI_REVERSE=1 /path/to/suzuri <token>"
"exec:SUZURI_RSS=1 SUZURI_MINIMAL=1 SUZURI_REVERSE=1 /path/to/suzuri <token> <folder>"
```
## Licence
This project is licensed with the [GNU General Public License v3.0](LICENSE).
|