Integration of scripts into various Unix file managers
Project description
file-manager-integration
A small utility for integrating scripts into various Unix/Linux file managers.
It uses a file named file_manager_integration.json specifying the script
and the parameters of the file manager integration.
Requirements
Python 3.6 or newer
Installation
pip install file-manager-integration
I recommend either installing into a virtual environment or doing a user install:
pip install --user file-manager-integration
Usage
The utility can be invoked on the command line either directly
(file_manager_integration) or via python3 -m
(python -m in a Python 3 virtual environment):
python3 -m file_manager_integration
In the following examples, the short variant is used.
List supported file managers
file_manager_integration list-supported
Show configuration
Reads file_manager_integration.json from the current working directory
and shows its contents.
file_manager_integration list-supported
Edit / create a configuration
Interactively asks the user for each parameter of a new configuration
and writes the new configuration to file_manager_integration.json
in the current working directory.
If the file already existed before, values are read from it and used as presets.
file_manager_integration configure
Do the integration
Call file_manager_integration install with at least the name of the file manager
and optionally the integration mode (actionor script).
If the integration mode is omitted, the first one listed for the file manager
when calling file_manager_integration list-supported will be used
(that’s usually action if supported).
The action integration mode creates files,
and the script integration modes creates symbolic links,
both in locations specific to the file manager (see the file_managers module source).
file_manager_integration install [ Options ] <file manager> [ <integration mode> ]
Options:
--interactiveasks for each parameter interactively, using the values from thefile_manager_integration.jsonfile as presets.--force-create-directoriescreates required directories if they do not exist yet.--force-overwriteoverwrites pre-existing target files or symbolic links--force-rename-existingrenames an existing symbolic link pointing to the same path as the script to be integrated to the name specified in the parameters.
Scripts requirements
The scripts being integrated must support the following:
- For script integration:
Read the selected file or directory from environment variables
set by the file manager:
CAJA_SCRIPT_SELECTED_FILE_PATHSNAUTILUS_SCRIPT_SELECTED_FILE_PATHSNEMO_SCRIPT_SELECTED_FILE_PATHS
- For action integration: Read the selected file or directory as a single command line argument.
The scripts should provide a graphical user interface.
Supported file managers
implemented
- Caja (MATE)
- Nautilus (GNOME)
- Nemo (Cinnamon)
planned support
- KDE file manager
- PCManFM (LXDE)
- Thunar (XFCE)
Bugs / Feature requests
Feel free to open an issue here
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 file_manager_integration-0.2.2.tar.gz.
File metadata
- Download URL: file_manager_integration-0.2.2.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71b44ed472ab1adfc7164e7926ea78b9ca20b03190a1d5710f65c552462b6c6e
|
|
| MD5 |
8cbe9ef948619144ef6837eb8f8a5f12
|
|
| BLAKE2b-256 |
92edfa9ec58efdbb9c3b3e270d1cb27720a7c21d12fa92d51bb88ce6c1628353
|
File details
Details for the file file_manager_integration-0.2.2-py3-none-any.whl.
File metadata
- Download URL: file_manager_integration-0.2.2-py3-none-any.whl
- Upload date:
- Size: 27.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.6.0 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.9.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e9a29fe7953845a14d0de5ee9ad18baaa2cce2286f444dd0520f6fff7ee0522
|
|
| MD5 |
1ce69abad201796f246a62bc0e586c09
|
|
| BLAKE2b-256 |
2f0e1aaf9169fbe13f36c2123b9e79ea8479331868626ed87de4d69aaf2346ff
|