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

@@ -10,7 +10,7 @@ def run_article_md_daily_notes(
10
10
  bib_path_or_file: str,
11
11
  path_conferences_journals_json: str,
12
12
  options: dict
13
- ):
13
+ ) -> None:
14
14
  """
15
15
  Run article markdown daily notes processing pipeline.
16
16
 
@@ -21,7 +21,13 @@ def run_article_md_daily_notes(
21
21
  bib_path_or_file (str): Path to bibliography file or directory
22
22
  path_conferences_journals_json (str): Path to conferences and journals JSON files directory
23
23
  options (dict): Additional options to override default settings
24
+
25
+ Returns:
26
+ None
24
27
  """
28
+ path_input_file = os.path.expandvars(os.path.expanduser(path_input_file))
29
+ path_output_file = os.path.expandvars(os.path.expanduser(path_output_file))
30
+
25
31
  # Initialize default options with detailed descriptions
26
32
  _options = {
27
33
  "full_json_c": os.path.expanduser(os.path.join(path_conferences_journals_json, "conferences.json")),
@@ -97,3 +103,5 @@ def run_article_md_daily_notes(
97
103
  })
98
104
 
99
105
  PyRunBibMdTex(path_output_file, ".md", "paper", _options).run_files(file_list, "", "current")
106
+
107
+ return None
@@ -0,0 +1,119 @@
1
+ import os
2
+
3
+ from pyadvtools import GitAutoCommitter
4
+
5
+ from pyeasyphd.tools import PyRunBibMdTex
6
+
7
+
8
+ def run_article_tex_submit(
9
+ path_input_file: str,
10
+ input_file_names: list[str],
11
+ path_output_file: str,
12
+ bib_path_or_file: str,
13
+ path_conferences_journals_json: str,
14
+ options: dict
15
+ ) -> None:
16
+ """
17
+ Process academic article files (TeX, and bibliography) with automated Git version control.
18
+
19
+ This function handles the conversion and processing of academic article files including TeX documents, and
20
+ bibliography management with automatic Git commit and push capabilities.
21
+
22
+ Note: The raw figures and TeX source files must be located in the data/raw subdirectory of the input path.
23
+
24
+ Args:
25
+ path_input_file (str): Path to input files directory
26
+ input_file_names (list[str]): List of input file names
27
+ path_output_file (str): Path to output directory
28
+ bib_path_or_file (str): Path to bibliography file or directory
29
+ path_conferences_journals_json (str): Path to conferences and journals JSON files directory
30
+ options (dict): Additional options to override default settings
31
+
32
+ Returns:
33
+ None
34
+ """
35
+ path_input_file = os.path.expandvars(os.path.expanduser(path_input_file))
36
+ path_output_file = os.path.expandvars(os.path.expanduser(path_output_file))
37
+
38
+ # Initialize default options with detailed descriptions
39
+ _options = {
40
+ "full_json_c": os.path.expanduser(os.path.join(path_conferences_journals_json, "conferences.json")),
41
+ "full_json_j": os.path.expanduser(os.path.join(path_conferences_journals_json, "journals.json")),
42
+
43
+ # figure options
44
+ "includegraphics_figs_directory": os.path.join(path_input_file, "data", "raw"),
45
+ "shutil_includegraphics_figs": True,
46
+ "includegraphics_figs_in_relative_path": True,
47
+ "figure_folder_name": "figs", # "" or "figs" or "main"
48
+
49
+ # bib options
50
+ "abbr_index_article_for_abbr": 1, # 0, 1, 2
51
+ "abbr_index_inproceedings_for_abbr": 0, # 0, 1, 2
52
+ "add_link_to_fields_for_abbr": None, # None, or ["title", "journal", "booktitle"]
53
+ "maximum_authors_for_abbr": 0, # 0, 1, 2, ...
54
+ "add_index_to_entries": False,
55
+ "bib_for_abbr_name": "abbr.bib",
56
+ "bib_for_zotero_name": "zotero.bib",
57
+ "bib_for_save_name": "save.bib",
58
+ "display_google_connected_scite": ["google", "connected", "scite"],
59
+
60
+ "bib_folder_name": "bibs", # "" or "bib" or "bibs" or "main"
61
+ "delete_original_bib_in_output_folder": False,
62
+ "bib_path_or_file": os.path.expanduser(bib_path_or_file),
63
+
64
+ # tex options
65
+ "handly_preamble": True,
66
+ "final_output_main_tex_name": "main.tex",
67
+ "run_latex": False,
68
+ "delete_run_latex_cache": False,
69
+
70
+ "input_texs_directory": os.path.join(path_input_file, "data", "raw"),
71
+ "shutil_input_texs": True,
72
+ "input_texs_in_relative_path": True,
73
+ "tex_folder_name": "texs", # "" or "tex" or "texs" or "main"
74
+ "delete_original_tex_in_output_folder": True,
75
+ "generate_tex": True,
76
+
77
+ # md options
78
+ "add_url_for_basic_dict": True, # default is True
79
+ "add_anchor_for_basic_dict": False, # default is False
80
+ "add_anchor_for_beauty_dict": False, # default is False
81
+ "add_anchor_for_complex_dict": False, # default is False
82
+
83
+ "final_output_main_md_name": "main.md",
84
+ "delete_temp_generate_md": True,
85
+ "add_reference_in_md": True,
86
+ "add_bib_in_md": False,
87
+ "replace_cite_to_fullcite_in_md": True,
88
+ "replace_by_basic_beauty_complex_in_md": "basic",
89
+ "display_basic_beauty_complex_references_in_md": "beauty",
90
+ "add_anchor_in_md": False, # default is False
91
+
92
+ "md_folder_name": "mds", # "" or "md" or "main"
93
+ "delete_original_md_in_output_folder": False, # default is False
94
+
95
+ # html options
96
+ "generate_html": False,
97
+ }
98
+
99
+ # Update with user-provided options
100
+ _options.update(options)
101
+
102
+ committer = GitAutoCommitter(path_output_file)
103
+
104
+ if not committer.auto_check(remote="origin", branch="master"):
105
+ print("Remote != Local, please manually pull")
106
+
107
+ else:
108
+ # Create full file paths from input file names
109
+ file_list = [os.path.join(path_input_file, f) for f in input_file_names]
110
+
111
+ PyRunBibMdTex(path_output_file, ".tex", "paper", _options).run_files(file_list, "", "current")
112
+
113
+ if committer.has_changes():
114
+ # Auto commit
115
+ committer.auto_commit()
116
+ # Auto push
117
+ committer.auto_push(remote="origin", branch="master")
118
+
119
+ return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyeasyphd
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: pyeasyphd
5
5
  License: GPL-3.0-or-later
