Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
4e87b48
Update convert-local.sh
hiroshisuga Jul 18, 2026
7e6f7dc
Create convert_pptx_with_bullet_and_autofit_fixes.py
hiroshisuga Jul 18, 2026
47d3f64
Create run-pptx-fixes-in-container.sh
hiroshisuga Jul 18, 2026
c5cfd5c
Create zzz-bbb-docker-libreoffice-pptx
hiroshisuga Jul 18, 2026
c6f6708
Update install-local.sh
hiroshisuga Jul 18, 2026
3e55159
Update install-local.sh
hiroshisuga Jul 18, 2026
3279789
Update convert-local.sh
hiroshisuga Jul 18, 2026
43dcdbe
Define paraIs CharacterDiscance fix only to Asian-ASCII adjacent texts
hiroshisuga Jul 19, 2026
efc1778
Update run-pptx-fixes-in-container.sh
hiroshisuga Jul 19, 2026
e01ef1f
Update run-pptx-fixes-in-container.sh
hiroshisuga Jul 19, 2026
5e2fd20
Fix mistakes in convert-local.sh
hiroshisuga Jul 20, 2026
b6c16b2
Update convert_pptx_with_bullet_and_autofit_fixes.py
hiroshisuga Jul 20, 2026
99bb037
[Fix - removing trailing spaces] Update convert_pptx_with_bullet_and_…
hiroshisuga Jul 27, 2026
6ba3d7e
[fix - trailing spaces] More strict condition
hiroshisuga Jul 27, 2026
f518127
[revert the previous changes] convert_pptx_with_bullet_and_autofit_fi…
hiroshisuga Aug 6, 2026
35a906b
Package PPTX conversion helpers and sudoers rule
hiroshisuga Sep 26, 2026
5f7c14e
Allow more time for LibreOffice UNO startup during PPTX conversion
hiroshisuga Sep 26, 2026
dec3844
Restore default UNO timeout after successful unmodified conversion
hiroshisuga Sep 26, 2026
cb550d5
Allow 30 seconds for intermittent LibreOffice UNO startup
hiroshisuga Sep 26, 2026
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
21 changes: 19 additions & 2 deletions bbb-libreoffice/assets/convert-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,23 @@ then
convertToParam="$convertToParam --writer"
fi

cp "${source}" "$tempDir/file"
sudo /usr/bin/docker run --rm --memory=1g --memory-swap=1g --network none --env="HOME=/tmp/" -w /tmp/ --user=$(printf %05d `id -u`) -v "$tempDir/":/data/ -v /usr/share/fonts/:/usr/share/fonts/:ro -v /usr/share/fontconfig/:/usr/share/fontconfig/:ro -v /etc/fonts/:/etc/fonts/:ro -v /var/cache/fontconfig/:/var/cache/fontconfig/:ro --rm bbb-soffice sh -c "timeout $(printf %03d $timeoutSecs)s /usr/bin/soffice -env:UserInstallation=file:///tmp/ $convertToParam --outdir /data /data/file"
pptxFixer="/usr/share/bbb-libreoffice-conversion/convert_pptx_with_bullet_and_autofit_fixes.py"
pptxRunner="/usr/share/bbb-libreoffice-conversion/run-pptx-fixes-in-container.sh"

if [[ "${source,,}" == *.pptx && "${convertTo,,}" == "pdf" ]]; then
if [[ ! -r "${pptxFixer}" || ! -r "${pptxRunner}" ]]; then
echo "PPTX conversion helper is not readable" >&2
exit 1
fi

cp "${source}" "${tempDir}/file.pptx"
cp "${pptxFixer}" "${tempDir}/convert_pptx_with_bullet_and_autofit_fixes.py"
cp "${pptxRunner}" "${tempDir}/run-pptx-fixes-in-container.sh"

sudo -n /usr/bin/docker run --rm --memory=1g --memory-swap=1g --network none --env="HOME=/tmp/" -w /tmp/ --user=$(printf %05d `id -u`) -v "$tempDir/":/data/ -v /usr/share/fonts/:/usr/share/fonts/:ro -v /usr/share/fontconfig/:/usr/share/fontconfig/:ro -v /etc/fonts/:/etc/fonts/:ro -v /var/cache/fontconfig/:/var/cache/fontconfig/:ro --rm bbb-soffice sh -c "timeout $(printf %03d $timeoutSecs)s /data/run-pptx-fixes-in-container.sh"
else
cp "${source}" "$tempDir/file"
sudo /usr/bin/docker run --rm --memory=1g --memory-swap=1g --network none --env="HOME=/tmp/" -w /tmp/ --user=$(printf %05d `id -u`) -v "$tempDir/":/data/ -v /usr/share/fonts/:/usr/share/fonts/:ro -v /usr/share/fontconfig/:/usr/share/fontconfig/:ro -v /etc/fonts/:/etc/fonts/:ro -v /var/cache/fontconfig/:/var/cache/fontconfig/:ro --rm bbb-soffice sh -c "timeout $(printf %03d $timeoutSecs)s /usr/bin/soffice -env:UserInstallation=file:///tmp/ $convertToParam --outdir /data /data/file"
fi

cp "$tempDir/file.$convertTo" "${dest}"
Loading
Loading