pyeasyphd 0.3.3__tar.gz → 0.3.5__tar.gz

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.

Files changed (50) hide show
  1. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/PKG-INFO +1 -1
  2. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/main/__init__.py +0 -6
  3. pyeasyphd-0.3.5/pyeasyphd/scripts/__init__.py +13 -0
  4. pyeasyphd-0.3.5/pyeasyphd/scripts/run_search_keywords.py +262 -0
  5. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyproject.toml +1 -1
  6. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/LICENSE +0 -0
  7. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/README.md +0 -0
  8. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/.python-version +0 -0
  9. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/Main.sublime-menu +0 -0
  10. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/__init__.py +0 -0
  11. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/CSL/apa-no-ampersand.csl +0 -0
  12. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/CSL/apa.csl +0 -0
  13. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/CSL/ieee.csl +0 -0
  14. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/Article.tex +0 -0
  15. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/Article_Header.tex +0 -0
  16. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/Article_Tail.tex +0 -0
  17. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/Beamer_Header.tex +0 -0
  18. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/Beamer_Tail.tex +0 -0
  19. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/Style.tex +0 -0
  20. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/TEVC_Header.tex +0 -0
  21. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/TEVC_Tail.tex +0 -0
  22. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/eisvogel.beamer +0 -0
  23. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/eisvogel.latex +0 -0
  24. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/eisvogel.tex +0 -0
  25. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/math.tex +0 -0
  26. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/math_commands.tex +0 -0
  27. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/data/Templates/TEX/nextaimathmacros.sty +0 -0
  28. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/main/basic_input.py +0 -0
  29. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/main/pandoc_md_to.py +0 -0
  30. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/main/python_run_md.py +0 -0
  31. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/main/python_run_tex.py +0 -0
  32. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/pyeasyphd.py +0 -0
  33. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/pyeasyphd.sublime-settings +0 -0
  34. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/pyeasyphd.sublime-syntax +0 -0
  35. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/scripts/run_article_md.py +0 -0
  36. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/scripts/run_article_tex.py +0 -0
  37. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/scripts/run_beamer_tex.py +0 -0
  38. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/tools/__init__.py +0 -0
  39. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/tools/generate/generate_from_bibs.py +0 -0
  40. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/tools/generate/generate_html.py +0 -0
  41. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/tools/generate/generate_library.py +0 -0
  42. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/tools/generate/generate_links.py +0 -0
  43. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/tools/py_run_bib_md_tex.py +0 -0
  44. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/tools/search/data.py +0 -0
  45. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/tools/search/search_base.py +0 -0
  46. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/tools/search/search_core.py +0 -0
  47. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/tools/search/search_keywords.py +0 -0
  48. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/tools/search/search_writers.py +0 -0
  49. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/tools/search/utils.py +0 -0
  50. {pyeasyphd-0.3.3 → pyeasyphd-0.3.5}/pyeasyphd/utils/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyeasyphd
3
- Version: 0.3.3
3
+ Version: 0.3.5
4
4
  Summary: pyeasyphd
5
5
  License: GPL-3.0-or-later
6
6
  License-File: LICENSE
@@ -1,9 +1,3 @@
1
- """Main module for PyEasyPhD core functionality.
2
-
3
- This module contains the core classes for processing academic papers,
4
- managing bibliographies, and converting between different formats.
5
- """
6
-
7
1
  __all__ = ["BasicInput", "PandocMdTo", "PythonRunMd", "PythonRunTex"]
8
2
 
9
3
  from .basic_input import BasicInput
