mirror of
https://github.com/correl/dotfiles.git
synced 2024-11-27 03:00:06 +00:00
[provisioning] Add html-xml-utils
Enables URL rewriting in downloaded articles
This commit is contained in:
parent
18c905163c
commit
fa12198430
2 changed files with 10 additions and 1 deletions
|
@ -20,6 +20,13 @@ if ! command -v pandoc >/dev/null; then
|
|||
ok="no"
|
||||
fi
|
||||
|
||||
if ! command -v hxcopy >/dev/null; then
|
||||
echo 'Could not find hxcopy. Get it from:' >&2
|
||||
echo ' brew install hxml-xml-utils' >&2
|
||||
echo ' or apt-get install hxml-xml-utils' >&2
|
||||
ok="no"
|
||||
fi
|
||||
|
||||
if [ "$ok" != "yes" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
@ -36,7 +43,7 @@ author=$(echo $json | jq -r '.author // "Unknown"')
|
|||
pubdate=$(echo $json | jq -r '.date_published')
|
||||
description=$(echo $json | jq -r '.excerpt // ""')
|
||||
description="${description}<br><br><a href=\"${1}\">${1}</a>"
|
||||
content=$(echo $json | jq -r .content)
|
||||
content=$(echo $json | jq -r .content | hxcopy -i "$1" -o "file:///")
|
||||
shift
|
||||
for url in "$@"; do
|
||||
echo "Parsing and appending $url" >&2
|
||||
|
|
|
@ -27,6 +27,7 @@ case $_PLATFORM in
|
|||
|
||||
# Misc
|
||||
_brew entr
|
||||
_brew html-xml-utils
|
||||
_brew htop
|
||||
_brew jq
|
||||
_brew lnav
|
||||
|
@ -55,6 +56,7 @@ case $_PLATFORM in
|
|||
|
||||
# Misc
|
||||
_apt entr
|
||||
_apt html-xml-utils
|
||||
_apt htop
|
||||
_apt jq
|
||||
_apt lnav
|
||||
|
|
Loading…
Reference in a new issue