Metadata-Version: 2.4
Name: qexshare
Version: 0.2.1
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
Provides-Extra: development
Requires-Dist: pre-commit==4.6.1; extra == "development"
Requires-Dist: pyright==1.1.411; extra == "development"
Requires-Dist: ruff==0.16.2; extra == "development"

# qexshare

A simple file share service.

## usage

```sh
pip install qexshare
```

### setup

```sh
qexshare setup
```

If this is your first time running `qexshare` on your computer, you will be prompted to enter the domain name (the URL domain that serves the share links), 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 `--domain-name`, `--host`, `--user` and `--password`.

Both the domain name and the host must have the shape `(subdomain.)domain.toplevel`. Do NOT include the protocol (such as `https://`).

> 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 could need to clone the repository and `pip install` locally with `-e` (editable installation) when installing `qexshare`, though the defaults are chosen such that you probably don't have to change them.

### shared file directory

The constant `REMOTE_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.
