clip2imgur


Nameclip2imgur JSON
Version 0.9.3 PyPI version JSON
download
home_pagehttps://github.com/xiaohk/clip2imgur
SummaryA simple CLI that uploads your image in the clipboard to Imgur.
upload_time2024-04-10 02:53:43
maintainerNone
docs_urlNone
authorJay Wang
requires_python>=3.6
licenseMIT license
keywords imgur cli image clipboard
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            <h1>clip2imgur <img src="./icon.png" height="36" align="right"></h1>

> A simple macOS command line tool for uploading your screenshots from clipboard
> to Imgur

[![Github Actions Status](https://github.com/xiaohk/clip2imgur/workflows/build/badge.svg)](https://github.com/xiaohk/clip2imgur/actions/workflows/build.yml)
[![License](https://img.shields.io/badge/License-MIT-yellowgreen)](https://github.com/xiaohk/clip2imgur/blob/master/LICENSE)
[![pypi](https://img.shields.io/pypi/v/clip2imgur?color=blue)](https://pypi.python.org/pypi/clip2imgur)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5348350.svg)](https://doi.org/10.5281/zenodo.5348350)

## Usage

<img src="./demo.gif" width=500 style="margin-left:50px"  align="right">

- Press <kbd>control+shift+command+3</kbd> or <kbd>control+shift+command+4</kbd>
  to capture and copy a screenshot.

- Run `clip2imgur` in your terminal, then boom, the image URL is in your
  clipboard.

- If it is your first time to run `clip2imgur`, you can choose to authorize this
  tool, and your image will be posted in your image collection
  (`username.imgur.com/all`).

- You also can choose to post anonymously, but it is hard to get the url later
  and Imgur might delete your posts.

In default setting, the URL of posted image will be copied to your clipboard.
You can use flags to configure it.

```
$ clip2imgur --html
$ clip2imgur -n
```

| short | long         | description                                                                         |
| :---- | :----------- | :---------------------------------------------------------------------------------- |
| `-m`  | `--markdown` | URL will be copied in the Markdown image format.`[](https://i.imgur.com/x.png)`     |
| `-t`  | `--html`     | URL will be copied in the HTML image format.`<img src="https://i.imgur.com/x.png">` |
| `-n`  | `--notcopy`  | Your image URL will not be copied to your clipboard                                 |

Personally I like to include images in Markdown file using the HTML format,
which gives more control of the display. If you forget these flags, you always
can run `clip2imgur -h` to check the usage.

## Install

This package is built using cross-platform Swift with Swift Package Manager
(SPM), but it currently only supports macOS. There are three ways to install
`clip2imgur`.

### Homebrew

Using `Homebrew` is the recommended and also the easiest way to get `clip2imgur`
installed on your mac. If you don't have `Homebrew` installed, you can simply
run:

```
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```

Then, to install `clip2imgur`:

```
$ brew tap xiaohk/clip2imgur
$ brew install clip2imgur
```

### Download the Binary

You can download the pre-compiled binary from the
[Latest Rease](https://github.com/xiaohk/clip2imgur/releases/latest). After
extract the binary, you want to create a symbolic link in `/usr/local/bin` to
launch `clip2imgur` in your terminal more quickly.

```
$ mkdir ~/clip2imgur && cd ~/clip2imgur
$ curl -O https://github.com/xiaohk/clip2imgur/releases/download/v0.9/clip2imgur-0.9.0.tar.gz
$ tar -xvzf clip2imgur-0.9.0.tar.gz
$ ln -s ~/clip2imgur/clip2imgur /usr/local/bin/clip2imgur
```

### Build from Source

This approach is not recommended, because a function used to refresh your
authorization is not open sourced for security reasons. Your compiled version
works fine, but may require you to re-authorize `clip2imgur` periodically. If
you only want to post images anonymously, then it doesn't really matter.

To build `clip2imgur`, you need macOS 10.10 or later and Swift 3.0 or above.

```
$ git clone https://github.com/xiaohk/clip2imgur.git
$ cd clip2imgur
$ swift build -c release -Xswiftc -static-stdlib
$ ln -s $(pwd)/.build/release/clip2imgur /usr/local/bin/clip2imgur
```

`clip2imgur` also has a by-product framework `clip2imgurCore` in `./build`.
There might be some handy functions to use in your own projects.

## Built With

- [Swift Package Manager](https://swift.org/package-manager/)
- [Rainbow](https://github.com/onevcat/Rainbow)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/xiaohk/clip2imgur",
    "name": "clip2imgur",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "Imgur, CLI, Image, Clipboard",
    "author": "Jay Wang",
    "author_email": "jayw@zijie.wang",
    "download_url": "https://files.pythonhosted.org/packages/e8/ae/cfba36a2b029549715be9247dc6c93eb4164e6ed7a9fa9b0e2822485209a/clip2imgur-0.9.3.tar.gz",
    "platform": "Linux",
    "description": "<h1>clip2imgur <img src=\"./icon.png\" height=\"36\" align=\"right\"></h1>\n\n> A simple macOS command line tool for uploading your screenshots from clipboard\n> to Imgur\n\n[![Github Actions Status](https://github.com/xiaohk/clip2imgur/workflows/build/badge.svg)](https://github.com/xiaohk/clip2imgur/actions/workflows/build.yml)\n[![License](https://img.shields.io/badge/License-MIT-yellowgreen)](https://github.com/xiaohk/clip2imgur/blob/master/LICENSE)\n[![pypi](https://img.shields.io/pypi/v/clip2imgur?color=blue)](https://pypi.python.org/pypi/clip2imgur)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5348350.svg)](https://doi.org/10.5281/zenodo.5348350)\n\n## Usage\n\n<img src=\"./demo.gif\" width=500 style=\"margin-left:50px\"  align=\"right\">\n\n- Press <kbd>control+shift+command+3</kbd> or <kbd>control+shift+command+4</kbd>\n  to capture and copy a screenshot.\n\n- Run `clip2imgur` in your terminal, then boom, the image URL is in your\n  clipboard.\n\n- If it is your first time to run `clip2imgur`, you can choose to authorize this\n  tool, and your image will be posted in your image collection\n  (`username.imgur.com/all`).\n\n- You also can choose to post anonymously, but it is hard to get the url later\n  and Imgur might delete your posts.\n\nIn default setting, the URL of posted image will be copied to your clipboard.\nYou can use flags to configure it.\n\n```\n$ clip2imgur --html\n$ clip2imgur -n\n```\n\n| short | long         | description                                                                         |\n| :---- | :----------- | :---------------------------------------------------------------------------------- |\n| `-m`  | `--markdown` | URL will be copied in the Markdown image format.`[](https://i.imgur.com/x.png)`     |\n| `-t`  | `--html`     | URL will be copied in the HTML image format.`<img src=\"https://i.imgur.com/x.png\">` |\n| `-n`  | `--notcopy`  | Your image URL will not be copied to your clipboard                                 |\n\nPersonally I like to include images in Markdown file using the HTML format,\nwhich gives more control of the display. If you forget these flags, you always\ncan run `clip2imgur -h` to check the usage.\n\n## Install\n\nThis package is built using cross-platform Swift with Swift Package Manager\n(SPM), but it currently only supports macOS. There are three ways to install\n`clip2imgur`.\n\n### Homebrew\n\nUsing `Homebrew` is the recommended and also the easiest way to get `clip2imgur`\ninstalled on your mac. If you don't have `Homebrew` installed, you can simply\nrun:\n\n```\n$ /usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n```\n\nThen, to install `clip2imgur`:\n\n```\n$ brew tap xiaohk/clip2imgur\n$ brew install clip2imgur\n```\n\n### Download the Binary\n\nYou can download the pre-compiled binary from the\n[Latest Rease](https://github.com/xiaohk/clip2imgur/releases/latest). After\nextract the binary, you want to create a symbolic link in `/usr/local/bin` to\nlaunch `clip2imgur` in your terminal more quickly.\n\n```\n$ mkdir ~/clip2imgur && cd ~/clip2imgur\n$ curl -O https://github.com/xiaohk/clip2imgur/releases/download/v0.9/clip2imgur-0.9.0.tar.gz\n$ tar -xvzf clip2imgur-0.9.0.tar.gz\n$ ln -s ~/clip2imgur/clip2imgur /usr/local/bin/clip2imgur\n```\n\n### Build from Source\n\nThis approach is not recommended, because a function used to refresh your\nauthorization is not open sourced for security reasons. Your compiled version\nworks fine, but may require you to re-authorize `clip2imgur` periodically. If\nyou only want to post images anonymously, then it doesn't really matter.\n\nTo build `clip2imgur`, you need macOS 10.10 or later and Swift 3.0 or above.\n\n```\n$ git clone https://github.com/xiaohk/clip2imgur.git\n$ cd clip2imgur\n$ swift build -c release -Xswiftc -static-stdlib\n$ ln -s $(pwd)/.build/release/clip2imgur /usr/local/bin/clip2imgur\n```\n\n`clip2imgur` also has a by-product framework `clip2imgurCore` in `./build`.\nThere might be some handy functions to use in your own projects.\n\n## Built With\n\n- [Swift Package Manager](https://swift.org/package-manager/)\n- [Rainbow](https://github.com/onevcat/Rainbow)\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "A simple CLI that uploads your image in the clipboard to Imgur.",
    "version": "0.9.3",
    "project_urls": {
        "Homepage": "https://github.com/xiaohk/clip2imgur"
    },
    "split_keywords": [
        "imgur",
        " cli",
        " image",
        " clipboard"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df538e1c20a200a1ed43772d463e22b596458905c5f317c68498d5ebb81aa8d7",
                "md5": "4592fb8b463331dc96e933b16210df6b",
                "sha256": "fb3cbad3840ba3e91e9310ba23e42a8633939f676aac85f7255fc1f409b89878"
            },
            "downloads": -1,
            "filename": "clip2imgur-0.9.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4592fb8b463331dc96e933b16210df6b",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6",
            "size": 12289,
            "upload_time": "2024-04-10T02:53:42",
            "upload_time_iso_8601": "2024-04-10T02:53:42.368325Z",
            "url": "https://files.pythonhosted.org/packages/df/53/8e1c20a200a1ed43772d463e22b596458905c5f317c68498d5ebb81aa8d7/clip2imgur-0.9.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e8aecfba36a2b029549715be9247dc6c93eb4164e6ed7a9fa9b0e2822485209a",
                "md5": "b389387db4d7cbc4d71586c54e106f48",
                "sha256": "873767e081731f3ee7c688dd1cd3630a47e7b00ffbff9ecc43d37bbec8ab6f44"
            },
            "downloads": -1,
            "filename": "clip2imgur-0.9.3.tar.gz",
            "has_sig": false,
            "md5_digest": "b389387db4d7cbc4d71586c54e106f48",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 13023,
            "upload_time": "2024-04-10T02:53:43",
            "upload_time_iso_8601": "2024-04-10T02:53:43.354459Z",
            "url": "https://files.pythonhosted.org/packages/e8/ae/cfba36a2b029549715be9247dc6c93eb4164e6ed7a9fa9b0e2822485209a/clip2imgur-0.9.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-10 02:53:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xiaohk",
    "github_project": "clip2imgur",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "lcname": "clip2imgur"
}
        
Elapsed time: 0.29854s