Bash Script and markdown to generate readmes per patched font directory (fixes #52)

* helps clarify the differences between 'complete', 'alternative' and 'minimal'
This commit is contained in:
ryanoasis 2016-04-17 14:00:03 -04:00
parent 52e9a9537e
commit dc775a7819
2 changed files with 67 additions and 0 deletions

View file

@ -0,0 +1,30 @@
## Which font?
### TL;DR
0. Pick your font family and then select from the `'complete'` directory.
* Are you on Windows? Pick a font with the suffix `'Windows Compatible'`
* Are you limited to mono fonts (because of your terminal, etc)? Pick a font with the suffix `'Mono'`
### Explanation
Once you narrow done your font choice of family (Droid Sans, Inconsolata, etc) and style (bold, italic, etc) you are provided with 3 main folders choices:
* complete
* This is most likely the one you want. It includes **all** of the glyphs from all of the glyph sets. Only caution here is that some fonts have glyphs in the _same_ code point so to include everything some had to be moved to alternate code points.
* alternative
* This attempts to contain _all permutations_ of the various glyphs. E.g. You want the font with only [Octicons][octicons] or you want the font with just [Font Awesome][font-awesome] and [Devicons][vorillaz-devicons]. The goal is to provide every combination possible in this folder.
* minimal
* This contains just the glyphs needed to use [vim-devicons][vim-devicons]. This is mostly provided for historical purposes. This might end up being removed at some point if it ends up causing too much confusion and/or providing little purpose in the grand scheme of things.
For more information see: [The FAQ](https://github.com/ryanoasis/nerd-fonts/wiki/FAQ#which-font)
[vim-devicons]:https://github.com/ryanoasis/vim-devicons
[vorillaz-devicons]:http://vorillaz.github.io/devicons/
[font-awesome]:https://github.com/FortAwesome/Font-Awesome
[octicons]:https://github.com/github/octicons
[gabrielelana-pomicons]:https://github.com/gabrielelana/pomicons
[Seti-UI]:https://atom.io/themes/seti-ui
[ryanoasis-powerline-extra-symbols]:https://github.com/ryanoasis/powerline-extra-symbols

View file

@ -0,0 +1,37 @@
#!/bin/bash
# version: 0.7.0
# Iterates over all patched fonts directories
# converts all non markdown readmes to markdown (e.g. txt, rst) using pandoc
# adds information on minimal, alternative, and complete font variations
cd patched-fonts/
#find ./DejaVuSansMono -type d | # uncomment to test 1 font
find -type d | # uncomment to do ALL fonts
while read filename
do
echo "$filename" # ... or any other command using $filename
RST=( $(find $filename -type f -iname 'readme.rst' -exec basename {} \;) )
TXT=( $(find $filename -type f -iname 'readme.txt' -exec basename {} \;) )
echo "RST:"
echo $RST
echo "end"
if [ $RST ];
then
echo "found RST"
pandoc "$filename/$RST" --from=rst --to=markdown --output=$filename/README.md
echo "pandoc $filename/$RST --from=rst --to=markdown --output=$filename/README.md"
echo "pwd $PWD"
cat $PWD/../source/readme-per-directory-addendum.md >> $filename/README.md
elif [ $TXT ];
then
echo "found TXT"
echo "nothing to do for conversion, just copy as markdown"
cp $filename/$TXT $filename/README.md
echo "pwd $PWD"
cat $PWD/../source/readme-per-directory-addendum.md >> $filename/README.md
else
echo "did not find RST nor TXT"
cat $PWD/../source/readme-per-directory-addendum.md >> $filename/README.md
fi
done