diff --git a/.config/doom/config.el b/.config/doom/config.el index b95b43f..9f9ace3 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -144,7 +144,8 @@ Version 2019-11-04 2021-02-16" :desc "Markdown to Zulip" "mam" "4dip :%s/<\\/?span ?[^ >]*>//g :%s/\\n\\n\\n\\n//g -:%s/<\\(http[^ \\n]+\\)>/\\1/g " +:%s/<\\(http[^ \\n]+\\)>/\\1/g +:%s/\\\\<\\(.*\\)\\\\>/<\\1>/g " ;:%s/\\n *\\n /\\n / ;:%s/ / /g " ) @@ -469,7 +470,7 @@ Version 2019-11-04 2021-02-16" org-journal-created-property-timestamp-format time-stamp-format org-journal-carryover-delete-empty-journal 'always org-journal-date-format (concat "[" time-stamp-bare " %3a]") - ;org-journal-time-format "%02H " + org-journal-time-format "%02H " ) :config ; TODO map njj to open-or-create-entry diff --git a/.config/shell/functions b/.config/shell/functions index c12d7bf..c2ad6ac 100644 --- a/.config/shell/functions +++ b/.config/shell/functions @@ -243,6 +243,10 @@ del() { m "$@" $trash } +curlh() { + curl -v --location "$@" >/dev/null +} + u() { # Line below handy for users of netkeeper sudo nft list ruleset | grep -q outall && echo "Suspending netkeeper" >&2 | echo sysupgrade | netkeeper 30 2>/dev/null diff --git a/.local/bin/scripts/mdoh b/.local/bin/scripts/mdoh new file mode 100755 index 0000000..72f0c93 --- /dev/null +++ b/.local/bin/scripts/mdoh @@ -0,0 +1,9 @@ +#!/bin/sh +# Transforms org to markdown using a simplified regex +sed ':o; s/_\(\w[^_]*\w\)_/\/\1\//g; + /^#\+ /{ + s/^#/*/; To; + :b; s/^\(\**\)#/\1*/g; tb; + n; s/^$//; To; D + }' "$@" +# echo "# one\n\n# two\n## under #two\n_hello under_two_\nnumber #1" | mdoh