pyeasyphd 0.0.7__py3-none-any.whl → 0.0.8__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/main/basic_input.py
CHANGED
|
@@ -45,13 +45,19 @@ class BasicInput(object):
|
|
|
45
45
|
# Update
|
|
46
46
|
path_config = standard_path(options.get("path_config", ""))
|
|
47
47
|
if len(self.path_bibs) == 0:
|
|
48
|
-
for folder in [
|
|
48
|
+
for folder in [
|
|
49
|
+
"bib", "bibs", "Bib", "Bibs", "BIB", "BIBS",
|
|
50
|
+
"reference", "references", "Reference", "References", "REFERENCE", "REFERENCES"
|
|
51
|
+
]:
|
|
49
52
|
if os.path.exists(p := os.path.join(path_config, folder)):
|
|
50
53
|
self.path_bibs = p
|
|
51
54
|
break
|
|
52
55
|
|
|
53
56
|
if len(self.path_figures) == 0:
|
|
54
|
-
for folder in [
|
|
57
|
+
for folder in [
|
|
58
|
+
"figure", "figures", "Figure", "Figures", "FIGURE", "FIGURES",
|
|
59
|
+
"fig", "figs", "Fig", "Figs", "FIG", "FIGS",
|
|
60
|
+
]:
|
|
55
61
|
if os.path.exists(p := os.path.join(path_config, folder)):
|
|
56
62
|
self.path_figures = p
|
|
57
63
|
break
|
|
@@ -128,18 +134,26 @@ class BasicInput(object):
|
|
|
128
134
|
csl_name = options.get("csl_name", "apa-no-ampersand")
|
|
129
135
|
if len(csl_name) == 0:
|
|
130
136
|
csl_name = "apa-no-ampersand"
|
|
131
|
-
self.full_csl_style_pandoc = os.path.join(self.path_templates, "CSL", f"{csl_name}.csl")
|
|
132
|
-
self.full_tex_article_template_pandoc = os.path.join(self.path_templates, "TEX", "eisvogel.tex")
|
|
133
137
|
|
|
134
|
-
|
|
138
|
+
full_csl_style_pandoc = os.path.join(self.path_templates, "CSL", f"{csl_name}.csl")
|
|
139
|
+
if (p := options.get("full_csl")) is not None:
|
|
140
|
+
full_csl_style_pandoc = p
|
|
141
|
+
self.full_csl_style_pandoc = full_csl_style_pandoc
|
|
142
|
+
|
|
143
|
+
full_tex_article_template_pandoc = os.path.join(self.path_templates, "TEX", "eisvogel.tex")
|
|
144
|
+
if (p := options.get("full_eisvogel")) is not None:
|
|
145
|
+
full_tex_article_template_pandoc = p
|
|
146
|
+
self.full_tex_article_template_pandoc = full_tex_article_template_pandoc
|
|
147
|
+
|
|
148
|
+
self.article_template_tex = self._try_read_list(options, "TEX", "Article.tex", "full_article")
|
|
135
149
|
|
|
136
150
|
def _initialize_python_run_tex(self, options: Dict[str, Any]) -> None:
|
|
137
|
-
self.article_template_header_tex =
|
|
138
|
-
self.article_template_tail_tex =
|
|
139
|
-
self.beamer_template_header_tex =
|
|
140
|
-
self.beamer_template_tail_tex =
|
|
141
|
-
self.math_commands_tex =
|
|
142
|
-
self.usepackages_tex =
|
|
151
|
+
self.article_template_header_tex = self._try_read_list(options, "TEX", "Article_Header.tex", "full_article_header")
|
|
152
|
+
self.article_template_tail_tex = self._try_read_list(options, "TEX", "Article_Tail.tex", "full_article_tail")
|
|
153
|
+
self.beamer_template_header_tex = self._try_read_list(options, "TEX", "Beamer_Header.tex", "full_beamer_header")
|
|
154
|
+
self.beamer_template_tail_tex = self._try_read_list(options, "TEX", "Beamer_Tail.tex", "full_beamer_tail")
|
|
155
|
+
self.math_commands_tex = self._try_read_list(options, "TEX", "math_commands.tex", "full_math_commands")
|
|
156
|
+
self.usepackages_tex = self._try_read_list(options, "TEX", "Style.tex", "full_usepackages_tex")
|
|
143
157
|
|
|
144
158
|
# handly preamble
|
|
145
159
|
self.handly_preamble = options.get("handly_preamble", False)
|
|
@@ -147,3 +161,17 @@ class BasicInput(object):
|
|
|
147
161
|
self.article_template_header_tex, self.article_template_tail_tex = [], []
|
|
148
162
|
self.beamer_template_header_tex, self.beamer_template_tail_tex = [], []
|
|
149
163
|
self.math_commands_tex, self.usepackages_tex = [], []
|
|
164
|
+
|
|
165
|
+
def _try_read_list(self, options: Dict[str, Any], folder_name: str, file_name: str, key: str):
|
|
166
|
+
path_file = os.path.join(self.path_templates, folder_name, file_name)
|
|
167
|
+
if (p := options.get(key)) is None:
|
|
168
|
+
return []
|
|
169
|
+
else:
|
|
170
|
+
path_file = p
|
|
171
|
+
|
|
172
|
+
try:
|
|
173
|
+
data_list = read_list(path_file)
|
|
174
|
+
except Exception as e:
|
|
175
|
+
print(e)
|
|
176
|
+
data_list = []
|
|
177
|
+
return data_list
|
|
@@ -48,7 +48,7 @@ pyeasyphd/bib/core/convert_library_to_str.py,sha256=yvea1NUobcn2NF9CtvrjmNN1IU23
|
|
|
48
48
|
pyeasyphd/bib/core/convert_str_to_library.py,sha256=CNB5UfSOcCqPPypxm9yIY7R7kvLQ_fzRPIqKwdegToY,1017
|
|
49
49
|
pyeasyphd/bib/core/convert_str_to_str.py,sha256=jUxXD3v7t042OaMXPFlWGHjNNukpuoel12TpYt1krD4,900
|
|
50
50
|
pyeasyphd/main/__init__.py,sha256=7_x6_RNSeha2zrgIbKjJgEvFWK62btOW9v6RUU1Ygm8,390
|
|
51
|
-
pyeasyphd/main/basic_input.py,sha256=
|
|
51
|
+
pyeasyphd/main/basic_input.py,sha256=NvY6m5anBmzoUWKkHOmCOQoE8unsIcEtiL3HGO5lIrY,7830
|
|
52
52
|
pyeasyphd/main/pandoc_md_to.py,sha256=SPbQBlAvfB5hcXmfKlMDc2zoT2nJ_uQNyw8bHeiyy1s,15280
|
|
53
53
|
pyeasyphd/main/python_run_bib.py,sha256=RRVeGXXs1MELpAYex9vT3x97Rqr211TP1aeHhD-8hXU,2891
|
|
54
54
|
pyeasyphd/main/python_run_md.py,sha256=6K4zqYtl298-iS1XVGH4jY9FkDD9ezwpGfZk0NIgk2Q,10353
|
|
@@ -75,6 +75,6 @@ pyeasyphd/tools/spider/process_spider_bib.py,sha256=p1UNUaLAxMZPYtuwjNi20e1ms--c
|
|
|
75
75
|
pyeasyphd/tools/spider/process_spider_url.py,sha256=YKG4GER5TiFDjyk94n1ocUQ8bM7ZvXImx0lKNvnyVC4,2970
|
|
76
76
|
pyeasyphd/tools/spider/process_spider_url_bib.py,sha256=1b0FnUlTt5BzaOqFZJmnY5gnAhdD4pbQolHR1e3wiyE,2705
|
|
77
77
|
pyeasyphd/utils/utils.py,sha256=yuHy6D2mTsd2aAwNBSMC7CU4LV-MkWwzKeO_0Iehbyg,1655
|
|
78
|
-
pyeasyphd-0.0.
|
|
79
|
-
pyeasyphd-0.0.
|
|
80
|
-
pyeasyphd-0.0.
|
|
78
|
+
pyeasyphd-0.0.8.dist-info/METADATA,sha256=VVwuD78Df3XkQh66SNcfeGJ6l22Oj4qdYFXC24SMIE4,1043
|
|
79
|
+
pyeasyphd-0.0.8.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
80
|
+
pyeasyphd-0.0.8.dist-info/RECORD,,
|
|
File without changes
|