pyeasyphd 0.1.2__py3-none-any.whl → 0.1.5__py3-none-any.whl
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.
Potentially problematic release.
This version of pyeasyphd might be problematic. Click here for more details.
- pyeasyphd/__init__.py +5 -0
- pyeasyphd/data/Templates/CSL/apa-no-ampersand.csl +2183 -0
- pyeasyphd/data/Templates/CSL/apa.csl +2133 -0
- pyeasyphd/data/Templates/CSL/ieee.csl +512 -0
- pyeasyphd/data/Templates/TEX/Article.tex +38 -0
- pyeasyphd/data/Templates/TEX/Article_Header.tex +29 -0
- pyeasyphd/data/Templates/TEX/Article_Tail.tex +3 -0
- pyeasyphd/data/Templates/TEX/Beamer_Header.tex +80 -0
- pyeasyphd/data/Templates/TEX/Beamer_Tail.tex +14 -0
- pyeasyphd/data/Templates/TEX/Style.tex +249 -0
- pyeasyphd/data/Templates/TEX/TEVC_Header.tex +52 -0
- pyeasyphd/data/Templates/TEX/TEVC_Tail.tex +4 -0
- pyeasyphd/data/Templates/TEX/eisvogel.beamer +700 -0
- pyeasyphd/data/Templates/TEX/eisvogel.latex +1040 -0
- pyeasyphd/data/Templates/TEX/eisvogel.tex +1064 -0
- pyeasyphd/data/Templates/TEX/math.tex +196 -0
- pyeasyphd/data/Templates/TEX/math_commands.tex +673 -0
- pyeasyphd/main/__init__.py +6 -7
- pyeasyphd/main/basic_input.py +59 -77
- pyeasyphd/main/pandoc_md_to.py +48 -47
- pyeasyphd/main/python_run_md.py +65 -24
- pyeasyphd/main/python_run_tex.py +52 -21
- pyeasyphd/pyeasyphd.py +20 -6
- pyeasyphd/pyeasyphd.sublime-settings +0 -10
- pyeasyphd/tools/__init__.py +5 -8
- pyeasyphd/tools/generate/generate_from_bibs.py +41 -37
- pyeasyphd/tools/generate/generate_html.py +48 -8
- pyeasyphd/tools/generate/generate_library.py +39 -26
- pyeasyphd/tools/generate/generate_links.py +14 -8
- pyeasyphd/tools/py_run_bib_md_tex.py +59 -111
- pyeasyphd/tools/search/data.py +12 -48
- pyeasyphd/tools/search/search_base.py +37 -10
- pyeasyphd/tools/search/search_core.py +108 -38
- pyeasyphd/tools/search/search_keywords.py +18 -16
- pyeasyphd/tools/search/search_writers.py +94 -32
- pyeasyphd/tools/search/utils.py +48 -9
- pyeasyphd/utils/utils.py +7 -6
- {pyeasyphd-0.1.2.dist-info → pyeasyphd-0.1.5.dist-info}/METADATA +3 -3
- pyeasyphd-0.1.5.dist-info/RECORD +43 -0
- pyeasyphd-0.1.2.dist-info/RECORD +0 -27
- {pyeasyphd-0.1.2.dist-info → pyeasyphd-0.1.5.dist-info}/WHEEL +0 -0
|
@@ -4,12 +4,7 @@ import re
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from typing import Any, Dict, List
|
|
6
6
|
|
|
7
|
-
from pyadvtools import
|
|
8
|
-
generate_nested_dict,
|
|
9
|
-
read_list,
|
|
10
|
-
standard_path,
|
|
11
|
-
write_list,
|
|
12
|
-
)
|
|
7
|
+
from pyadvtools import generate_nested_dict, read_list, standard_path, write_list
|
|
13
8
|
from pybibtexer.tools.experiments_base import generate_standard_publisher_abbr_options_dict
|
|
14
9
|
|
|
15
10
|
from ...main import PandocMdTo
|
|
@@ -20,22 +15,28 @@ from .utils import extract_information, temp_html_style
|
|
|
20
15
|
|
|
21
16
|
|
|
22
17
|
class Searchkeywords(object):
|
|
23
|
-
"""Search.
|
|
18
|
+
"""Search keywords in bibliography data.
|
|
24
19
|
|
|
25
20
|
Args:
|
|
26
|
-
path_storage (str):
|
|
27
|
-
path_output (str):
|
|
28
|
-
options (dict): options
|
|
21
|
+
path_storage (str): Path to storage directory for journals or conferences.
|
|
22
|
+
path_output (str): Path to output directory for journals or conferences.
|
|
23
|
+
options (dict): Configuration options.
|
|
29
24
|
|
|
30
25
|
Attributes:
|
|
31
|
-
path_storage (str):
|
|
32
|
-
path_output (str):
|
|
33
|
-
options (dict): options
|
|
34
|
-
|
|
35
|
-
search_year_list (List[str] = []): search year list
|
|
26
|
+
path_storage (str): Path to storage directory.
|
|
27
|
+
path_output (str): Path to output directory.
|
|
28
|
+
options (dict): Configuration options.
|
|
29
|
+
search_year_list (List[str]): List of years to search. Defaults to [].
|
|
36
30
|
"""
|
|
37
31
|
|
|
38
32
|
def __init__(self, path_storage: str, path_output: str, options: Dict[str, Any]) -> None:
|
|
33
|
+
"""Initialize Searchkeywords with storage and output paths.
|
|
34
|
+
|
|
35
|
+
Args:
|
|
36
|
+
path_storage (str): Path to storage directory.
|
|
37
|
+
path_output (str): Path to output directory.
|
|
38
|
+
options (Dict[str, Any]): Configuration options.
|
|
39
|
+
"""
|
|
39
40
|
self.path_storage = standard_path(path_storage)
|
|
40
41
|
self.path_output = standard_path(path_output)
|
|
41
42
|
|
|
@@ -64,6 +65,7 @@ class Searchkeywords(object):
|
|
|
64
65
|
self._path_combine = self.path_output + "-Combine"
|
|
65
66
|
|
|
66
67
|
def run(self) -> None:
|
|
68
|
+
"""Run the keyword search process."""
|
|
67
69
|
all_dict = {}
|
|
68
70
|
publisher_abbr_dict = generate_standard_publisher_abbr_options_dict(self.path_storage, self.options)
|
|
69
71
|
for publisher in publisher_abbr_dict:
|
|
@@ -196,7 +198,7 @@ class Searchkeywords(object):
|
|
|
196
198
|
for file in nested_dict[entry_type][keywords_type][ext]:
|
|
197
199
|
data_dict.setdefault(os.path.basename(file).split(".")[0], []).append(file)
|
|
198
200
|
|
|
199
|
-
data_list = self._html_format(entry_type, data_dict, "Keywords",
|
|
201
|
+
data_list = self._html_format(entry_type, data_dict, "Keywords", "separate")
|
|
200
202
|
write_list(data_list, f"{entry_type.lower()}_links.html", "w", self._path_separate, False)
|
|
201
203
|
return None
|
|
202
204
|
|
|
@@ -2,33 +2,30 @@ import copy
|
|
|
2
2
|
import os
|
|
3
3
|
from typing import Dict, List, Tuple
|
|
4
4
|
|
|
5
|
-
from pyadvtools import
|
|
6
|
-
combine_content_in_list,
|
|
7
|
-
read_list,
|
|
8
|
-
write_list,
|
|
9
|
-
)
|
|
5
|
+
from pyadvtools import combine_content_in_list, read_list, write_list
|
|
10
6
|
from pybibtexer.bib.bibtexparser import Library
|
|
11
7
|
from pybibtexer.main import PythonWriters
|
|
12
8
|
|
|
13
9
|
from ...main import BasicInput, PandocMdTo
|
|
14
|
-
from ...tools.search.utils import
|
|
15
|
-
combine_keywords_for_file_name,
|
|
16
|
-
combine_keywords_for_title,
|
|
17
|
-
keywords_type_for_title,
|
|
18
|
-
)
|
|
10
|
+
from ...tools.search.utils import combine_keywords_for_file_name, combine_keywords_for_title, keywords_type_for_title
|
|
19
11
|
|
|
20
12
|
|
|
21
13
|
class WriteInitialResult(BasicInput):
|
|
22
14
|
"""Write initial results for single keyword.
|
|
23
15
|
|
|
24
16
|
Args:
|
|
25
|
-
options:
|
|
17
|
+
options (dict): Configuration options.
|
|
26
18
|
|
|
27
19
|
Attributes:
|
|
28
|
-
options (dict): options
|
|
20
|
+
options (dict): Configuration options.
|
|
29
21
|
"""
|
|
30
22
|
|
|
31
23
|
def __init__(self, options: dict) -> None:
|
|
24
|
+
"""Initialize WriteInitialResult with configuration options.
|
|
25
|
+
|
|
26
|
+
Args:
|
|
27
|
+
options (dict): Configuration options.
|
|
28
|
+
"""
|
|
32
29
|
super().__init__(options)
|
|
33
30
|
|
|
34
31
|
self.options = options
|
|
@@ -48,6 +45,21 @@ class WriteInitialResult(BasicInput):
|
|
|
48
45
|
library_for_zotero: Library,
|
|
49
46
|
library_for_save: Library,
|
|
50
47
|
) -> Tuple[List[List[str]], List[str]]:
|
|
48
|
+
"""Main method to write initial results.
|
|
49
|
+
|
|
50
|
+
Args:
|
|
51
|
+
path_initial (str): Path to initial directory.
|
|
52
|
+
output_prefix (str): Prefix for output files.
|
|
53
|
+
field (str): Field being searched.
|
|
54
|
+
keywords_type (str): Type of keywords.
|
|
55
|
+
combine_keywords (str): Combined keywords string.
|
|
56
|
+
library_for_abbr (Library): Abbreviated bibliography library.
|
|
57
|
+
library_for_zotero (Library): Zotero bibliography library.
|
|
58
|
+
library_for_save (Library): Save bibliography library.
|
|
59
|
+
|
|
60
|
+
Returns:
|
|
61
|
+
Tuple[List[List[str]], List[str]]: Tuple containing data and error messages.
|
|
62
|
+
"""
|
|
51
63
|
error_pandoc_md_md = []
|
|
52
64
|
|
|
53
65
|
# generate
|
|
@@ -56,7 +68,7 @@ class WriteInitialResult(BasicInput):
|
|
|
56
68
|
# update options
|
|
57
69
|
_options = copy.deepcopy(self.options)
|
|
58
70
|
_options["keep_entries_by_cite_keys"] = cite_keys
|
|
59
|
-
_python_writer = PythonWriters(
|
|
71
|
+
_python_writer = PythonWriters(_options)
|
|
60
72
|
|
|
61
73
|
# generate tex and md data
|
|
62
74
|
data_list_tex, data_list_md, header = self.generate_content_tex_md(
|
|
@@ -78,11 +90,7 @@ class WriteInitialResult(BasicInput):
|
|
|
78
90
|
# pandoc md to generate md file
|
|
79
91
|
path_bib = os.path.join(path_write, f"{file_prefix}{mid_list[2]}.bib") # bib_for_abbr
|
|
80
92
|
data_list_pandoc_md = self._pandoc_md_to.pandoc_md_to_md(
|
|
81
|
-
path_bib,
|
|
82
|
-
path_write,
|
|
83
|
-
path_write,
|
|
84
|
-
f"{file_prefix}.md",
|
|
85
|
-
f"{file_prefix}-pandoc.md",
|
|
93
|
+
path_bib, path_write, path_write, f"{file_prefix}.md", f"{file_prefix}-pandoc.md"
|
|
86
94
|
)
|
|
87
95
|
|
|
88
96
|
# mian part
|
|
@@ -111,11 +119,22 @@ class WriteInitialResult(BasicInput):
|
|
|
111
119
|
def generate_basic_beauty_complex_md(
|
|
112
120
|
self, header: str, cite_key_list: List[str], data_list_pandoc_md: List[str], library_for_zotero: Library
|
|
113
121
|
) -> Tuple[List[str], List[str], List[str]]:
|
|
122
|
+
"""Generate basic, beauty, and complex markdown content.
|
|
123
|
+
|
|
124
|
+
Args:
|
|
125
|
+
header (str): Header string for the content.
|
|
126
|
+
cite_key_list (List[str]): List of citation keys.
|
|
127
|
+
data_list_pandoc_md (List[str]): List of pandoc markdown data.
|
|
128
|
+
library_for_zotero (Library): Zotero bibliography library.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
Tuple[List[str], List[str], List[str]]: Tuple containing basic, beauty, and complex markdown content.
|
|
132
|
+
"""
|
|
114
133
|
data_basic_md, data_beauty_md, data_complex_md = [], [], []
|
|
115
134
|
|
|
116
135
|
# library
|
|
117
136
|
_options = copy.deepcopy(self.options)
|
|
118
|
-
_python_writer = PythonWriters(
|
|
137
|
+
_python_writer = PythonWriters(_options)
|
|
119
138
|
key_url_http_bib_dict = _python_writer.output_key_url_http_bib_dict(library_for_zotero)
|
|
120
139
|
|
|
121
140
|
key_basic_dict, key_beauty_dict, key_complex_dict = self._pandoc_md_to.generate_key_data_dict(
|
|
@@ -136,6 +155,14 @@ class WriteInitialResult(BasicInput):
|
|
|
136
155
|
|
|
137
156
|
@staticmethod
|
|
138
157
|
def _convert_to_special_list(data_list: List[str]) -> List[str]:
|
|
158
|
+
"""Convert data list to special formatted list.
|
|
159
|
+
|
|
160
|
+
Args:
|
|
161
|
+
data_list (List[str]): List of data strings.
|
|
162
|
+
|
|
163
|
+
Returns:
|
|
164
|
+
List[str]: Formatted list with proper indentation.
|
|
165
|
+
"""
|
|
139
166
|
if len(data_list) > 0:
|
|
140
167
|
data_list[0] = "- " + data_list[0]
|
|
141
168
|
for j in range(len(data_list) - 1):
|
|
@@ -146,7 +173,17 @@ class WriteInitialResult(BasicInput):
|
|
|
146
173
|
def generate_content_tex_md(
|
|
147
174
|
self, cite_key_list: List[str], output_prefix: str, field: str, combine_keywords: str
|
|
148
175
|
) -> Tuple[List[str], List[str], str]:
|
|
149
|
-
"""Generate.
|
|
176
|
+
"""Generate LaTeX and markdown content.
|
|
177
|
+
|
|
178
|
+
Args:
|
|
179
|
+
cite_key_list (List[str]): List of citation keys.
|
|
180
|
+
output_prefix (str): Prefix for output files.
|
|
181
|
+
field (str): Field being searched.
|
|
182
|
+
combine_keywords (str): Combined keywords string.
|
|
183
|
+
|
|
184
|
+
Returns:
|
|
185
|
+
Tuple[List[str], List[str], str]: Tuple containing LaTeX content, markdown content, and header.
|
|
186
|
+
"""
|
|
150
187
|
c_k_f_t = combine_keywords_for_title(combine_keywords)
|
|
151
188
|
|
|
152
189
|
number_references = len(cite_key_list)
|
|
@@ -164,15 +201,25 @@ class WriteInitialResult(BasicInput):
|
|
|
164
201
|
|
|
165
202
|
|
|
166
203
|
class WriteSeparateResult(object):
|
|
167
|
-
"""Write separate result."""
|
|
204
|
+
"""Write separate result for different keyword types."""
|
|
168
205
|
|
|
169
206
|
def __init__(self) -> None:
|
|
207
|
+
"""Initialize WriteSeparateResult with title levels."""
|
|
170
208
|
self._level_title_md = "##"
|
|
171
209
|
self._level_title_tex = "section"
|
|
172
210
|
|
|
173
211
|
def main(
|
|
174
212
|
self, data_temp: List[List[str]], field: str, keywords_type: str, combine_keywords: str, path_separate: str
|
|
175
213
|
) -> None:
|
|
214
|
+
"""Main method to write separate results.
|
|
215
|
+
|
|
216
|
+
Args:
|
|
217
|
+
data_temp (List[List[str]]): List of data lists for different file types.
|
|
218
|
+
field (str): Field being processed.
|
|
219
|
+
keywords_type (str): Type of keywords.
|
|
220
|
+
combine_keywords (str): Combined keywords string.
|
|
221
|
+
path_separate (str): Path to separate directory.
|
|
222
|
+
"""
|
|
176
223
|
k_t_f_t = keywords_type_for_title(keywords_type)
|
|
177
224
|
_title = f"{field.title()} contains {k_t_f_t}"
|
|
178
225
|
|
|
@@ -199,23 +246,27 @@ class WriteSeparateResult(object):
|
|
|
199
246
|
|
|
200
247
|
|
|
201
248
|
class WriteAbbrCombinedResults(object):
|
|
202
|
-
"""Write combined results for
|
|
249
|
+
"""Write combined results for abbreviations (such as `TEVC`, `PNAS`).
|
|
203
250
|
|
|
204
251
|
Args:
|
|
205
|
-
options:
|
|
252
|
+
options (dict): Configuration options.
|
|
206
253
|
|
|
207
254
|
Attributes:
|
|
208
|
-
options (dict): options
|
|
209
|
-
pandoc_md_basic_to_pdf (bool):
|
|
210
|
-
pandoc_md_beauty_to_pdf (bool):
|
|
211
|
-
pandoc_md_complex_to_pdf (bool):
|
|
212
|
-
pandoc_md_basic_to_html (bool):
|
|
213
|
-
pandoc_md_beauty_to_html (bool):
|
|
214
|
-
pandoc_md_complex_to_html (bool):
|
|
215
|
-
|
|
255
|
+
options (dict): Configuration options.
|
|
256
|
+
pandoc_md_basic_to_pdf (bool): Whether to convert basic markdown to PDF.
|
|
257
|
+
pandoc_md_beauty_to_pdf (bool): Whether to convert beauty markdown to PDF.
|
|
258
|
+
pandoc_md_complex_to_pdf (bool): Whether to convert complex markdown to PDF.
|
|
259
|
+
pandoc_md_basic_to_html (bool): Whether to convert basic markdown to HTML.
|
|
260
|
+
pandoc_md_beauty_to_html (bool): Whether to convert beauty markdown to HTML.
|
|
261
|
+
pandoc_md_complex_to_html (bool): Whether to convert complex markdown to HTML.
|
|
216
262
|
"""
|
|
217
263
|
|
|
218
264
|
def __init__(self, options: dict) -> None:
|
|
265
|
+
"""Initialize WriteAbbrCombinedResults with configuration options.
|
|
266
|
+
|
|
267
|
+
Args:
|
|
268
|
+
options (dict): Configuration options.
|
|
269
|
+
"""
|
|
219
270
|
self.pandoc_md_basic_to_pdf: bool = options.get("pandoc_md_basic_to_pdf", False)
|
|
220
271
|
self.pandoc_md_beauty_to_pdf: bool = options.get("pandoc_md_beauty_to_pdf", False)
|
|
221
272
|
self.pandoc_md_complex_to_pdf: bool = options.get("pandoc_md_complex_to_pdf", False)
|
|
@@ -230,6 +281,17 @@ class WriteAbbrCombinedResults(object):
|
|
|
230
281
|
def main(
|
|
231
282
|
self, search_field_list, keywords_type: str, field_data_dict: Dict[str, List[List[str]]], path_combine: str
|
|
232
283
|
) -> Tuple[List[str], List[str]]:
|
|
284
|
+
"""Main method to write combined results for abbreviations.
|
|
285
|
+
|
|
286
|
+
Args:
|
|
287
|
+
search_field_list: List of search fields.
|
|
288
|
+
keywords_type (str): Type of keywords.
|
|
289
|
+
field_data_dict (Dict[str, List[List[str]]]): Dictionary containing field data.
|
|
290
|
+
path_combine (str): Path to combine directory.
|
|
291
|
+
|
|
292
|
+
Returns:
|
|
293
|
+
Tuple[List[str], List[str]]: Tuple containing error messages for PDF and HTML conversion.
|
|
294
|
+
"""
|
|
233
295
|
path_subsection = os.path.join(path_combine, "tex-subsection")
|
|
234
296
|
path_md = os.path.join(path_combine, "md")
|
|
235
297
|
path_bib = os.path.join(path_combine, "bib")
|
|
@@ -284,7 +346,7 @@ class WriteAbbrCombinedResults(object):
|
|
|
284
346
|
os.path.join(path_combine, f"html-{i}"),
|
|
285
347
|
f"{file_prefix}-{i}.md",
|
|
286
348
|
f"{file_prefix}-{i}.html",
|
|
287
|
-
True
|
|
349
|
+
True,
|
|
288
350
|
)
|
|
289
351
|
if error_flag_html:
|
|
290
352
|
error_pandoc_md_html.append(error_flag_html)
|
pyeasyphd/tools/search/utils.py
CHANGED
|
@@ -2,19 +2,20 @@ import os
|
|
|
2
2
|
import re
|
|
3
3
|
from typing import Dict, List, Tuple, Union
|
|
4
4
|
|
|
5
|
-
from pyadvtools import
|
|
6
|
-
IterateSortDict,
|
|
7
|
-
is_list_contain_list_contain_str,
|
|
8
|
-
is_list_contain_str,
|
|
9
|
-
write_list,
|
|
10
|
-
)
|
|
5
|
+
from pyadvtools import IterateSortDict, is_list_contain_list_contain_str, is_list_contain_str, write_list
|
|
11
6
|
|
|
12
7
|
|
|
13
8
|
def switch_keywords_list(xx: Union[List[str], List[List[str]]]) -> Tuple[List[List[str]], str]:
|
|
14
|
-
"""Switch keyword.
|
|
9
|
+
"""Switch keyword list format and generate combined keywords string.
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
Args:
|
|
12
|
+
xx (Union[List[str], List[List[str]]]): Input keyword list or nested keyword list.
|
|
13
|
+
Examples: ["evolutionary", "algorithm"] or [["evolution"], ["evolutionary"]]
|
|
14
|
+
|
|
15
|
+
Returns:
|
|
16
|
+
Tuple[List[List[str]], str]: Tuple containing:
|
|
17
|
+
- List of keyword lists with regex word boundaries
|
|
18
|
+
- Combined keywords string for file naming
|
|
18
19
|
"""
|
|
19
20
|
yyy: List[List[str]] = [[]]
|
|
20
21
|
|
|
@@ -54,6 +55,14 @@ def switch_keywords_list(xx: Union[List[str], List[List[str]]]) -> Tuple[List[Li
|
|
|
54
55
|
|
|
55
56
|
|
|
56
57
|
def combine_keywords_for_title(combine_keywords: str) -> str:
|
|
58
|
+
"""Convert combined keywords string to human-readable title format.
|
|
59
|
+
|
|
60
|
+
Args:
|
|
61
|
+
combine_keywords (str): Combined keywords string with special characters.
|
|
62
|
+
|
|
63
|
+
Returns:
|
|
64
|
+
str: Human-readable title format with proper spacing and punctuation.
|
|
65
|
+
"""
|
|
57
66
|
combine_keywords = combine_keywords.replace("_without_", " without ")
|
|
58
67
|
combine_keywords = combine_keywords.replace("_and_", "; ")
|
|
59
68
|
combine_keywords = combine_keywords.replace("0", "")
|
|
@@ -66,6 +75,14 @@ def combine_keywords_for_title(combine_keywords: str) -> str:
|
|
|
66
75
|
|
|
67
76
|
|
|
68
77
|
def combine_keywords_for_file_name(combine_keywords: str) -> str:
|
|
78
|
+
"""Convert combined keywords string to valid file name format.
|
|
79
|
+
|
|
80
|
+
Args:
|
|
81
|
+
combine_keywords (str): Combined keywords string.
|
|
82
|
+
|
|
83
|
+
Returns:
|
|
84
|
+
str: File name safe string with underscores and hyphens.
|
|
85
|
+
"""
|
|
69
86
|
combine_keywords = combine_keywords_for_title(combine_keywords)
|
|
70
87
|
combine_keywords = combine_keywords.replace("/", "-")
|
|
71
88
|
combine_keywords = combine_keywords.replace("; ", "_and_")
|
|
@@ -74,6 +91,14 @@ def combine_keywords_for_file_name(combine_keywords: str) -> str:
|
|
|
74
91
|
|
|
75
92
|
|
|
76
93
|
def switch_keywords_type(keywords_type: str) -> str:
|
|
94
|
+
"""Normalize keywords type string for consistent formatting.
|
|
95
|
+
|
|
96
|
+
Args:
|
|
97
|
+
keywords_type (str): Keywords type string to normalize.
|
|
98
|
+
|
|
99
|
+
Returns:
|
|
100
|
+
str: Normalized keywords type with consistent separators.
|
|
101
|
+
"""
|
|
77
102
|
keywords_type = keywords_type.replace("/", "-")
|
|
78
103
|
keywords_type = keywords_type.replace(" ", "_")
|
|
79
104
|
keywords_type = re.sub(r"-+", "-", keywords_type)
|
|
@@ -82,11 +107,25 @@ def switch_keywords_type(keywords_type: str) -> str:
|
|
|
82
107
|
|
|
83
108
|
|
|
84
109
|
def keywords_type_for_title(keywords_type: str) -> str:
|
|
110
|
+
"""Convert keywords type string to title format.
|
|
111
|
+
|
|
112
|
+
Args:
|
|
113
|
+
keywords_type (str): Keywords type string with underscores.
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
str: Title format with spaces instead of underscores.
|
|
117
|
+
"""
|
|
85
118
|
keywords_type = keywords_type.replace("_", " ")
|
|
86
119
|
return keywords_type.strip()
|
|
87
120
|
|
|
88
121
|
|
|
89
122
|
def extract_information(old_dict: Dict[str, Dict[str, Dict[str, Dict[str, Dict[str, int]]]]], path_output: str) -> None:
|
|
123
|
+
"""Extract and organize search information into markdown tables.
|
|
124
|
+
|
|
125
|
+
Args:
|
|
126
|
+
old_dict (Dict[str, Dict[str, Dict[str, Dict[str, Dict[str, int]]]]]): Nested dictionary containing search results.
|
|
127
|
+
path_output (str): Output directory path for generated markdown files.
|
|
128
|
+
"""
|
|
90
129
|
new_dict: Dict[str, Dict[str, Dict[str, Dict[str, Dict[str, int]]]]] = {}
|
|
91
130
|
|
|
92
131
|
for abbr in old_dict:
|
pyeasyphd/utils/utils.py
CHANGED
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import os
|
|
2
2
|
import re
|
|
3
3
|
|
|
4
|
-
from pyadvtools import
|
|
5
|
-
combine_content_in_list,
|
|
6
|
-
read_list,
|
|
7
|
-
write_list,
|
|
8
|
-
)
|
|
4
|
+
from pyadvtools import combine_content_in_list, read_list, write_list
|
|
9
5
|
|
|
10
6
|
html_head = """<!DOCTYPE html>
|
|
11
7
|
<html>
|
|
@@ -47,10 +43,15 @@ textarea_tail = "\n</textarea>"
|
|
|
47
43
|
|
|
48
44
|
|
|
49
45
|
def operate_on_generate_html(html_name: str) -> None:
|
|
46
|
+
"""Operate on generated HTML file to add styling and functionality.
|
|
47
|
+
|
|
48
|
+
Args:
|
|
49
|
+
html_name (str): Name of the HTML file to process.
|
|
50
|
+
"""
|
|
50
51
|
if not (data_list := read_list(html_name, "r", None)):
|
|
51
52
|
return None
|
|
52
53
|
|
|
53
|
-
head_list = [html_head.format(os.path.basename(html_name).split(
|
|
54
|
+
head_list = [html_head.format(os.path.basename(html_name).split(".")[0].strip()), html_style, "\n"]
|
|
54
55
|
tail_list = [html_tail]
|
|
55
56
|
|
|
56
57
|
content = "".join(data_list)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyeasyphd
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.5
|
|
4
4
|
Summary: pyeasyphd
|
|
5
5
|
License: GPL-3.0-or-later
|
|
6
6
|
Keywords: Python,Markdown,LaTex
|
|
@@ -14,8 +14,8 @@ Classifier: Programming Language :: Python :: 3
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.14
|
|
16
16
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
|
-
Requires-Dist: pyadvtools (>=0.
|
|
18
|
-
Requires-Dist: pybibtexer (>=0.
|
|
17
|
+
Requires-Dist: pyadvtools (>=0.1.5,<0.2.0)
|
|
18
|
+
Requires-Dist: pybibtexer (>=0.1.5,<0.2.0)
|
|
19
19
|
Project-URL: Documentation, https://github.com/NextArtifIntell/pyeasyphd
|
|
20
20
|
Project-URL: Homepage, https://github.com/NextArtifIntell/pyeasyphd
|
|
21
21
|
Project-URL: Repository, https://github.com/NextArtifIntell/pyeasyphd
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
pyeasyphd/.python-version,sha256=Auc1s9_hwygz61ULf_j_oX9fK8P6HnuuYaj1o4g845g,5
|
|
2
|
+
pyeasyphd/Main.sublime-menu,sha256=6IKSvXyUSqq-eXrzSVGbzakbrPzw9n7hKe-p-FXmDXM,1561
|
|
3
|
+
pyeasyphd/__init__.py,sha256=tEypJy-Kmj6Oxpjh767NjkH5Ct0JF1Nhiw3D6-7I4E8,260
|
|
4
|
+
pyeasyphd/data/Templates/CSL/apa-no-ampersand.csl,sha256=ndFDG38PUNyGYpvfGqx_KzoSIs0DXA4w0GHG3MgFV7E,86859
|
|
5
|
+
pyeasyphd/data/Templates/CSL/apa.csl,sha256=S5OAu8zlZqzubySyR5c2FYDEzkTyuC9aRaJJlsygM8M,84591
|
|
6
|
+
pyeasyphd/data/Templates/CSL/ieee.csl,sha256=SzU0l89ymSCtmpugSoz2S6uM3_GHvibFZwZewn7WVEA,17413
|
|
7
|
+
pyeasyphd/data/Templates/TEX/Article.tex,sha256=M-vMXiHc2ncOTahtuY40s3flr2Ojo_-C8DDvLExMKbA,1264
|
|
8
|
+
pyeasyphd/data/Templates/TEX/Article_Header.tex,sha256=41Wv1BcQMmvh5peKTPh3uK_tm7mOSBnrFqkO0JzlXKU,949
|
|
9
|
+
pyeasyphd/data/Templates/TEX/Article_Tail.tex,sha256=1m7z4T6h8B8ylw3_4Q8_EOgzhyRRVSHgHrGZ6b5ut4k,35
|
|
10
|
+
pyeasyphd/data/Templates/TEX/Beamer_Header.tex,sha256=sS2MmMvPNwrYX_kBIEyHwe5lTXKcJO_JFsVUEY3YWyc,3732
|
|
11
|
+
pyeasyphd/data/Templates/TEX/Beamer_Tail.tex,sha256=88F75V0B8mP9naOEzM1S8PuEtYPdpZJAwxFQVVPP5K0,211
|
|
12
|
+
pyeasyphd/data/Templates/TEX/Style.tex,sha256=v5OjdDQcnuhHnLGWlopyHeVcAZ9uMSJAhknT4RxP5GM,10564
|
|
13
|
+
pyeasyphd/data/Templates/TEX/TEVC_Header.tex,sha256=WPFIJLQNRsEcr5jxSw8rpc2gXJrMLie273yfwgEXAOU,1579
|
|
14
|
+
pyeasyphd/data/Templates/TEX/TEVC_Tail.tex,sha256=FBoefRJsnJrH1-eRZfF68qu_lHjwYZhj-iFWBWfV4tw,86
|
|
15
|
+
pyeasyphd/data/Templates/TEX/eisvogel.beamer,sha256=MMJ5pdxyyCGVpripIfc3sEtvkoB1n69KOm2knPKtbaA,19811
|
|
16
|
+
pyeasyphd/data/Templates/TEX/eisvogel.latex,sha256=vxJKHEd7xPD3ie0DyeFO7Pp_-BofTBRM26XCqowXFdc,30060
|
|
17
|
+
pyeasyphd/data/Templates/TEX/eisvogel.tex,sha256=9bDMPfUFjaHQZPCnYLwjsw5DfBtD04uzwfxvQa9nWuE,30748
|
|
18
|
+
pyeasyphd/data/Templates/TEX/math.tex,sha256=eDpuVcjIv-iugZXQRxKFTAyXujMZflTjKlDY2eiRyMQ,10966
|
|
19
|
+
pyeasyphd/data/Templates/TEX/math_commands.tex,sha256=4bHrv5hFsvXRtOLdVqhPuHJFT9eKKje_My3YTnknJvQ,41391
|
|
20
|
+
pyeasyphd/main/__init__.py,sha256=Y7K7DO_MZZlbtxt5oAnyYuCggN2f9tu4cRfpA3lPaiI,416
|
|
21
|
+
pyeasyphd/main/basic_input.py,sha256=w_4sHS-gOmk7j5dDKQjU0fxXLO2eM3UkvR7o1urgeAg,4607
|
|
22
|
+
pyeasyphd/main/pandoc_md_to.py,sha256=r3gJX74PH6Mk8UQjLvJUd0gqBGepzvsoNC05NxmZo7I,16148
|
|
23
|
+
pyeasyphd/main/python_run_md.py,sha256=vFDkYxprepsSQ8VwzubCVDEuxgxR0Rjcp8PfOR9IleA,12624
|
|
24
|
+
pyeasyphd/main/python_run_tex.py,sha256=9Syu8qRjPXN3gEabfRUWxwTFBm_izIcB4yFhsz3QNs0,7672
|
|
25
|
+
pyeasyphd/pyeasyphd.py,sha256=OAwbwq2rSXLSk2AoTAF8hmlOMRSRfvDn1Uqk-zkuqH8,3470
|
|
26
|
+
pyeasyphd/pyeasyphd.sublime-settings,sha256=bpdcKIezFioEMQSqO2VLSABVRjjCCnvlqB3L2nqklhU,2093
|
|
27
|
+
pyeasyphd/pyeasyphd.sublime-syntax,sha256=pXylbA-tye-K5dCTjEJLFVRqtY1T7AgWZ4laxo-dnaE,73
|
|
28
|
+
pyeasyphd/tools/__init__.py,sha256=u1MZu_JjVac3HhEmcSTwroS83UVu0W5Vspy3Wu_-GH8,496
|
|
29
|
+
pyeasyphd/tools/generate/generate_from_bibs.py,sha256=Dp1MyADwIRb9qFTFOkMPJLaeeh7NBjuiSLBN7smP2eo,7640
|
|
30
|
+
pyeasyphd/tools/generate/generate_html.py,sha256=JzUEqgTVCaFzd4hXTYUEf0cVSO1QRe0nVUS72W6oyyU,5349
|
|
31
|
+
pyeasyphd/tools/generate/generate_library.py,sha256=cU043qWCG4CSITuJpyYECdSzWcNCJ5nlRoq1k-0f4p8,7918
|
|
32
|
+
pyeasyphd/tools/generate/generate_links.py,sha256=cDMYkcgtDGUY0nWRNafzIPkIvHxTEvmuaK04ePeck_E,15101
|
|
33
|
+
pyeasyphd/tools/py_run_bib_md_tex.py,sha256=vxUb2F7Uy_RBVvtemq30Jpy0gBsUy2sw2gdK3_b8E78,14208
|
|
34
|
+
pyeasyphd/tools/search/data.py,sha256=ykFEd8Tc04dupiG9Y8viOcEe5g56LCaMH-0KwbV4vt4,10306
|
|
35
|
+
pyeasyphd/tools/search/search_base.py,sha256=qKfWRob5HcUm-psNcT7isNpZCJ95xIvkRElJuXm0x20,5981
|
|
36
|
+
pyeasyphd/tools/search/search_core.py,sha256=Ks_dK69dRfOelaoK_B3fLvmLA9qONgZNb9OxI5HG_V0,17352
|
|
37
|
+
pyeasyphd/tools/search/search_keywords.py,sha256=YCurXuoYeU1ftve0cb8Hcn_g2FXCXf7Zn8EdFZZCBy8,10855
|
|
38
|
+
pyeasyphd/tools/search/search_writers.py,sha256=y-kLtnBbwK1DJqbfQ8z_RQsc9EoxxaQNiXP5eYONxbI,15734
|
|
39
|
+
pyeasyphd/tools/search/utils.py,sha256=bo7xtIZu31dQvjol1lwyWq1t6ldbw28oondwK8VbAqk,7562
|
|
40
|
+
pyeasyphd/utils/utils.py,sha256=9PLLvkI4FVyeCmoEExX-7wslzfjuhMzne8QtJPDQlrw,1788
|
|
41
|
+
pyeasyphd-0.1.5.dist-info/METADATA,sha256=jiO38qRSDb3hJk5srGIjv8EqZzyFmmwvTL7uPh2-E3A,933
|
|
42
|
+
pyeasyphd-0.1.5.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
|
|
43
|
+
pyeasyphd-0.1.5.dist-info/RECORD,,
|
pyeasyphd-0.1.2.dist-info/RECORD
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
pyeasyphd/.python-version,sha256=Auc1s9_hwygz61ULf_j_oX9fK8P6HnuuYaj1o4g845g,5
|
|
2
|
-
pyeasyphd/Main.sublime-menu,sha256=6IKSvXyUSqq-eXrzSVGbzakbrPzw9n7hKe-p-FXmDXM,1561
|
|
3
|
-
pyeasyphd/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
pyeasyphd/main/__init__.py,sha256=2PXcpkfVEni4Snq5OJ_B8drhunh5npFp9J8QaM88BXI,266
|
|
5
|
-
pyeasyphd/main/basic_input.py,sha256=LF1wf7oGXZVQ03BmEFe2EZRBswjIlp93omCjYiwlqr4,5497
|
|
6
|
-
pyeasyphd/main/pandoc_md_to.py,sha256=SPbQBlAvfB5hcXmfKlMDc2zoT2nJ_uQNyw8bHeiyy1s,15280
|
|
7
|
-
pyeasyphd/main/python_run_md.py,sha256=AypAh-GN5P0jCAZrtcBIYSRGul7-DXjzF2RJLZK7FUg,10413
|
|
8
|
-
pyeasyphd/main/python_run_tex.py,sha256=lH0IvkYAM9i6L8gv_DXJTJhncKcIpFN1zaIoMBQ1m3o,5936
|
|
9
|
-
pyeasyphd/pyeasyphd.py,sha256=vPM4uPmr6jSxVOy0zYetoijc8wUkQdXExUVdJyWynVQ,2875
|
|
10
|
-
pyeasyphd/pyeasyphd.sublime-settings,sha256=DbtGidRJhnnNDlcvfoUEtdolNvB04mn9BRxJ6rCzagE,2293
|
|
11
|
-
pyeasyphd/pyeasyphd.sublime-syntax,sha256=pXylbA-tye-K5dCTjEJLFVRqtY1T7AgWZ4laxo-dnaE,73
|
|
12
|
-
pyeasyphd/tools/__init__.py,sha256=9JvQ_Sl_l2bV9b_IyLYPDrPUxTV27zr1wv7xMbIHDPw,369
|
|
13
|
-
pyeasyphd/tools/generate/generate_from_bibs.py,sha256=TNj5icRi_Sq8PaQxdDAvEtVznxLVPGx6H-xOLULCxYo,6960
|
|
14
|
-
pyeasyphd/tools/generate/generate_html.py,sha256=VV-fVsxMMhnwLvzuAu0i-Avp6RcwLGRcrYMSrb_3z3U,4127
|
|
15
|
-
pyeasyphd/tools/generate/generate_library.py,sha256=Qq8JYmPMeCoiBejkd-jMbJoLKaAlgmDh1SjbM6zIM-k,7294
|
|
16
|
-
pyeasyphd/tools/generate/generate_links.py,sha256=BKDCNIzw9cZ0KHRnwKDcI-riqwFmEj2Vv5IVKjBeFTc,14652
|
|
17
|
-
pyeasyphd/tools/py_run_bib_md_tex.py,sha256=aMfdrzbzUG0-EBmfoZcGEywyyU8Bf2WpDEl4wrR0ve4,14790
|
|
18
|
-
pyeasyphd/tools/search/data.py,sha256=7uHXfHTcn88zkfqAGZMNcSd2OjS2LhkpE9paNuSUUqw,10754
|
|
19
|
-
pyeasyphd/tools/search/search_base.py,sha256=-nHa0gXF9zu2-qFTlhFUyHtVQbi7-orua4lKQB8cIzw,4665
|
|
20
|
-
pyeasyphd/tools/search/search_core.py,sha256=2OOGzA81f_u0fGAopqtU7KEyjJfQJ_2rPt782S53FAk,13853
|
|
21
|
-
pyeasyphd/tools/search/search_keywords.py,sha256=zhHdg97VT92AxrWuabsvPKe7OyQsssipTrepoXOLSGc,10445
|
|
22
|
-
pyeasyphd/tools/search/search_writers.py,sha256=5n4JA0qPvCNeK3KMx5WSYFCb5M640TjIekHcD4HTwo4,12722
|
|
23
|
-
pyeasyphd/tools/search/utils.py,sha256=yLKrMmM2x-fHdm6P8haFZzagd9sLkViTdwJTHyGRgXY,6092
|
|
24
|
-
pyeasyphd/utils/utils.py,sha256=yuHy6D2mTsd2aAwNBSMC7CU4LV-MkWwzKeO_0Iehbyg,1655
|
|
25
|
-
pyeasyphd-0.1.2.dist-info/METADATA,sha256=9zI6H35UQXGNX-xs72BdkiXLpFCBcNpgGPM-Ya9LQ0w,933
|
|
26
|
-
pyeasyphd-0.1.2.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
|
|
27
|
-
pyeasyphd-0.1.2.dist-info/RECORD,,
|
|
File without changes
|