ryry-cli 2.51__tar.gz → 2.52__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. {ryry_cli-2.51 → ryry_cli-2.52}/PKG-INFO +1 -1
  2. ryry_cli-2.52/ryry/constant.py +5 -0
  3. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/upload.py +9 -2
  4. {ryry_cli-2.51 → ryry_cli-2.52}/ryry_cli.egg-info/PKG-INFO +1 -1
  5. {ryry_cli-2.51 → ryry_cli-2.52}/setup.py +1 -1
  6. ryry_cli-2.51/ryry/constant.py +0 -5
  7. {ryry_cli-2.51 → ryry_cli-2.52}/LICENSE +0 -0
  8. {ryry_cli-2.51 → ryry_cli-2.52}/README.md +0 -0
  9. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/__init__.py +0 -0
  10. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/main.py +0 -0
  11. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/ryry_server_socket.py +0 -0
  12. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/ryry_service.py +0 -0
  13. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/ryry_webapi.py +0 -0
  14. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/ryry_widget.py +0 -0
  15. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/script_template/__init__.py +0 -0
  16. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/script_template/main.py +0 -0
  17. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/script_template/run.py +0 -0
  18. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/server_func.py +0 -0
  19. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/store.py +0 -0
  20. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/task.py +0 -0
  21. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/taskUtils.py +0 -0
  22. {ryry_cli-2.51 → ryry_cli-2.52}/ryry/utils.py +0 -0
  23. {ryry_cli-2.51 → ryry_cli-2.52}/ryry_cli.egg-info/SOURCES.txt +0 -0
  24. {ryry_cli-2.51 → ryry_cli-2.52}/ryry_cli.egg-info/dependency_links.txt +0 -0
  25. {ryry_cli-2.51 → ryry_cli-2.52}/ryry_cli.egg-info/entry_points.txt +0 -0
  26. {ryry_cli-2.51 → ryry_cli-2.52}/ryry_cli.egg-info/requires.txt +0 -0
  27. {ryry_cli-2.51 → ryry_cli-2.52}/ryry_cli.egg-info/top_level.txt +0 -0
  28. {ryry_cli-2.51 → ryry_cli-2.52}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 2.51
3
+ Version: 2.52
4
4
  Summary: ryry tools
5
5
  Home-page: https://github.com/dalipenMedia
6
6
  Author: dalipen
@@ -0,0 +1,5 @@
1
+ #!!!!! do not change this file !!!!!
2
+ app_version="2.52"
3
+ app_bulld_number=252
4
+ app_bulld_anchor="Noh_2024-09-09 11:49:02.049734"
5
+ app_name="ryry-cli"
@@ -216,7 +216,7 @@ def download(url, saveDir):
216
216
  print(f"download fail: {e}")
217
217
  return None
218
218
 
219
- def downloadDir(url, saveDir):
219
+ def downloadDir(url, saveDir, useCount=-1, autoDelete=False):
220
220
  import uuid, os
221
221
  if len(url) <= 0:
222
222
  return None
@@ -242,9 +242,16 @@ def downloadDir(url, saveDir):
242
242
  savePath = os.path.join(saveDir, f"{name}")
243
243
  if os.path.exists(savePath) == False:
244
244
  os.makedirs(savePath)
245
+ if useCount > 0 and useCount <= len(files):
246
+ files = random.sample(files, useCount)
245
247
  for file in files:
246
248
  with open(os.path.join(savePath, file), 'wb') as f:
247
- ftp.retrbinary(f'RETR {file}', f.write)
249
+ ftp.retrbinary(f'RETR {file}', f.write)
250
+ if autoDelete:
251
+ try:
252
+ ftp.delete(file)
253
+ except Exception as e:
254
+ print(f"Error deleting file {file}: {e}")
248
255
  ftp.quit()
249
256
  return savePath
250
257
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ryry-cli
3
- Version: 2.51
3
+ Version: 2.52
4
4
  Summary: ryry tools
5
5
  Home-page: https://github.com/dalipenMedia
6
6
  Author: dalipen
@@ -3,7 +3,7 @@ import os
3
3
  import subprocess
4
4
  import datetime
5
5
 
6
- ryry_version = "2.51"
6
+ ryry_version = "2.52"
7
7
  ryry_build_number = int(ryry_version.replace(".",""))
8
8
  cur_dir = os.path.dirname(os.path.abspath(__file__))
9
9
  constanspy = os.path.join(cur_dir, "ryry", "constant.py")
@@ -1,5 +0,0 @@
1
- #!!!!! do not change this file !!!!!
2
- app_version="2.51"
3
- app_bulld_number=251
4
- app_bulld_anchor="Noh_2024-09-02 16:43:45.861338"
5
- app_name="ryry-cli"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes