Compare commits

..

3 Commits

Author SHA1 Message Date
5f518c8df7 Added upload directory contents to .gitignore.
All checks were successful
RUpload build / Build (push) Successful in 1m14s
2024-11-26 06:05:24 +01:00
15869d6537 Removed uploads content 2024-11-26 06:04:50 +01:00
3bd46cb640 Created build server configuration. 2024-11-26 06:04:33 +01:00
6 changed files with 63 additions and 4 deletions

View File

@ -0,0 +1,30 @@
name: RUpload build
run-name: RUpload build
on: [push]
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: List files in the repository
run: |
ls ${{ gitea.workspace }}
- run: echo "Install dependencies."
- run: apt update
- run: apt install python3 python3-pip python3-venv make -y
- run: echo "Create environment."
- run: make ensure_env
- run: echo "Create build."
- run: make build
- run: echo "Install package."
- run: make install
- run: echo "Test installation."
- run: ./.venv/bin/rupload.serve --help
- run: git add .
- run: git config --global user.email "bot@molodetz.com"
- run: git config --global user.name "bot"
- run: git commit -a -m "Update build files."
- run: git push
- run: echo "This job's status is ${{ job.status }}."

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
.history
.venv
src/upload/__pycache__
src/upload/__pycache__
uploads/*

View File

@ -1,4 +1,4 @@
all: ensure_env clean build serve
all: clean ensure_env build install serve
clean:
-@rm -rf src/rupload/__pycache__
@ -9,6 +9,8 @@ ensure_env:
build:
./.venv/bin/python -m pip install build
./.venv/bin/python -m build .
install:
./.venv/bin/python -m pip install -e .
serve:

BIN
dist/rupload-1.3.37-py3-none-any.whl vendored Normal file

Binary file not shown.

BIN
dist/rupload-1.3.37.tar.gz vendored Normal file

Binary file not shown.

View File

@ -24,6 +24,32 @@ python3 -m venv .venv
```
## Usage
```
rupload.serve [host(127.0.0.1)] [port] [destination path for uploads] [max file size in bytes]
```bash
rupload.serve [-h]
[--hostname HOSTNAME]
[--port PORT]
[--upload_folder UPLOAD_FOLDER]
[--upload_url UPLOAD_URL]
[--max_file_size MAX_FILE_SIZE]
Start the file upload server.
options:
-h, --help show this help message
and exit
--hostname HOSTNAME The hostname for the
server.
--port PORT The port to bind the
server to.
--upload_folder UPLOAD_FOLDER
Directory to store
uploaded files.
--upload_url UPLOAD_URL
HTTP(S) URL where the
server will serve the
uploaded files.
--max_file_size MAX_FILE_SIZE
Maximum file size in
bytes (default is
50MB).
```