pyeasyphd 0.0.3__py3-none-any.whl → 0.0.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.

@@ -128,18 +128,18 @@ class BasicInput(object):
128
128
  csl_name = options.get("csl_name", "apa-no-ampersand")
129
129
  if len(csl_name) == 0:
130
130
  csl_name = "apa-no-ampersand"
131
- self.full_csl_style_pandoc = os.path.join(self.path_templates, f"CSL/{csl_name}.csl")
132
- self.full_tex_article_template_pandoc = os.path.join(self.path_templates, "TEX/eisvogel.tex")
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
133
 
134
- self.article_template_tex = read_list(os.path.join(self.path_templates, "TEX/Article.tex"))
134
+ self.article_template_tex = read_list(os.path.join(self.path_templates, "TEX", "Article.tex"))
135
135
 
136
136
  def _initialize_python_run_tex(self, options: Dict[str, Any]) -> None:
137
- self.article_template_header_tex = read_list(os.path.join(self.path_templates, "TEX/Article_Header.tex"))
138
- self.article_template_tail_tex = read_list(os.path.join(self.path_templates, "TEX/Article_Tail.tex"))
139
- self.beamer_template_header_tex = read_list(os.path.join(self.path_templates, "TEX/Beamer_Header.tex"))
140
- self.beamer_template_tail_tex = read_list(os.path.join(self.path_templates, "TEX/Beamer_Tail.tex"))
141
- self.math_commands_tex = read_list(os.path.join(self.path_templates, "TEX/math_commands.tex"))
142
- self.usepackages_tex = read_list(os.path.join(self.path_templates, "TEX/Style.tex"))
137
+ self.article_template_header_tex = read_list(os.path.join(self.path_templates, "TEX", "Article_Header.tex"))
138
+ self.article_template_tail_tex = read_list(os.path.join(self.path_templates, "TEX", "Article_Tail.tex"))
139
+ self.beamer_template_header_tex = read_list(os.path.join(self.path_templates, "TEX", "Beamer_Header.tex"))
140
+ self.beamer_template_tail_tex = read_list(os.path.join(self.path_templates, "TEX", "Beamer_Tail.tex"))
141
+ self.math_commands_tex = read_list(os.path.join(self.path_templates, "TEX", "math_commands.tex"))
142
+ self.usepackages_tex = read_list(os.path.join(self.path_templates, "TEX", "Style.tex"))
143
143
 
144
144
  # handly preamble
145
145
  self.handly_preamble = options.get("handly_preamble", False)
@@ -323,8 +323,8 @@ class PandocMdTo(BasicInput):
323
323
  def generate_tex_content(self, file_prefix: str, path_subsection: str, path_bib: str, path_combine: str) -> None:
324
324
  # for latex
325
325
  # add template for tex file
326
- add_bib_name = "{}/{}-abbr.bib".format(os.path.basename(path_bib), file_prefix)
327
- add_tex_name = "{}/{}.tex".format(os.path.basename(path_subsection), file_prefix)
326
+ add_bib_name = os.path.join(os.path.basename(path_bib), f"{file_prefix}-abbr.bib")
327
+ add_tex_name = os.path.join(os.path.basename(path_subsection), f"{file_prefix}.tex")
328
328
  insert_part_one, insert_part_two = self._generate_tex_content(file_prefix, add_tex_name, add_bib_name)
329
329
 
330
330
  # write tex
@@ -343,9 +343,9 @@ class PandocMdTo(BasicInput):
343
343
  part_one = [
344
344
  "\\date{" + "{}".format(time.strftime("%B %d, %Y")) + "}\n\n",
345
345
  "\\ifx \\fullpath \\undefined\n",
346
- " \\addbibresource{" + "../{}".format(add_bib_name) + "}\n",
346
+ " \\addbibresource{" + os.path.join("..", add_bib_name) + "}\n",
347
347
  "\\else\n",
348
- " \\addbibresource{" + "\\fullpath/{}".format(add_bib_name) + "}\n",
348
+ " \\addbibresource{" + os.path.join("\\fullpath", add_bib_name) + "}\n",
349
349
  "\\fi\n\n",
350
350
  ]
351
351
  part_two = [
@@ -353,9 +353,9 @@ class PandocMdTo(BasicInput):
353
353
  "% \\maketitle\n",
354
354
  "\\tableofcontents\n\n",
355
355
  "\\ifx \\fullpath \\undefined\n",
356
- " \\input{" + "../{}".format(add_tex_name) + "}\n",
356
+ " \\input{" + os.path.join("..", add_tex_name) + "}\n",
357
357
  "\\else\n",
358
- " \\input{" + "\\fullpath/{}".format(add_tex_name) + "}\n",
358
+ " \\input{" + os.path.join("\\fullpath", add_tex_name) + "}\n",
359
359
  "\\fi\n",
360
360
  ]
361
361
  return part_one, part_two
@@ -48,8 +48,8 @@ class PythonRunTex(BasicInput):
48
48
  # for figures
