Skip to content

Commit

Permalink
sed script
Browse files Browse the repository at this point in the history
  • Loading branch information
wpears committed Mar 7, 2024
1 parent 3abece1 commit 7fb0f7c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/save-ecfr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
curl -sSL "https://www.ecfr.gov/api/renderer/v1/content/enhanced/${{ steps.date.outputs.value }}/title-12?chapter=X&part=${PART}" |
htmlq -r 'h1, h2, .source, .authority, .citation' |
htmlq -t '.part' |
sed -e '/^ *$/d' -e 's/ / /g' -e 's/–/-/g' |
./sed.sh |
awk '{$1=$1};1' > "./ecfr/${PART}.txt"
done
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/save-iregs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
curl -sSL "${CHUNKS[@]}" |
htmlq -r '.regulation-meta, .inline-interpretation, .block__sub, .o-regulations-wayfinder' |
htmlq -t '.u-layout-grid_main' |
sed -e '/^ *$/d' -e 's/ / /g' -e 's/–/-/g' |
./sed.sh |
awk '{$1=$1};1' > "./iregs/${PART}.txt"
sleep 1
done
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/sed.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

sed -e '/^ *$/d' -e 's/ / /g' -e 's/–/-/g' -e "s/’/'/g"

0 comments on commit 7fb0f7c

Please sign in to comment.