pyformatjson 0.2.9__tar.gz → 0.3.0__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.
Files changed (28) hide show
  1. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/.github/workflows/release.yml +1 -1
  2. pyformatjson-0.3.0/.python-version +1 -0
  3. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/PKG-INFO +2 -2
  4. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/docs/requirements.txt +1 -0
  5. pyformatjson-0.2.9/pyformatjson.sublime-project → pyformatjson-0.3.0/main.sublime-project +10 -3
  6. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/pyformatjson/core/_base.py +2 -2
  7. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/pyformatjson/core/update_json.py +33 -0
  8. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/pyproject.toml +2 -2
  9. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/scripts/generate_docs.py +2 -1
  10. pyformatjson-0.3.0/tests/test_main.py +18 -0
  11. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/.github/workflows/docs.yml +0 -0
  12. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/.github/workflows/publish.yml +0 -0
  13. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/.gitignore +0 -0
  14. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/CODE_OF_CONDUCT.md +0 -0
  15. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/LICENSE +0 -0
  16. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/README.md +0 -0
  17. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/docs/api-manual/index.md +0 -0
  18. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/docs/index.md +0 -0
  19. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/docs/users-guide/bug-report.md +0 -0
  20. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/docs/users-guide/installation.md +0 -0
  21. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/docs/users-guide/pull-request.md +0 -0
  22. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/mkdocs.yml +0 -0
  23. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/pyformatjson/__init__.py +0 -0
  24. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/pyformatjson/core/__init__.py +0 -0
  25. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/pyformatjson/main.py +0 -0
  26. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/pyformatjson/tools/__init__.py +0 -0
  27. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/pyformatjson/tools/generate_dict.py +0 -0
  28. {pyformatjson-0.2.9 → pyformatjson-0.3.0}/pyformatjson/tools/write_dict.py +0 -0
@@ -41,6 +41,6 @@ jobs:
41
41
  uses: softprops/action-gh-release@v2
42
42
  with:
43
43
  body_path: CHANGELOG.md
44
- # generate_release_notes: true
44
+ generate_release_notes: true
45
45
  env:
46
46
  GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
@@ -0,0 +1 @@
1
+ 3.12
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyformatjson
3
- Version: 0.2.9
3
+ Version: 0.3.0
4
4
  Summary: pyformatjson
5
5
  Project-URL: Homepage, https://github.com/Easy-PhD/pyformatjson
6
6
  Project-URL: Repository, https://github.com/Easy-PhD/pyformatjson
@@ -26,7 +26,7 @@ Requires-Dist: func-timeout>=4.3.5
26
26
  Requires-Dist: lxml>=6.0.2
27
27
  Requires-Dist: playwright>=1.55.0
28
28
  Requires-Dist: psutil>=7.1.2
29
- Requires-Dist: pyadvtools>=0.3.8
29
+ Requires-Dist: pyadvtools>=0.3.10
30
30
  Requires-Dist: requests>=2.32.5
31
31
  Requires-Dist: selenium>=4.38.0
32
32
  Description-Content-Type: text/markdown
@@ -1,3 +1,4 @@
1
+ ruff>=0.14.3
1
2
  mkdocs>=1.6.1
2
3
  mkdocs-autorefs>=1.4.3
3
4
  mkdocs-material>=9.6.21
@@ -8,6 +8,15 @@
8
8
  "target": "terminus_exec",
9
9
  "cancel": "terminus_cancel_build",
10
10
  "shell_cmd": "\".venv/bin/python3\" -u \"$file\"",
11
+ "windows": {
12
+ "shell_cmd": "\".venv\\Scripts\\python.exe\" -u \"$file\"",
13
+ },
14
+ "osx": {
15
+ "shell_cmd": "\".venv/bin/python3\" -u \"$file\"",
16
+ },
17
+ "linux": {
18
+ "shell_cmd": "\".venv/bin/python3\" -u \"$file\"",
19
+ },
11
20
  "env": {
12
21
  "PYTHONIOENCODING": "utf-8",
13
22
  "PYTHONPATH": ".",
@@ -17,8 +26,6 @@
17
26
  ],
18
27
  "settings": {},
19
28
  "folders": [
20
- {
21
- "path": ".",
22
- },
29
+ { "path": ".", },
23
30
  ],
24
31
  }
@@ -69,8 +69,8 @@ def split_data_list(split_pattern: str, data_list: list[str], last_next: str = "
69
69
  new_data_list = []
70
70
  for line in data_list:
71
71
  split_list = re.split(split_pattern, line)
72
- list_one = split_list[0: len(split_list): 2]
73
- list_two = split_list[1: len(split_list): 2]
72
+ list_one = split_list[0 : len(split_list) : 2]
73
+ list_two = split_list[1 : len(split_list) : 2]
74
74
 
75
75
  temp = []
76
76
  if last_next == "next":
@@ -63,12 +63,45 @@ def update_json_file(full_json_cj: str, conferences_or_journals: str) -> dict[st
63
63
 
64
64
  # Save updated JSON
65
65
  if flag and json_dict:
66
+ json_dict = add_multiple_add(json_dict, conferences_or_journals)
67
+
66
68
  with open(full_json_cj, "w", encoding="utf-8", newline="\n") as f:
67
69
  f.write(json.dumps(json_dict, indent=4, sort_keys=True, ensure_ascii=True))
68
70
 
69
71
  return json_dict
70
72
 
71
73
 
74
+ def add_multiple_add(json_dict, conferences_or_journals):
75
+ for pub in json_dict:
76
+ for key in json_dict[pub][conferences_or_journals]:
77
+ names_abbr = json_dict[pub][conferences_or_journals][key].get("names_abbr", [])
78
+ names_full = json_dict[pub][conferences_or_journals][key].get("names_full", [])
79
+
80
+ names_abbr_, names_full_ = [], []
81
+ for abbr, full in zip(names_abbr, names_full, strict=True):
82
+ names_abbr_.append(abbr)
83
+ names_full_.append(full)
84
+
85
+ full = full.encode('unicode_escape').decode()
86
+ if "&" in full and r"\\&" not in full and r"\\\\&" not in full:
87
+ full_1 = re.sub("&", r"\\&", full)
88
+ full_2 = re.sub("&", r"\\\\&", full)
89
+ if full_1 not in names_full:
90
+ breakpoint()
91
+ names_abbr_.append(abbr)
92
+ names_full_.append(full_1)
93
+
94
+ if full_2 not in names_full:
95
+ breakpoint()
96
+ names_abbr_.append(abbr)
97
+ names_full_.append(full_2)
98
+
99
+ json_dict[pub][conferences_or_journals][key]["names_abbr"] = names_abbr_
100
+ json_dict[pub][conferences_or_journals][key]["names_full"] = names_full_
101
+
102
+ return json_dict
103
+
104
+
72
105
  def generate_standard_form(json_dict: dict[str, Any], conferences_or_journals: str):
73
106
  # Check for duplicate abbreviations in the data.
74
107
  abbr_list = []
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyformatjson"
3
- version = "0.2.9"
3
+ version = "0.3.0"
4
4
  description = "pyformatjson"
5
5
  license = "GPL-3.0-or-later"
6
6
  license-files = ["LICENSE"]
@@ -28,7 +28,7 @@ dependencies = [
28
28
  "lxml>=6.0.2",
29
29
  "playwright>=1.55.0",
30
30
  "psutil>=7.1.2",
31
- "pyadvtools>=0.3.8",
31
+ "pyadvtools>=0.3.10",
32
32
  "requests>=2.32.5",
33
33
  "selenium>=4.38.0",
34
34
  ]
@@ -35,7 +35,8 @@ class DocGenerator:
35
35
  def get_module_info(self, module_path: Path) -> dict[str, Any]:
36
36
  # Calculate relative import path
37
37
  relative_path = module_path.relative_to(self.source_dir)
38
- module_name = str(relative_path).replace("/", ".").replace("\\", ".").replace(".py", "")
38
+ module_name = str(relative_path).replace("/", ".").replace("\\", ".")
39
+ module_name = module_name[:-3] # replace(".py", "")
39
40
 
40
41
  return {
41
42
  "path": module_path,
@@ -0,0 +1,18 @@
1
+ import os
2
+
3
+ from pyformatjson.main import main_generate_md_files
4
+
5
+ if __name__ == "__main__":
6
+ full_json_c = os.getenv("FULL_JSON_C", "")
7
+ full_json_j = os.getenv("FULL_JSON_J", "")
8
+ full_json_k = os.getenv("FULL_JSON_K", "")
9
+ path_spidered_bibs = os.getenv("PATH_SPIDERED_BIBS", "")
10
+ path_output = os.path.join(os.getenv("PATH_AILINKS", ""), "docs", "data")
11
+
12
+ main_generate_md_files(full_json_c, full_json_j, full_json_k, path_output, path_spidered_bibs)
13
+ main_generate_md_files(
14
+ full_json_c, full_json_j, full_json_k, path_output, path_spidered_bibs, keywords_category_name="S"
15
+ )
16
+ main_generate_md_files(
17
+ full_json_c, full_json_j, full_json_k, path_output, path_spidered_bibs, keywords_category_name="Y"
18
+ )
File without changes
File without changes
File without changes
File without changes
File without changes