[generate-themes-doc.fish] Ignore '.git' suffix on theme URLs (#472)

* Ignore '.git' suffix on theme URLs.
* Regenerated the Themes doc (after a long hiatus)
This commit is contained in:
Itzik Ephraim 2017-01-22 03:25:00 +02:00 committed by Derek W. Stavis
parent 38d4badbd2
commit 284f5b5518
2 changed files with 709 additions and 265 deletions

File diff suppressed because it is too large Load Diff

View File

@ -35,9 +35,9 @@ echo "Generating Themes documentation to $theme_doc ..."
echo "# Available themes" > $temp_theme_toc
for theme in (command find $project_dir/db/themes/ -type f|sort)
set -l name (echo $theme|xargs basename)
set -l url (cat $theme)
set -l raw_content (echo $url|sed -r 's#https://github.com/([-.a-z0-9]+)/([-.a-z0-9]+)#https://raw.githubusercontent.com/\1/\2/master#gi')
set -l name (basename $theme)
read -l url < $theme
set -l raw_content (echo $url | sed -r 's#\.git$#/#i; s#https://github.com/([-.a-z0-9]+)/([-.a-z0-9]+)#https://raw.githubusercontent.com/\1/\2/master#i')
set -l readme (__find_readme $raw_content)
echo "- [$name](#$name)" >> $temp_theme_toc