diff --git a/bangs/config.json b/bangs/config.json index 4320817..657dde0 100644 --- a/bangs/config.json +++ b/bangs/config.json @@ -18363,6 +18363,10 @@ "name": "GitHub", "url": "https://github.com/search?utf8=%E2%9C%93&q={{{s}}}" }, + "gha": { + "name": "GitHub Actions", + "url": "https://github.com/marketplace?type=actions&query={{{s}}}" + }, "ghacks": { "name": "Ghacks", "url": "https://www.ghacks.net/?s={{{s}}}" @@ -29837,7 +29841,7 @@ }, "melpa": { "name": "MELPA", - "url": "http://melpa.milkbox.net/#/?q={{{s}}}" + "url": "http://melpa.org/#/?q={{{s}}}" }, "melvyl": { "name": "Melvyl Catalog (University of California Libraries)", @@ -41975,6 +41979,10 @@ "name": "Shutterstock", "url": "http://www.shutterstock.com/cat.mhtml?searchterm={{{s}}}" }, + "swh": { + "name": "Software Heritage", + "url": "https://archive.softwareheritage.org/browse/search/?q={{{s}}}&with_visit=true&with_content=true" + }, "shz": { "name": "Shazam", "url": "http://www.shazam.com/de/search/{{{s}}}" diff --git a/bin/bangs b/bin/bangs index aa9909d..da0466b 100755 --- a/bin/bangs +++ b/bin/bangs @@ -5,12 +5,37 @@ # Examples: # ``` -# bangs hello there !g !aw +# bangs hello there ~g ~aw # ``` # will open a search result page on Google and Arch Wiki +proc usage() { + cat <&2 printf "$format\\n" @msg } +if (len(ARGV) == 0) { + usage + exit 0 +} + for i in @ARGV { write -- $i | rg --quiet $bangs_format || { push :search_query $i diff --git a/bin/generate-gitignore b/bin/generate-gitignore index 317e8e3..9615c1b 100755 --- a/bin/generate-gitignore +++ b/bin/generate-gitignore @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#! nix-shell --pure -i bash -p curl jq fzf coreutils findutils iputils +#! nix-shell --pure -i bash -p curl jq fzf coreutils findutils iputils cacert # A quick command line interface for creating a gitignore with the API from https://gitignore.io. # This script comes with a simple caching to avoid creating too much requests. @@ -11,7 +11,7 @@ CACHE_FILE="${XDG_CACHE_DIR:-$HOME/.cache}/gitignore-io.langs.json" # Check if the language list is downloaded for the last hour (3600 seconds). if [[ ! -e $CACHE_FILE ]] || test $(expr $(date "+%s") - $(date -r $CACHE_FILE "+%s")) -gt 3600 then - ping -q -c 4 "gitignore.io" && curl --silent --location "https://gitignore.io/api/list?format=json" --output $CACHE_FILE + curl --silent --location --output $CACHE_FILE "https://gitignore.io/api/list?format=json" fi KEYS=$(jq 'keys | .[] | @text' --raw-output $CACHE_FILE | fzf --multi | while read lang; do echo " .[\"$lang\"].contents"; done | paste -s -d ',') diff --git a/bin/split-album b/bin/split-album index 73bfe8d..537bada 100755 --- a/bin/split-album +++ b/bin/split-album @@ -232,7 +232,7 @@ for index in @(seq $[chapter_len]) { setvar has_error = true } - push :job_queue "ffmpeg -loglevel quiet -nostdin -i '${audio_file}' -ss ${start} $['-to ' + end if index != chapter_len else ''] ${title_slug}/${filename}" + push :job_queue ">&2 printf '[%d/%d] %s\\n' $[index] $[chapter_len] \"$[output_data['chapters'][index - 1]['title']]\" && ffmpeg -loglevel quiet -nostdin -i '${audio_file}' -ss ${start} $['-to ' + end if index != chapter_len else ''] ${title_slug}/${filename}" } if (has_error) { exit 1 }