Skip to content

Commit

Permalink
trim whitespace in ecfr
Browse files Browse the repository at this point in the history
  • Loading branch information
wpears committed Feb 29, 2024
1 parent 758263a commit 503a4bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/save-ecfr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ jobs:
IFS="," read -a BASH_PARTS <<< "$PARTS"
for PART in "${BASH_PARTS[@]}"; do
echo "$PART"
curl -sSL "https://www.ecfr.gov/api/renderer/v1/content/enhanced/${{ steps.date.outputs.value }}/title-12?chapter=X&part=${PART}" | htmlq -t '.part' | sed '/^$/d' > "./ecfr/${PART}.txt"
curl -sSL "https://www.ecfr.gov/api/renderer/v1/content/enhanced/${{ steps.date.outputs.value }}/title-12?chapter=X&part=${PART}" |
htmlq -t '.part' |
sed '/^ *$/d' |
awk '{$1=$1};1' > "./ecfr/${PART}.txt"
done
- name: Commit text
Expand Down

0 comments on commit 503a4bc

Please sign in to comment.