Skip to main content

Tools for exporting Synology Office files from Synology NAS devices

Project description

Synology Office Exporter

Python License Contributions welcome

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):

  1. Command line arguments (-u, -p, -s)
  2. Environment variables (via .env file: SYNOLOGY_NAS_USER, SYNOLOGY_NAS_PASS, SYNOLOGY_NAS_HOST)
  3. 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 --force option)
  • 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 --force option is used).

Security Considerations

When using this tool, please be aware of the following security aspects:

  • Credentials Storage: The .env file 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 .env file 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

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

synology_office_exporter-0.0.3.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

synology_office_exporter-0.0.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file synology_office_exporter-0.0.3.tar.gz.

File metadata

  • Download URL: synology_office_exporter-0.0.3.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for synology_office_exporter-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f05bfe2c6f9622092b31fdf5019c1c91b3f9a73ee356e60818273a93540b6d51
MD5 8984e043260f3674194602f3552de656
BLAKE2b-256 87b78b979781ca8aa53da4793a39d59d7f08cb48f4c792746fb98462e2e9c046

See more details on using hashes here.

Provenance

The following attestation bundles were made for synology_office_exporter-0.0.3.tar.gz:

Publisher: ci-cd.yml on isseis/synology-office-exporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file synology_office_exporter-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for synology_office_exporter-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9ef62c8767c9dea997d7f3a24fd5cfa3bd626cd76dc11f48be4f60fd3d4d8d7f
MD5 472d3159553ce5d14295457382384131
BLAKE2b-256 b2344b50d1a2aac0861192c151507310b3bb7b452d1502e4d9303cc1c0ea26f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for synology_office_exporter-0.0.3-py3-none-any.whl:

Publisher: ci-cd.yml on isseis/synology-office-exporter

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page