LibreOffice plugin to pipe whole Writer documents through Google Translate, that ought to keep most of the page formatting.

⌈⌋ branch:  PageTranslate


Artifact [48a25365c3]

Artifact 48a25365c3f8cb6f4ace4732e59e4cec5d8f7e9f:

  • File Makefile — part of check-in [e93c2ef456] at 2022-10-31 09:08:05 on branch trunk — release as 2.1 (user: mario size: 1412)

.PHONY:	xhp lo aoo gui tk_translate help pylint version oxt test

all:	xhp version oxt install

install:
	unopkg remove vnd.include-once.pagetranslate
	unopkg add --log-file log.txt -s pagetranslate.oxt

version: # https://fossil.include-once.org/versionnum/
	which version  &&  version  --read pagetranslate.py  --incr  --write pagetranslate.py  --write description.xml  ||  true

oxt:
	zip pagetranslate.oxt -9 -r META-INF pagetranslate.py *xcu *xcs *xdl *desc* icons pythonpath/ help NEWS -x '*/__pycache__/*'

aoo:	version oxt
	#/opt/openoffice4/program/unopkg remove pagetranslate.oxt
	/opt/openoffice4/program/unopkg add pagetranslate.oxt
	# Shift+F1 for UNO names of widgets
	HELP_DEBUG=true /opt/openoffice4/program/soffice -writer

lo:	lo74

lo7:	lo74

lo74:	version oxt
	/opt/libreoffice7.4/program/unopkg add pagetranslate.oxt
	/opt/libreoffice7.4/program/soffice --writer --norestore
	tail /tmp/pagetranslate-libreoffice.log
	
lo71:	version oxt
	/opt/libreoffice7.1/program/unopkg add pagetranslate.oxt
	/opt/libreoffice7.1/program/soffice --writer


help:	xhp

xhp:
	make -C help/en/vnd.include-once.pagetranslate/

pip:
	make -C pythonpath

gui:	tk_translate

setup:
	./setup.py bdist_wheel
	# twine upload dist/*

tk_translate:
	./setup.py bdist_wheel

pylint:
	PYTHONPATH=./pythonpath/:/opt/libreoffice7.1/program/ pylint pagetranslate.py pythonpath/translationbackends.py

test:
	pytest -vv -ra