summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <bousset.rudy@gmail.com>2022-07-06 18:01:21 +0200
committerJoe <bousset.rudy@gmail.com>2022-07-06 18:01:21 +0200
commit5877ad10d45de3b30c48752b9b3fcf9ec500e524 (patch)
treee53af9746b5a7d3fc7fe329e749174e3b9aac73a
parentupdate (diff)
downloaddotfiles-bsd-5877ad10d45de3b30c48752b9b3fcf9ec500e524.tar.gz
dotfiles-bsd-5877ad10d45de3b30c48752b9b3fcf9ec500e524.tar.bz2
dotfiles-bsd-5877ad10d45de3b30c48752b9b3fcf9ec500e524.tar.xz
dotfiles-bsd-5877ad10d45de3b30c48752b9b3fcf9ec500e524.tar.zst
dotfiles-bsd-5877ad10d45de3b30c48752b9b3fcf9ec500e524.zip
updat
-rw-r--r--.config/zsh/alias.zsh1
-rwxr-xr-x.local/bin/mutt_md2html.sh9
2 files changed, 5 insertions, 5 deletions
diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh
index 7608b7a..57e88c3 100644
--- a/.config/zsh/alias.zsh
+++ b/.config/zsh/alias.zsh
@@ -56,6 +56,7 @@ alias \
irssi='irssi --config="$XDG_CONFIG_HOME"/irssi/config --home="$XDG_DATA_HOME"/irssi' \
irc='irssi' \
free='freecolor' \
+ gt='gpg-tui' \
dgit='git --git-dir=$HOME/docs/dotfiles-bsd --work-tree=$HOME' \
confgit='git --git-dir=$HOME/docs/conffiles-bsd --work-tree=/' \
gjdo='/usr/home/jozan/dev/perl/gitjoe-scripts/gitjoe-do.pl'
diff --git a/.local/bin/mutt_md2html.sh b/.local/bin/mutt_md2html.sh
index 9915f96..a7e3ebe 100755
--- a/.local/bin/mutt_md2html.sh
+++ b/.local/bin/mutt_md2html.sh
@@ -11,12 +11,15 @@ img_count=$(grep -Eo '!\[[^]]*\]\([^)]+' "$markdown_file" |
cut -d '(' -f 2 |
grep -Evc '^(cid:|https?://)')
if [ "$img_count" -gt 0 ]; then
+ printf '<first-entry><tag-entry><group-related>' >>"$commands_file"
+ printf '<attach-file>"%s"<enter><first-entry><detach-file>' \
+ "$markdown_file" >>"$commands_file"
grep -Eo '!\[[^]]*\]\([^)]+' "$markdown_file" | cut -d '(' -f 2 |
grep -Ev '^(cid:|https?://)' |
while read -r file; do
real_file=$(echo "$file" | sed "s#~#$HOME#g")
id="cid:$(md5 "$real_file" | rev | cut -d ' ' -f 1 | rev)"
- sed -i '.orig' "s#$file#$id#g" "$markdown_file"
+ sed -i '' "s#$file#$id#g" "$markdown_file"
{
printf '<attach-file>"%s"<enter>' "$real_file"
printf '<toggle-disposition>'
@@ -24,9 +27,6 @@ if [ "$img_count" -gt 0 ]; then
printf '<tag-entry>'
} >>"$commands_file"
done
- printf '<first-entry><tag-entry><group-related>' >>"$commands_file"
- printf '<attach-file>"%s"<enter><first-entry><detach-file>' \
- "$markdown_file" >>"$commands_file"
fi
pandoc -f markdown -t html5 --standalone "$markdown_file" >"$html_file"
@@ -38,7 +38,6 @@ pandoc -f markdown -t html5 --standalone "$markdown_file" >"$html_file"
printf '<tag-entry><previous-entry><tag-entry>'
printf '<group-alternatives>'
} >>"$commands_file"
-
# if [ "$img_count" -gt 0 ]; then
# grep -Eo '!\[[^]]*\]\([^)]+' "${markdown_file}.orig" | cut -d '(' -f 2 |
# grep -Ev '^(cid:|https?://)' |