Kam gerade in einer Mail, die mir der liebe Mrf gevorwärtst hat. Ursprünglich über die netaudio Mailingliste. Ein kleines Lisp Snippet hat das übrige erledigt.
(defun load-techno-urls (file)
(with-open-file (s file :direction :input)
(loop for l = (read-line s nil 'eof)
with last-url = nil
with res = nil
until (eql l 'eof)
do (if (and (>= (length l) 7)
(string-equal (subseq l 0 7) "http://"))
(progn
(when last-url
(push last-url res))
(setf last-url (string-trim (list #\Space #\Tab #\Newline) l)))
(if (and (>= (length l) 1)
(eql (char l 0) #\Space))
(when last-url
(push last-url res)
(setf last-url nil))
(when last-url
(setf last-url (concatenate 'string last-url l)))))
finally (return (remove-duplicates (cons last-url res) :test #'string-equal)))))