31 lines
1.2 KiB
Plaintext
31 lines
1.2 KiB
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
# Copyright 2015 jnphilipp <me@jnphilipp.org>
|
||
|
#
|
||
|
# This file is part of qutebrowser.
|
||
|
#
|
||
|
# qutebrowser is free software: you can redistribute it and/or modify
|
||
|
# it under the terms of the GNU General Public License as published by
|
||
|
# the Free Software Foundation, either version 3 of the License, or
|
||
|
# (at your option) any later version.
|
||
|
#
|
||
|
# qutebrowser is distributed in the hope that it will be useful,
|
||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
# GNU General Public License for more details.
|
||
|
#
|
||
|
# You should have received a copy of the GNU General Public License
|
||
|
# along with qutebrowser. If not, see <http://www.gnu.org/licenses/>.
|
||
|
|
||
|
# Opens all links to feeds defined in the head of a site
|
||
|
#
|
||
|
# Ideal for use with tabs-are-windows. Set a hotkey to launch this script, then:
|
||
|
# :bind gF spawn --userscript openfeeds
|
||
|
#
|
||
|
# Use the hotkey to open the feeds in new tab/window, press 'gF' to open
|
||
|
#
|
||
|
|
||
|
grep cat ${QUTE_HTML} | grep "<link[^>]*rel=\"alternate\"[^>]*>" | grep -E "(application/((rss|rdf|atom)\+)?xml|text/xml)" | grep -oE "href=\"([^\"]+)\"" | cut -d\" -f2 | while read -r line ; do
|
||
|
echo "open -t ${line}" >> "$QUTE_FIFO"
|
||
|
done
|