[qutebrowser] wordfilter userscript with sed: local file fails to load.

william tonks exo660 at gmail.com
Wed Nov 2 05:37:28 CET 2016


    #!/bin/bash

    curl -o /home/william/qutetemp/oldfile ${QUTE_URL}

    sed 's:bash:fish:g' /home/william/qutetemp/oldfile >
/home/william/qutetemp/newfile

    echo "open file://home/william/qutetemp/newfile" >> "$QUTE_FIFO"


i'm trying to download the current page, filter words, and then open the
edited page in the current tab.
where it fails is on the third step, this is the error message:

Unable to load pageError while opening
file://home/william/qutetemp/newfile:

Request for opening non-local file file://home/william/qutetemp/newfile


but i don't understand why it says it's a non local file; it's definitely
on my drive. could it be the "file://"?

but when i run it as "/home/william/qutetemp/newfile" it tries to download
the file.

so it seems to succeed on the first step but sed may be making an
unreadable file.

or perhaps line 7 is somehow wrong.


and when/if this works how do i run it? i intend to have it run on every
page load but i'm not sure how to accomplish that.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.schokokeks.org/pipermail/qutebrowser/attachments/20161101/80507c31/attachment.html>


More information about the qutebrowser mailing list