A lightweight CLI for uploading and managing your files on a linx-server instance.
Project description
pylinx a linx-server CLI
A lightweight Python CLI for uploading and managing your files on a linx-server instance.
Usage
Help command:
Usage: pylinx [OPTIONS] COMMAND [ARGS]...
Options:
--working-dir TEXT Manually sets the working directory. Any relative
argument paths use this as the base.
-v, --verbose Print more information
--config TEXT Set the custom configuration file
--version
-y, --yes Skip interactive questions, if possible
--help Show this message and exit.
Commands:
configure Manage your configuration (interactive)
delete (del) Delete a file with the provided delete key
info (i) Show information about a file (expiration, size, ...)
upload (u) Upload a file
Upload command help:
Usage: pylinx upload [OPTIONS] FILE_PATH
Upload a file
Options:
-r, --randomize whether to randomize the file name [default: False]
-e, --expiry-days TEXT for how many days should the file be retained
(maximum is set by the server!)
-d, --delete-key TEXT what the delete key should be [default: random]
-a, --access-key TEXT what the access key (file password) should be
-f, --filename TEXT custom filename [default: same as file]
--help Show this message and exit.
See pylinx [command] --help for more detailed help for each available command.
Installation
1. Prerequisites
Poetry is the dependency manager of choice for this project, so you need to have it installed (or if you really don't want to use it, see b) Pip install). Additionally, this project is compatible with Python 3.8+ (Poetry will insist on it).
2. Installation
a) Install script (recommended)
The simplest way to install pylinx is to use the provided install script.
It will create a virtualenv in the current directory using Poetry to avoid polluting your global package list.
Bash with curl:
curl -sSL https://raw.githubusercontent.com/DefaultSimon/pylinx/master/scripts/install_pylinx.py --output install_pylinx.py && python install_pylinx.py
On Windows with Powershell
(Invoke-WebRequest -Uri https://raw.githubusercontent.com/DefaultSimon/pylinx/master/scripts/install_pylinx.py -UseBasicParsing -OutFile install_pylinx.py); python install_pylinx.py
You will still be asked to add the resulting path to your PATH variable manually.
Uninstalling is as simple as updating PATH and removing the directory that was made.
b) Pip install
NOTE: This package is publised on PyPi as cli-pylinx, not pylinx!
If other methods are unavailable for you or fail, you can install pylinx using either
python -m pip install cli-pylinx (latest release) or
python -m pip install git+https://github.com/DefaultSimon/pylinx.git (up-to-date with the repository)
Note that this will install packages to your global Python install, so the first method with Poetry and virtualenv might be preffered.
A note for Windows users: using this type of install, you will not be able to add pylinx to your right-click "context" menu using the provided scripts.
c) Manual install (advanced)
If you do not want to run the install script, you can also do the installation manually.
- clone this repository to a location of your choosing
- execute
poetry installin the root directory - copy the
pylinxbinary andpylinx-script.pyscript to somewhere in yourPATH(or, as the installer does it - make a localbindirectory, copy the two files there and add them to yourPATHvariable)
3. Configuration
Pylinx uses a single TOML configuration file named linxConfig.toml. A blank configuration file is available under config/linxConfig.EXAMPLE.toml.
Pylinx offers three ways of specifying your configuration file. First, if --config [filepath] is passed, it ignores any other configuration files.
Otherwise, it looks at the current directory, then ~/.config/pylinx/.
If no configuration file can be found in any of the above places, pylinx will refuse to run.
While you can create and edit the configuration manually, pylinx also provides a handy command for doing this a bit more interactively - pylinx configure.
4. Extras
4.1. Right-click context menu on Windows
If you are a Windows user, you might benefit from a quicker way of uploading files.
The script in scripts/win-add_to_context_menu.py will add pylinx to the right-click (context) menu.
Simply run python win-add_to_context_menu.py and follow the instructions.
Project details
Release history Release notifications | RSS feed
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 cli-pylinx-1.3.1.tar.gz.
File metadata
- Download URL: cli-pylinx-1.3.1.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.1 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c3c06e3d80c3b5a84c9819b333bc167f8ca3a3447cf2cfbf6b812bd38958a51
|
|
| MD5 |
ac01c56b41b87f39df931464004f0a11
|
|
| BLAKE2b-256 |
9ccb1e31413604a33152192be8d092bd2ce21b5c3ddcd76b68478a4915840343
|
File details
Details for the file cli_pylinx-1.3.1-py3-none-any.whl.
File metadata
- Download URL: cli_pylinx-1.3.1-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.1 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14febda5a321cbc7c48b0b7c9419157794a8f5254941117a29496a4006cadac3
|
|
| MD5 |
4594d97adc6a753387414d000c76e39d
|
|
| BLAKE2b-256 |
134f54001a98691a6d6921681b40d51ec6748cd397028798c33542b6c84b5338
|