mirror of
https://github.com/PR0M3TH3AN/VoxVera.git
synced 2025-09-08 06:58:42 +00:00
docs: explain download zip usage
This commit is contained in:
10
README.md
10
README.md
@@ -133,6 +133,16 @@ voxvera init --config path/to/custom.json
|
|||||||
voxvera init --from-pdf path/to/form.pdf
|
voxvera init --from-pdf path/to/form.pdf
|
||||||
```
|
```
|
||||||
|
|
||||||
|
After updating the configuration run the build step. You can optionally
|
||||||
|
include a zip file that visitors can download:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
voxvera build --download path/to/file.zip
|
||||||
|
```
|
||||||
|
|
||||||
|
If `--download` is omitted the CLI looks for `src/download/download.zip` and
|
||||||
|
copies it into the output directory.
|
||||||
|
|
||||||
When run interactively you'll be prompted for details such as the flyer title
|
When run interactively you'll be prompted for details such as the flyer title
|
||||||
and headline. The script now also asks for a **URL** and a **Tear-off link**.
|
and headline. The script now also asks for a **URL** and a **Tear-off link**.
|
||||||
These values are written into the configuration file (`src/config.json` by
|
These values are written into the configuration file (`src/config.json` by
|
||||||
|
@@ -5,7 +5,11 @@ This guide covers common CLI workflows. See `docs/docker.md` for Docker instruct
|
|||||||
## Step-by-Step
|
## Step-by-Step
|
||||||
1. Edit `src/index-master.html` or `src/nostr-master.html` if you need custom content.
|
1. Edit `src/index-master.html` or `src/nostr-master.html` if you need custom content.
|
||||||
2. Run `voxvera init` and follow the prompts, or use `voxvera init --from-pdf path/to/form.pdf`.
|
2. Run `voxvera init` and follow the prompts, or use `voxvera init --from-pdf path/to/form.pdf`.
|
||||||
3. Host the generated `host/<subdomain>` directory. The `index.html` file fetches `config.json`, so the flyer must be served via a local or remote web server rather than opened directly from disk. For a quick test you can run `python3 -m http.server` inside the folder and then visit the provided address.
|
3. Build the flyer assets. Add an optional zip file at `src/download/download.zip` or pass `--download` to include it in the build:
|
||||||
|
```bash
|
||||||
|
voxvera build --download path/to/file.zip
|
||||||
|
```
|
||||||
|
4. Host the generated `host/<subdomain>` directory. The `index.html` file fetches `config.json`, so the flyer must be served via a local or remote web server rather than opened directly from disk. For a quick test you can run `python3 -m http.server` inside the folder and then visit the provided address. Visitors can use the **Download** button to retrieve the file.
|
||||||
|
|
||||||
## Batch Import
|
## Batch Import
|
||||||
Place configuration files in an `imports/` directory at the project root and run:
|
Place configuration files in an `imports/` directory at the project root and run:
|
||||||
|
@@ -22,7 +22,6 @@ def _setup_tmp(monkeypatch, tmp_path):
|
|||||||
return repo_root
|
return repo_root
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def test_help(capsys):
|
def test_help(capsys):
|
||||||
with pytest.raises(SystemExit):
|
with pytest.raises(SystemExit):
|
||||||
cli.main(["-h"])
|
cli.main(["-h"])
|
||||||
@@ -102,4 +101,3 @@ def test_build_download_zip(tmp_path, monkeypatch):
|
|||||||
cli.main(["build", "--download", str(zip_path)])
|
cli.main(["build", "--download", str(zip_path)])
|
||||||
dest = tmp_path / "host" / subdomain / "download" / "download.zip"
|
dest = tmp_path / "host" / subdomain / "download" / "download.zip"
|
||||||
assert dest.is_file()
|
assert dest.is_file()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user