Comment

Comment by chmod775

You can do feature creep for a long time. If you just want a basic working version (that will probably drain your battery), that can be done really quickly.

This took me ~10 minutes:

    #!/bin/sh
    set -e
    while true; do
        URLS="$(xsel | grep -Eo "(http|https)://[a-zA-Z0-9./?=_%:-]*")" &&
        if [[ ! "${URLS}" = "${OLD_URLS}" ]]; then
            echo "${URLS}" >> urls.txt
            OLD_URLS="${URLS}"
        fi
        sleep 1
    done;
parent chmod775 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton