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

⌈⌋ ⎇ branch:  PageTranslate


Artifact [dc323439d9]

Artifact dc323439d941defda74ba913e171540674949ab2:

  • Executable file doc.py — part of check-in [ad382edca0] at 2022-10-23 05:51:31 on branch trunk — rough privacy judgement (user: mario size: 1080)

#!/usr/bin/env python3
# api: cli
# title: document backends
# description: markdown table from class attributes
# version: 0.1
#

import sys
sys.path.append("pythonpath")
from translationbackends import BackendUtils

# Generate overview list
def document_backends():
    print("| service        | brief summary                               | lang_detect | error msgs | api key🔑| test quali | prvcy |")
    print("|----------------|---------------------------------------------|-------------|------------|----------|------------|-------|")
    _re = ["log", "popup"]
    _kr = ["-", "required"]
    classes = {cls.__name__: cls for cls in set(BackendUtils.subclasses())}
    for name in sorted(classes):
        c = classes[name]
        print("| {name:<14} |{doc:<45}| {lang:<11} | {error:<10} | {key:<8} | {quality:<10s} | {privacyy:<5s} |".format(
            name=name, doc=c.__doc__, lang=c.lang_detect, error=_re[c.raises_error],
            key=_kr[c.requires_key], quality="+" * int(10 * c.is_tested), privacyy="+" * int(5 * c.privacy)
        ))

document_backends()