beeckcenter / softwarecollaborative.org

The State Software Collaborative website.
https://softwarecollaborative.org/
GNU General Public License v3.0
5 stars 15 forks source link

Auto-generate the state listing #1

Open waldoj opened 3 years ago

waldoj commented 3 years ago
waldoj commented 3 years ago

This generates TSV of every project and its URL slug:

echo "URL\ttitle"; egrep "^# " *.md |sed 's/.md:#/\t/'

waldoj commented 3 years ago

This should generate TSV of every project and its states, but it doesn't, due to as-yet-unplumbed oddities in the regex dialect supported by sed:

egrep "\| states" *.md |sed 's/\.md:\|\sstates(\s+)\|\s/\t/'

waldoj commented 3 years ago

Ah-ha, this generates TSV of every project and its states:

echo "URL\tstates"; egrep "\| states" *.md |sed 's/\.md:|[[:blank:]]*states[[:blank:]]*\|[[:blank:]]*/\t/'
waldoj commented 3 years ago

I've been wondering how to execute GitHub Actions prior to pushing content out to GitHub Pages. Turns out that you need to use this GitHub Pages action as the last step.