summaryrefslogtreecommitdiffstats
path: root/bin/check-implementer-notes.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:54:39 +0000
commit267c6f2ac71f92999e969232431ba04678e7437e (patch)
tree358c9467650e1d0a1d7227a21dac2e3d08b622b2 /bin/check-implementer-notes.py
parentInitial commit. (diff)
downloadlibreoffice-267c6f2ac71f92999e969232431ba04678e7437e.tar.xz
libreoffice-267c6f2ac71f92999e969232431ba04678e7437e.zip
Adding upstream version 4:24.2.0.upstream/4%24.2.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'bin/check-implementer-notes.py')
-rwxr-xr-xbin/check-implementer-notes.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/bin/check-implementer-notes.py b/bin/check-implementer-notes.py
new file mode 100755
index 0000000000..e637563d2f
--- /dev/null
+++ b/bin/check-implementer-notes.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+import json, re, subprocess, sys, urllib3
+
+http = urllib3.PoolManager()
+
+# TDF implementer notes pages for LibreOffice
+wiki_pages = [
+ 'https://wiki.documentfoundation.org/api.php?action=parse&format=json&page=Development/ODF_Implementer_Notes/List_of_LibreOffice_ODF_Extensions&prop=wikitext',
+ 'https://wiki.documentfoundation.org/api.php?action=parse&format=json&page=Development/ODF_Implementer_Notes/List_of_LibreOffice_OpenFormula_Extensions&prop=wikitext']
+
+# get all commit hashes mentioned in implementer notes
+wiki_commit_hashes = {}
+query = re.compile(r'\{\{commit\|(\w+)\|\w*\|\w*\}\}', re.IGNORECASE)
+for page in wiki_pages:
+ r = http.request('GET', page)
+ data = json.loads(r.data.decode('utf-8'))
+ for line in data['parse']['wikitext']['*'].split('\n'):
+ for res in query.finditer(line):
+ wiki_commit_hashes[res.group(1)] = ''
+
+# get all commits that change core/schema/* - and are _not_ mentioned
+# in the wiki page
+# Cut-off is May 18th 2020, when Michael Stahl had finished cleaning this up
+for commit in subprocess.check_output(
+ ['git', '--no-pager', '-C', sys.path[0]+'/..', 'log',
+ '--since=2020-05-18', '--format=%H', '--', 'schema/'],
+ stderr=subprocess.STDOUT).decode("utf-8").split("\n"):
+ if commit != '' and commit not in wiki_commit_hashes:
+ print('missing commit: %s' % commit)
+