diff options
| -rw-r--r-- | .config/zsh/alias.zsh | 1 | ||||
| -rwxr-xr-x | .local/bin/mutt_md2html.sh | 9 | 
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?://)' | | 
