~smlavine/scripts

40980598e91a9ac539f8563fd0fb4b6d9fe16b61 — Sebastian LaVine a month ago 39fdf2b
todo: Fetch URLs with only one curl call

Depending on the amount/length of tickets in the tracker being
requested, this can shave off as much as a few seconds.
1 files changed, 1 insertions(+), 1 deletions(-)

M src/todo
M src/todo => src/todo +1 -1
@@ 19,7 19,7 @@ curl -s "$url" |
	sed -e 's:^<a href="/::' -e 's:">.*</a>$::' |
	xargs -L1 printf '%s%s\n' "$prefix" |
	grep -v "^$prefix$" | # Don't pipe if tracker isn't found
	xargs -L1 curl -s |
	xargs curl -s |
	awk -v url="$url" '
	BEGIN { print "# " url "\n" }
	/<title>/ { title = !title; next }