logo

dotfiles

My dotfiles, one branch per machine, rebased on base git clone https://anongit.hacktivis.me/git/dotfiles.git/

equery2bookmarks (801B)


  1. #!/bin/sh
  2. # Puts the homepage of all installed packages into XBEL bookmarks (for badwolf)
  3. (
  4. cat <<EOF
  5. <?xml version="1.0" encoding="UTF-8"?>
  6. <!DOCTYPE xbel PUBLIC "+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML"
  7. "http://www.python.org/topics/xml/dtds/xbel-1.0.dtd">
  8. <xbel>
  9. EOF
  10. #equery l -F '$cp' '*/*' \
  11. # | while read pkg; do
  12. # cat "/var/db/pkg/${pkg}"*"/HOMEPAGE" \
  13. # | tr ' ' '\n' \
  14. # | sed -r -e 's/\&/\&amp;/' -e 's;(.*);<bookmark href="\1"><title>'$pkg'</title></bookmark>;'
  15. # done 2>/dev/null \
  16. # | sort -u
  17. ls /var/db/pkg/*/*/HOMEPAGE \
  18. | xargs cat \
  19. | tr ' ' '\n' \
  20. | sort -u \
  21. | sed -r -e 's/\&/\&amp;/' -e 's;(.*);<bookmark href="\1"><title>\1</title></bookmark>;'
  22. echo '</xbel>'
  23. ) > ${XDG_DATA_HOME:-$HOME/.local/share}/badwolf/bookmarks-equery.xbel