odk: update DevGuide wiki links after import into TDF wiki
Change-Id: I5a698250db7e822f8d95ff43d87705df05f91c47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132784 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
|
||||
#
|
||||
# This file is part of the LibreOffice project.
|
||||
@@ -10,19 +11,24 @@
|
||||
# wikilinks.py:
|
||||
# This throwaway program can be used to convert idl_chapter_refs.txt to a
|
||||
# "fake" IDL file that can be fed to doxygen to get the DevGuide Wiki links.
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# In core, generate a file letting us know what kinds of entities to declare:
|
||||
# cat <(make -s cmd cmd='LD_LIBRARY_PATH=$(INSTDIR_FOR_BUILD)/program $(WORKDIR_FOR_BUILD)/LinkTarget/Executable/unoidl-read --summary $(INSTDIR)/program/types.rdb') <(make -s cmd cmd='LD_LIBRARY_PATH=$(INSTDIR_FOR_BUILD)/program $(WORKDIR_FOR_BUILD)/LinkTarget/Executable/unoidl-read --summary $(INSTDIR)/program/types.rdb $(INSTDIR)/program/types/offapi.rdb') | LC_ALL=C sort | LC_ALL=C uniq > /tmp/kinds
|
||||
#
|
||||
# Run the script while feeding it the chapter references and output the fake IDL:
|
||||
# python wikilinks.py < idl_chapter_refs.txt > generated_idl_chapter_refs.idl
|
||||
|
||||
import sys
|
||||
|
||||
devguidewww = "http://wiki.openoffice.org/wiki/"
|
||||
devguidewww = "https://wiki.documentfoundation.org/"
|
||||
in_topic = False
|
||||
link = None
|
||||
description = None
|
||||
allthings = {}
|
||||
allkinds = {}
|
||||
|
||||
# unfortunately we need to know what kind of entity to declare...
|
||||
# generate this file like so:
|
||||
# cat <(make -s cmd cmd='LD_LIBRARY_PATH=$(INSTDIR_FOR_BUILD)/program $(WORKDIR_FOR_BUILD)/LinkTarget/Executable/unoidl-read --summary $(INSTDIR)/program/types.rdb') <(make -s cmd cmd='LD_LIBRARY_PATH=$(INSTDIR_FOR_BUILD)/program $(WORKDIR_FOR_BUILD)/LinkTarget/Executable/unoidl-read --summary $(INSTDIR)/program/types.rdb $(INSTDIR)/program/types/offapi.rdb') | LC_ALL=C sort | LC_ALL=C uniq > /tmp/kinds
|
||||
for line in open("/tmp/kinds") :
|
||||
(kind,_,name) = line.strip().partition(" ")
|
||||
allkinds[name] = kind
|
||||
@@ -43,7 +49,8 @@ for line in sys.stdin :
|
||||
else:
|
||||
allthings[sline] = [(link, description)]
|
||||
|
||||
print("/* this file was generated from idl_chapter_refs.txt by wikilinks.py */")
|
||||
print("""/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||
/* this file was generated from idl_chapter_refs.txt by wikilinks.py */""")
|
||||
|
||||
for key in allthings:
|
||||
kind = allkinds[key]
|
||||
|
Reference in New Issue
Block a user