Skip to content

Commit

Permalink
improve comparison to previous HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
entorb committed Feb 6, 2025
1 parent 7950183 commit 4d39fd1
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/check-and-ebook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,19 +125,15 @@ jobs:
ebook-convert --version
python3 --version
- name: Download previous hpmor.html
run: |
wget --quiet https://github.com/${{ github.repository }}/releases/download/WorkInProgress/hpmor.html -O hpmor-prev.html
- name: Make eBooks
run: |
wget --quiet https://github.com/${{ github.repository }}/releases/download/WorkInProgress/hpmor.html -O hpmor-prev.html
wget --quiet https://github.com/${{ github.repository }}/releases/download/WorkInProgress/hpmor.pdf -O hpmor.pdf
sh scripts/make_ebooks.sh > /dev/null
- name: Compare to previous hpmor.html
- name: Compare HTML to previous version
run: |
diff -u -s hpmor-prev.html hpmor.html > hpmor-html-diff.log || :
rm hpmor-prev.html
diff -U 0 -s hpmor-prev.html hpmor.html > hpmor-html-diff.log || :
- name: ls after
run: |
Expand Down
16 changes: 16 additions & 0 deletions scripts/ebook/step_8.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh

echo === 8. HTML comparison with latest release ===

script_dir=$(dirname $0)
cd $script_dir/../..

source_file="hpmor.html"
target_file="hpmor-html-diff.log"

echo ==== 8.1 downloading from latest release ====
wget --quiet https://github.com/entorb/hpmor-de/releases/download/WorkInProgress/hpmor.html -O hpmor-prev.html
# or use latest release, like https://github.com/rrthomas/hpmor/releases/latest/download/hpmor.html

echo ==== 8.2 diff ====
diff -U 0 -s hpmor-prev.html $source_file >$target_file
1 change: 1 addition & 0 deletions scripts/make_ebooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ python3 scripts/ebook/step_4.py
sh scripts/ebook/step_5.sh
python3 scripts/ebook/step_6.py
sh scripts/ebook/step_7.sh
echo optionally run scripts/ebook/step_8.sh to compare HTML to latest release

# rm -rf hpmor-epub*.tex
# rm -rf hpmor-epub*.html
Expand Down

0 comments on commit 4d39fd1

Please sign in to comment.