imgurup
Upload to imgur using its API(v3). Support CLI, KDE, Zenity(GTK) and Mac dialog upload.
Feature
Installation
$ sudo python setup.py install
or
$ sudo pip install imgurup
Usage
img [-h] [-f [<image path> [<image path> ...]]] [-d [<album id>]] [-g] [-n] [-q]
Optional arguments:
-h, --help show this help message and exit -f [<image path> [<image path> ...]] The images you want to upload -d [<album id>] The album id you want your image to be uploaded to -g GUI mode -n Anonymous upload -s Add command in the context menu of file manager(Support Gnome and KDE) -q Choose album with each file -t Use image name as the title
Packcage Dependency
None
Customize example
from imgurup import Imgur
class MyImgur(Imgur):
def get_error_dialog_args(self, msg='Error'):
args = [
'zenity',
'--error',
'--text={text}'.format(text=msg),
]
return args
def get_auth_msg_dialog_args(self, auth_msg, auth_url):
args = [
'zenity',
'--entry',
'--text={msg}'.format(msg=auth_msg),
'--entry-text={link}'.format(link=auth_url),
]
return args
def get_enter_pin_dialog_args(self, token_msg):
args = [
'zenity',
'--entry',
'--text={msg}'.format(msg=token_msg),
]
return args
def get_ask_image_path_dialog_args(self):
args = [
'zenity',
'--file-selection',
]
return args
def get_ask_album_id_dialog_args(self, albums, no_album_msg):
i = 1
arg = [
'zenity',
'--list',
'--text="Choose the album"',
'--column=No.',
'--column=Album name',
'--column=Privacy',
]
for album in albums:
arg.append(str(i))
arg.append('{album[title]}'.format(album=album))
arg.append('{album[privacy]}'.format(album=album))
i += 1
arg.append(str(i))
arg.append(no_album_msg)
arg.append('public')
def get_show_link_dialog_args(self, links):
args = [
'zenity',
'--info',
'--text={links}'.format(links=links),
]
return args
License
The imgurup package is written by Chien-Wei Huang. It’s MIT licensed and freely available.
Feel free to improve this package and send a pull request to GitHub.
Metadata
Release files for imgurup 1.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| imgurup-1.7.0.tar.gz | 14.4 kB | Without provenance | Details for imgurup-1.7.0.tar.gz |
Release files / imgurup-1.7.0.tar.gz
| Download URL | imgurup-1.7.0.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69c28f8332f71ec35240db118c9a33158befe616748664583157f8063bdaef3a
|
|
BLAKE2b-256 checksum How to use checksums |
5ee3f5e181f790f415a530c59280c2a71dc166ac5b098ba21c24caf9f732921d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for imgurup 1.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.