doclifter-2.22 2.22
“Translates documents written in troff macros to DocBook”
Executes shell commands via PythonImports Python's subprocess module
SHA-2565f34c9892302ba3ee5e44e637dfa28b6b26051b64f7c84c6623485afc335f386
MaleculeO(Er)H₅(CmDb₄F₆Os₃Po₇)Md₂(InPa)
Evidence
9:33… rough 8 by default.
10#
11# SPDX-FileCopyrightText: Copyright Eric S. Raymond <[email protected]>
12# SPDX-License-Identifier: BSD-2-Clause
13
14import sys, os, getopt, signal, time, re, subprocess, stat
15import _thread, threading, queue
16
17try:
18 getstatusoutput = subprocess.getstatusoutput
19 getoutput = subprocess.getoutput
20except AttributeError:
21 import commands
22
23 getstatusoutput = commands.getstatusoutput
⋯4 lines
56:14… log annotations based on content."
57 exclusions = (
58 ("<html>", "HTML"),
59 ("auto-generated by docbook2man-spec", "DocBook"),
60 ("automatically generated by docbook2man", "DocBook"),
61 ("Generated by db2man.xsl", "XML DocBook"),
62 ("Automatically generated by Pod::Man", "Pod::Man"),
63 ("Man page generated from reStructeredText", "reStructuredText"),
64 ("Man page generated from reStructuredText", "r …
69:33… ", "latex2man"),
70 )
71 output = ""
72 fp = open(manpage, "rb")
73 text = fp.read().decode("latin-1")
74 for pattern, generator in exclusions:
75 if text.find(pattern) > -1:
⋯7 lines
83 output = ""
84 if file[-3:] == ".gz":
85 cstat = os.system("gunzip <%s >%s" % (file, localcopy))
86 elif file[-4:] == ".bz2":
87 cstat = os.system("bunzip2 <%s >%s" % (file, localcopy …
128:15… None
129 if doclifter_status == 2:
130 fp = open(source)
131 contents = fp.read()
132 inclusions = re.compile(r"\.so\s+(.*)").search(contents)
133 fp.close()
134 if inclusions:
135 lxmlloc = os.path.join(outdir, getstem(inclusions.group(1)) + ".xml")
136 return (2, lxmlloc, output)
137 return (doclifter_status, None, output)
⋯4 lines
242:30… dir, "man" + section)
243 stem = getstem(withsect)
244 xmlloc = os.path.join(subdir, stem + ".xml")
245 # Count patches here so our stats won't be off
246 patch = os.path.join(patchdir, withsect + ".patch")
247 if os.path.exists(patch):
248 patched += 1
⋯4 lines
No evidence locations were recorded for this file. Raw result