uploader
Dedicated container/script to upload files to openzim/kiwix warehouses and S3
Files are uploaded via SFTP (pubkey authentication) or SCP using OpenSSH.
Usage
- Specify file to upload with
--file. - Mount the RSA private key onto
/etc/ssh/keys/id_rsaor use--private_key - Use an
scp://orsftp://URI to specify target. - Specify a full path (with filename) to upload to a specific name or end with a
/for uploading inside a folder
docker run \
-v ~/.ssh/id_rsa:/etc/ssh/keys/id_rsa:ro \
-v /path/:/path:rw \
openzim/uploader \
uploader \
--file /path/my_file.zim \
--upload-uri sftp://uploader@warehouse.farm.openzim.org/zim/ \
--move \
--delete
Parameters
--username: if your URI has no username, you can specify it here.--move: upload to a temporary filename (<fname>.tmp) and rename it upon completion. Note that SCP is not able to do it so it uploads an<fname>.completefile upon completion instead.--delete: delete source file once uploaded successfuly.--compress: enable transfer compression.--bandwidth: enable bandwidth limit. Set it in Kbps.--cipher: change default cipher (aes128-ctr).--resume: resume partially uploaded file (SFTP only)
Python
pip3 install openzim_uploader[all]
openzim-uploader --help
from openzim_uploader import check_and_upload_file
check_and_upload_file(
src_path="/path/my_file.zim",
upload_uri="sftp://uploader@warehouse.farm.openzim.org/zim/",
private_key="~/.ssh/id_rsa",
)
Note: check_and_upload_file returns an unix-like returncode (0 on success)
Metadata
Release files for openzim-uploader 1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openzim_uploader-1.2.tar.gz | 9.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openzim_uploader-1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.9 kB
Release files / openzim_uploader-1.2.tar.gz
| Download URL | openzim_uploader-1.2.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb6343e2bb6147c9404c47d617d194d0c8db3b4a554df343525e7fada756fa80
|
|
BLAKE2b-256 checksum How to use checksums |
abe1aa3ec6e49bbd11e8853fcc343b3b84cdc00747e77d9b0f2842e1dbe9db51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.27.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.14
|
Release files / openzim_uploader-1.2-py3-none-any.whl
| Download URL | openzim_uploader-1.2-py3-none-any.whl |
|---|---|
| Size | 9.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23ff1b9ff592aeea544c56bbd93bda802769998057155f23d83310b7d805f522
|
|
BLAKE2b-256 checksum How to use checksums |
c7b6f8b4d8fe89d772d04d08bd5bd2f62a3c19fe47fdca1b3821a538e7cd3fd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.27.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.14
|