If you want to integrate o/PARASHOOT into your automated workflows or custom software there are two ways to do that:
Using the API
On macOS, o/PARASHOOT exposes two very simple to use API endpoints based on named pipes. Both are located in ~/Library/Application Support/ParaShoot
.
erase_mountpoint
Writing the full mountpoint to ~/Library/Application Support/ParaShoot/erase_mountpoint
followed by a newline (\n
) will trigger the same actions and dialogs as the corresponding actions in the drop down menu.
In bash this might look like this:
echo '/Volumes/A003XYZ1' > ~/Library/Application\ Support/ParaShoot/erase_mountpoint
In Python:
api_path = "~/Library/Application Support/ParaShoot/erase_mountpoint"
with open(os.path.expanduser(api_path), "w") as f:
f.write("/Volumes/A003XYZ1\n")
erase_mountpoint with renamed files
If your app renames files on the fly, you can provide a json map with the old and new names like so:
echo '/Volumes/A002XYZ1 | {"renamed":{"gopro1.mov":"A001C001_240110.mov","gopro2.mov":"A001C002_240110.mov"}}' > ~/Library/Application\ Support/ParaShoot/erase_mountpoint
Using the command line interface
If your workflow needs to be completely automated or for any other reason you need to run o/PARASHOOT without any user interaction you can use the CLI.
Erasing a card using the CLI
/Applications/ParaShoot.app/Contents/MacOS/cli/parashoot erase --card=/Volumes/A003XYZ1 --destinations=/Volumes/BACKUP_1,/Volumes/BACKUP_2
Help
Use parashoot --help
and parashoot --help erase
to get detailed help:
/Applications/ParaShoot.app/Contents/MacOS/cli/parashoot --help
ParaShoot - The safe(-ish) card eraser
Developed by OTTOMATIC - https://ottomatic.io
In collaboration with Awesome Pixels - https://www.awpi.de
Usage: parashoot <command> [arguments]
Global options:
-h, --help Print this usage information.
-v, --version Print the current version
Available commands:
erase Erases a card
Run "parashoot help <command>" for more information about a command.
/Applications/ParaShoot.app/Contents/MacOS/cli/parashoot --help erase
Erases a card
Usage: parashoot erase [arguments]
-h, --help Print this usage information.
-c, --card=<path> (mandatory) Path to card
-d, --destinations=<path1,path2,...> Backup destinations (comma separated or multiple options)
-e, --erase-empty Erase card even if it is empty
Run "parashoot help" to see global options.