decider-ref 1.22.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- decider_ref-1.22.2/LICENSE +21 -0
- decider_ref-1.22.2/PKG-INFO +50 -0
- decider_ref-1.22.2/README +1 -0
- decider_ref-1.22.2/decider_abb/__init__.py +29 -0
- decider_ref-1.22.2/decider_abb/cli.py +46 -0
- decider_ref-1.22.2/decider_abb/features/__init__.py +8 -0
- decider_ref-1.22.2/decider_abb/features/table.py +147 -0
- decider_ref-1.22.2/decider_abb/path.py +16 -0
- decider_ref-1.22.2/decider_bib/__init__.py +19 -0
- decider_ref-1.22.2/decider_bib/cli.py +75 -0
- decider_ref-1.22.2/decider_bib/features/__init__.py +8 -0
- decider_ref-1.22.2/decider_bib/features/label.py +306 -0
- decider_ref-1.22.2/decider_bib/features/plot.py +73 -0
- decider_ref-1.22.2/decider_bib/features/table.py +261 -0
- decider_ref-1.22.2/decider_bib/order.py +53 -0
- decider_ref-1.22.2/decider_bib/path.py +20 -0
- decider_ref-1.22.2/decider_bib/reference.py +87 -0
- decider_ref-1.22.2/decider_bib/serialize.py +32 -0
- decider_ref-1.22.2/decider_bib/table.py +83 -0
- decider_ref-1.22.2/decider_bib/utils.py +75 -0
- decider_ref-1.22.2/decider_cap/__init__.py +17 -0
- decider_ref-1.22.2/decider_cap/basic.py +148 -0
- decider_ref-1.22.2/decider_cap/cli.py +72 -0
- decider_ref-1.22.2/decider_cap/driver.py +31 -0
- decider_ref-1.22.2/decider_cap/features/__init__.py +8 -0
- decider_ref-1.22.2/decider_cap/features/basic.py +154 -0
- decider_ref-1.22.2/decider_cap/features/missing.py +143 -0
- decider_ref-1.22.2/decider_cap/features/style.py +52 -0
- decider_ref-1.22.2/decider_ref/__init__.py +16 -0
- decider_ref-1.22.2/decider_ref/listdiff.py +50 -0
- decider_ref-1.22.2/decider_ref.egg-info/PKG-INFO +50 -0
- decider_ref-1.22.2/decider_ref.egg-info/SOURCES.txt +52 -0
- decider_ref-1.22.2/decider_ref.egg-info/dependency_links.txt +1 -0
- decider_ref-1.22.2/decider_ref.egg-info/entry_points.txt +6 -0
- decider_ref-1.22.2/decider_ref.egg-info/requires.txt +35 -0
- decider_ref-1.22.2/decider_ref.egg-info/top_level.txt +5 -0
- decider_ref-1.22.2/decider_toc/__init__.py +20 -0
- decider_ref-1.22.2/decider_toc/balance.py +247 -0
- decider_ref-1.22.2/decider_toc/cli.py +84 -0
- decider_ref-1.22.2/decider_toc/duplicated.py +155 -0
- decider_ref-1.22.2/decider_toc/features/__init__.py +69 -0
- decider_ref-1.22.2/decider_toc/features/basic.py +159 -0
- decider_ref-1.22.2/decider_toc/features/complexity.py +194 -0
- decider_ref-1.22.2/decider_toc/features/rules.py +147 -0
- decider_ref-1.22.2/decider_toc/features/style.py +100 -0
- decider_ref-1.22.2/decider_toc/features/sync.py +137 -0
- decider_ref-1.22.2/decider_toc/length.py +31 -0
- decider_ref-1.22.2/decider_toc/level.py +79 -0
- decider_ref-1.22.2/decider_toc/marks.py +52 -0
- decider_ref-1.22.2/decider_toc/path.py +8 -0
- decider_ref-1.22.2/decider_toc/utils.py +42 -0
- decider_ref-1.22.2/pyproject.toml +137 -0
- decider_ref-1.22.2/setup.cfg +4 -0
- decider_ref-1.22.2/tests/test_validate.py +83 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Helmut Konrad Schewe
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: decider-ref
|
|
3
|
+
Version: 1.22.2
|
|
4
|
+
Author-email: Helmut Konrad Schewe <helmutus@outlook.com>
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Project-URL: Homepage, https://github.com/anaticulae/decider-ref
|
|
7
|
+
Project-URL: Repository, https://github.com/anaticulae/decider-ref
|
|
8
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
9
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
10
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
11
|
+
Requires-Python: >=3.12
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
License-File: LICENSE
|
|
14
|
+
Requires-Dist: analp<2.0.0,>=1.0.0
|
|
15
|
+
Requires-Dist: captions<2.0.0,>=1.0.1
|
|
16
|
+
Requires-Dist: configos<2.0.0,>=1.0.4
|
|
17
|
+
Requires-Dist: elementae<2.0.0,>=1.0.1
|
|
18
|
+
Requires-Dist: iamraw<5.0.0,>=4.95.0
|
|
19
|
+
Requires-Dist: konradus<2.0.0,>=1.0.1
|
|
20
|
+
Requires-Dist: protoerror<4.0.0,>=3.20.4
|
|
21
|
+
Requires-Dist: texes<2.0.0,>=1.0.1
|
|
22
|
+
Requires-Dist: upainter<2.0.0,>=1.0.0
|
|
23
|
+
Requires-Dist: utilo<3.0.0,>=2.110.2
|
|
24
|
+
Requires-Dist: verbo<2.0.0,>=1.23.4
|
|
25
|
+
Requires-Dist: writers<2.0.0,>=1.7.1
|
|
26
|
+
Provides-Extra: dev
|
|
27
|
+
Requires-Dist: callidus==1.7.1; extra == "dev"
|
|
28
|
+
Requires-Dist: capita==1.25.3; extra == "dev"
|
|
29
|
+
Requires-Dist: capita_ref==1.0.1; extra == "dev"
|
|
30
|
+
Requires-Dist: codero==1.0.1; extra == "dev"
|
|
31
|
+
Requires-Dist: decider-chapter==1.0.1; extra == "dev"
|
|
32
|
+
Requires-Dist: figureo==1.0.1; extra == "dev"
|
|
33
|
+
Requires-Dist: formulero==1.0.0; extra == "dev"
|
|
34
|
+
Requires-Dist: gennex==1.1.0; extra == "dev"
|
|
35
|
+
Requires-Dist: headnote==1.0.3; extra == "dev"
|
|
36
|
+
Requires-Dist: hoverpower==1.7.0; extra == "dev"
|
|
37
|
+
Requires-Dist: ibidem==1.0.2; extra == "dev"
|
|
38
|
+
Requires-Dist: indagator==1.0.2; extra == "dev"
|
|
39
|
+
Requires-Dist: indicibus==1.0.2; extra == "dev"
|
|
40
|
+
Requires-Dist: jamer==1.0.2; extra == "dev"
|
|
41
|
+
Requires-Dist: mundare==1.0.2; extra == "dev"
|
|
42
|
+
Requires-Dist: pagenumber==1.0.0; extra == "dev"
|
|
43
|
+
Requires-Dist: protoerror==3.20.4; extra == "dev"
|
|
44
|
+
Requires-Dist: reftable==1.0.0; extra == "dev"
|
|
45
|
+
Requires-Dist: tablero==1.0.1; extra == "dev"
|
|
46
|
+
Requires-Dist: titulum==1.0.2; extra == "dev"
|
|
47
|
+
Requires-Dist: utilotest==1.1.1; extra == "dev"
|
|
48
|
+
Dynamic: license-file
|
|
49
|
+
|
|
50
|
+
# reference
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# reference
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2022 by Helmut Konrad Fahrendholz. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Fahrendholz. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
9
|
+
"""Abbreviation Analyzer
|
|
10
|
+
=====================
|
|
11
|
+
|
|
12
|
+
* verify order/sorted
|
|
13
|
+
* check obvious abbrevation and give advice to delete abbreviation
|
|
14
|
+
|
|
15
|
+
TODO: INFORM ABOUT NOT USED ABBREVIATION
|
|
16
|
+
TODO: VERIFY FIRST USAGE
|
|
17
|
+
"""
|
|
18
|
+
|
|
19
|
+
import configos
|
|
20
|
+
|
|
21
|
+
import decider_abb.path
|
|
22
|
+
import decider_ref
|
|
23
|
+
|
|
24
|
+
__version__ = decider_ref.__version__
|
|
25
|
+
|
|
26
|
+
ROOT = decider_ref.ROOT
|
|
27
|
+
PROCESS = 'decider_abbrev'
|
|
28
|
+
|
|
29
|
+
configos.cloud_lookup(PROCESS)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2022 by Helmut Konrad Fahrendholz. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Fahrendholz. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
import protoerror
|
|
11
|
+
import utilo
|
|
12
|
+
|
|
13
|
+
import decider_abb
|
|
14
|
+
|
|
15
|
+
DESCRIPTION = ''
|
|
16
|
+
|
|
17
|
+
WORKPLAN = [
|
|
18
|
+
utilo.create_step(
|
|
19
|
+
'table',
|
|
20
|
+
[
|
|
21
|
+
utilo.ResultFile('reftable', 'abbrev_abbrev'),
|
|
22
|
+
utilo.ResultFile('words', 'abbreviation_detected'),
|
|
23
|
+
],
|
|
24
|
+
output=protoerror.ResultDefault,
|
|
25
|
+
),
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def main():
|
|
30
|
+
hook = protoerror.integrate(
|
|
31
|
+
root=decider_abb.ROOT,
|
|
32
|
+
features='decider_abb.features',
|
|
33
|
+
)
|
|
34
|
+
utilo.featurepack(
|
|
35
|
+
workplan=WORKPLAN,
|
|
36
|
+
root=decider_abb.ROOT,
|
|
37
|
+
featurepackage='decider_abb.features',
|
|
38
|
+
config=utilo.FeaturePackConfig(
|
|
39
|
+
cli_hook=hook,
|
|
40
|
+
description=DESCRIPTION,
|
|
41
|
+
multiprocessed=True,
|
|
42
|
+
name=decider_abb.PROCESS,
|
|
43
|
+
pages=True,
|
|
44
|
+
version=decider_abb.__version__,
|
|
45
|
+
),
|
|
46
|
+
)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2022 by Helmut Konrad Fahrendholz. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Fahrendholz. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2022 by Helmut Konrad Fahrendholz. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Fahrendholz. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
import iamraw
|
|
11
|
+
import konradus
|
|
12
|
+
import protoerror
|
|
13
|
+
import serializeraw
|
|
14
|
+
import utilo
|
|
15
|
+
|
|
16
|
+
import decider_ref.listdiff
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def work(
|
|
20
|
+
abbrev: str,
|
|
21
|
+
intext: str,
|
|
22
|
+
pages: tuple = None,
|
|
23
|
+
) -> protoerror.ResultType:
|
|
24
|
+
driver = create_driver(
|
|
25
|
+
abbrev,
|
|
26
|
+
intext,
|
|
27
|
+
pages=pages,
|
|
28
|
+
)
|
|
29
|
+
result = protoerror.run(
|
|
30
|
+
__name__,
|
|
31
|
+
driver,
|
|
32
|
+
)
|
|
33
|
+
return result
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def create_driver(abbrev: str, intext: str, pages: tuple = None):
|
|
37
|
+
if utilo.exists(abbrev):
|
|
38
|
+
table = serializeraw.load_abbreviation_table(abbrev)
|
|
39
|
+
else:
|
|
40
|
+
table = iamraw.AbbreviationResult()
|
|
41
|
+
intext = serializeraw.load_text_abbreviations(intext, pages=pages)
|
|
42
|
+
driver = protoerror.driver(
|
|
43
|
+
abbrevtable=table,
|
|
44
|
+
intext=intext,
|
|
45
|
+
)
|
|
46
|
+
return driver
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
SOLUTION_15010 = """\
|
|
50
|
+
Abkürzungsverzeichnis nicht alphabetisch sortiert
|
|
51
|
+
|
|
52
|
+
Sortieren Sie das Abkürzungsverzeichnis.
|
|
53
|
+
|
|
54
|
+
{{advice}}
|
|
55
|
+
|
|
56
|
+
{elemente/abkuerzungsverzeichnis#alphabetische-sortierung}
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def check_15010_not_sorted_alphabetically(linter: callable, driver):
|
|
61
|
+
abbreviations: iamraw.AbbreviationResult = driver.abbrevtable
|
|
62
|
+
current = list(abbreviations)
|
|
63
|
+
expected = sorted(
|
|
64
|
+
abbreviations,
|
|
65
|
+
key=lambda x: utilo.alphabetically(x.short),
|
|
66
|
+
)
|
|
67
|
+
if current == expected:
|
|
68
|
+
# well sorted
|
|
69
|
+
return
|
|
70
|
+
location = pagelocation(current[0])
|
|
71
|
+
# prepare viewable format
|
|
72
|
+
current = [format_abbreviation_line(item) for item in current]
|
|
73
|
+
expected = [format_abbreviation_line(item) for item in expected]
|
|
74
|
+
advice = decider_ref.listdiff.diffview(expected, current)
|
|
75
|
+
linter(
|
|
76
|
+
advice=advice,
|
|
77
|
+
location=location,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
SOLUTION_R15015 = """\
|
|
82
|
+
Allgemein gültige Abkürzung
|
|
83
|
+
|
|
84
|
+
Die Abkürzung {{abbreviation}} kann als allgemein gültig angenommen werden und \
|
|
85
|
+
muss nicht separat aufgeführt werden. Entfernen Sie die Abkürzung um die \
|
|
86
|
+
Übersichtlichkeit des Abkürzungsverzeichnisses zu erhöhen.
|
|
87
|
+
|
|
88
|
+
{elemente/abkuerzungsverzeichnis#abkurzungsverzeichnis}
|
|
89
|
+
"""
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def check_15015_abbreviation_not_required(linter: callable, driver):
|
|
93
|
+
"""Inform user to remove common abbreviation (exists in DUDEN)."""
|
|
94
|
+
abbreviations: iamraw.AbbreviationResult = driver.abbrevtable
|
|
95
|
+
for item in abbreviations:
|
|
96
|
+
name = item.short.lower()
|
|
97
|
+
if name not in konradus.ABBREVIATION_LOWER:
|
|
98
|
+
continue
|
|
99
|
+
linter(
|
|
100
|
+
abbreviation=item.short,
|
|
101
|
+
location=pagelocation(item),
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
SOLUTION_R15016 = """\
|
|
106
|
+
Abkürzung nicht vorhanden
|
|
107
|
+
|
|
108
|
+
Die Abkürzung **{{abbrev}}** ist nicht im Abkürzungsverzeichnis aufgeführt.
|
|
109
|
+
|
|
110
|
+
{elemente/abkuerzungsverzeichnis#abkurzungsverzeichnis}
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
def check_15016_abbreviation_missing(linter: callable, driver):
|
|
115
|
+
abbreviations: iamraw.AbbreviationResult = driver.abbrevtable
|
|
116
|
+
if len(abbreviations) == 0: # pylint:disable=compare-to-zero
|
|
117
|
+
protoerror.skip_method('no abbreviation table')
|
|
118
|
+
return
|
|
119
|
+
references = utilo.flatten_content(driver.intext)
|
|
120
|
+
references = [
|
|
121
|
+
item for item in references
|
|
122
|
+
if item.short.lower() not in konradus.ABBREVIATION_LOWER
|
|
123
|
+
]
|
|
124
|
+
single = utilo.Single()
|
|
125
|
+
collected = [
|
|
126
|
+
item for item in references if not single.contains(item.short.lower())
|
|
127
|
+
]
|
|
128
|
+
pdfpage = abbreviations.pdfpages[0]
|
|
129
|
+
location = iamraw.Location.from_page(page=pdfpage)
|
|
130
|
+
for item in collected:
|
|
131
|
+
if abbreviations.short_inside(item.short):
|
|
132
|
+
continue
|
|
133
|
+
linter(
|
|
134
|
+
abbrev=item.short,
|
|
135
|
+
location=location,
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def format_abbreviation_line(item) -> str:
|
|
140
|
+
return f' * {item.short} {item.description}'
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def pagelocation(item) -> iamraw.Location:
|
|
144
|
+
pagenumber = protoerror.OVERVIEW
|
|
145
|
+
if item.position:
|
|
146
|
+
pagenumber = iamraw.Location.from_page(item.position.page)
|
|
147
|
+
return pagenumber
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2021-2022 by Helmut Konrad Fahrendholz. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Fahrendholz. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
import utilo
|
|
11
|
+
|
|
12
|
+
import decider_abb
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def decider_abb_table_user(path: str, prefix: str = '') -> str:
|
|
16
|
+
return utilo.pathconnector(path, decider_abb.PROCESS, 'table_user', prefix)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2020-2022 by Helmut Konrad Fahrendholz. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Fahrendholz. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|
|
9
|
+
|
|
10
|
+
import configos
|
|
11
|
+
|
|
12
|
+
# ease importing path module when using decider_bib
|
|
13
|
+
import decider_bib.path
|
|
14
|
+
import decider_ref
|
|
15
|
+
|
|
16
|
+
ROOT = decider_ref.ROOT
|
|
17
|
+
PROCESS = 'decider_bibliography'
|
|
18
|
+
|
|
19
|
+
configos.cloud_lookup(PROCESS)
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
#==============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
#------------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2019-2022 by Helmut Konrad Fahrendholz. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Fahrendholz. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
#==============================================================================
|
|
9
|
+
|
|
10
|
+
import protoerror
|
|
11
|
+
import utilo
|
|
12
|
+
|
|
13
|
+
import decider_bib
|
|
14
|
+
import decider_ref
|
|
15
|
+
|
|
16
|
+
DESCRIPTION = ''
|
|
17
|
+
|
|
18
|
+
USER = 'user'
|
|
19
|
+
DEVELOPER = 'developer'
|
|
20
|
+
|
|
21
|
+
WORKPLAN = [
|
|
22
|
+
utilo.create_step(
|
|
23
|
+
'label',
|
|
24
|
+
[
|
|
25
|
+
utilo.ResultFile('detector', 'bibliography_detected'),
|
|
26
|
+
utilo.ResultFile('docref', 'bibliography_parsed'),
|
|
27
|
+
utilo.ResultFile('words', 'headlines_headlines'),
|
|
28
|
+
utilo.ResultFile('words', 'sentences_sentences'),
|
|
29
|
+
utilo.ResultFile('sections', 'section_result'),
|
|
30
|
+
],
|
|
31
|
+
(USER, DEVELOPER),
|
|
32
|
+
),
|
|
33
|
+
utilo.create_step(
|
|
34
|
+
'table',
|
|
35
|
+
[
|
|
36
|
+
utilo.ResultFile('detector', 'bibliography_detected'),
|
|
37
|
+
utilo.ResultFile('detector', 'titlepage_detected'),
|
|
38
|
+
utilo.File('pdflog'),
|
|
39
|
+
],
|
|
40
|
+
(USER, DEVELOPER),
|
|
41
|
+
),
|
|
42
|
+
utilo.create_step(
|
|
43
|
+
name='plot',
|
|
44
|
+
inputs=[
|
|
45
|
+
utilo.ResultFile('detector', 'bibliography_detected'),
|
|
46
|
+
],
|
|
47
|
+
output=[
|
|
48
|
+
('year_histogram', 'png'),
|
|
49
|
+
],
|
|
50
|
+
),
|
|
51
|
+
]
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def main():
|
|
55
|
+
hook = protoerror.integrate(
|
|
56
|
+
root=decider_ref.ROOT,
|
|
57
|
+
features='decider_bib.features',
|
|
58
|
+
)
|
|
59
|
+
docinfo = protoerror.integrate_docinfo()
|
|
60
|
+
utilo.featurepack(
|
|
61
|
+
workplan=WORKPLAN,
|
|
62
|
+
root=decider_ref.ROOT,
|
|
63
|
+
featurepackage='decider_bib.features',
|
|
64
|
+
config=utilo.FeaturePackConfig(
|
|
65
|
+
cli_hook=[
|
|
66
|
+
docinfo,
|
|
67
|
+
hook,
|
|
68
|
+
],
|
|
69
|
+
description=DESCRIPTION,
|
|
70
|
+
multiprocessed=True,
|
|
71
|
+
name=decider_bib.PROCESS,
|
|
72
|
+
pages=True,
|
|
73
|
+
version=decider_ref.__version__,
|
|
74
|
+
),
|
|
75
|
+
)
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# C O P Y R I G H T
|
|
3
|
+
# -----------------------------------------------------------------------------
|
|
4
|
+
# Copyright (c) 2020-2022 by Helmut Konrad Fahrendholz. All rights reserved.
|
|
5
|
+
# This file is property of Helmut Konrad Fahrendholz. Any unauthorized copy,
|
|
6
|
+
# use or distribution is an offensive act against international law and may
|
|
7
|
+
# be prosecuted under federal law. Its content is company confidential.
|
|
8
|
+
# =============================================================================
|