2016-02-27 23:25:53 +01:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
SHELL = /bin/bash
|
|
|
|
all: checks
|
|
|
|
|
2016-08-22 12:07:58 +02:00
|
|
|
checks: nolicenselanguage nofullstop longdescriptions syntaxerrors
|
2016-02-27 23:25:53 +01:00
|
|
|
|
|
|
|
noexternallink:
|
2016-08-22 12:07:58 +02:00
|
|
|
@echo -e "\nLines with no source/demo/other link:"
|
2016-02-27 23:25:53 +01:00
|
|
|
@sed -n -e '/BEGIN SOFTWARE LIST/,/END SOFTWARE LIST/ p' README.md | egrep '^ *\* ' | egrep --color=always '[a-z\.] `'
|
|
|
|
|
2016-08-22 12:07:58 +02:00
|
|
|
nolicenselanguage:
|
|
|
|
@echo -e "\nLines with only 1 or no language/license entry:"
|
|
|
|
@! sed -n -e '/BEGIN SOFTWARE LIST/,/END SOFTWARE LIST/ p' README.md | egrep '^ *\* ' | egrep -v '` `'
|
2016-02-27 23:25:53 +01:00
|
|
|
|
2016-02-27 23:58:17 +01:00
|
|
|
nofullstop:
|
2016-08-22 12:07:58 +02:00
|
|
|
@echo -e "\nLines without a full stop after description:"
|
|
|
|
@! sed -n -e '/BEGIN SOFTWARE LIST/,/END SOFTWARE LIST/ p' README.md | egrep '[a-z] \(\['
|
|
|
|
@! sed -n -e '/BEGIN SOFTWARE LIST/,/END SOFTWARE LIST/ p' README.md | egrep '[a-z] `'
|
|
|
|
|
|
|
|
longdescriptions:
|
|
|
|
@echo -e "\nDescriptions exceeding 250 chars:"
|
|
|
|
@! sed -n -e '/BEGIN SOFTWARE LIST/,/END SOFTWARE LIST/ p' README.md | egrep --only-matching '\) - [Aa-Zz|.|\(|\)|/| |,|-]*\s\(\[' README.md | grep '.\{257\}'
|
|
|
|
|
|
|
|
listlicenses:
|
|
|
|
@echo -e "\nList of licenses:"
|
|
|
|
@sed -n -e '/BEGIN SOFTWARE LIST/,/END SOFTWARE LIST/ p' README.md | egrep --only-matching '([Aa0-Zz9]|\s|\.|-)*` `' README.md | sort --unique
|
|
|
|
|
|
|
|
syntaxerrors:
|
|
|
|
@echo -e "\n Syntax errors:"
|
2016-09-02 18:54:21 +02:00
|
|
|
@! sed -n -e '/BEGIN SOFTWARE LIST/,/END SOFTWARE LIST/ p' README.md | egrep '\)\(|``|\)`'
|
2016-02-27 23:58:17 +01:00
|
|
|
|
2016-02-27 23:25:53 +01:00
|
|
|
contrib:
|
|
|
|
@git shortlog -sne
|
|
|
|
|
|
|
|
add:
|
|
|
|
@#add a new entry
|
|
|
|
@printf 'Software name: ' ;\
|
|
|
|
read Name; if [ -z "$$Name" ]; then printf 'Missing software name!\n'; exit 1 ; fi ;\
|
|
|
|
printf 'Homepage URL: ' ;\
|
|
|
|
read Url; if [ -z "$$Url" ]; then printf 'Missing main project URL!\n'; exit 1 ; fi ;\
|
|
|
|
printf 'Description (max 250 char): ' ;\
|
|
|
|
read Description; if [ -z "$$Description" ]; then printf 'Missing description!\n'; exit 1 ; fi ;\
|
|
|
|
printf 'License: ' ;\
|
|
|
|
read License; if [ -z "$$License" ]; then printf 'Missing license!\n'; exit 1 ; fi ;\
|
|
|
|
printf 'Main server-side language/platform/requirement: ' ;\
|
|
|
|
read Language; if [ -z "$$Language" ]; then printf 'Missing language!\n'; exit 1 ; fi ;\
|
|
|
|
printf 'Demo URL (if any): ' ;\
|
|
|
|
read Demo; if [ -z "$$Demo" ]; then CDemo="" ; else CDemo="[Demo]($$Demo)" ; fi ;\
|
|
|
|
printf 'Source code URL (if different from Homepage): ' ;\
|
|
|
|
read Source; if [ -z "$$Source" ]; then CSource="" ; else CSource="[Source Code]($$Source)" ; fi ;\
|
|
|
|
if [[ "$$CSource" == "" && "$$Demo" == "" ]]; \
|
|
|
|
then Moreinfo="";\ printf "debug" ;\
|
2016-05-06 01:52:46 +02:00
|
|
|
else Moreinfo=$$(echo "($$CDemo$$CSource)" | sed 's|)\[|), [|g') ;\
|
2016-02-27 23:25:53 +01:00
|
|
|
fi ;\
|
|
|
|
echo -e "Copy this entry to your clipboard, paste it in the appropriate category:\n\n" ;\
|
|
|
|
echo " * [$$Name]($$Url) - $${Description}. $$Moreinfo \`$$License\` \`$$Language\`"
|
|
|
|
|
|
|
|
|
|
|
|
#TODO ask for category and insert item accordingly
|
|
|
|
#TODO check for unsorted entries
|
|
|
|
#TODO automatically sort entries/sections
|
2016-05-06 01:52:46 +02:00
|
|
|
#TODO autoupdate contributors list
|