{ "info": { "author": "huntzhan", "author_email": "programmer.zhx@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 1 - Planning", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries" ], "description": "# img2url\n\n## Introduction \n\nimg2url transforms a local image file to an url by uploading the file to remote. img2url helps you write portable document, especially markdown file, in such a way you don't need to worry about where to place the static resource like images!\n\nSupported remotes:\n\n* GitHub Repository (by default).\n* Qiqiu Object Storage.\n\n## Install\n\nimg2url is a Python project, use `pip` to install:\n\n```\npip install img2url\n```\n\n## Command-Line Interface\n\nAnd the CLI is pretty simple:\n\n```\n$ img2url --help \nUsage:\n img2url [--no-clipboard] \n img2url [--no-clipboard] (-m | --markdown) \n\nOptions:\n --no-clipboard Prevent copying result to clipboard.\n -m, --markdown Return Markdown format of image url.\n```\n\nExample:\n\n```\n$ ls -al\ntotal 56\ndrwxr-xr-x 4 haoxun staff 136 Aug 13 21:26 .\ndrwxr-xr-x 8 haoxun staff 272 Aug 13 21:23 ..\n-rw-r--r--@ 1 haoxun staff 23975 Aug 13 21:26 image1.png\n-rw-r--r--@ 1 haoxun staff 3727 Aug 13 21:26 image2.png\n\n$ img2url image1.png \nhttps://cdn.rawgit.com/huntzhan/img2url-repo/master/image1.png\n\n$ img2url --markdown image2.png \n![image2.png](https://cdn.rawgit.com/huntzhan/img2url-repo/master/image2.png)\n```\n\n## Configuration\n\nUser should configure img2url before actually using it, so that img2url knows where to upload the files.\n\nPath of configuration file:\n\n* `~/.img2url.yml`, by default.\n* `IMG2URL_CONFIG_PATH`, customized path.\n\nCurrently, img2url supports following remotes, remote is specified by setting `remote` key in configuration file. If `remote` is not defined, `github` is selected as remote by default.\n\n| Remote | Field Setting |\n| -------------------- | ---------------- |\n| GitHub Repository | `remote: github` |\n| Qiqiu Object Storage | `remote: qiniu` |\n\n### Configuration of GitHub Repository\n\nExample of `.img2url.yml`:\n\n```yaml\nremote: github\n\ngithu_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\ngithu_user: img2url-testing\ngithu_repo: img2url-testing-travisci\n\nproxies:\n https: socks5://127.0.0.1:1080\n```\n\nSupported fields:\n\n| field | required | default |\n| ------------------------- | -------- | ---------------------------------------- |\n| `github_token` | yes | - |\n| `github_user` | yes | - |\n| `github_repo` | yes | - |\n| `github_branch` | no | `\"master\"` |\n| `github_path` | no | `\"\"` |\n| `github_commiter_name` | no | `\"huntzhan\"` |\n| `github_commiter_email` | no | `\"programmer.zhx@gmail.com\"` |\n| `message_template_create` | no | `\"{filename} created by img2url at {time}.\"` |\n| `message_template_update` | no | `\"{filename} updated by img2url at {time}.\"` |\n| `proxies` | no | `None` |\n\nMeaning of fields:\n\n* `github_token`: [Personal access tokens](https://github.com/settings/tokens) of your GitHub account. If you don't have one, click \"Generate new token\" and **select the \"repo\" scope**, then record the generated token.\n* `github_user`: Account of GitHub.\n* `github_repo`: The repository to store images.\n\n\n* `github_branch`: If not defined, use `master` as the default branch.\n* `github_path`: Path to store the uploaded files in your repository. If not defined, use the root of repository by default.\n* `proxies`: If defined, use proxy to make API requests instead of connecting directly.\n* `message_template_create`: Message template for creating new file, supported variables: `{filename}`, `sha`, `time`.\n* `message_template_update`: Message template for updating existed file, supported variables: `{filename}`, `sha`, `time`.\n* `github_commiter_name`: Username for commit message.\n* `github_commiter_email`: Email for commit message.\n\n### Configuration of Qiqiu Object Storage\n\nExample of `.img2url.yml`:\n\n```yaml\nremote: qiniu\n\nqiniu_access_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nqiniu_secret_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nqiniu_bucket: img2url\nqiniu_base_url: xxxxxxxxx.bkt.clouddn.com\n```\n\nSupported fields:\n\n| field | required | default |\n| ------------------- | -------- | ------- |\n| ` qiniu_access_key` | yes | - |\n| ` qiniu_secret_key` | yes | - |\n| ` qiniu_bucket` | yes | - |\n| ` qiniu_base_url` | yes | - |\n\nMeaning of fields:\n\n* `qiniu_access_key`, `qiniu_secret_key`: [Access/Secret Key](https://portal.qiniu.com/user/key)\n* `qiniu_bucket`: the name of Qiniu object storage space.\n* `qiniu_base_url`: domain of Qiniu object storage space.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "img2url", "package_url": "https://pypi.org/project/img2url/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/img2url/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/img2url/0.2.0/", "requires_dist": null, "requires_python": null, "summary": "upload image to github and return corresponding url.", "version": "0.2.0" }, "last_serial": 2292538, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "bbd9c7d2bf1ea621d10d37808d5376ec", "sha256": "73e57d4238998e2182969659a1327cd1971e9bcbea6c1e8cd68d4500ceb1a247" }, "downloads": -1, "filename": "img2url-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bbd9c7d2bf1ea621d10d37808d5376ec", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 6518, "upload_time": "2016-08-13T10:43:48", "url": "https://files.pythonhosted.org/packages/b7/50/3ad910d49c76410aebf0374a150df5f47657a1bc9c72b40656797a40eb60/img2url-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2207f7ff009b4e17babbf6b0327c9c2b", "sha256": "28a1445a01600b97b96308636ae9ae72cc3a152bca0a50839ad9ec150e09c2be" }, "downloads": -1, "filename": "img2url-0.1.0.tar.gz", "has_sig": false, "md5_digest": "2207f7ff009b4e17babbf6b0327c9c2b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5528, "upload_time": "2016-08-13T10:43:43", "url": "https://files.pythonhosted.org/packages/3f/d7/ebbec551a792bb20955284b3d1dca2257d68be7e5ddf7f97cdfca5d63e72/img2url-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "13121c713ec3e43fe9bbabacf024d269", "sha256": "4ba5313594c757a0c77e42f0ea1873b33a48be268053bf263c0789d11ba62e17" }, "downloads": -1, "filename": "img2url-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "13121c713ec3e43fe9bbabacf024d269", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8416, "upload_time": "2016-08-13T13:51:39", "url": "https://files.pythonhosted.org/packages/3b/c7/2f876f177a13b80f37562b16d589533729a3e13ad36ddb73aaa54bf02d47/img2url-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b82fbaa3b5dac039bc28eebac7baba94", "sha256": "5bc586447c27b84d3bc4146a68ace2aa28a5889196d126f686e45578f365a15e" }, "downloads": -1, "filename": "img2url-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b82fbaa3b5dac039bc28eebac7baba94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7215, "upload_time": "2016-08-13T13:51:34", "url": "https://files.pythonhosted.org/packages/03/64/728cc62a42c279c346da95ccce16a81dc32e61fd38f9a1e5b6ef632ecbc9/img2url-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "6a5cd6943ea0df6bf19a6def09b7b889", "sha256": "013cfeb964f7c575729bca1979ce8e8e3799fae163606884b66b36f86d5f1666" }, "downloads": -1, "filename": "img2url-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6a5cd6943ea0df6bf19a6def09b7b889", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8431, "upload_time": "2016-08-13T13:55:54", "url": "https://files.pythonhosted.org/packages/1f/11/d258118d881e7e35857644e383ae48960ed6f61e314232185bda3945ddda/img2url-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "20818ff690489e6cc32991321dffff0b", "sha256": "114dd6aa57df6db1759a6d4fb9f47ee17ca8cc5ceb6a8775f333d37ee0e777d7" }, "downloads": -1, "filename": "img2url-0.1.2.tar.gz", "has_sig": false, "md5_digest": "20818ff690489e6cc32991321dffff0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7217, "upload_time": "2016-08-13T13:55:49", "url": "https://files.pythonhosted.org/packages/91/82/ef82b351db5340daea6a486de2cb7e0eb27a886735bcd06c357a300416b7/img2url-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "03466c8146e42b9aaf1926bc553948da", "sha256": "8940cde9b7b5f445a501ca7b38a28a3072de0b3af699488ffc9d97d69fd99220" }, "downloads": -1, "filename": "img2url-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "03466c8146e42b9aaf1926bc553948da", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8432, "upload_time": "2016-08-14T06:27:21", "url": "https://files.pythonhosted.org/packages/41/2b/064d1183d2bbbf57c14b97bedcda906726380d4eaaeb287f9272c48c4340/img2url-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "86953a252e4fe66ae29f840b8da37b3d", "sha256": "81ea429d6dbb748de67560a6099654952b1698d2418d82e921e1c65f3eb4692c" }, "downloads": -1, "filename": "img2url-0.1.3.tar.gz", "has_sig": false, "md5_digest": "86953a252e4fe66ae29f840b8da37b3d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7235, "upload_time": "2016-08-14T06:27:16", "url": "https://files.pythonhosted.org/packages/f4/93/c13f0da11d8bb69f6d9e93ee5d7b4e363ede1e1d639f827d79b2063ca10f/img2url-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "0d8927f544e3980ccbb9aa34bcba3be0", "sha256": "5feb406c0e0ca4ca091bc75317a433c4dbfc30db96e0929421f93cf22239491a" }, "downloads": -1, "filename": "img2url-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0d8927f544e3980ccbb9aa34bcba3be0", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 8927, "upload_time": "2016-08-14T07:51:21", "url": "https://files.pythonhosted.org/packages/f0/6a/22e285ef4b0b9f7531f8984b1040f63c8991279e175930db941a674a97b9/img2url-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1a0b297639bf40e0657cfb699bc8e00a", "sha256": "aa71d59e60557a8d81496289d4852b125ca03cc2636ae273d3450b9fd585e89f" }, "downloads": -1, "filename": "img2url-0.1.4.tar.gz", "has_sig": false, "md5_digest": "1a0b297639bf40e0657cfb699bc8e00a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7813, "upload_time": "2016-08-14T07:51:15", "url": "https://files.pythonhosted.org/packages/28/3a/24af68534065b80c7f1f887c30b15a9754f0e69eb4dc2867de40ae44878b/img2url-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "5690cfe3582dce781905bf1e1a8f98d7", "sha256": "568133b47505b24ec40de69ee4c1f703e27b1b1b46f8e50be2438b2eb86a1e81" }, "downloads": -1, "filename": "img2url-0.1.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5690cfe3582dce781905bf1e1a8f98d7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 9115, "upload_time": "2016-08-14T12:43:13", "url": "https://files.pythonhosted.org/packages/8b/be/94e5c6ec7a739eb6f7583f94394767c27133c0e5cd666651644c0c3b74e3/img2url-0.1.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "400dee4c6b93a5b33fc2475949e22b64", "sha256": "329d557cbbd2b554a2895ee11c2d6c8566cea3017d8c297859ad080cb07dade4" }, "downloads": -1, "filename": "img2url-0.1.5.tar.gz", "has_sig": false, "md5_digest": "400dee4c6b93a5b33fc2475949e22b64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7973, "upload_time": "2016-08-14T12:43:09", "url": "https://files.pythonhosted.org/packages/6b/21/e33c2b61da2ba96f0f617fe96f35fcce6ca4d292f768ff4711136a30e7b4/img2url-0.1.5.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "6fb11ca0071974705e2634a57da2e155", "sha256": "becbeec4e0c835a147564b41fa1c05bc341059098acf3fd421fac4767576f5d1" }, "downloads": -1, "filename": "img2url-0.1.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "6fb11ca0071974705e2634a57da2e155", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 14507, "upload_time": "2016-08-17T15:25:14", "url": "https://files.pythonhosted.org/packages/76/84/6812da89fd3ed3ba972d6753675e5c1398cfa23d7e57a694384885fdb915/img2url-0.1.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a497cd4563cce45a7d33ba20e3198acf", "sha256": "04adf4cfbdfaaf282f1e0631e3140b73de5a73af001914357d6adf576c7a0169" }, "downloads": -1, "filename": "img2url-0.1.6.tar.gz", "has_sig": false, "md5_digest": "a497cd4563cce45a7d33ba20e3198acf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10228, "upload_time": "2016-08-17T15:25:08", "url": "https://files.pythonhosted.org/packages/22/a7/16c6ab1b4b1e506258f8ff304ee34bb1025649987b184bd9c42fbf34a4bf/img2url-0.1.6.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "8bf17d7b4f29f55fd51bb8bf562c972c", "sha256": "76eb2647251dd6c8a60b23525fb914fc7520e8a9b9f42be33fe6ba2dadbc04f1" }, "downloads": -1, "filename": "img2url-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8bf17d7b4f29f55fd51bb8bf562c972c", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 14712, "upload_time": "2016-08-20T13:08:24", "url": "https://files.pythonhosted.org/packages/9d/e4/af3b9236852b339adaaeac2bbd2573d1f8a37aa769592b5a4285220da184/img2url-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9619a88808ce08b90077d506675e25aa", "sha256": "d144423f8bb4d168ce7d63fbc88f4a8116b0f1ee6f539442288cddd05a717278" }, "downloads": -1, "filename": "img2url-0.2.0.tar.gz", "has_sig": false, "md5_digest": "9619a88808ce08b90077d506675e25aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10351, "upload_time": "2016-08-20T13:08:19", "url": "https://files.pythonhosted.org/packages/f4/78/c41aa572d08164c0246fb07d71a8c41a4cbc1c0ebc1a0c3e30a253701982/img2url-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8bf17d7b4f29f55fd51bb8bf562c972c", "sha256": "76eb2647251dd6c8a60b23525fb914fc7520e8a9b9f42be33fe6ba2dadbc04f1" }, "downloads": -1, "filename": "img2url-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "8bf17d7b4f29f55fd51bb8bf562c972c", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 14712, "upload_time": "2016-08-20T13:08:24", "url": "https://files.pythonhosted.org/packages/9d/e4/af3b9236852b339adaaeac2bbd2573d1f8a37aa769592b5a4285220da184/img2url-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9619a88808ce08b90077d506675e25aa", "sha256": "d144423f8bb4d168ce7d63fbc88f4a8116b0f1ee6f539442288cddd05a717278" }, "downloads": -1, "filename": "img2url-0.2.0.tar.gz", "has_sig": false, "md5_digest": "9619a88808ce08b90077d506675e25aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10351, "upload_time": "2016-08-20T13:08:19", "url": "https://files.pythonhosted.org/packages/f4/78/c41aa572d08164c0246fb07d71a8c41a4cbc1c0ebc1a0c3e30a253701982/img2url-0.2.0.tar.gz" } ] }