Skip to content

Use the json export of MediaDC (NextCloud app) to massively delete files

License

Notifications You must be signed in to change notification settings

deftmartian/mediadc-massdelete

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MediaDC Mass Deleter

Use the json export of MediaDC (NextCloud app) to delete duplicates pictures massively

Setup:

  • python3 venv myenv
  • source myenv/bin/activate
  • pip install webdavclient3
  • python3 mediadc_delete.py --help
    usage: MediaDC - Mass deleter [-h] [--exclude EXCLUDE [EXCLUDE ...]] [--include INCLUDE [INCLUDE ...]] [--dry-run] [--different-path-only] --host
                                  HOST --login LOGIN --password PASSWORD [--verify-ssl]
                                  json

    Takes the json export from MediaDC and massively delete all replicates

    positional arguments:
      json                  Path to the json file

    optional arguments:
      -h, --help            show this help message and exit
      --exclude EXCLUDE [EXCLUDE ...]
                            Do not delete files whose path contains this (if size is similar)
      --include INCLUDE [INCLUDE ...]
                            Prefer to delete files whose path contains this (if size is similar)
      --dry-run             Do not actually delete files
      --different-path-only
                            Only delete files in different path (to avoid deleting pictures just a bit similar)
      --host HOST           WebDav full URL as given in the bottom left of the root URL
      --login LOGIN         Login
      --password PASSWORD   Password
      --verify-ssl          Do verify SSL certificate

Getting the json file out of MediaDC

image image

Example

Sample command : python3 mediadc_delete.py --exclude workspace --include DCIM Temp Import Upload temp --host "https://server.com/nextcloud/remote.php/dav/files/user" --login user --password XXX ../../Downloads/2_task_results_export.json --different-path-only

About

Use the json export of MediaDC (NextCloud app) to massively delete files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%