@@ -0,0 +1,13 @@
1
+ __all__ = [
2
+ "run_article_md_daily_notes",
3
+ "run_article_tex_submit",
4
+ "run_beamer_tex_weekly_reports",
5
+ "run_search_for_screen",
6
+ "run_search_for_files",
7
+ "run_compare_after_search",
8
+ ]
9
+
10
+ from .run_article_md import run_article_md_daily_notes
11
+ from .run_article_tex import run_article_tex_submit
12
+ from .run_beamer_tex import run_beamer_tex_weekly_reports
13
+ from .run_search_keywords import run_compare_after_search, run_search_for_files, run_search_for_screen
@@ -0,0 +1,262 @@
1
+ import os
2
+ from typing import Any, Dict, List
3
+
4
+ from pyadvtools import transform_to_data_list
5
+ from pybibtexer.tools import compare_bibs_with_zotero
6
+
7
+ from pyeasyphd.tools import Searchkeywords
8
+
9
+
10
+ def run_search_for_screen(
11
+ acronym: str,
12
+ year: int,
13
+ title: str,
14
+ path_spidered_bibs: str,
15
+ path_spidering_bibs: str,
16
+ path_conferences_journals_json: str,
17
+ ) -> None:
18
+ """
19
+ Run search for screen display with specific conference/journal parameters.
20
+
21
+ Args:
22
+ acronym: Conference/journal acronym to search for
23
+ year: Publication year to filter by
24
+ title: Paper title used as search keyword
25
+ path_spidered_bibs: Path to spidered bibliography files
26
+ path_spidering_bibs: Path to spidering bibliography files
27
+ path_conferences_journals_json: Path to conferences/journals JSON files
28
+ """
29
+ # Expand and normalize file paths
30
+ path_spidered_bibs = _expand_path(path_spidered_bibs)
31
+ path_spidering_bibs = _expand_path(path_spidering_bibs)
32
+ path_conferences_journals_json = _expand_path(path_conferences_journals_json)
33
+
34
+ # Configure search options
35
+ options = _build_search_options(
36
+ print_on_screen=True,
37
+ search_year_list=[str(year)],
38
+ include_publisher_list=[],
39
+ include_abbr_list=[acronym],
40
+ exclude_publisher_list=["arXiv"],
41
+ exclude_abbr_list=[],
42
+ keywords_type="Temp",
43
+ keywords_list_list=[[title]],
44
+ path_conferences_journals_json=path_conferences_journals_json,
45
+ )
46
+
47
+ # Execute searches across different bibliography sources
48
+ _execute_searches(options, "", path_spidered_bibs, path_spidering_bibs)
49
+
50
+
51
+ def run_search_for_files(
52
+ keywords_type: str,
53
+ keywords_list_list: List[List[str]],
54
+ path_main_output: str,
55
+ path_spidered_bibs: str,
56
+ path_spidering_bibs: str,
57
+ path_conferences_journals_json: str,
58
+ ) -> None:
59
+ """
60
+ Run search and save results to files with custom keywords.
61
+
62
+ Args:
63
+ keywords_type: Category name for the search keywords
64
+ keywords_list_list: Nested list of keywords to search for
65
+ path_main_output: Main output directory for search results
66
+ path_spidered_bibs: Path to spidered bibliography files
67
+ path_spidering_bibs: Path to spidering bibliography files
68
+ path_conferences_journals_json: Path to conferences/journals JSON files
69
+ """
70
+ # Expand and normalize file paths
71
+ path_main_output = _expand_path(path_main_output)
72
+ path_spidered_bibs = _expand_path(path_spidered_bibs)
73
+ path_spidering_bibs = _expand_path(path_spidering_bibs)
74
+ path_conferences_journals_json = _expand_path(path_conferences_journals_json)
75
+
76
+ # Configure search options
77
+ options = _build_search_options(
78
+ print_on_screen=False,
79
+ search_year_list=[],
80
+ include_publisher_list=[],
81
+ include_abbr_list=[],
82
+ exclude_publisher_list=["arXiv"],
83
+ exclude_abbr_list=[],
84
+ keywords_type=keywords_type,
85
+ keywords_list_list=keywords_list_list,
86
+ path_conferences_journals_json=path_conferences_journals_json,
87
+ )
88
+
89
+ # Execute searches across different bibliography sources
90
+ _execute_searches(options, path_main_output, path_spidered_bibs, path_spidering_bibs)
91
+
92
+
93
+ def _expand_path(path: str) -> str:
94
+ """Expand user home directory and environment variables in path."""
95
+ return os.path.expandvars(os.path.expanduser(path))
96
+
97
+
98
+ def _build_search_options(
99
+ print_on_screen: bool,
100
+ search_year_list: List[str],
101
+ include_publisher_list: List[str],
102
+ include_abbr_list: List[str],
103
+ exclude_publisher_list: List[str],
104
+ exclude_abbr_list: List[str],
105
+ keywords_type: str,
106
+ keywords_list_list: List[List[str]],
107
+ path_conferences_journals_json: str,
108
+ ) -> Dict[str, Any]:
109
+ """
110
+ Build search options dictionary with common configuration.
111
+
112
+ Args:
113
+ print_on_screen: Whether to display results on screen
114
+ search_year_list: List of years to filter search results
115
+ include_publisher_list: List of publishers to include
116
+ include_abbr_list: List of conference/journal abbreviations to include
117
+ exclude_publisher_list: List of publishers to exclude from search
118
+ exclude_abbr_list: List of conference/journal abbreviations to exclude from search
119
+ keywords_type: Category name for search keywords
120
+ keywords_list_list: Nested list of search keywords
121
+ path_conferences_journals_json: Base path for conferences/journals JSON files
122
+
123
+ Returns:
124
+ Dictionary containing configured search options
125
+ """
126
+ return {
127
+ "print_on_screen": print_on_screen,
128
+ "search_year_list": search_year_list,
129
+ "include_publisher_list": include_publisher_list,
130
+ "include_abbr_list": include_abbr_list,
131
+ "exclude_publisher_list": exclude_publisher_list,
132
+ "exclude_abbr_list": exclude_abbr_list,
133
+ "keywords_dict": {keywords_type: keywords_list_list},
134
+ "keywords_type_list": [keywords_type],
135
+ "full_json_c": os.path.join(path_conferences_journals_json, "conferences.json"),
136
+ "full_json_j": os.path.join(path_conferences_journals_json, "journals.json"),
137
+ }
138
+
139
+
140
+ def _execute_searches(
141
+ options: Dict[str, Any], path_main_output: str, path_spidered_bibs: str, path_spidering_bibs: str
142
+ ) -> None:
143
+ """
144
+ Execute searches across different bibliography sources.
145
+
146
+ Args:
147
+ options: Search configuration options
148
+ path_main_output: Base path for search results output
149
+ path_spidered_bibs: Path to spidered bibliography files
150
+ path_spidering_bibs: Path to spidering bibliography files
151
+ """
152
+ # Search in spidered bibliographies (Conferences and Journals)
153
+ for cj in ["Conferences", "Journals"]:
154
+ path_storage = os.path.join(path_spidered_bibs, cj)
155
+ path_output = os.path.join(path_main_output, "Search_spidered_bib", cj)
156
+ Searchkeywords(path_storage, path_output, options).run()
157
+
158
+ # Search in spidering bibliographies (Journals and Journals Early Access)
159
+ for je in ["spider_j", "spider_j_e"]:
160
+ path_storage = os.path.join(path_spidering_bibs, je)
161
+ path_output = os.path.join(path_main_output, "Search_spidering_bib", je)
162
+ Searchkeywords(path_storage, path_output, options).run()
163
+
164
+
165
+ def run_compare_after_search(
166
+ zotero_bib: str,
167
+ keywords_type: str,
168
+ path_main_output: str,
169
+ path_conferences_journals_json: str,
170
+ ):
171
+ """
172
+ Compare search results with Zotero bibliography and generate comparison report.
173
+
174
+ Args:
175
+ zotero_bib: Path to Zotero bibliography file
176
+ keywords_type: Category name for the search keywords used
177
+ path_main_output: Main output directory for search results and comparison
178
+ path_conferences_journals_json: Path to conferences/journals JSON files
179
+ """
180
+ # Expand and normalize file paths
181
+ zotero_bib = _expand_path(zotero_bib)
182
+ path_main_output = _expand_path(path_main_output)
183
+ path_conferences_journals_json = _expand_path(path_conferences_journals_json)
184
+
185
+ # Configure search options
186
+ options = _build_search_options(
187
+ print_on_screen=False,
188
+ search_year_list=[],
189
+ include_publisher_list=[],
190
+ include_abbr_list=[],
191
+ exclude_publisher_list=["arXiv"],
192
+ exclude_abbr_list=[],
193
+ keywords_type=keywords_type,
194
+ keywords_list_list=[],
195
+ path_conferences_journals_json=path_conferences_journals_json,
196
+ )
197
+
198
+ # Download bibliography files from local search results
199
+ download_bib = _download_bib_from_local(path_main_output, keywords_type)
200
+
201
+ # Generate comparison output path and run comparison
202
+ path_output = os.path.join(path_main_output, "comparison_new")
203
+ compare_bibs_with_zotero(zotero_bib, download_bib, path_output, options)
204
+
205
+ return None
206
+
207
+
208
+ def _generate_data_list(path_output: str, folder_name: str, keywords_type: str) -> list[str]:
209
+ """
210
+ Extract bibliography data content from files in specified folder structure.
211
+
212
+ Args:
213
+ path_output: Base output path for search results
214
+ folder_name: Specific folder name within the output structure
215
+ keywords_type: Category name for the search keywords used
216
+
217
+ Returns:
218
+ List of bibliography data content extracted from .bib files in the specified folders
219
+ """
220
+ data_list = []
221
+
222
+ # Extract data from both title and abstract bibliography folders
223
+ for bib_type in ["title-bib-zotero", "abstract-bib-zotero"]:
224
+ folder_path = os.path.join(
225
+ path_output,
226
+ f"{folder_name}-Separate",
227
+ "article",
228
+ keywords_type,
229
+ bib_type
230
+ )
231
+
232
+ # Extract bibliography data content if folder exists
233
+ if os.path.exists(folder_path):
234
+ data_list.extend(transform_to_data_list(folder_path, ".bib"))
235
+
236
+ return data_list
237
+
238
+
239
+ def _download_bib_from_local(path_output: str, keywords_type: str) -> list[str]:
240
+ """
241
+ Collect bibliography data content from all local search result directories.
242
+
243
+ Args:
244
+ path_output: Base output path containing search results
245
+ keywords_type: Category name for the search keywords used
246
+
247
+ Returns:
248
+ Combined list of bibliography data content from all .bib files in search results
249
+ """
250
+ data_list = []
251
+
252
+ # Collect data from spidered bibliographies (Conferences and Journals)
253
+ for cj in ["Conferences", "Journals"]:
254
+ folder_name = os.path.join("Search_spidered_bib", cj)
255
+ data_list.extend(_generate_data_list(path_output, folder_name, keywords_type))
256
+
257
+ # Collect data from spidering bibliographies (journal sources)
258
+ for je in ["spider_j", "spider_j_e"]:
259
+ folder_name = os.path.join("Search_spidering_bib", je)
260
+ data_list.extend(_generate_data_list(path_output, folder_name, keywords_type))
261
+
262
+ return data_list
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pyeasyphd"
3
- version = "0.3.3"
3
+ version = "0.3.5"
4
4
  description = "pyeasyphd"
5
5
  license = "GPL-3.0-or-later"
6
6
  authors = ["NextAI <nextartifintell@gmail.com>"]
File without changes
File without changes