6
6
  License-File: LICENSE
@@ -25,7 +25,8 @@ pyeasyphd/main/python_run_tex.py,sha256=9Syu8qRjPXN3gEabfRUWxwTFBm_izIcB4yFhsz3Q
25
25
  pyeasyphd/pyeasyphd.py,sha256=OAwbwq2rSXLSk2AoTAF8hmlOMRSRfvDn1Uqk-zkuqH8,3470
26
26
  pyeasyphd/pyeasyphd.sublime-settings,sha256=KcXx3DjyVf8UfnB4FP4u-jaTQU3Cuj24OvxGCZvXAsw,3135
27
27
  pyeasyphd/pyeasyphd.sublime-syntax,sha256=pXylbA-tye-K5dCTjEJLFVRqtY1T7AgWZ4laxo-dnaE,73
28
- pyeasyphd/scripts/run_article_md.py,sha256=RXDgyc3METP_ln7IUaNDmLfu0XlZkYqm0UIdsyO16zo,3916
28
+ pyeasyphd/scripts/run_article_md.py,sha256=ZjdO03YRDokSqo-Rffby-1p6_P35N4amERKHe4yS6_0,4127
29
+ pyeasyphd/scripts/run_article_tex.py,sha256=TuTEQk7y-Ykos3a_mlEJzyFnT9RKsAYjGXnwHJa5cjY,4672
29
30
  pyeasyphd/tools/__init__.py,sha256=u1MZu_JjVac3HhEmcSTwroS83UVu0W5Vspy3Wu_-GH8,496
30
31
  pyeasyphd/tools/generate/generate_from_bibs.py,sha256=Dp1MyADwIRb9qFTFOkMPJLaeeh7NBjuiSLBN7smP2eo,7640
31
32
  pyeasyphd/tools/generate/generate_html.py,sha256=JzUEqgTVCaFzd4hXTYUEf0cVSO1QRe0nVUS72W6oyyU,5349
@@ -39,7 +40,7 @@ pyeasyphd/tools/search/search_keywords.py,sha256=YCurXuoYeU1ftve0cb8Hcn_g2FXCXf7
39
40
  pyeasyphd/tools/search/search_writers.py,sha256=Dz6D8m17R7x8NT7_PCjwmzlq29AfUz-N6sjyCguDTo4,15702
40
41
  pyeasyphd/tools/search/utils.py,sha256=bo7xtIZu31dQvjol1lwyWq1t6ldbw28oondwK8VbAqk,7562
41
42
  pyeasyphd/utils/utils.py,sha256=kWxzzgNwz77K9Q7j-RKTaoPpxqiVLVtaBMMhLuEenwE,3128
42
- pyeasyphd-0.3.0.dist-info/METADATA,sha256=AqB1HjkmWMGsAHYvnnpFK2XBnJBITN7W4T6L-JH3hFE,985
43
- pyeasyphd-0.3.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
44
- pyeasyphd-0.3.0.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
45
- pyeasyphd-0.3.0.dist-info/RECORD,,
43
+ pyeasyphd-0.3.1.dist-info/METADATA,sha256=IzA1enwzXYoYBIa46ERPZk5euKztZV50k8oMMOOA3bU,985
44
+ pyeasyphd-0.3.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
45
+ pyeasyphd-0.3.1.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
46
+ pyeasyphd-0.3.1.dist-info/RECORD,,