Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  xmltools_dep_wrapper   Sprache: C

 

#!/usr/bin/env python3

# A small wrapper around xmllint and xsltproc that collects dependency
# information (in gcc's format) using --load-trace.

import argparse
import re
import subprocess
import sys

parser = argparse.ArgumentParser(
    description='generate dependency file for docs')

parser.add_argument('--targetname', type=str, required=False, nargs='+')
parser.add_argument('--depfile', type=str, required=False)
parser.add_argument('--tool', type=str, required=True)
parser.add_argument('flags', nargs='*')

args = parser.parse_args()

if args.depfile:
    command = [args.tool, '--load-trace'] + args.flags

    # list of targets that depend on the loaded files we see via --load-trace
    line_start = ' '.join(args.targetname) + ': '

    # --load-trace flag displays all the documents loaded during the processing
    # to stderr
    res = subprocess.run(command, stderr=subprocess.PIPE,
                         universal_newlines=True)

    line_re = re.compile('^Loaded URL="([^"]+)"')
    with open(args.depfile, 'w') as f:
        for line in res.stderr.splitlines():
            m = re.match(line_re, line)

            # continue to show errors
            if m is None:
                print(line, file=sys.stderr)
                continue
            # Absolute paths are printed as file://, relative paths as-is. We
            # don't care about http://, as a) those will be printed even if
            # resolved locally b) we couldn't have a dependency anyway.
            fname = m.group(1)
            if fname.startswith('http://'):
                continue
            if fname.startswith('file://'):
                fname = fname.split('file://')[1]
            f.write(line_start + fname + '\n')
else:
    command = [args.tool] + args.flags
    res = subprocess.run(command)

exit(res.returncode)

Messung V0.5 in Prozent
C=91 H=96 G=93

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-09-28) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1126438
#Domains=1897691