markdown-img-icexmoon 0.4.0__tar.gz → 2.0.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 (52) hide show
  1. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/PKG-INFO +52 -6
  2. markdown-img-icexmoon-0.4.0/src/markdown_img_icexmoon.egg-info/PKG-INFO → markdown_img_icexmoon-2.0.0/README.md +17 -15
  3. markdown_img_icexmoon-2.0.0/pyproject.toml +33 -0
  4. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/setup.cfg +1 -1
  5. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/globalization.py +2 -0
  6. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/main.py +12 -2
  7. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/smms_img.py +4 -0
  8. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/tools/file_tools.py +19 -4
  9. markdown-img-icexmoon-0.4.0/README.md → markdown_img_icexmoon-2.0.0/src/markdown_img_icexmoon.egg-info/PKG-INFO +62 -1
  10. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img_icexmoon.egg-info/SOURCES.txt +2 -1
  11. markdown_img_icexmoon-2.0.0/src/markdown_img_icexmoon.egg-info/requires.txt +6 -0
  12. markdown_img_icexmoon-2.0.0/tests/test.py +13 -0
  13. markdown-img-icexmoon-0.4.0/pyproject.toml +0 -6
  14. markdown-img-icexmoon-0.4.0/src/markdown_img_icexmoon.egg-info/requires.txt +0 -6
  15. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/LICENSE +0 -0
  16. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/setup.py +0 -0
  17. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/__init__.py +0 -0
  18. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/__main__.py +0 -0
  19. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/compress/__init__.py +0 -0
  20. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/compress/compress.py +0 -0
  21. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/compress/compress_manager.py +0 -0
  22. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/compress/compress_service.py +0 -0
  23. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/compress/none_compress_service.py +0 -0
  24. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/compress/pillow_compress_service.py +0 -0
  25. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/compress/tinypng_compress_service.py +0 -0
  26. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/config.py +0 -0
  27. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/config_backup.py +0 -0
  28. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/download_help.py +0 -0
  29. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/help.info +0 -0
  30. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/help_en.info +0 -0
  31. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/img_service/Upyun_img_service.py +0 -0
  32. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/img_service/__init__.py +0 -0
  33. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/img_service/bilibili_img_service.py +0 -0
  34. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/img_service/fz_img_service.py +0 -0
  35. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/img_service/img_service.py +0 -0
  36. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/img_service/none_img_service.py +0 -0
  37. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/img_service/qcloud_img_service.py +0 -0
  38. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/img_service/qiniu_img_service.py +0 -0
  39. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/img_service/smms_img_service.py +0 -0
  40. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/img_service/vimcn_img_service.py +0 -0
  41. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/img_service/yujian_img_service.py +0 -0
  42. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/img_service_manager.py +0 -0
  43. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/qcloud_client.py +0 -0
  44. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/qiniu_client.py +0 -0
  45. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/time_helper.py +0 -0
  46. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/tools/__init__.py +0 -0
  47. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/tools/debug.py +0 -0
  48. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/tools/my_time.py +0 -0
  49. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img/user_exception.py +0 -0
  50. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img_icexmoon.egg-info/dependency_links.txt +0 -0
  51. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img_icexmoon.egg-info/entry_points.txt +0 -0
  52. {markdown-img-icexmoon-0.4.0 → markdown_img_icexmoon-2.0.0}/src/markdown_img_icexmoon.egg-info/top_level.txt +0 -0
@@ -1,17 +1,46 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: markdown-img-icexmoon
3
- Version: 0.4.0
3
+ Version: 2.0.0
4
4
  Summary: A program for find and upload images in markdown file and will replace them.
5
5
  Home-page: https://github.com/icexmoon/markdown-img
6
6
  Author: icexmoon
7
7
  Author-email: icexmoon@qq.com
