# 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/.
# Use this script to retrieve information from https://crashreport.libreoffice.org # about a specific version of LibreOffice # Usage sample: ./crashreportScraper.py --version 7.2.0.4 --repository /path/to/libreoffice/repository/
import argparse import requests from bs4 import BeautifulSoup import sys import os from datetime import datetime import urllib.parse import re import git
def convert_str_to_date(value):
value = value.replace('.', '')
value = value.replace('March', 'Mar')
value = value.replace('April', 'Apr')
value = value.replace('June', 'Jun')
value = value.replace('July', 'Jul')
value = value.replace('Sept', 'Sep') # reset the time leaving the date
value = ", ".join(value.split(", ")[:-1]) return datetime.strptime(value, '%b %d, %Y')
# get most recent version # symbols on linux are not very informative generally if currentOS == "windows"and currentVersion > version:
version = currentVersion
ID = currentID
OS = currentOS
with open(fileName, "w") as f:
f.write(HtmlHeader.replace("%VERSION%", args.version))
f.write("<table class=\"sortable\">")
f.write("<thead>")
f.write("<tr>") for name in tableHeader:
f.write("<th>" + name + "</th>")
f.write("</tr>")
f.write("</thead>")
f.flush()
f.write("<tbody>")
count = 0 for k, lDate in crashes.items(): if k notin crashesInFile:
print("Parsing " + k)
f.write("<tr>") try:
crashCount, crashID, crashOS = parse_reports_and_get_most_recent_report_from_last_page( "https://crashreport.libreoffice.org/stats/signature/" + urllib.parse.quote(k)) if crashCount == 0: continue
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.