logo

dotfiles

My dotfiles, one branch per machine, rebased on base git clone https://hacktivis.me/git/dotfiles.git
commit: d4f5fb62f00ebbfef7d9b7b85280778e70e354ac
parent 9ce0b8ce4e610b9ce4302227ffa5935431bc0a62
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Fri,  9 Apr 2021 08:51:22 +0200

equery2bookmarks: New bin

Diffstat:

A.local/bin/equery2bookmarks27+++++++++++++++++++++++++++
M.local/share/badwolf/bookmarks.xbel1+
2 files changed, 28 insertions(+), 0 deletions(-)

diff --git a/.local/bin/equery2bookmarks b/.local/bin/equery2bookmarks @@ -0,0 +1,27 @@ +#!/bin/sh +# Puts the homepage of all installed packages into XBEL bookmarks (for badwolf) +( +cat <<EOF +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE xbel PUBLIC "+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML" + "http://www.python.org/topics/xml/dtds/xbel-1.0.dtd"> + +<xbel> +EOF + +#equery l -F '$cp' '*/*' \ +# | while read pkg; do +# cat "/var/db/pkg/${pkg}"*"/HOMEPAGE" \ +# | tr ' ' '\n' \ +# | sed -r -e 's/\&/\&amp;/' -e 's;(.*);<bookmark href="\1"><title>'$pkg'</title></bookmark>;' +# done 2>/dev/null \ +# | sort -u + +ls /var/db/pkg/*/*/HOMEPAGE \ + | xargs cat \ + | tr ' ' '\n' \ + | sort -u \ + | sed -r -e 's/\&/\&amp;/' -e 's;(.*);<bookmark href="\1"><title>\1</title></bookmark>;' + +echo '</xbel>' +) > ${XDG_DATA_HOME:-$HOME/.local/share}/badwolf/bookmarks-equery.xbel diff --git a/.local/share/badwolf/bookmarks.xbel b/.local/share/badwolf/bookmarks.xbel @@ -4,4 +4,5 @@ <xbel xmlns:xi="http://www.w3.org/2001/XInclude" xml:space="preserve"> <xi:include href="file:///home/haelwenn/Sources/git/hacktivis.me/git/blog/bookmarks.xbel" parse="xml" xpointer="xpointer(/xbel/*)"/> <xi:include href="file:///home/haelwenn/.elinks/bookmarks.xbel" parse="xml" xpointer="xpointer(/xbel/*)"/> + <xi:include href="file:///home/haelwenn/.local/share/badwolf/bookmarks-equery.xbel" parse="xml" xpointer="xpointer(/xbel/*)" /> </xbel>