49
49
  for i in range(len(data_list_body)):
50
50
  if re.search(r"\\includegraphics", data_list_body[i]):
51
- data_list_body[i] = data_list_body[i].replace("./Figures/", f"./{figure_folder_name}/")
52
- data_list_body[i] = data_list_body[i].replace("Figures/", f"{figure_folder_name}/")
51
+ data_list_body[i] = data_list_body[i].replace(f".{os.sep}Figures{os.sep}", f".{os.sep}{figure_folder_name}{os.sep}")
52
+ data_list_body[i] = data_list_body[i].replace(f"Figures{os.sep}", f"{figure_folder_name}{os.sep}")
53
53
  write_list(data_list_body, output_tex_name, "w", os.path.join(path_output, tex_folder_name), False)
54
54
 
55
55
  self._special_operate_tex(
@@ -105,15 +105,15 @@ class PythonRunTex(BasicInput):
105
105
  data_list = insert_list_in_list(data_list, ["\n\\def\\cn{}\n"], r"\\documentclass", "after")
106
106
 
107
107
  # for bib
108
- regex = re.compile(r"\\addbibresource{\./References/References\.bib}")
108
+ regex = re.compile(r"\\addbibresource{" + os.path.join(".", "References", "References.bib") + "}")
109
109
  for i in range(len(data_list)):
110
110
  mch = regex.search(data_list[i])
111
111
  if not mch:
112
112
  continue
113
113
  if bib_folder_name:
114
- data_list[i] = "\\addbibresource{" + f"./{bib_folder_name}/{bib_name}" + "}\n"
114
+ data_list[i] = "\\addbibresource{" + os.path.join(".", bib_folder_name, bib_name) + "}\n"
115
115
  else:
116
- data_list[i] = "\\addbibresource{" + f"./{bib_name}" + "}\n"
116
+ data_list[i] = "\\addbibresource{" + os.path.join(".", bib_name) + "}\n"
117
117
 
118
118
  # body
119
119
  if len(data_list_body) != 0:
@@ -172,7 +172,7 @@ def generate_statistic_information(path_output: str) -> None:
172
172
  informations.append(flag + "\n")
173
173
 
174
174
  # Write information to CSV file
175
- csv_path = f.replace(".bib", ".csv").replace("/bib/", "/url/")
175
+ csv_path = f.replace(".bib", ".csv").replace(f"{os.sep}bib{os.sep}", f"{os.sep}url{os.sep}")
176
176
  write_list(informations, csv_path, "w", None, False)
177
177
 
178
178
  return None
@@ -305,7 +305,7 @@ class SearchResultsCore(BasicInput):
305
305
 
306
306
  for d in delete_folder_list:
307
307
  for field in self.search_field_list:
308
- path_delete = os.path.join(p_separate, rf"{keywords_type}/{field}-md-{d}")
308
+ path_delete = os.path.join(p_separate, keywords_type, rf"{field}-md-{d}")
309
309
  if os.path.exists(path_delete):
310
310
  shutil.rmtree(path_delete)
311
311
 
@@ -73,7 +73,7 @@ class WriteInitialResult(object):
73
73
  _python_writer.write_to_file(data_list[i], file_name, "w", path_write)
74
74
 
75
75
  # pandoc md to generate md file
76
- path_bib = f"{path_write}/{file_prefix}{mid_list[2]}.bib" # bib_for_abbr
76
+ path_bib = os.path.join(path_write, f"{file_prefix}{mid_list[2]}.bib") # bib_for_abbr
77
77
  data_list_pandoc_md = self._pandoc_md_to.pandoc_md_to_md(
78
78
  path_bib,
79
79
  path_write,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pyeasyphd
3
- Version: 0.0.3
3
+ Version: 0.0.5
4
4
  Summary: pyeasyphd
5
5
  License: GPL-3.0-or-later
6
6
  Keywords: Python,Markdown,LaTex
@@ -48,11 +48,11 @@ 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=Oh-JG4BtdVimJHtINq4zkfvN4av1bJ39ZErmJISaJHE,6767
52
- pyeasyphd/main/pandoc_md_to.py,sha256=hRajMqlPl879qQKOE-MLtCE-KL9U5y2GO6et8cgkm8w,14806
51
+ pyeasyphd/main/basic_input.py,sha256=b2ilzgslD2W-10gLM3RM3zBn3-MxFkYeHeTzdILzbAU,6794
52
+ pyeasyphd/main/pandoc_md_to.py,sha256=oC9KXnMqBJKKDvtBBMLkmPmcisWvWD0XiUwv18FUEbY,14828
53
53
  pyeasyphd/main/python_run_bib.py,sha256=RRVeGXXs1MELpAYex9vT3x97Rqr211TP1aeHhD-8hXU,2891
54
54
  pyeasyphd/main/python_run_md.py,sha256=6K4zqYtl298-iS1XVGH4jY9FkDD9ezwpGfZk0NIgk2Q,10353
55
- pyeasyphd/main/python_run_tex.py,sha256=LQirSh_5Mv5t-SdAtV5Ge2aCTTkvaPNAloFTH6hkzCI,5691
55
+ pyeasyphd/main/python_run_tex.py,sha256=P5jqnyRfKyUJFvhd7LgASmwlfkHSJ0Br9_jeYwp2Ojg,5786
56
56
  pyeasyphd/main/python_writers.py,sha256=VQpaAbdNNa1s327ADgl8Wy-rKBZy1alqmtmx6E3RDWI,8510
57
57
  pyeasyphd/pyeasyphd.py,sha256=vPM4uPmr6jSxVOy0zYetoijc8wUkQdXExUVdJyWynVQ,2875
58
58
  pyeasyphd/pyeasyphd.sublime-settings,sha256=6D5SYWsG6xn8OEu6IchIDGGGH7uLX4v451X28yeAevU,8718
@@ -60,21 +60,21 @@ pyeasyphd/pyeasyphd.sublime-syntax,sha256=pXylbA-tye-K5dCTjEJLFVRqtY1T7AgWZ4laxo
60
60
  pyeasyphd/tools/__init__.py,sha256=4l2e19MWmVrAvIH3IOA7v1EPaaBBvuq1UbXhmd6_bts,1041
61
61
  pyeasyphd/tools/compare/compare_bibs.py,sha256=QZlqVHbF133nnZZpzDa6jYlkHnai_x7kqgq62hpIzw0,10156
62
62
  pyeasyphd/tools/experiments_base.py,sha256=mx-vt0dpgjhsYcRyVpQkzdbJw_CFXcaaYt81w13y4Tc,7639
63
- pyeasyphd/tools/format_save_bibs.py,sha256=vChgzsg45MT6IkeN8ZuJhMdGDMIvwmH8NGr16IuQwy4,7043
63
+ pyeasyphd/tools/format_save_bibs.py,sha256=mRwrilzC4coul-Bf8aZwrCOCZB9ah_G-Zy9DcGAr_4Q,7073
64
64
  pyeasyphd/tools/generate/generate_from_bibs.py,sha256=RP-ADsmUsM6lEUaHDMAv6DSVrsx5wHyHsRVDVZwjaeM,17794
65
65
  pyeasyphd/tools/generate/generate_links.py,sha256=lnPf8FmksPDBtb30wHarr7y9cdFm3ELnKZwXIKHukyw,13700
66
66
  pyeasyphd/tools/py_run_bib_md_tex.py,sha256=lc6JqfXeJSMA8icTJTC7X1pq4tgurOaXq9f0-LSJK7g,14657
67
67
  pyeasyphd/tools/replace/replace.py,sha256=wXdO72PpqZ-Iyzq5AjVCIpx8h2d1YCTiWY9VSbQAVvs,3337
68
68
  pyeasyphd/tools/search/data.py,sha256=7uHXfHTcn88zkfqAGZMNcSd2OjS2LhkpE9paNuSUUqw,10754
69
69
  pyeasyphd/tools/search/search_base.py,sha256=Q8IWqVLk-rGZwRZ316WkZNs0qyF7PVHP6lx6Ul5mLKI,4507
70
- pyeasyphd/tools/search/search_core.py,sha256=16nVB2j3mtrTxUJKgtYg65ux6bI81ofTHn1IAB3twPc,13783
70
+ pyeasyphd/tools/search/search_core.py,sha256=Gn_9vWojSn4Pg5jOaN54Kiv1osW3TM6D3SvZ53Xk9-Y,13782
71
71
  pyeasyphd/tools/search/search_keywords.py,sha256=O_ivQzElsjujTHqU0Sxw4w4v3VwcN560HcoBhS1B3WA,10430
72
- pyeasyphd/tools/search/search_writers.py,sha256=TuQGm9QwHy0bZHNtO_qg-MYEcip_rUPfwHyvPKO-sEg,12551
72
+ pyeasyphd/tools/search/search_writers.py,sha256=qP6UE_oK2LKriP7kfoDR4j8p7MlV09zdK7LnXHHB1_8,12564
73
73
  pyeasyphd/tools/search/utils.py,sha256=yLKrMmM2x-fHdm6P8haFZzagd9sLkViTdwJTHyGRgXY,6092
74
74
  pyeasyphd/tools/spider/process_spider_bib.py,sha256=p1UNUaLAxMZPYtuwjNi20e1ms--cyjlB7CIZFP3SX6U,10443
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.3.dist-info/METADATA,sha256=kdJqcjdJmco0oqwtJJGkTAhThc5va21YIm58E6XYGzM,1043
79
- pyeasyphd-0.0.3.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
80
- pyeasyphd-0.0.3.dist-info/RECORD,,
78
+ pyeasyphd-0.0.5.dist-info/METADATA,sha256=OLfqsS9SEDB7k9-kU8hD_egVQHpxqRL5grdJl_Cnn9U,1043
79
+ pyeasyphd-0.0.5.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
80
+ pyeasyphd-0.0.5.dist-info/RECORD,,