Tools for exporting Synology Office files from Synology NAS devices
Project description
Synology Office Exporter
This tool downloads Synology Office files from your Synology NAS and converts them to Microsoft Office formats. It processes Synology Office documents from your personal My Drive, team folders, and shared files, converting them to their corresponding Microsoft Office formats.
File Conversion Types
- Synology Spreadsheet (
.osheet) → Microsoft Excel (.xlsx) - Synology Document (
.odoc) → Microsoft Word (.docx) - Synology Slides (
.oslides) → Microsoft PowerPoint (.pptx)
Requirements
- Python 3.6+
Installation
pip install synology-office-exporter
After installation, you can run the tool using the command:
synology-office-exporter --help
Configuration
Create a .env file and set the following environment variables:
SYNOLOGY_NAS_USER=your_username
SYNOLOGY_NAS_PASS=your_password
SYNOLOGY_NAS_HOST=your_nas_ip_or_hostname
Usage
Command Line
synology-office-exporter [options]
Options
-o, --output DIR- Directory to save files (default: current directory)-u, --username USER- Synology username-p, --password PASS- Synology password-s, --server HOST- Synology server URL-f, --force- Force download all files, ignoring download history--log-level LEVEL- Set log level (default: info)- Choices: debug, info, warning, error, critical
-h, --help- Show help message
Authentication
Authentication can be provided in three ways (in order of priority):
- Command line arguments (-u, -p, -s)
- Environment variables (via .env file: SYNOLOGY_NAS_USER, SYNOLOGY_NAS_PASS, SYNOLOGY_NAS_HOST)
- Interactive prompt
Features
- Connects to Synology NAS and downloads Synology Office files from My Drive, team folders, and shared files
- Saves files to the specified output directory while preserving directory structure
- Tracks download history to avoid re-downloading unchanged files (can be overridden with the
--forceoption) - Automatically skips encrypted files (as they cannot be converted automatically)
Notes
- This tool uses the Synology Drive API to access files.
- If you have a large number of files, the initial run may take some time.
- Subsequent runs will only download changed files (unless the
--forceoption is used).
Security Considerations
When using this tool, please be aware of the following security aspects:
-
Credentials Storage: The
.envfile contains sensitive login credentials. Make sure to:- Never commit this file to version control systems
- Set restrictive file permissions (e.g.,
chmod 600 .env) - Store it only in secure locations
-
Command Line Security: Using credentials as command line arguments may expose them in your shell history or process listings. Prefer using the
.envfile or interactive prompt when possible. -
Network Security: When connecting to your Synology NAS over the internet, ensure you're using a secure connection (HTTPS). Consider using a VPN if accessing your NAS remotely.
-
Output Files: Downloaded files inherit the permissions of the process running the tool. Be mindful of who has access to the output directory.
Troubleshooting
Runtime Errors
ModuleNotFoundError: Ensure the required packages are installed correctly.- Connection errors: Check the NAS IP address and port settings. The default ports are 5000 for HTTP and 5001 for HTTPS.
Development
For developers interested in contributing to this project, please see the DEVELOPMENT.md file for detailed instructions on setting up the development environment, running tests, and contributing code.
Acknowledgements
- Synology Drive API - Used for communication with the Synology Drive API
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file synology_office_exporter-0.0.4.tar.gz.
File metadata
- Download URL: synology_office_exporter-0.0.4.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8ec402d62acc230e58de9755f24c2589c8fbd060facc81321b5fd2a49166926
|
|
| MD5 |
dd344249c2c2dd3d55cb331885fdceed
|
|
| BLAKE2b-256 |
2392ff9a5ecdbd205278a5c39c5ff27db2332bd89b78ddcd5eaa6a0b7aba6b02
|
Provenance
The following attestation bundles were made for synology_office_exporter-0.0.4.tar.gz:
Publisher:
ci-cd.yml on isseis/synology-office-exporter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synology_office_exporter-0.0.4.tar.gz -
Subject digest:
a8ec402d62acc230e58de9755f24c2589c8fbd060facc81321b5fd2a49166926 - Sigstore transparency entry: 186536318
- Sigstore integration time:
-
Permalink:
isseis/synology-office-exporter@fda64d37de825fe4aa04e780270efeb1c8ec0964 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/isseis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@fda64d37de825fe4aa04e780270efeb1c8ec0964 -
Trigger Event:
push
-
Statement type:
File details
Details for the file synology_office_exporter-0.0.4-py3-none-any.whl.
File metadata
- Download URL: synology_office_exporter-0.0.4-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7aaffa25572da216be48c3ab97a7cf76e642fade40582896afbfc6a47cc7af0
|
|
| MD5 |
f4b02fcc01c4031c940956535cc1cd3a
|
|
| BLAKE2b-256 |
c256436826d8aeed98940a123279127371650405845b17025993998fb864b2cf
|
Provenance
The following attestation bundles were made for synology_office_exporter-0.0.4-py3-none-any.whl:
Publisher:
ci-cd.yml on isseis/synology-office-exporter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
synology_office_exporter-0.0.4-py3-none-any.whl -
Subject digest:
a7aaffa25572da216be48c3ab97a7cf76e642fade40582896afbfc6a47cc7af0 - Sigstore transparency entry: 186536320
- Sigstore integration time:
-
Permalink:
isseis/synology-office-exporter@fda64d37de825fe4aa04e780270efeb1c8ec0964 -
Branch / Tag:
refs/tags/v0.0.4 - Owner: https://github.com/isseis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@fda64d37de825fe4aa04e780270efeb1c8ec0964 -
Trigger Event:
push
-
Statement type: