config: adjust formats

This commit is contained in:
xeruf 2022-11-19 19:58:57 +01:00
parent 2e26d955ad
commit 268f533e9a
3 changed files with 16 additions and 2 deletions

View File

@ -144,7 +144,8 @@ Version 2019-11-04 2021-02-16"
:desc "Markdown to Zulip" "mam" "4dip
:%s/<\\/?span ?[^ >]*>//g
:%s/\\n\\n<a id=.*<\\/a>\\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

View File

@ -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

9
.local/bin/scripts/mdoh Executable file
View File

@ -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