Compare commits
3 Commits
1ed30e0d80
...
5f518c8df7
Author | SHA1 | Date | |
---|---|---|---|
5f518c8df7 | |||
15869d6537 | |||
3bd46cb640 |
30
.gitea/workflows/build.yaml
Normal file
30
.gitea/workflows/build.yaml
Normal 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
3
.gitignore
vendored
@ -1,3 +1,4 @@
|
|||||||
.history
|
.history
|
||||||
.venv
|
.venv
|
||||||
src/upload/__pycache__
|
src/upload/__pycache__
|
||||||
|
uploads/*
|
4
Makefile
4
Makefile
@ -1,4 +1,4 @@
|
|||||||
all: ensure_env clean build serve
|
all: clean ensure_env build install serve
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-@rm -rf src/rupload/__pycache__
|
-@rm -rf src/rupload/__pycache__
|
||||||
@ -9,6 +9,8 @@ ensure_env:
|
|||||||
build:
|
build:
|
||||||
./.venv/bin/python -m pip install build
|
./.venv/bin/python -m pip install build
|
||||||
./.venv/bin/python -m build .
|
./.venv/bin/python -m build .
|
||||||
|
|
||||||
|
install:
|
||||||
./.venv/bin/python -m pip install -e .
|
./.venv/bin/python -m pip install -e .
|
||||||
|
|
||||||
serve:
|
serve:
|
||||||
|
BIN
dist/rupload-1.3.37-py3-none-any.whl
vendored
Normal file
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
BIN
dist/rupload-1.3.37.tar.gz
vendored
Normal file
Binary file not shown.
@ -24,6 +24,32 @@ python3 -m venv .venv
|
|||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
```
|
```bash
|
||||||
rupload.serve [host(127.0.0.1)] [port] [destination path for uploads] [max file size in bytes]
|
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).
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user