Skip to main content

A cross-platform CLI tool to ignore files and folders in Dropbox

Project description

dropblock

A cross-platform CLI tool to ignore or unblock files and folders in Dropbox using platform-specific methods.

Features

  • Cross-platform support (Windows, macOS, Linux)
  • Wildcard and glob pattern support
  • Automatic detection and removal of Dropbox conflicted copies
  • Batch processing of multiple paths
  • Unblock (reverse) operation to restore syncing
  • Verbose and quiet modes

Installation

pip install -e .

Or for system-wide installation:

pip install .

Usage

Basic usage

Ignore a single file or folder:

dropblock /path/to/file
dropblock /path/to/folder

Multiple paths

Ignore multiple files/folders:

dropblock file1.txt folder1 file2.pdf

Wildcard patterns

Ignore parent folder (path ending with *):

dropblock /path/to/folder/*

Ignore files matching a pattern:

dropblock /path/*/specific/file.txt
dropblock /home/user/*/node_modules

Options

  • --ignore-conflicts: Don't remove conflicted copies
  • -n, --no-output: Suppress the list of ignored files
  • -v, --verbose: Show verbose output

Examples

# Ignore node_modules in all projects
dropblock ~/projects/*/node_modules

# Ignore a folder and don't remove conflicts
dropblock --ignore-conflicts ~/Dropbox/large-folder

# Quiet mode - no output
dropblock -n ~/Dropbox/temp/*

# Verbose mode
dropblock -v ~/Dropbox/cache ~/Dropbox/logs

How it works

The tool uses platform-specific methods to set the ignore attribute:

  • Windows: Uses PowerShell to set the com.dropbox.ignored stream
  • macOS: Uses xattr to set either com.apple.fileprovider.ignore#P (File Provider) or com.dropbox.ignored
  • Linux: Uses xattr or attr command to set com.dropbox.ignored

Conflict handling

By default, the tool automatically detects and removes Dropbox conflicted copies (files matching the pattern filename (user's conflicted copy date).ext). Use --ignore-conflicts to disable this behavior.

Requirements

  • Python 3.6+
  • Platform-specific tools:
    • Windows: PowerShell
    • macOS: xattr (built-in)
    • Linux: xattr or attr package

License

MIT

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

dropblock_cli-1.0.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

dropblock_cli-1.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file dropblock_cli-1.0.0.tar.gz.

File metadata

  • Download URL: dropblock_cli-1.0.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dropblock_cli-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d200be1e676cd2f67dbf7acefc73207a29c57b41c21de85dcfaf074517b17378
MD5 6da3b26a7e5d23f3563fe25bff776a4b
BLAKE2b-256 5c9ca151c645b7302ec1d0e9745d12623b951bacb25fe9eaa1b0be30e9964f77

See more details on using hashes here.

Provenance

The following attestation bundles were made for dropblock_cli-1.0.0.tar.gz:

Publisher: publish.yml on Ottermatics/dropbox-ignore-cli

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

File details

Details for the file dropblock_cli-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: dropblock_cli-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dropblock_cli-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5077a73d08208f808ac0c5eb3dfc48d99cd58043b62587079dfe7c0cc3e93e5e
MD5 48f38ae7f52890704740ea4d5bc602a1
BLAKE2b-256 1909bb24e6214ae678bc711b1eada826f3886c4a4d988c5bd770a62199fb51c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for dropblock_cli-1.0.0-py3-none-any.whl:

Publisher: publish.yml on Ottermatics/dropbox-ignore-cli

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