#!/bin/bash # remove php arguments from url url="${1%%\?*}" # download pad's /export/txt curl $url/export/txt > export.txt # remove the weird * from framapad txt export (framapad only) # sed -i 's/^*//' export.txt # remove comments starting with // sed -i '/^\/\/*/d' export.txt # remove empty lines sed -i '/^[[:space:]]*$/d' export.txt # add tabs to each lines starting by - or # sed -i 's/^[-|#]/\t&/' export.txt # add newline before glyph id sed -i '/:$/i\ ' export.txt # remove first line sed -i '1d' export.txt # remove space EOL sed -i 's/\s*$//' export.txt # remove \n after glyph id sed -z 's/:\n/:/g' export.txt # the output should now be ready to use with the unifont utility "hexdraw" # hexdraw:convert a GNU Unifont .hex file to and from an ASCII text file