dot

packages and services management
Log | Files | Refs | README

commit b3b3f3ea1db87d0ce5ebebe86b845ef1e65791c4
parent 1fbd9b17cd27738cc6625f569a68603e434da412
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun, 23 Apr 2017 10:35:53 +0200

Back to the GREAT

Diffstat:
Mbin/git-all | 2+-
Abin/io-url | 5+++++
Mbin/madown | 35++++++++++++-----------------------
Mbuild/dvtm | 2+-
Dstunnel | 7-------
Astunnel/stunnel.conf | 3+++
Aurl | 19+++++++++++++++++++
7 files changed, 41 insertions(+), 32 deletions(-)

diff --git a/bin/git-all b/bin/git-all @@ -3,6 +3,6 @@ shift find "$HOME" -name .git | while IFS='' read repo do - printf '\n%s\n' "${repo/.git}" + printf '\n%s\n' "${repo%/.git}" (cd "${repo%/.git}" && "$command" "$@") done diff --git a/bin/io-url b/bin/io-url @@ -0,0 +1,5 @@ +# open a link from $CONFIG/url in $BROWSER + +"${BROWSER:-chromium}" & # So that calling browser again open a new tab + +iomenu -s -p 'url' < "$CONFIG/url" | xargs "${BROWSER:-chromium}" diff --git a/bin/madown b/bin/madown @@ -1,26 +1,7 @@ awk ' BEGIN { - head = 1; pre = 0; -} - - -# document head - -head && /^[\t ]*$/ { - head = 0; - RS = "\n\n+"; - next; -} - -head && /^Title: / { - sub(/^Title: /, ""); - printf("<h1>%s</h1>\n", $0); - next; -} - -head { - next; + RS = "\n\n+"; pre = 0; } @@ -38,18 +19,25 @@ pre { } /^```.*\n```$/ { - sub(/^```/, "<pre>"); sub(/```$/, "</pre>") + sub(/^```/, "\n<pre>"); sub(/```$/, "</pre>") print; next; } /^```/ { - print("<pre>"); + print("\n<pre>"); pre = 1; RS = "\n"; next; } +# h1 - headings + +!tag && /^[\t ]*~.*~$/ { + sub(/^[\t ]*~ */, ""); sub(/^ *~$/, ""); + tag = "h1"; +} + # h2 - headings @@ -121,7 +109,8 @@ tag != "li" && previous == "li" { while (sub(/\[/, "<a href=\"")) sub(/]/, "\">@</a>"); - printf("<%s>%s</%s>\n", tag, $0, tag); + if (tag ~ /h[1-6]/) print(""); + printf("\n<%s>%s</%s>\n", tag, $0, tag); previous = tag; tag = ""; diff --git a/build/dvtm b/build/dvtm @@ -4,7 +4,7 @@ tar=http://github.com/martanne/dvtm/archive/master.tar.gz build() { - patch -Ni ~/.config/dvtm/dvtm-statusline.diff + patch -Ni "$CONFIG/dvtm/dvtm-statusline.diff" cp "$CONFIG/dvtm/config.h" config.h cp "$CONFIG/dvtm/dvtm-status" dvtm-status make PREFIX="$PREFIX" install diff --git a/stunnel b/stunnel @@ -1,7 +0,0 @@ -[irc] -accept = 127.0.0.1:6667 -connect = unix.chat:6697 - -[irc] -accept = 127.0.0.2:6667 -connect = irc.cyberia.is:6697 diff --git a/stunnel/stunnel.conf b/stunnel/stunnel.conf @@ -0,0 +1,3 @@ +[test] +accept = 4321 +connect = 1234 diff --git a/url b/url @@ -0,0 +1,19 @@ +# Learn - networking +http://calomel.org +# Communities +http://suckless.org +http://2f30.org +http://nixers.net +http://lobste.rs +# Blogs +http://gnu.moe +# Independent services +http://fuwafuwa.moe +# IRC channels +irc://irc.freenode.net#2f30 +irc://irc.freenode.net##c +irc://irc.freenode.net#!/bin/sh +irc://irc.oftc.net#suckless +irc://unix.chat:6697#unix +irc://irc.cyberia.is:6697#unix +