8
- Project-URL: Bug Tracker, https://github.com/icexmoon/markdown-img/issues
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: License :: OSI Approved :: MIT License
8
+ License: Copyright (c) 2018 The Python Packaging Authority
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+ Project-URL: homepage, https://github.com/icexmoon/markdown-img
28
+ Project-URL: documentation, https://github.com/icexmoon/markdown-img
29
+ Project-URL: repository, https://github.com/icexmoon/markdown-img
30
+ Project-URL: changelog, https://github.com/icexmoon/markdown-img
31
+ Keywords: markdown,image
32
+ Classifier: Programming Language :: Python
11
33
  Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.6
34
+ Requires-Python: >=3.13
13
35
  Description-Content-Type: text/markdown
14
36
  License-File: LICENSE
37
+ Requires-Dist: cos-python-sdk-v5>=1.9.41
38
+ Requires-Dist: pillow>=12.1.0
39
+ Requires-Dist: qiniu>=7.17.0
40
+ Requires-Dist: requests>=2.32.5
41
+ Requires-Dist: tinify>=1.7.1
42
+ Requires-Dist: upyun>=2.5.5
43
+ Dynamic: license-file
15
44
 
16
45
  # Markdown-img User's Guide
17
46
 
@@ -257,6 +286,17 @@ pymdimg -m relative_img
257
286
  > - In order to avoid the corruption of the original MD file caused by program errors, one original file will be kept and backed up in the backup subdirectory.
258
287
  > - Because of the difference between Windows and Linux platform separators, there is no guarantee that the relative directories of both will behave properly.
259
288
 
