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

⌈⌋ branch:  PageTranslate


Check-in [6d343a41cc]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:remove configfile stub
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1:6d343a41ccaa4eae29bd21ba5b4debeb543b8e2a
User & Date: mario 2020-05-25 17:33:27
Context
2020-05-25
17:33
remove configfile stub Leaf check-in: 6d343a41cc user: mario tags: trunk
17:22
Remove some logging, fix setLevel on debug mode. Move config dialog into Language settings leave. Remove `crlf` in favour of `quick` mode. check-in: 10276ceb8e user: mario tags: trunk, 1.3
Changes

Deleted pythonpath/_configfile.py.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os, json


# config file
env = os.environ.get
class config:
    fn = env("XDG_CONFIG_HOME", env("APPDATA", env("HOME", "")+"/.config"))+"/libreoffice/pagetranslate.json"
    @staticmethod
    def read():
        try:
            return json.load(open(config.fn, "r"))
        except Exception as e:
            log.warning("no config file (yet?)")
            return {}
    @staticmethod
    def write(params):
        try:
            return json.dump(params, open(config.fn, "w"))
        except Exception as e:
            log.error("couldn't write to config file")
    @staticmethod
    def map():
        c = config.read()
        c["crlf"] = "quick" if c.get("quick") else "iterate"
        if c.get("debug"):
            c["log"] = "debug"
        return c
        
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<