diff options
| author | Isabella Bastaja <isabella@sorre.xyz> | 2026-02-21 17:12:32 +0100 |
|---|---|---|
| committer | Isabella Bastaja <isabella@sorre.xyz> | 2026-02-21 17:13:53 +0100 |
| commit | 0ff8b519459a97b3eca8b4e5263404a5628e2f41 (patch) | |
| tree | 424853207108b161f79e83f6042371eae3c3e283 /site/2023-11-15-scraping-images-from-open-tabs.md | |
| parent | ee7b2ba718c47fa7f4ef67af08e5906f3d5333b5 (diff) | |
add syntax highlighting
Diffstat (limited to 'site/2023-11-15-scraping-images-from-open-tabs.md')
| -rw-r--r-- | site/2023-11-15-scraping-images-from-open-tabs.md | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/site/2023-11-15-scraping-images-from-open-tabs.md b/site/2023-11-15-scraping-images-from-open-tabs.md index b0aebb6..75a768c 100644 --- a/site/2023-11-15-scraping-images-from-open-tabs.md +++ b/site/2023-11-15-scraping-images-from-open-tabs.md @@ -3,12 +3,14 @@ <time id="post-upload-date">2023-11-15</time> <time id="post-update-date">2023-11-15</time> -```zsh +<!-- FIXME: shell highlighting doesn't work yet --> +<pre><code> cat export.json \ | jaq --raw-output '..["url"]? | strings' \ | rg --fixed-strings "wallhaven.cc/w" \ | gallery-dl --input-file - -``` +</code></pre> + I exported my current session to json with tab session manager. This command takes that json export (referred to as `export.json`), finds all the urls that contain `wallhaven.cc/w` (i.e. all urls that are wallhaven images) and @@ -19,7 +21,9 @@ This workflow could be made better by creating a version of tab session manager that exports in a simpler (or more configurable format), and I could also turn this into a script that takes the wanted website formats as an argument. Invocation of the script might look something like: -```zsh + +<!-- FIXME: shell highlighting doesn't work yet --> +<pre><code> tabsession-dl --format "wallhaven.cc/w" --format "reddit.com/r" \ --input-file export.json -``` +</code></pre> |
