manpager, gh releases, Potd

This commit is contained in:
Jan Andrle 2025-01-07 09:44:15 +01:00
parent 5e7e5b6f33
commit cf083e866b
Signed by: jaandrle
GPG Key ID: B3A25AED155AFFAB
4 changed files with 44 additions and 24 deletions

View File

@ -21,7 +21,8 @@ export PATH="$HOME/.local/bin:$PATH:/home/linuxbrew/.linuxbrew/bin"
set -o vi # VIM mode for bash set -o vi # VIM mode for bash
bind -m vi-command 'Control-l: clear-screen' bind -m vi-command 'Control-l: clear-screen'
bind -m vi-insert 'Control-l: clear-screen' bind -m vi-insert 'Control-l: clear-screen'
export MANPAGER="/bin/sh -c \"sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | vim --appimage-extract-and-run --not-a-term -c 'set ft=man ts=8 nomod nolist noma' -\"" # export MANPAGER="/bin/sh -c \"sed -e 's/\x1B\[[[:digit:]]\+m//g' | col -b | vim --appimage-extract-and-run --not-a-term -c 'set ft=man ts=8 nomod nolist noma' -\""
export MANPAGER="vim --appimage-extract-and-run +MANPAGER --not-a-term -c 'set ts=8 nolist' -"
shopt -s checkwinsize # dynamic columns update after every cmd shopt -s checkwinsize # dynamic columns update after every cmd
## History ## History

View File

@ -21,8 +21,8 @@
"exec": "yes", "exec": "yes",
"description": "AI Browser", "description": "AI Browser",
"glare": "AppImage", "glare": "AppImage",
"last_update": "2024-09-17T15:03:29Z", "last_update": "2025-01-01T14:34:08Z",
"version": "2.15.1", "version": "3.2.0",
"downloads": "/home/jaandrle/bin/pinokio" "downloads": "/home/jaandrle/bin/pinokio"
}, },
{ {
@ -112,9 +112,9 @@
"group": "nondev", "group": "nondev",
"file_name": "upscayl", "file_name": "upscayl",
"exec": "yes", "exec": "yes",
"last_update": "2024-06-01T14:48:20Z", "last_update": "2024-12-25T13:44:34Z",
"downloads": "/home/jaandrle/bin/upscayl", "downloads": "/home/jaandrle/bin/upscayl",
"version": "v2.11.5", "version": "v2.15.0",
"glare": "AppImage" "glare": "AppImage"
}, },
{ {
@ -134,11 +134,11 @@
"name": "Fedistar", "name": "Fedistar",
"description": "Multi-column Mastodon, Pleroma, and Friendica client for desktop", "description": "Multi-column Mastodon, Pleroma, and Friendica client for desktop",
"group": "nondev", "group": "nondev",
"file_name": "fedistar", "file_name": "fedistar.appimage",
"exec": "yes", "exec": "yes",
"last_update": "2024-10-23T12:45:06Z", "last_update": "2025-01-04T02:33:29Z",
"downloads": "/home/jaandrle/bin/fedistar", "downloads": "/home/jaandrle/bin/fedistar.appimage",
"version": "v1.9.12", "version": "v1.10.1",
"glare": ".*amd64.*.AppImage" "glare": ".*amd64.*.AppImage"
}, },
{ {
@ -148,9 +148,9 @@
"group": "ai", "group": "ai",
"file_name": "ollama", "file_name": "ollama",
"exec": "yes", "exec": "yes",
"last_update": "2024-11-08T19:58:30Z", "last_update": "2024-12-17T21:54:59Z",
"downloads": "/home/jaandrle/bin/ollama", "downloads": "/home/jaandrle/bin/ollama",
"version": "v0.4.1", "version": "v0.5.4",
"glare": "linux-amd64" "glare": "linux-amd64"
}, },
{ {
@ -173,8 +173,8 @@
"file_name": "vim", "file_name": "vim",
"exec": "yes", "exec": "yes",
"downloads": "/home/jaandrle/bin/vim", "downloads": "/home/jaandrle/bin/vim",
"version": "v9.1.0857", "version": "v9.1.0990",
"last_update": "2024-11-12T01:13:27Z", "last_update": "2025-01-06T01:20:31Z",
"glare": "GVim.*x86_64.*.AppImage" "glare": "GVim.*x86_64.*.AppImage"
}, },
{ {
@ -182,11 +182,11 @@
"name": "Escrcpy", "name": "Escrcpy",
"description": "📱 Graphical Scrcpy to display and control Android, devices powered by Electron. | 使用图形化的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动。", "description": "📱 Graphical Scrcpy to display and control Android, devices powered by Electron. | 使用图形化的 Scrcpy 显示和控制您的 Android 设备,由 Electron 驱动。",
"group": "dev", "group": "dev",
"file_name": "escrcpy", "file_name": "escrcpy.appimage",
"exec": "yes", "exec": "yes",
"last_update": "2024-11-08T07:30:51Z", "last_update": "2024-12-28T11:05:28Z",
"downloads": "/home/jaandrle/bin/escrcpy", "downloads": "/home/jaandrle/bin/escrcpy.appimage",
"version": "v1.26.3", "version": "v1.28.3",
"glare": ".*x86_64.*.AppImage" "glare": ".*x86_64.*.AppImage"
}, },
{ {
@ -208,9 +208,9 @@
"group": "ai", "group": "ai",
"file_name": "jan", "file_name": "jan",
"exec": "yes", "exec": "yes",
"last_update": "2024-10-24T08:03:18Z", "last_update": "2025-01-06T08:15:48Z",
"downloads": "/home/jaandrle/bin/jan", "downloads": "/home/jaandrle/bin/jan",
"version": "v0.5.7", "version": "v0.5.13",
"glare": ".*x86_64.*.AppImage" "glare": ".*x86_64.*.AppImage"
}, },
{ {
@ -220,10 +220,22 @@
"group": "ai", "group": "ai",
"file_name": "Chatbox", "file_name": "Chatbox",
"exec": "yes", "exec": "yes",
"last_update": "2024-11-07T15:22:15Z", "last_update": "2024-12-16T12:18:19Z",
"downloads": "/home/jaandrle/bin/Chatbox", "downloads": "/home/jaandrle/bin/Chatbox",
"version": "v0.10.2", "version": "v0.10.3",
"glare": ".*x86_64.*.AppImage" "glare": ".*x86_64.*.AppImage"
},
{
"repository": "Martichou/rquickshare",
"group": "nondev",
"name": "r-quick-share",
"description": "Rust implementation of NearbyShare/QuickShare from Android for Linux and macOS.",
"file_name": "r-quick-share",
"exec": "yes",
"downloads": "/home/jaandrle/bin/r-quick-share",
"glare": ".*main.*amd64.AppImage",
"last_update": "2024-08-21T21:17:54Z",
"version": "v0.11.2"
} }
] ]
} }

