Skip to content

Commit

Permalink
Add directory listing to bookmarks/
Browse files Browse the repository at this point in the history
  • Loading branch information
Xerbo committed Jul 21, 2022
1 parent d1b312b commit 87042d3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ jobs:
python3 sdrsharp_bookmarks.py &&
python3 gqrx_bookmarks.py &&
mkdir bookmarks &&
mv sdrpp_bookmarks.json sdrsharp_bookmarks.xml gqrx_bookmarks.csv bookmarks
mv sdrpp_bookmarks.json bookmarks/sdrpp.json &&
mv sdrsharp_bookmarks.xml bookmarks/sdrsharp.xml &&
mv gqrx_bookmarks.csv bookmarks/gqrx.csv
- name: Upload bookmarks
uses: actions/upload-artifact@v3
Expand All @@ -35,16 +37,8 @@ jobs:
name: satfreq
path: satfreq.json

- name: Generate json/ directory listing
run: |
cd json &&
(echo '<!DOCTYPE html><html><body><ul><li><a href="..">..</a></li>'
for i in *; do
if [ "$i" != "index.html" ]; then
echo "<li><a href=\"$i\">$i</a></li>"
fi
done
echo '</ul></body></html>') > index.html
- name: Generate directory listings
run: cd json && ../make_html_listing.sh && cd ../bookmarks && ../make_html_listing.sh

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ <h2>Downlinks:</h2>
<a href="https://github.com/sgcderek/satfreq">GitHub repository</a><br/>
<a href="json/">Raw JSON files</a><br/>
<a href="satfreq.json">Raw JSON catalogue</a><br/>
<a href="bookmarks/">SDR bookmarks</a><br/>
</footer>
</nav>
<main>
Expand Down
8 changes: 8 additions & 0 deletions make_html_listing.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash
(echo '<!DOCTYPE html><html><body><ul><li><a href="..">..</a></li>'
for i in *; do
if [ "$i" != "index.html" ]; then
echo "<li><a href=\"$i\">$i</a></li>"
fi
done
echo '</ul></body></html>') > index.html

0 comments on commit 87042d3

Please sign in to comment.