{ "info": { "author": "Mesut Tasci", "author_email": "mst.tasci@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "snipper\n================================================\n\nManage Bitbucket snippets from command line easy\n-------------------------------------------------\n\n.. image:: https://img.shields.io/pypi/v/snipper.svg\n :target: https://pypi.python.org/pypi/snipper\n\n.. image:: https://img.shields.io/pypi/pyversions/snipper.svg\n :target: https://pypi.python.org/pypi/snipper\n\n.. image:: https://img.shields.io/pypi/l/snipper.svg\n :target: https://pypi.python.org/pypi/snipper\n\n\n\nWhy?\n===================\n\nI created snipper because I prefer Bitbucket snippet instead of Github gist. So why?\n\nBecause gists are `secret but not private`_. So anyone can discover your secret gists by brute-forcing url or finding url of your gist from somewhere.\n\n.. _secret but not private: https://help.github.com/articles/about-gists/#secret-gists\n\n\nSnipper\n==================\n\nUsage\n--------\n\n.. code:: bash\n\n Usage: snipper [OPTIONS] COMMAND [ARGS]...\n\n Options:\n -C, --config PATH Config file path: Default: $HOME/.snipperrc\n --no-color Disable colorizing output\n -h, --help Show this message and exit.\n\n Commands:\n ls List local snippets\n new Create new snippet from file[s]/STDIN\n add Add file[s] to snippet\n edit Edit snippet file\n pull Update local snippets from Bitbucket.\n sync Sync snippets with Bitbucket\n\nInstallation\n~~~~~~~~~~~~~~~~~~~~\n\n::\n\n pip install snipper\n\n\nCreating new snippet\n~~~~~~~~~~~~~~~~~~~~\n\nCreate a snippet from the contents of ``foo.py`` by just the following:\n\n::\n\n snipper new foo.py\n\nCreate snippet from multiple files:\n\n::\n\n snipper new a b c\n snipper new *.py\n\n\u200cBy default, it reads from STDIN, and you can set a filename with ``-f``\nparameter.\n\n::\n\n snipper new -f test.py < a.py\n\nAlternatively, you can just paste from the clipboard:\n\n::\n\n snipper new -P\n\nSnipper creates snippets as private by default. \u200cUse ``-p`` to make the\nsnippet public:\n\n::\n\n snipper new -p a.py\n\nUse ``-t`` parameter to add title to snippet:\n\n::\n\n snipper new -t \"Postgresql notes\" postgres.md\n\nIf you'd like to copy the resulting URL to your clipboard, use ``-c``\nparameter.\n\n::\n\n snipper new -c a.py\n\nAnd you can just ask snipper to open a created snippet on a browser tab\nwith ``-o``.\n\n::\n\n snipper new -o < a.md\n\nAdding files to existing snippet\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can add existing file to a snippet:\n\n::\n\n snipper add [snippetId] a.py\n\nIf you don't give snippet id to ``add`` command, snipper opens a fuzzy\nsnippet selection prompt in order to add file to the selected snippet.\n\n::\n\n snipper add foo.py\n\nAlso if you don't add a file to snipper as parameter, snipper opens a\nnew file with your default editor.\n\nAfter you save and close the editor, new file will be added to selected\nsnippet.\n\n::\n\n snipper add\n\nAlso you can read content from clipboard by ``-P`` or by redirecting\noutput from STDIN to snipper.\n\n::\n\n cat *.txt | snipper add -f foo.txt\n snipper add -P\n\nIf you didn't specified any file name with ``-f`` option,\n``default_filename`` config will be used as the filename.\n\nEditing snippet files\n~~~~~~~~~~~~~~~~~~~~~\n\nYou should give the path of a snippet file for editing.\n\n::\n\n snipper edit\n\nIf you don't give any path, snipper opens a fuzzy search prompt for file\nselection:\n\n::\n\n snipper edit Ahg2l/notes.md\n\nPulling/Syncing snippets\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nIf you make changes on snippets at bitbucket.org website, you can get\nthese changes from Bitbucket with ``pull`` command\n\n::\n\n snipper pull\n\nIf you disabled auto pushing feature from config file, you should sync\nsnippets manually. ``sync`` pushes unpushed local changes to Bitbucket\nand pull the new changes from Bitbucket if any exist.\n\n::\n\n snipper sync\n\nSee ``snipper --help`` for more detail. Also you can get help for any\nspecified command as below:\n\n::\n\n snippet new --help\n\n--------------\n\nLogin\n-----\n\nBitbucket does not support token authentication for users now, but you\ncan create an app password that is permitted only to snippets on\nBitbucket settings page. Nobody cannot login or access to your bitbucket\ndata with given username and password, except making request to\nBitbucket API for your snippets.\n\nBitbucket snippets are git or mercurial repositories. So, pulling\nchanges from Bitbucket or pushing changes to Bitbucket requires public\nkey authentication. Therefore, you can use ssh-agent not to enter\npassword at every snippet pull/push.\n\nConfiguration\n-------------\n\nWhen you run snipper for the first time, by default snipper creates a\nconfig file in your home directory.\n\nConfig file example with defaults:\n\n::\n\n [snipper]\n username=\n password=\n auto_push=on\n default_filename=file.txt\n colorize=on\n\n**username**, **password**: Using for authenticating to Bitbucket API\n\n**default\\_filename** : If you did not specify filename with ``-f``\nparameter, this name will be used as filename while creating a new\nsnippet or adding new files to a snippet.\n\n**auto\\_push** : If this option is enabled, snipper pushes changes after\n``new``,\\ ``add`` and ``edit`` commands are executed. Otherwise, you\nneed to push the changes manually.\n\n**colorize** : By default, snipper colorizes the output, but you can\ndisable colorizing in config file. Also, you can use ``--no-color``\noption with any snipper command.\n\nIf you want to keep snipper config file at another location different\nfrom home directory, you can use ``-C`` parameter to be the default\nlocation. Also you can add an alias to your ``~/.bashrc`` (or\nequivalent). For example:\n\n::\n\n alias sp='snipper -C ~/dotfiles/snipperrc'\n\nEnvironment variables\n~~~~~~~~~~~~~~~~~~~~~\n\n``SNIPPER_USERNAME``, ``SNIPPER_PASSWORD``: Use this username and\npassword instead of reading from config file every time.\n\n``HTTP_PROXY``, ``HTTPS_PROXY``: If you need to use a proxy to access\nthe internet, use one of these environment variables and snipper will\nuse it.\n\n``BROWSER`` : Use specified browser for opening snippets in a browser.\n\n\nRequirements\n~~~~~~~~~~~~~~~~~~~~~\n\n- Git or Mercurial: Each Bitbucket snippet is a git or mercurial repository. So at least one of git or mercurial must be installed.\n- requests\n- prompt-toolkit\n- click\n- pyperclip\n\n--------------\n\nLicensed under the `MIT license `__.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mesuutt/snipper", "keywords": "bitbucket snippet gist command-line cli", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "snipper", "package_url": "https://pypi.org/project/snipper/", "platform": "", "project_url": "https://pypi.org/project/snipper/", "project_urls": { "Homepage": "https://github.com/mesuutt/snipper" }, "release_url": "https://pypi.org/project/snipper/1.2/", "requires_dist": null, "requires_python": "", "summary": "A command-line tool to manage Bitbucket snippets.", "version": "1.2" }, "last_serial": 2729459, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5eb3ba31efccce7e9b0212ec5d461b90", "sha256": "17581da1670e9e2facf876843b321ce06374af45d8a8fdc4c462e843819164f9" }, "downloads": -1, "filename": "snipper-0.1.tar.gz", "has_sig": false, "md5_digest": "5eb3ba31efccce7e9b0212ec5d461b90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13364, "upload_time": "2017-01-29T00:27:47", "url": "https://files.pythonhosted.org/packages/1b/c0/a85476de525944249a5ca1ea853f360b4ee3527cfee0d26146d5b5baf21d/snipper-0.1.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "f0134bf67e9a3d95923df5d3ffaa0e78", "sha256": "183c6d35560e585c719652348e489d215f792034817ea3063eabced568e53854" }, "downloads": -1, "filename": "snipper-1.0.tar.gz", "has_sig": false, "md5_digest": "f0134bf67e9a3d95923df5d3ffaa0e78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13731, "upload_time": "2017-03-04T16:33:39", "url": "https://files.pythonhosted.org/packages/f6/fe/e70d41c78f7e6aa4e92fca51cf0652c6797a22711eb5c1e661cd96b8d1ef/snipper-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "187b595334c1919307753f18719ed3c7", "sha256": "bb2c35c4b39f134780412e8b098977220b36463597299549866b00098444e9bf" }, "downloads": -1, "filename": "snipper-1.1.tar.gz", "has_sig": false, "md5_digest": "187b595334c1919307753f18719ed3c7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14060, "upload_time": "2017-03-24T22:18:59", "url": "https://files.pythonhosted.org/packages/7a/fc/40a997e9fcd6b34fcad499bc3ad67f24416aadd3e6276febb6e89e18d5b5/snipper-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "3f9a91ab2fbbad57f9ef77f05904fd8d", "sha256": "851cd5c037e617b89738e69ff4061ec112e999fdd5f62a92f7aa2caaf613d322" }, "downloads": -1, "filename": "snipper-1.2.tar.gz", "has_sig": false, "md5_digest": "3f9a91ab2fbbad57f9ef77f05904fd8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14071, "upload_time": "2017-03-24T22:38:38", "url": "https://files.pythonhosted.org/packages/95/02/3bfc513d8084589b118c91daee1c6395af4d7d1ab3a66f30945b9b066966/snipper-1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3f9a91ab2fbbad57f9ef77f05904fd8d", "sha256": "851cd5c037e617b89738e69ff4061ec112e999fdd5f62a92f7aa2caaf613d322" }, "downloads": -1, "filename": "snipper-1.2.tar.gz", "has_sig": false, "md5_digest": "3f9a91ab2fbbad57f9ef77f05904fd8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14071, "upload_time": "2017-03-24T22:38:38", "url": "https://files.pythonhosted.org/packages/95/02/3bfc513d8084589b118c91daee1c6395af4d7d1ab3a66f30945b9b066966/snipper-1.2.tar.gz" } ] }