Skip to main content

pomf.lain.la uploader.

Project description

lain.la-pomf-uploader

pomf.lain.la uploader.

Installation

Via PyPI (Recommended)

You have the option to choose between the standard version (lain-upload) or the desktop version (lain-upload[clipboard]), which adds clipboard support for auto-copying links.

[!NOTE] For brevity, the examples below use the desktop version.

With pip (Basic)

pip install "lain-upload[clipboard]"

With pipx (Isolated)

pipx install "lain-upload[clipboard]"

With uv (Best)

The most efficient way to install or run the uploader.

# Permanent isolated installation
uv tool install "lain-upload[clipboard]"

# Run once without installing
uvx --with "lain-upload[clipboard]" lain-upload <file1> <file2> <file3>

# Run in scripts or ad-hoc environments
uv run --with "lain-upload[clipboard]" lain-upload <file1> <file2> <file3>

From Source (Development)

# Clone the repository and navigate to it
git clone git@github.com:NecRaul/lain.la-pomf-uploader.git
cd lain.la-pomf-uploader

# Install environment and all development dependencies (mandatory and optional)
uv sync --dev

# Install pre-commit hook
uv run pre-commit install

# Optional: Run all linters and type checkers manually
uv run pre-commit run --all-files

# Run the local version
uv run lain-upload <file1> <file2> <file3>

Usage

Simply provide the path to the file or files you wish to upload.

# Upload a file
lain-upload kuroneko.png

# Upload files from different directories
lain-upload /path/to/kuroneko.png /path/to/another/directory/shirone.png yamineko.png ../kamineko.png

# Upload files with the -p/--progress flag
lain-upload -p big-file

# Display help with the -h/--help flag
lain-upload -h

# Display version with the -v/--version flag
lain-upload -v

Dependencies

  • requests: send the API request for uploading.
  • requests-toolbelt: enable memory-efficient streaming and progress tracking for large uploads.

Optional

  • pyperclip: copy the uploaded files' URLs to the clipboard.

How it works

The pomf.lain.la service allows uploading files via a multipart POST request.

This tool automates the process and adds safety checks.

The Manual Way

curl -F "files[]=@kuroneko.png" https://pomf.lain.la/upload.php

The lain-upload way

  • Batch Processing: Upload multiple files in a single command execution, saving time over individual manual requests.
  • Validation: Checks the file size before uploading to ensure it is below the 1GiB limit.
  • API Request: Sends the multipart POST request via requests and requests-toolbelt, provides progress bar with the -p/--progress flag.
  • Normalization: Parses the server response to provide clean links from pomf.lain.la or pomf2.lain.la.
  • Clipboard (Optional): If pyperclip is installed, the result is instantly copied to your clipboard.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lain_upload-1.16.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lain_upload-1.16-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file lain_upload-1.16.tar.gz.

File metadata

  • Download URL: lain_upload-1.16.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for lain_upload-1.16.tar.gz
Algorithm Hash digest
SHA256 e03a39cda7694bd8a387c67048935c9dc1776c843e8db99d7567ff220d7cc0ad
MD5 dba13aa111dd9351a45390e3eda3898c
BLAKE2b-256 867eff3043c9788a343f85531b43fe073a58de9956149cd7b05390e5e79b9cb5

See more details on using hashes here.

File details

Details for the file lain_upload-1.16-py3-none-any.whl.

File metadata

  • Download URL: lain_upload-1.16-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for lain_upload-1.16-py3-none-any.whl
Algorithm Hash digest
SHA256 2802d1542cef3125dd1d26e26839e2e62133667998a07e00ceab9206d229d2e8
MD5 108644cad69aec18974a2b927cc847cb
BLAKE2b-256 b1da2822bc5102af256f17e86923bda3d59212beaeb7a5214393e72b9a596760

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page