summaryrefslogtreecommitdiff
path: root/help-to-wiki.py
blob: 448a1dac063cef7f3dacf0eac84a030d32121917 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
#!/usr/bin/env python
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

import sys, os, getopt, signal

sys.path.append(sys.path[0]+"/to-wiki")
import wikiconv2
import getalltitles

def usage():
    print '''
help-to-wiki.py [params] [path to l10n]

Converts .xhp files into a wiki

-h, --help            - this help
-n, --no-translations - generate only English pages
-r, --redirects       - generate also redirect pages
-t, --title-savefile  - save the title file

Most probably, you want to generate the redirects only once when you initially
populate the wiki, and then only update the ones that broke.\n'''

def create_wiki_dirs():
    dirs = [
            "Common",
            "Basic",
            "Calc",
            "Chart",
            "Draw",
            "Impress",
            "Math",
            "Writer",
            "swriter",
            "scalc",
            "simpress",
            "sdraw",
            "smath",
            "schart",
            "sbasic",
            "sdatabase"
           ]

    try:
        os.mkdir( "wiki" )
    except:
        sys.stdout.write( "wiki already generated - the wiki/ subdir exists\n" )
        sys.exit( 1 )

    for i in dirs:
        try:
            os.mkdir( "wiki/" + i )
        except:
            pass

# Langs to handle (fully translated or otherwise important)
langs = ['', 'ast', 'bg', 'bn', 'bn-IN', 'ca', 'cs', 'da', 'de', \
         'el', 'es', 'eu', 'fi', 'fr', 'hu', 'it', 'ja', 'km', \
         'ko', 'nb', 'nl', 'om', 'pl', 'pt', 'pt-BR', 'ru', \
         'sl', 'sv', 'tr', 'vi', 'zh-CN', 'zh-TW' ]

# Argument handling
try:
    opts, args = getopt.getopt(sys.argv[1:], 'hnrt', ['help', 'no-translations', 'redirects', 'title-savefile'])
except getopt.GetoptError:
    usage()
    sys.exit(1)

generate_redirects = False
title_savefile = False
for opt, arg in opts:
    if opt in ('-h', '--help'):
        usage()
        sys.exit()
    elif opt in ('-n', '--no-translations'):
        langs = ['']
    elif opt in ('-r', '--redirects'):
        generate_redirects = True
    elif opt in ('-t', '--title-savefile'):
        title_savefile = True

def signal_handler(signal, frame):
    sys.stderr.write( 'Exiting...\n' )
    sys.exit(1)

# Do the work
signal.signal(signal.SIGINT, signal_handler)

create_wiki_dirs()

print "Generating the titles..."
title_data = getalltitles.gettitles("source/text")
if title_savefile:
    with open ('alltitles.csv', 'w') as f:
        for d in title_data:
            f.write('%s;%s;%s\n' % (d[0], d[1], d[2]))

try:
    po_path = args[0]
except:
    po_path = '../translations/source'
    sys.stderr.write('Path to the .po files not provided, using "%s"\n'% po_path)

# do the work
for lang in langs:
    wikiconv2.convert(title_data, generate_redirects, lang, '%s/%s/helpcontent2/source'% (po_path, lang))

# vim:set shiftwidth=4 softtabstop=4 expandtab:
libreoffice-3-5-3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/hyperlinkcontext.hxx
AgeCommit message (Collapse)Author
2020-07-19compact namespace: ooxNoel Grandin
Change-Id: I9ea016adcec334437da45296ee325453347836ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99002 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-09tdf#42949 Fix IWYU warnings in oox/*/*hxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I3d34eb4933ad574321c0de6a650fc89dd0aa353f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90144 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2017-11-01loplugin:finalclasses in ooxNoel Grandin
Change-Id: I12c274877a0975971863456e9abdcb811ee2bd80 Reviewed-on: https://gerrit.libreoffice.org/44133 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: ooxStephan Bergmann
Change-Id: I9f1cc9940f5b31370394f789ebfaddfd6d30ca61
2017-07-31loplugin:constparams in ooxNoel Grandin
Change-Id: I43984b4ece82da39ca61a91fa14e4660298509dd Reviewed-on: https://gerrit.libreoffice.org/40581 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2013-10-23fixincludeguards.sh: ooxThomas Arnhold
Change-Id: Ibc1fb5c149461d6030749a974c6d37aa11ad0e16
2013-06-28Convert all ContextHandler-derived clases over to ContextHandler2Tor Lillqvist
Change-Id: I81f54e3b7d29a0807ec4c2f082ae00fd6e1d6138 Reviewed-on: https://gerrit.libreoffice.org/4580 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>