Skip to content

Manual to EPUB: convert to XHTML first #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 23, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/manual-epub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,19 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install HTML Tidy
run: |
apt-get update
apt-get install -y tidy

- name: Convert HTML to XHTML with Tidy
# Tidy returns 0 when all's well, 1 when there are warnings and 2 when there are errors.
run: tidy -asxhtml -utf8 -o user_guide/index.xhtml user_guide/index.html || [ $? -eq 0 -o $? -eq 1 ]

- name: Convert ebook
run: ebook-convert user_guide/index.html koreader_user_guide.epub
run: ebook-convert user_guide/index.xhtml koreader_user_guide.epub

- name: Upload
uses: actions/upload-artifact@v4
with:
Expand Down