Commit Graph

12 Commits

Author SHA1 Message Date
orrisroot 36cad6db52 refactor: extract MdrsClient service layer for library portability
To improve the tool's portability as a Python library, the core logic
has been decoupled from the CLI interface. This allows developers to
programmatically interact with MDRS without relying on CLI-specific
argument parsing or local file-based caches.

- Introduce `MdrsClient` service layer to handle core operations.
- Abstract authentication state using `CacheInterface` and `InMemoryCache`.
- Migrate all CLI commands to utilize `MdrsClient` for execution.
- Separate `Doi` data model from API responses and move to `models/doi.py`.
- Update `README.md` to include Python API usage examples.
- Bump package version to 1.3.17.
2026-07-02 13:07:18 +09:00
orrisroot 5bdf837941 feat(doi): add DOI-based path access for commands
Support accessing repositories using DOI strings with optional subpaths
across ls, download, metadata, and file-metadata commands.

- Implement GET v3/doi/{id}/ API model and client calls
- Parse and resolve DOI paths into respective folder and files
- Extract common folder and file resolution logic to shared helpers
- Update README with example DOI-based shell commands
2026-06-12 01:28:40 +09:00
orrisroot 4283481695 fix: apply NFC normalization to filenames and folder names sent to server
On macOS, local filenames and directory names may be in NFD encoding
(decomposed Unicode). Without normalization, files and folders are
created on the server with NFD names, inconsistent with the server's
NFC convention.

Apply normalize("NFC", ...) before sending names to the server in:
- FilesApi.create(): filename in multipart upload
- FilesApi.update(): filename in multipart upload
- UploadCommand: directory name in FoldersApi.create()

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-20 12:25:59 +09:00
pw-serizawa 95f22ea5f9 fix for file.list api pagination 2025-06-26 17:13:06 +09:00
orrisroot 020ef8835a fixed bug to upload large file. 2024-07-04 12:33:57 +09:00
orrisroot dbfc68c396 implemented -s --skip-if-file-exists option for upload commnad. 2024-02-13 10:48:01 +09:00
orrisroot ce0a608db2 fixed bug to resolve local files for recursive file upload. 2023-12-20 19:42:06 +09:00
orrisroot 9284346153 real path should not be used when creating distination file list. 2023-12-18 16:23:46 +09:00
orrisroot 292ca1df27 changed API endpoint from v2 to v3. 2023-12-12 20:05:46 +09:00
orrisroot 08d8a0626a fixed type errors when pylance type checking mode is strict. 2023-07-19 21:47:47 +09:00
orrisroot b569c20b6e support case insensitive and normalized file and folder names. 2023-07-19 13:46:23 +09:00
orrisroot 97007233c6 split source code for each command. 2023-05-10 18:17:35 +09:00