289
+ ## Secondary Development
290
+
291
+ The development toolchain has been migrated to uv. For the installation and usage of uv, you can refer to [Python Package Management Tool UV](https://blog.icexmoon.cn/archives/805.html).
292
+
293
+ You can run the test code in the project's root directory using the following command:
294
+
295
+ ```
296
+ uv run test.py
297
+ ```
298
+
299
+ The test directory is located at `tests`, and you need to prepare the test files and data yourself. For reference, you can look at the `tests example`.
260
300
 
261
301
  ## Acknowledgements
262
302
 
@@ -317,3 +357,9 @@ Added the function to modify the absolute path image in the MD file to relative
317
357
  ### 0.4.0
318
358
 
319
359
  Added the support to fengzhen image bed.
360
+
361
+ ### 2.0.0
362
+
363
+ Migrate the development workflow to uv.
364
+
365
+ Optimize the display performance of the terminal on Windows, show the filenames before and after processing, and allow clicking on the filenames to jump to the corresponding files.
@@ -1,18 +1,3 @@
1
- Metadata-Version: 2.1
2
- Name: markdown-img-icexmoon
3
- Version: 0.4.0
4
- Summary: A program for find and upload images in markdown file and will replace them.
5
- Home-page: https://github.com/icexmoon/markdown-img
6
- Author: icexmoon
7
- Author-email: icexmoon@qq.com
8
- Project-URL: Bug Tracker, https://github.com/icexmoon/markdown-img/issues
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: License :: OSI Approved :: MIT License
11
- Classifier: Operating System :: OS Independent
12
- Requires-Python: >=3.6
13
- Description-Content-Type: text/markdown
14
- License-File: LICENSE
15
-
16
1
  # Markdown-img User's Guide
17
2
 
18
3
  English | [**简体中文**](https://github.com/icexmoon/markdown-img/blob/master/README_cn.md)
@@ -257,6 +242,17 @@ pymdimg -m relative_img
257
242
  > - In order to avoid the corruption of the original MD file caused by program errors, one original file will be kept and backed up in the backup subdirectory.
258
243
  > - Because of the difference between Windows and Linux platform separators, there is no guarantee that the relative directories of both will behave properly.
259
244
 
245
+ ## Secondary Development
246
+
247
+ The development toolchain has been migrated to uv. For the installation and usage of uv, you can refer to [Python Package Management Tool UV](https://blog.icexmoon.cn/archives/805.html).
248
+
249
+ You can run the test code in the project's root directory using the following command:
250
+
251
+ ```
252
+ uv run test.py
253
+ ```
254
+
255
+ The test directory is located at `tests`, and you need to prepare the test files and data yourself. For reference, you can look at the `tests example`.
260
256
 
261
257
  ## Acknowledgements
262
258
 
@@ -317,3 +313,9 @@ Added the function to modify the absolute path image in the MD file to relative
317
313
  ### 0.4.0
318
314
 
319
315
  Added the support to fengzhen image bed.
316
+
317
+ ### 2.0.0
318
+
319
+ Migrate the development workflow to uv.
320
+
321
+ Optimize the display performance of the terminal on Windows, show the filenames before and after processing, and allow clicking on the filenames to jump to the corresponding files.
@@ -0,0 +1,33 @@
1
+ [project]
2
+ name = "markdown-img-icexmoon"
3
+ version = "2.0.0"
4
+ description = "A program for find and upload images in markdown file and will replace them."
5
+ readme = "README.md"
6
+ requires-python = ">=3.13"
7
+ license = {file = "LICENSE"}
8
+ keywords = ["markdown", "image"]
9
+ authors = [
10
+ {email = "icexmoon@qq.com"},
11
+ {name = "icexmoon"}
12
+ ]
13
+ classifiers = [
14
+ "Programming Language :: Python",
15
+ "Operating System :: OS Independent"
16
+ ]
17
+ dependencies = [
18
+ "cos-python-sdk-v5>=1.9.41",
19
+ "pillow>=12.1.0",
20
+ "qiniu>=7.17.0",
21
+ "requests>=2.32.5",
22
+ "tinify>=1.7.1",
23
+ "upyun>=2.5.5",
24
+ ]
25
+
26
+ [project.scripts]
27
+ pymdimg = "markdown_img.__main__:main"
28
+
29
+ [project.urls]
30
+ homepage = "https://github.com/icexmoon/markdown-img"
31
+ documentation = "https://github.com/icexmoon/markdown-img"
32
+ repository = "https://github.com/icexmoon/markdown-img"
33
+ changelog = "https://github.com/icexmoon/markdown-img"
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = markdown-img-icexmoon
3
- version = 0.4.0
3
+ version = 1.0.0
4
4
  author = icexmoon
5
5
  author_email = icexmoon@qq.com
6
6
  description = A program for find and upload images in markdown file and will replace them.
@@ -36,6 +36,7 @@ class Globalization:
36
36
  "tencent_oss_info_saved": "腾讯云OSS信息已保存,请重新运行程序",
37
37
  "undefined_error_info": "未定义错误,请联系开发者",
38
38
  "deal_success": "已成功处理markdown文件",
39
+ "deal_success_with_detail": "已成功处理markdown文件,原文件{},处理后的文件{}",
39
40
  "all_file_done": "所有markdown文档已处理完毕",
40
41
  "recove_markdown_file": "已成功还原markdown文件{}的本地图库",
41
42
  "images_number_is_not_equal": "文件{}中的图片数目与备份中的数目不相符,请自行确认",
@@ -135,6 +136,7 @@ class Globalization:
135
136
  "tencent_oss_info_saved": "Tencent Cloud OSS information has been saved, please re-run the program",
136
137
  "undefined_error_info": "Undefined error, please contact the developer",
137
138
  "deal_success": "Successfully processed markdown files",
139
+ "deal_success_with_detail": "Successfully processed markdown files, old file {}, new file {}",
138
140
  "all_file_done": "All markdown documents have been processed",
139
141
  "recove_markdown_file": "The local gallery of markdown file {} has been successfully restored",
140
142
  "images_number_is_not_equal": "The number of images in file {} does not match the number in the backup, please check yourself",
@@ -12,6 +12,7 @@ from .compress.compress_manager import CompressManager
12
12
  from .config_backup import ConfigBackup
13
13
  from .tools.file_tools import FileTools
14
14
  import shutil
15
+ import sys
15
16
 
16
17
 
17
18
  class Main():
@@ -152,7 +153,8 @@ class Main():
152
153
  shutil.copyfile(localImg, relativeLocalImage)
153
154
  # 替换图片路径为相对路径
154
155
  line = line.replace(
155
- localImg, "."+sysConfig.getPathSplit()+"images"+sysConfig.getPathSplit()+imgName)
156
+ # 改为使用/而非\
157
+ localImg, "."+"/"+"images"+"/"+imgName)
156
158
  copyFileOpen.write(line)
157
159
  copyFileOpen.close()
158
160
  # 保存原始文件备份
@@ -224,7 +226,15 @@ class Main():
224
226
  self.dealMdFile(dir, self.__createWebImgCopy)
225
227
  except UserException as e:
226
228
  self.dealUserException(e)
227
- print(self.globalization.getText("deal_success"), dir)
229
+ # 如果是 windows 平台,优化终端显示,让显示包含文件链接
230
+ if sys.platform == 'win32':
231
+ absSourcePath = FileTools.getAbsolutePath(dir)
232
+ sourceLink = FileTools.getWindowsTerminalPathLink(dir, absSourcePath)
233
+ targetFileName = FileTools.getFileName(copyFilePath)
234
+ targetLink = FileTools.getWindowsTerminalPathLink(targetFileName, copyFilePath)
235
+ print(self.globalization.getText("deal_success_with_detail").format(sourceLink, targetLink))
236
+ else:
237
+ print(self.globalization.getText("deal_success"), dir)
228
238
  print(self.globalization.getText("all_file_done"))
229
239
 
230
240
  def outputHelpInfo(self):
@@ -39,6 +39,10 @@ class SmmsImg():
39
39
  images[MAX_SAME_TIME_DEAL:len(images)], results)
40
40
 
41
41
  def uploadOne(self, localImg):
42
+ # 如果是 gif 而非静态图片,不压缩
43
+ if (localImg.endswith(".gif")):
44
+ imgService = ImgServiceManager.getImgService()
45
+ return imgService.upload(localImg)
42
46
  # 如果设置了压缩选项,进行压缩
43
47
  info = self.sysConfig.getCompressInfo()
44
48
  if(info[Config.COMPRESS_INFO_STATUS] == "on"):
@@ -18,9 +18,9 @@ class FileTools:
18
18
  if unit == cls.SIZE_KB:
19
19
  size = size / 1024
20
20
  elif unit == cls.SIZE_MB:
21
- size = size/1024/1024
21
+ size = size / 1024 / 1024
22
22
  elif unit == cls.SIZE_GB:
23
- size = size/1024/1024/1024
23
+ size = size / 1024 / 1024 / 1024
24
24
  return size
25
25
 
26
26
  @classmethod
@@ -34,11 +34,26 @@ class FileTools:
34
34
 
35
35
  @classmethod
36
36
  def getFileName(cls, path: str) -> str:
37
- '''返回路径中的文件名
37
+ """返回路径中的文件名
38
38
  path: 绝对路径或相对路径
39
- '''
39
+ """
40
40
  if path is None:
41
41
  return None
42
42
  config = Config()
43
43
  parts = path.split(config.getPathSplit())
44
44
  return parts[-1]
45
+
46
+ @classmethod
47
+ def getWindowsTerminalPathLink(cls, name: str, path: str) -> str:
48
+ """返回Windows终端的快捷方式路径
49
+ name: 路径名称
50
+ path: 路径
51
+ """
52
+ return "\033]8;;{}\033\\{}\033]8;;\033\\".format(path, name)
53
+
54
+ @classmethod
55
+ def getAbsolutePath(cls, path: str) -> str:
56
+ """返回绝对路径
57
+ path: 相对路径
58
+ """
59
+ return os.path.abspath(path)
@@ -1,3 +1,47 @@
1
+ Metadata-Version: 2.4
2
+ Name: markdown-img-icexmoon
3
+ Version: 2.0.0
4
+ Summary: A program for find and upload images in markdown file and will replace them.
5
+ Home-page: https://github.com/icexmoon/markdown-img
6
+ Author: icexmoon
7
+ Author-email: icexmoon@qq.com
8
+ License: Copyright (c) 2018 The Python Packaging Authority
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+ Project-URL: homepage, https://github.com/icexmoon/markdown-img
28
+ Project-URL: documentation, https://github.com/icexmoon/markdown-img
29
+ Project-URL: repository, https://github.com/icexmoon/markdown-img
30
+ Project-URL: changelog, https://github.com/icexmoon/markdown-img
31
+ Keywords: markdown,image
32
+ Classifier: Programming Language :: Python
33
+ Classifier: Operating System :: OS Independent
34
+ Requires-Python: >=3.13
35
+ Description-Content-Type: text/markdown
36
+ License-File: LICENSE
37
+ Requires-Dist: cos-python-sdk-v5>=1.9.41
38
+ Requires-Dist: pillow>=12.1.0
39
+ Requires-Dist: qiniu>=7.17.0
40
+ Requires-Dist: requests>=2.32.5
41
+ Requires-Dist: tinify>=1.7.1
42
+ Requires-Dist: upyun>=2.5.5
43
+ Dynamic: license-file
44
+
1
45
  # Markdown-img User's Guide
2
46
 
3
47
  English | [**简体中文**](https://github.com/icexmoon/markdown-img/blob/master/README_cn.md)
@@ -242,6 +286,17 @@ pymdimg -m relative_img
242
286
  > - In order to avoid the corruption of the original MD file caused by program errors, one original file will be kept and backed up in the backup subdirectory.
243
287
  > - Because of the difference between Windows and Linux platform separators, there is no guarantee that the relative directories of both will behave properly.
244
288
 
289
+ ## Secondary Development
290
+
291
+ The development toolchain has been migrated to uv. For the installation and usage of uv, you can refer to [Python Package Management Tool UV](https://blog.icexmoon.cn/archives/805.html).
292
+
293
+ You can run the test code in the project's root directory using the following command:
294
+
295
+ ```
296
+ uv run test.py
297
+ ```
298
+
299
+ The test directory is located at `tests`, and you need to prepare the test files and data yourself. For reference, you can look at the `tests example`.
245
300
 
246
301
  ## Acknowledgements
247
302
 
@@ -301,4 +356,10 @@ Added the function to modify the absolute path image in the MD file to relative
301
356
 
302
357
  ### 0.4.0
303
358
 
304
- Added the support to fengzhen image bed.
359
+ Added the support to fengzhen image bed.
360
+
361
+ ### 2.0.0
362
+
363
+ Migrate the development workflow to uv.
364
+
365
+ Optimize the display performance of the terminal on Windows, show the filenames before and after processing, and allow clicking on the filenames to jump to the corresponding files.
@@ -45,4 +45,5 @@ src/markdown_img_icexmoon.egg-info/SOURCES.txt
45
45
  src/markdown_img_icexmoon.egg-info/dependency_links.txt
46
46
  src/markdown_img_icexmoon.egg-info/entry_points.txt
47
47
  src/markdown_img_icexmoon.egg-info/requires.txt
48
- src/markdown_img_icexmoon.egg-info/top_level.txt
48
+ src/markdown_img_icexmoon.egg-info/top_level.txt
49
+ tests/test.py
@@ -0,0 +1,6 @@
1
+ cos-python-sdk-v5>=1.9.41
2
+ pillow>=12.1.0
3
+ qiniu>=7.17.0
4
+ requests>=2.32.5
5
+ tinify>=1.7.1
6
+ upyun>=2.5.5
@@ -0,0 +1,13 @@
1
+ import sys
2
+ sys.path.insert(-2, "D:\software\coding\python\Lib\site-packages")
3
+ sys.path.insert(-3, "D:\\workspace\\markdown-img\\src")
4
+ print(sys.path)
5
+ from markdown_img.main import Main
6
+ import os
7
+ testFile = '.\\markdown_img\\test_image.md'
8
+ if os.path.exists(testFile):
9
+ os.remove(testFile)
10
+ main = Main()
11
+ main.changeImgService("upyun")
12
+ main.changeMainPrams({"compress_engine": "tinyPNG"})
13
+ main.main(True)
@@ -1,6 +0,0 @@
1
- [build-system]
2
- requires = [
3
- "setuptools>=42",
4
- "wheel"
5
- ]
6
- build-backend = "setuptools.build_meta"
@@ -1,6 +0,0 @@
1
- requests
2
- cos-python-sdk-v5
3
- qiniu
4
- upyun
5
- Pillow
6
- tinify