From dc775a7819aed19cd9379ac71e7bc576b17963a3 Mon Sep 17 00:00:00 2001 From: ryanoasis Date: Sun, 17 Apr 2016 14:00:03 -0400 Subject: [PATCH] Bash Script and markdown to generate readmes per patched font directory (fixes #52) * helps clarify the differences between 'complete', 'alternative' and 'minimal' --- source/readme-per-directory-addendum.md | 30 ++++++++++++++++++++ standardize-and-complete-readmes.sh | 37 +++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 source/readme-per-directory-addendum.md create mode 100755 standardize-and-complete-readmes.sh diff --git a/source/readme-per-directory-addendum.md b/source/readme-per-directory-addendum.md new file mode 100644 index 000000000..75a12c1b6 --- /dev/null +++ b/source/readme-per-directory-addendum.md @@ -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 diff --git a/standardize-and-complete-readmes.sh b/standardize-and-complete-readmes.sh new file mode 100755 index 000000000..5ef8125df --- /dev/null +++ b/standardize-and-complete-readmes.sh @@ -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