Skip to content

Commit

Permalink
add
Browse files Browse the repository at this point in the history
  • Loading branch information
farfun committed Dec 6, 2024
1 parent f714a05 commit 9a291f0
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion extbuild/fundrive-lanzou/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "fundrive-lanzou"
version = "1.2.57"
version = "1.2.58"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.8"
Expand Down
3 changes: 3 additions & 0 deletions logs/all.log
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
2024-12-06 11:22:05.940 |INFO | funbuild.core.core : core: 77 | funbuild | - fundrive build
2024-12-06 11:22:05.940 |INFO | funbuild.core.core : core: 65 | funbuild | - fundrive pull
2024-12-06 11:22:16.097 |INFO | funbuild.core.core : core: 69 | funbuild | - fundrive push
2024-12-06 11:24:17.475 |INFO | funbuild.core.core : core: 77 | funbuild | - fundrive build
2024-12-06 11:24:17.475 |INFO | funbuild.core.core : core: 65 | funbuild | - fundrive pull
2024-12-06 11:24:27.972 |INFO | funbuild.core.core : core: 69 | funbuild | - fundrive push
3 changes: 3 additions & 0 deletions logs/funbuild.log
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@
2024-12-06 11:22:05.940 |INFO | funbuild.core.core : core: 77 | funbuild | - fundrive build
2024-12-06 11:22:05.940 |INFO | funbuild.core.core : core: 65 | funbuild | - fundrive pull
2024-12-06 11:22:16.097 |INFO | funbuild.core.core : core: 69 | funbuild | - fundrive push
2024-12-06 11:24:17.475 |INFO | funbuild.core.core : core: 77 | funbuild | - fundrive build
2024-12-06 11:24:17.475 |INFO | funbuild.core.core : core: 65 | funbuild | - fundrive pull
2024-12-06 11:24:27.972 |INFO | funbuild.core.core : core: 69 | funbuild | - fundrive push
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "fundrive"
version = "1.2.57"
version = "1.2.58"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.8"
Expand Down
2 changes: 1 addition & 1 deletion src/fundrive/drives/zenodo/drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def upload_file(
)[0]

def check_record(self, record_id=None, new_version=True, *args, **kwargs) -> int:
if self.client.records_retrieve(record_id) is False:
if self.client.records_retrieve(record_id)[0] is False:
return record_id
if new_version:
response = self.client.deposition_actions_new_version(record_id=record_id)
Expand Down
8 changes: 8 additions & 0 deletions src/fundrive/drives/zenodo/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@
print(file)
# 下载一个record下的所有文件
drive.download_file(record_id="13293150", local_dir="./resource/songs")

record_id = drive.mkdir()["metadata"]["prereserve_doi"]["recid"]

drive.upload_dir(local_path="./resource/songs", record_id=record_id)

drive.publish(
record_id=record_id,
title="funmaterial-audio",
description="funmaterial-audio",
names="funmaterial-audio",
)
4 changes: 2 additions & 2 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9a291f0

Please sign in to comment.