pyeasyphd 0.1.5__py3-none-any.whl → 0.1.6__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.

@@ -46,15 +46,19 @@
46
46
  ],
47
47
 
48
48
  // pyeasyphd/tools/python_run_latex_md.py
49
+ // Path to bibliographic data, can be either a directory path or a specific file path
50
+ "bib_path_or_file": "",
51
+
52
+ // Path to the figures directory (must be a directory path, not a file)
53
+ "figures_directory": "",
54
+ // ture, false
55
+ "shutil_figures": true,
56
+
49
57
  // true, false
50
58
  "generate_html": false,
51
-
52
59
  // true, false
53
60
  "generate_tex": true,
54
61
 
55
- // ture, false
56
- "shutil_figures": true,
57
-
58
62
  // for figure, bib, tex, and md
59
63
  "figure_folder_name": "fig", // "" or "figs" or "main"
60
64
  "bib_folder_name": "bib", // "" or "bibs" or "main"
@@ -18,7 +18,11 @@ class PyRunBibMdTex(BasicInput):
18
18
  """
19
19
 
20
20
  def __init__(
21
- self, path_output: str, tex_md_flag: str = ".md", template_name: str = "paper", options: Dict[str, Any] = {}
21
+ self,
22
+ path_output: str,
23
+ tex_md_flag: str = ".md",
24
+ template_name: str = "paper",
25
+ options: Dict[str, Any] = {}
22
26
  ) -> None:
23
27
  """Initialize the PyRunBibMdTex instance.
24
28
 
@@ -39,13 +43,18 @@ class PyRunBibMdTex(BasicInput):
39
43
  assert self.template_name in ["paper", "beamer"], f"{template_name} must be `paper` or `beamer`."
40
44
  self.path_output = standard_path(path_output)
41
45
 
42
- self.path_bibs = ""
43
- self.path_figures = ""
46
+ # Bib
47
+ # Path to bibliographic data, can be either a directory path or a specific file path
48
+ self.bib_path_or_file = options.get("bib_path_or_file", "")
49
+
50
+ # Figures
51
+ # Path to the figures directory (must be a directory path, not a file)
52
+ self.figures_directory = options.get("figures_directory", "")
53
+ self.shutil_figures = options.get("shutil_figures", True)
44
54
 
45
55
  # Configuration options
46
56
  self.generate_html = options.get("generate_html", False)
47
57
  self.generate_tex = options.get("generate_tex", True)
48
- self.shutil_figures = options.get("shutil_figures", True)
49
58
 
50
59
  # Folder name configurations
51
60
  self.figure_folder_name = options.get("figure_folder_name", "fig") # "" or "figs" or "main"
@@ -89,7 +98,7 @@ class PyRunBibMdTex(BasicInput):
89
98
  data_list_md_tex = combine_content_in_list(data_list_list, ["\n"])
90
99
 
91
100
  content_md, content_tex = self.python_run_bib_md_tex(
92
- output_prefix, data_list_md_tex, self.path_bibs, output_level
101
+ output_prefix, data_list_md_tex, self.bib_path_or_file, output_level
93
102
  )
94
103
  return content_md, content_tex
95
104
 
@@ -161,7 +170,7 @@ class PyRunBibMdTex(BasicInput):
161
170
  # Copy figures if enabled
162
171
  if self.shutil_figures:
163
172
  figure_names = self.search_figure_names(data_list_md_tex)
164
- self.shutil_copy_figures(self.figure_folder_name, self.path_figures, figure_names, self.path_output)
173
+ self.shutil_copy_figures(self.figure_folder_name, self.figures_directory, figure_names, self.path_output)
165
174
 
166
175
  # Extract citation keys from content
167
176
  key_in_md_tex = self.search_cite_keys(data_list_md_tex, self.tex_md_flag)
@@ -258,8 +267,11 @@ class PyRunBibMdTex(BasicInput):
258
267
  fig_names (List[str]): List of figure filenames to copy.
259
268
  path_output (str): Output directory path.
260
269
  """
270
+ if not fig_names:
271
+ return None
272
+
261
273
  if not os.path.exists(path_fig):
262
- print(f"{path_fig} does not existed.")
274
+ print(f"The specified figure directory: {path_fig} does not exist.")
263
275
  return None
264
276
 
265
277
  file_list = []
@@ -268,6 +280,10 @@ class PyRunBibMdTex(BasicInput):
268
280
  if name in fig_names:
269
281
  file_list.append(os.path.join(root, name))
270
282
 
283
+ not_founded_figures = list(set([os.path.basename(f) for f in file_list]).intersection(set(fig_names)))
284
+ if not_founded_figures:
285
+ print(f"Figures: {', '.join(not_founded_figures)} could not be found.")
286
+
271
287
  for file in file_list:
272
288
  path_output_file = os.path.join(path_output, fig_folder_name, os.path.basename(file))
273
289
  p = os.path.dirname(path_output_file)
@@ -62,7 +62,6 @@ class SearchInitialResult(BasicInput):
62
62
  Args:
63
63
  options (dict): Configuration options.
64
64
  """
65
- self.options = options
66
65
  super().__init__(options)
67
66
 
68
67
  self.print_on_screen: bool = options.get("print_on_screen", False)
@@ -28,8 +28,6 @@ class WriteInitialResult(BasicInput):
28
28
  """
29
29
  super().__init__(options)
30
30
 
31
- self.options = options
32
-
33
31
  self._level_title_md = "###"
34
32
  self._level_title_tex = "subsection"
35
33
  self._pandoc_md_to = PandocMdTo(options)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyeasyphd
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: pyeasyphd
5
5
  License: GPL-3.0-or-later
6
6
  Keywords: Python,Markdown,LaTex
@@ -15,7 +15,7 @@ Classifier: Programming Language :: Python :: 3.13
15
15
  Classifier: Programming Language :: Python :: 3.14
16
16
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
17
  Requires-Dist: pyadvtools (>=0.1.5,<0.2.0)
18
- Requires-Dist: pybibtexer (>=0.1.5,<0.2.0)
18
+ Requires-Dist: pybibtexer (>=0.1.6,<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
@@ -23,21 +23,21 @@ pyeasyphd/main/pandoc_md_to.py,sha256=r3gJX74PH6Mk8UQjLvJUd0gqBGepzvsoNC05NxmZo7
23
23
  pyeasyphd/main/python_run_md.py,sha256=vFDkYxprepsSQ8VwzubCVDEuxgxR0Rjcp8PfOR9IleA,12624
24
24
  pyeasyphd/main/python_run_tex.py,sha256=9Syu8qRjPXN3gEabfRUWxwTFBm_izIcB4yFhsz3QNs0,7672
25
25
  pyeasyphd/pyeasyphd.py,sha256=OAwbwq2rSXLSk2AoTAF8hmlOMRSRfvDn1Uqk-zkuqH8,3470
26
- pyeasyphd/pyeasyphd.sublime-settings,sha256=bpdcKIezFioEMQSqO2VLSABVRjjCCnvlqB3L2nqklhU,2093
26
+ pyeasyphd/pyeasyphd.sublime-settings,sha256=mg1KzfdoLBc5Wt2HjCsd3WVefg0Pe45_VGG9AzeJ1uo,2316
27
27
  pyeasyphd/pyeasyphd.sublime-syntax,sha256=pXylbA-tye-K5dCTjEJLFVRqtY1T7AgWZ4laxo-dnaE,73
28
28
  pyeasyphd/tools/__init__.py,sha256=u1MZu_JjVac3HhEmcSTwroS83UVu0W5Vspy3Wu_-GH8,496
29
29
  pyeasyphd/tools/generate/generate_from_bibs.py,sha256=Dp1MyADwIRb9qFTFOkMPJLaeeh7NBjuiSLBN7smP2eo,7640
30
30
  pyeasyphd/tools/generate/generate_html.py,sha256=JzUEqgTVCaFzd4hXTYUEf0cVSO1QRe0nVUS72W6oyyU,5349
31
31
  pyeasyphd/tools/generate/generate_library.py,sha256=cU043qWCG4CSITuJpyYECdSzWcNCJ5nlRoq1k-0f4p8,7918
32
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
33
+ pyeasyphd/tools/py_run_bib_md_tex.py,sha256=fqwWAEbS3GcBxCcsJGh0Kf-pk18B7LirzbvdmfmGGls,14845
34
34
  pyeasyphd/tools/search/data.py,sha256=ykFEd8Tc04dupiG9Y8viOcEe5g56LCaMH-0KwbV4vt4,10306
35
- pyeasyphd/tools/search/search_base.py,sha256=qKfWRob5HcUm-psNcT7isNpZCJ95xIvkRElJuXm0x20,5981
35
+ pyeasyphd/tools/search/search_base.py,sha256=JR80m72UBJu__CWV1KP7ixPhK1uDyApPhDaExrlzfKM,5950
36
36
  pyeasyphd/tools/search/search_core.py,sha256=Ks_dK69dRfOelaoK_B3fLvmLA9qONgZNb9OxI5HG_V0,17352
37
37
  pyeasyphd/tools/search/search_keywords.py,sha256=YCurXuoYeU1ftve0cb8Hcn_g2FXCXf7Zn8EdFZZCBy8,10855
38
- pyeasyphd/tools/search/search_writers.py,sha256=y-kLtnBbwK1DJqbfQ8z_RQsc9EoxxaQNiXP5eYONxbI,15734
38
+ pyeasyphd/tools/search/search_writers.py,sha256=Dz6D8m17R7x8NT7_PCjwmzlq29AfUz-N6sjyCguDTo4,15702
39
39
  pyeasyphd/tools/search/utils.py,sha256=bo7xtIZu31dQvjol1lwyWq1t6ldbw28oondwK8VbAqk,7562
40
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,,
41
+ pyeasyphd-0.1.6.dist-info/METADATA,sha256=U0wBLxkrZ4rPc7UFOPAfvmXwj6fK90E4aWFhV6CLM-M,933
42
+ pyeasyphd-0.1.6.dist-info/WHEEL,sha256=M5asmiAlL6HEcOq52Yi5mmk9KmTVjY2RDPtO4p9DMrc,88
43
+ pyeasyphd-0.1.6.dist-info/RECORD,,