Updates gdl-update-todo.sh's default behaviour and fixes URL grep

This commit is contained in:
Matheus Albino
2024-06-21 23:36:32 -03:00
parent d6fa907719
commit 42376615b6

View File

@@ -12,7 +12,7 @@ show_help() {
}
should_abort_on_found=true
should_parallel_download=false
should_parallel_download=true
custom_grep_search=''
while [ "$#" -gt 0 ]; do
@@ -28,7 +28,7 @@ done
gallery_dl_path=/mnt/e/home/Documents/data-hoarding
cd "$gallery_dl_path"
urls=($(grep -v "filter" -i "$gallery_dl_path/todo.md" | grep -Eo "(http|https)://[a-zA-Z0-9./?~?=_%:-]*"))
urls=($(grep -v "filter" -i "$gallery_dl_path/todo.md" | grep -Eo "(mastodon:)?(http|https)://[a-zA-Z0-9.(/~@)?=_%:-]*"))
if [ ! -z "$custom_grep_search" ]; then
filtered_urls=()