Skip to content

Commit e97ba9a

Browse files
taylorarndtCopilot
andcommitted
fix: replace DAISY Pipeline with liblouis for BRF conversion
DAISY Pipeline 2 always requires --data (TTS config) even for braille conversion — a design limitation unrelated to actual TTS. Switch to liblouisutdml (file2brl) which is the braille-only library: - No TTS needed — it's pure text-to-braille-dots translation - Simpler: pandoc extracts HTML from EPUB, file2brl produces BRF - Available as apt package on ubuntu-latest Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f88852a commit e97ba9a

1 file changed

Lines changed: 6 additions & 26 deletions

File tree

.github/workflows/build-epub.yml

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -34,37 +34,17 @@ jobs:
3434
- name: Build EPUB and Word
3535
run: node scripts/build-epub.js
3636

37-
- name: Install DAISY Pipeline 2 CLI
38-
run: |
39-
curl -sL https://github.com/daisy/pipeline-assembly/releases/download/v1.15.3/pipeline2-1.15.3_linux.zip -o pipeline2.zip
40-
unzip -q pipeline2.zip -d pipeline2
41-
ls pipeline2/
42-
43-
- name: Start DAISY Pipeline 2 service
44-
run: |
45-
PIPELINE_DIR=pipeline2/daisy-pipeline
46-
$PIPELINE_DIR/bin/pipeline2 &
47-
echo "Waiting for Pipeline service to start..."
48-
for i in $(seq 1 30); do
49-
if curl -sf http://localhost:8181/ws/alive > /dev/null 2>&1; then
50-
echo "Pipeline service is up"
51-
break
52-
fi
53-
sleep 2
54-
done
37+
- name: Install liblouis (braille translator — no TTS needed)
38+
run: sudo apt-get install -y liblouisutdml-bin
5539

5640
- name: Convert EPUB to BRF (Braille — no TTS required)
5741
continue-on-error: true
5842
run: |
5943
mkdir -p epub/brf
60-
# Create a minimal TTS config (required by DAISY Pipeline even for braille scripts)
61-
echo '<?xml version="1.0" encoding="UTF-8"?><config></config>' > /tmp/tts-config.xml
62-
# Use file:// URI as DAISY Pipeline requires it for local files
63-
pipeline2/daisy-pipeline/cli/dp2 epub3-to-pef \
64-
--source "file://$(pwd)/epub/git-going-with-github.epub" \
65-
--data "file:///tmp/tts-config.xml" \
66-
--output "$(pwd)/epub/brf/" || echo "BRF conversion failed - check dp2 logs above"
67-
ls epub/brf/ || echo "No BRF output produced"
44+
# Extract HTML from EPUB, then translate to BRF using liblouis (pure text→braille, zero TTS)
45+
pandoc epub/git-going-with-github.epub -f epub -t html5 -o /tmp/book.html
46+
file2brl /tmp/book.html epub/brf/git-going-with-github.brf || echo "BRF conversion failed"
47+
ls -lh epub/brf/ || echo "No BRF output produced"
6848
6949
- name: Upload EPUB artifact
7050
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)