tdf#137335 calculate paragraph height in RTF/DOCX
[LibreOffice.git] / bin / check-implementer-notes.py
blob24e4049ddebadb0a285e00f7148fcb748b3c7477
1 #!/usr/bin/env python
3 import json
4 import re
5 import subprocess
6 import sys
7 import urllib3
9 http = urllib3.PoolManager()
11 # TDF implementer notes pages for LibreOffice
12 wiki_pages = [
13 'https://wiki.documentfoundation.org/api.php?action=parse&format=json&page=Development/ODF_Implementer_Notes/List_of_LibreOffice_ODF_Extensions&prop=wikitext',
14 'https://wiki.documentfoundation.org/api.php?action=parse&format=json&page=Development/ODF_Implementer_Notes/List_of_LibreOffice_OpenFormula_Extensions&prop=wikitext']
16 # get all commit hashes mentioned in implementer notes
17 wiki_commit_hashes = {}
18 query = re.compile(r'\{\{commit\|(\w+)\|\w*\|\w*\}\}', re.IGNORECASE)
19 for page in wiki_pages:
20 r = http.request('GET', page)
21 data = json.loads(r.data.decode('utf-8'))
22 for line in data['parse']['wikitext']['*'].split('\n'):
23 for res in query.finditer(line):
24 wiki_commit_hashes[res.group(1)] = ''
26 # get all commits that change core/schema/* - and are _not_ mentioned
27 # in the wiki page
28 # Cut-off is May 18th 2020, when Michael Stahl had finished cleaning this up
29 for commit in subprocess.check_output(
30 ['git', '--no-pager', '-C', sys.path[0]+'/..', 'log',
31 '--since=2020-05-18', '--format=%H', '--', 'schema/'],
32 stderr=subprocess.STDOUT).decode("utf-8").split("\n"):
33 if commit != '' and commit not in wiki_commit_hashes:
34 print('missing commit: %s' % commit)