View File

@ -26,5 +26,5 @@
"complexity": ["error", 15] "complexity": ["error", 15]
} }
} }
} }
} }

View File

@ -9,7 +9,7 @@ const path_home= $.xdg.home`Obrázky/Bing Image Of The Day/`;
const path_info= join(path_home, "images.json"); const path_info= join(path_home, "images.json");
$.api() $.api()
.version("2024-11-14") .version("2025-01-06")
.command("pull", "Pull new/today image(s)") .command("pull", "Pull new/today image(s)")
.action(async function pull(){ .action(async function pull(){
const images= { const images= {
@ -96,8 +96,15 @@ async function getImagePath(shift= 0){
prop: "wikitext", prop: "wikitext",
text: `{{Potd/${date}}}`, text: `{{Potd/${date}}}`,
}); });
const pluckCaption= response=> response.expandtemplates.wikitext;
const caption_fallback= await fetchGet({
action: "expandtemplates",
prop: "wikitext",
text: `{{Potd/${date} (en)}}`,
}).then(pluckCaption);
const caption= pipe( const caption= pipe(
response=> response.expandtemplates.wikitext, pluckCaption,
caption=> caption !== `[[:Template:Potd/${date} (cs)]]` ? caption : caption_fallback,
caption=> caption.replace(/\[\[.*?\]\]/g, m=> m.slice(2, -2).split("|").reverse()[0]), caption=> caption.replace(/\[\[.*?\]\]/g, m=> m.slice(2, -2).split("|").reverse()[0]),
caption=> caption.replace(/''(.*?)''/g, "„$1”"), caption=> caption.replace(/''(.*?)''/g, "„$1”"),
)(await fetchGet({ )(await fetchGet({