Metadata-Version: 2.4
Name: qexshare
Version: 0.1.0
Summary: A simple file share service
Author-email: lexa <lexa@qex.at>
License-Expression: MIT
Project-URL: repository, https://codeberg.org/qexat/qexshare
Requires-Python: >=3.14
Description-Content-Type: text/markdown
Requires-Dist: click==8.4.2
Requires-Dist: fabric==3.2.3
Requires-Dist: keyring==25.7.0

# qexshare

A simple file share service.

## usage

First, clone the repository and install the project locally.

> You are advised to use a virtual environment.

```sh
git clone ssh://git@codeberg.org/qexat/qexshare.git
cd qexshare/
# venv .venv -ppython314
pip install -e .
```

### setup

```sh
qexshare setup
```

If this is your first time running `qexshare` on your computer, you will be prompted to enter the host (the address of the server that stores the files), the user and the password. They will be saved in a keyring. You can reset up each credential individually, using `--host`, `--user` and `--password`.

> Note: this command is for a one-time convenience. If you don't run it, `qexshare` will ask for credentials on the first command that requires them.

### get or create a link

```sh
qexshare get /path/to/file
```

If the file has already a share link, the command simply returns it. Otherwise, it uploads the file to the server and returns the newly created link.

### list files and links

```sh
qexshare list
qexshare list --type=files
qexshare list --type=links
qexshare list --type=uuids
```

Lists the files that are shared from this device. `--type=files` only prints their paths. `--type=links` only prints their links. `--type=uuids` only prints their UUIDs.

### remove link

```sh
qexshare remove /path/to/file
qexshare remove UUID
```

Remove the share link (and thus the file on the server) associated with the file or UUID given.

## configuration

Currently, configuration happens directly in `qexshare.py` (this is why you need `-e` when installing `qexshare` with `pip`).

### service domain name

The constant `DOMAIN_NAME` dictates the domain name of the file share service. Note that this is different from the server URL. The domain name is the *visible* address of the service, the one users interact with.

### shared file directory

The constant `REMOVE_ROOT_PATH` dictates the directory on the remote server that stores the files shared.

### database file name

The constant `DATABASE_FILE_NAME` dictates the name of the database file used by `qexshare`. This is mostly a choice of taste, it has no influence on anything else.

### server port (advanced)

The constant `PORT` dictates the port to connect to on the remote server. It's unlikely that you need to change from the default value ; if you aren't sure, leave it as-is.
