diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2021-05-01 11:12:23 -0400 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2021-05-01 11:12:23 -0400 |
commit | 16436494f6b7fff2eae8418746af01ee52f7565d (patch) | |
tree | 665608c8d4e858d757502e3795db3ef7821c4869 /.local/bin/groffdown | |
parent | 9ed9de5006d437e126c5871dc0cf38a02825aabb (diff) | |
parent | a8604b71a10edda8c08b909ce1fb63aca653d77e (diff) |
Merge branch 'master' of git://git.chausse.xyz/dotfiles
Diffstat (limited to '.local/bin/groffdown')
-rwxr-xr-x | .local/bin/groffdown | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/.local/bin/groffdown b/.local/bin/groffdown deleted file mode 100755 index f2810a5..0000000 --- a/.local/bin/groffdown +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -file=$(readlink -f "$1") -dir=$(dirname "$file") -base="${file%.*}" - -output=$( sed -e '1,1d - s/title:/\.TL\n/ - s/author:/\.AU\n/ - s/date:/\.ND\n/ - s/institution:/\.AI\n/ - - s/\\begin{abstract}/\.AB/ - s/\\end{abstract}/\.AE/ - - s/^\#####.\(.*\)/\.NH 5\n\1\n\.PP/g - s/^\####.\(.*\)/\.NH 4\n\1\n\.PP/g - s/^\###.\(.*\)/\.NH 3\n\1\n\.PP/g - s/^\##.\(.*\)/\.NH 2\n\1\n\.PP/g - s/^\#.\(.*\)/\.NH 1\n\1\n\.PP/g - - s/\*\*\*\(.*\)\*\*\*$/\n\.BI\ \"\1\"\ /g - s/\*\*\*\(.*\)\*\*\*\(.\)$/\n\.BI\ \"\1\"\ \"\2\"/g - s/\*\*\*\(.*\)\*\*\*\(.\)/\n\.BI\ \"\1\"\ \"\2\"\n/g - - s/\*\*\(.*\)\*\*$/\n\.B\ \"\1\"\ /g - s/\*\*\(.*\)\*\*\(.\)$/\n\.B\ \"\1\"\ \"\2\"/g - s/\*\*\(.*\)\*\*\(.\)/\n\.B\ \"\1\"\ \"\2\"\n/g - - s/\*\(.*\)\*$/\n\.I\ \"\1\"\ /g - s/\*\(.*\)\*\(.\)$/\n\.I\ \"\1\"\ \"\2\"/g - s/\*\(.*\)\*\(.\)/\n\.I\ \"\1\"\ \"\2\"\n/g - - s/`\(.*\)`$/\n\.CW\ \"\1\"\ /g - s/`\(.*\)`\(.\)$/\n\.CW\ \"\1\"\ \"\2\"/g - s/`\(.*\)`\(.\)/\n\.CW\ \"\1\"\ \"\2\"\n/g - - s/^\ ...............-\ /.IP\ \\(bu\ 10\n/g - s/^\ ...........-\ /.IP\ \\(bu\ 8\n/g - s/^\ .......-\ /.IP\ \\(bu\ 6\n/g - s/^\ ...-\ /.IP\ \\(bu\ 4\n/g - s/^-\ /.IP\ \\(bu\ 2\n/g - s/^\ .*-\ /.IP\ \\(bu\ 12\n/g - - ' $1) -# echo "$output" | groff -me -ms -kejpt -T pdf > $base.pdf - -# echo "$output" > $base.ms -# groff -ms $base.ms -T pdf > $base.pdf - -echo "$output" - -# $output >> output.ms -# s/\*\*\*.*\*\*\*/Hi\1hi/g |