Restructuring the repo
This commit is contained in:
parent
21e3cf65e6
commit
3d67598c27
45 changed files with 368 additions and 77 deletions
11
misc/mdcat
Executable file
11
misc/mdcat
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/zsh
|
||||
|
||||
MDCAT=/usr/bin/mdcat
|
||||
encoding=$(file -i "$1" | sed "s/.*charset=\(.*\)$/\1/")
|
||||
if ! iconv -f $encoding <<<"" &> /dev/null; then
|
||||
cat "$1"
|
||||
elif [[ $encoding != 'utf-8' ]]; then
|
||||
iconv -f $encoding -t 'utf-8' < "$1" | $MDCAT /dev/stdin
|
||||
else
|
||||
$MDCAT $1
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue