{ "info": { "author": "CJ Harries", "author_email": "cj@wizardsoftheweb.pro", "bugtrack_url": null, "classifiers": [], "description": ".. image:: https://badge.fury.io/py/git-ls-anytree.svg\n :target: https://badge.fury.io/py/git-ls-anytree\n\n.. image:: https://travis-ci.org/wizardsoftheweb/git-ls-anytree.svg?branch=master\n :target: https://travis-ci.org/wizardsoftheweb/git-ls-anytree\n\n.. image:: https://coveralls.io/repos/github/wizardsoftheweb/git-ls-anytree/badge.svg?branch=master\n :target: https://coveralls.io/github/wizardsoftheweb/git-ls-anytree?branch=master\n\n\n``git-ls-anytree``\n==================\n\n``git-ls-anytree`` provides ``tree``-like output from ``git`` tree(ish)s.\n\nUntil ``v1``, the API might change slightly as I add more options and streamline what I've got.\n\n.. contents::\n\nOverview\n--------\n\n``git-ls-tree`` (`man `__) is a great little tool to view the contents of a tree(ish). It functions in a manner similar to ``ls``, where each line contains all the information you'd need and the lines don't really connect. ``tree`` (`man `__) is a fantastic CLI addition that adds visual context to directory information. ``anytree`` (`package `__) is a great Python tool that implements the visual cues from ``tree`` on abstract trees.\n\n``git-ls-anytree`` is my attempt to link all of those neat things together. I built this primarily for usage in Python code itself, but adding CLI support was really fun.\n\nInstallation\n------------\n\n::\n\n $ pip install --user git-ls-anytree\n # or whatever; the number of ways to install things is fairly large\n\nTests\n~~~~~\n\nYou can find the tests in `the source repo `__\n\nQuick Examples\n--------------\n\n``git ls-tree`` (baseline)\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n $ git ls-tree -rtl --abbrev HEAD\n 100644 blob b2b0820 184 .editorconfig\n 100644 blob 9744e3b 1291 .gitignore\n 100644 blob af55cdb 230 .travis.yml\n 100644 blob 93bb548 724 LICENSE.rst\n 100644 blob 5d22467 132 MANIFEST.in\n 100644 blob 1670bfb 1830 README.rst\n 040000 tree 4d2dd1d - git_ls_anytree\n 100644 blob 0c62199 6 git_ls_anytree/VERSION\n 100644 blob ee53f20 243 git_ls_anytree/__init__.py\n 100644 blob 626d501 33 git_ls_anytree/__main__.py\n 100644 blob 5cc512a 259 git_ls_anytree/__version__.py\n 100644 blob c23d837 2844 git_ls_anytree/cli_file.py\n 100644 blob a90da6c 356 git_ls_anytree/convert_path_to_list.py\n 100644 blob f6485bf 4235 git_ls_anytree/git_ls_tree.py\n 100644 blob a73aeb4 4584 git_ls_anytree/git_ls_tree_node.py\n 100644 blob b14931a 648 git_ls_anytree/local_exceptions.py\n 100644 blob 55f8a08 427 setup.cfg\n 100644 blob 823c34b 321 setup.py\n 040000 tree c8d53d3 - tests\n 100644 blob a941a90 953 tests/test_cli.py\n 100644 blob eb2a9dd 609 tests/test_convert_path_to_list.py\n 100644 blob dc7c7a9 13337 tests/test_git_ls_tree.py\n 100644 blob b96675d 5709 tests/test_git_ls_tree_node.py\n 100644 blob 9a60bad 182 tests/test_main.py\n 100644 blob c5389bc 152 tox.ini\n\n``git ls-anytree`` (default)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n $ git ls-anytree HEAD --abbrev\n mode type object size HEAD\n 100644 blob b2b0820 184 \u251c\u2500\u2500 .editorconfig\n 100644 blob 9744e3b 1291 \u251c\u2500\u2500 .gitignore\n 100644 blob af55cdb 230 \u251c\u2500\u2500 .travis.yml\n 100644 blob 93bb548 724 \u251c\u2500\u2500 LICENSE.rst\n 100644 blob 5d22467 132 \u251c\u2500\u2500 MANIFEST.in\n 100644 blob 1670bfb 1830 \u251c\u2500\u2500 README.rst\n 040000 tree 4d2dd1d - \u251c\u2500\u2500 git_ls_anytree\n 100644 blob 0c62199 6 \u2502 \u251c\u2500\u2500 VERSION\n 100644 blob ee53f20 243 \u2502 \u251c\u2500\u2500 __init__.py\n 100644 blob 626d501 33 \u2502 \u251c\u2500\u2500 __main__.py\n 100644 blob 5cc512a 259 \u2502 \u251c\u2500\u2500 __version__.py\n 100644 blob c23d837 2844 \u2502 \u251c\u2500\u2500 cli_file.py\n 100644 blob a90da6c 356 \u2502 \u251c\u2500\u2500 convert_path_to_list.py\n 100644 blob f6485bf 4235 \u2502 \u251c\u2500\u2500 git_ls_tree.py\n 100644 blob a73aeb4 4584 \u2502 \u251c\u2500\u2500 git_ls_tree_node.py\n 100644 blob b14931a 648 \u2502 \u2514\u2500\u2500 local_exceptions.py\n 100644 blob 55f8a08 427 \u251c\u2500\u2500 setup.cfg\n 100644 blob 823c34b 321 \u251c\u2500\u2500 setup.py\n 040000 tree c8d53d3 - \u251c\u2500\u2500 tests\n 100644 blob a941a90 953 \u2502 \u251c\u2500\u2500 test_cli.py\n 100644 blob eb2a9dd 609 \u2502 \u251c\u2500\u2500 test_convert_path_to_list.py\n 100644 blob dc7c7a9 13337 \u2502 \u251c\u2500\u2500 test_git_ls_tree.py\n 100644 blob b96675d 5709 \u2502 \u251c\u2500\u2500 test_git_ls_tree_node.py\n 100644 blob 9a60bad 182 \u2502 \u2514\u2500\u2500 test_main.py\n 100644 blob c5389bc 152 \u2514\u2500\u2500 tox.ini\n\n``git ls-anytree`` (tree only)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n::\n\n $ git ls-anytree --name-only\n HEAD\n \u251c\u2500\u2500 .editorconfig\n \u251c\u2500\u2500 .gitignore\n \u251c\u2500\u2500 .travis.yml\n \u251c\u2500\u2500 LICENSE.rst\n \u251c\u2500\u2500 MANIFEST.in\n \u251c\u2500\u2500 README.rst\n \u251c\u2500\u2500 git_ls_anytree\n \u2502 \u251c\u2500\u2500 VERSION\n \u2502 \u251c\u2500\u2500 __init__.py\n \u2502 \u251c\u2500\u2500 __main__.py\n \u2502 \u251c\u2500\u2500 __version__.py\n \u2502 \u251c\u2500\u2500 cli_file.py\n \u2502 \u251c\u2500\u2500 convert_path_to_list.py\n \u2502 \u251c\u2500\u2500 git_ls_tree.py\n \u2502 \u251c\u2500\u2500 git_ls_tree_node.py\n \u2502 \u2514\u2500\u2500 local_exceptions.py\n \u251c\u2500\u2500 setup.cfg\n \u251c\u2500\u2500 setup.py\n \u251c\u2500\u2500 tests\n \u2502 \u251c\u2500\u2500 test_cli.py\n \u2502 \u251c\u2500\u2500 test_convert_path_to_list.py\n \u2502 \u251c\u2500\u2500 test_git_ls_tree.py\n \u2502 \u251c\u2500\u2500 test_git_ls_tree_node.py\n \u2502 \u2514\u2500\u2500 test_main.py\n \u2514\u2500\u2500 tox.ini\n\nUsage\n-----\n\nCLI\n~~~\n\nInstallation via ``pip`` should add an executable to your ``PATH`` (you might need to add ``$HOME/.local/bin`` to your ``PATH`` first if you used ``--user``).\n\n::\n\n $ which git-ls-anytree\n /home/user/.local/bin/git-ls-anytree\n\nThis should register it with ``git``, which you can check with ``git help -a``\n\n::\n\n $ git help -a | grep 'ls-anytree' > /dev/null || echo 'whoops'\n\nThis means you can either call it via ``git-ls-anytree`` or ``git ls-anytree``.\n\nCurrently, to access the help, you'll have to use one of these options:\n\n::\n\n $ git ls-anytree -h\n $ git-ls-anytree --help\n\nThe package doesn't install a ``man`` page, so ``git`` can't find any help when you run ``git ls-anytree --help``.\n\nOptions\n<<<<<<<\n\n::\n\n usage: git-ls-anytree [-h] [-v] [-w WORKING_DIRECTORY] [--name-only]\n [--abbrev | --abbrev-n ABBREV] [-d] [-F] [--dirsfirst]\n [tree-ish] [patterns [patterns ...]]\n\n Python tool to pretty-print git-ls-tree\n\n positional arguments:\n tree-ish Reference to tree-ish. Defaults to HEAD\n patterns Subtrees within the main tree-ish\n\n optional arguments:\n -h, --help show this help message and exit\n -v, --version show program's version number and exit\n -w WORKING_DIRECTORY, --working-directory WORKING_DIRECTORY\n The directory to use for the git commands. Defaults to\n cwd (/mnt/c/Users/thecj/Code/@wizardsoftheweb/git_ls_a\n nytree)\n\n Inherited git-ls-tree arguments:\n --name-only, --name-status\n Only print the tree structure per git-ls-tree\n --name-(only|status)\n --abbrev Equivalent to git-ls-tree --abbrev. Uses the default\n git short hash of seven characters.\n --abbrev-n ABBREV Sets the git object abbreviation per git-ls-tree\n --abbrev=n\n -d, --trees-only Only print trees per git-ls-tree -d\n\n Inherited tree arguments:\n -F, --classify Appends ( *@/) to filename per ls -F\n --dirsfirst Displays directories (tree, commit) before files\n (blob)\n\n Due to known issues with nargs='?' consuming positionals under the right\n circumstances, --abbrev[=n] was split into --abbrev, for the default, and\n --abbrev-n INT, to specify a level.\n\n\n\n``import``\n~~~~~~~~~~\n\nCheck out the last lines of ``cli_file.py`` (`source `__) for a simple usage example:\n\n::\n\n ...\n args = parser.parse_args(passed_args)\n\n full_tree = GitLsTree(\n tree_ish=args.tree_ish,\n patterns=args.patterns,\n trees_only=args.trees_only,\n working_dir=args.working_directory,\n abbrev=args.abbrev if hasattr(args, 'abbrev') else None,\n item_sort=args.item_sort\n )\n full_tree.pretty_print(\n name_only=args.name_only,\n classify=args.classify\n )\n\nMore here later.\n\nRoadmap\n-------\n\nThese are all things I'd like to have finished before tagging ``v1``.\n\n* Build and install ``man`` page\n* Compile docs\n* Test docs\n* Clean up ``tests``\n* Code Climate, Hound, something of that nature\n* Refactor the ``pylint`` refactor issues", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wizardsoftheweb/git-ls-anytree#readme", "keywords": "", "license": "ISC", "maintainer": "", "maintainer_email": "", "name": "git-ls-anytree", "package_url": "https://pypi.org/project/git-ls-anytree/", "platform": "", "project_url": "https://pypi.org/project/git-ls-anytree/", "project_urls": { "Homepage": "https://github.com/wizardsoftheweb/git-ls-anytree#readme" }, "release_url": "https://pypi.org/project/git-ls-anytree/0.4.1/", "requires_dist": null, "requires_python": "", "summary": "Runs git-ls-tree through anytree for easy consumption", "version": "0.4.1" }, "last_serial": 3345282, "releases": { "0.2.3": [ { "comment_text": "", "digests": { "md5": "8e18bfa29f6005da9d5a1cb18aaae19e", "sha256": "216907b1e720aa2231d3308c6a184bd5085ce4bf251aa402e61b7c63bb443c9e" }, "downloads": -1, "filename": "git-ls-anytree-0.2.3.tar.gz", "has_sig": false, "md5_digest": "8e18bfa29f6005da9d5a1cb18aaae19e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13995, "upload_time": "2017-11-12T23:29:51", "url": "https://files.pythonhosted.org/packages/0a/41/63d92c0252cf89b83971382a473dd4d987cf2c28c01716474524b133db64/git-ls-anytree-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "531ddea7a9dec1c8b2c65bc6edcd7ac7", "sha256": "8952df1b3f306fa7a18002148f97d4a5604f9cf7a994a2414d7a0ea2e5b302b2" }, "downloads": -1, "filename": "git-ls-anytree-0.2.4.tar.gz", "has_sig": false, "md5_digest": "531ddea7a9dec1c8b2c65bc6edcd7ac7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14001, "upload_time": "2017-11-12T23:33:49", "url": "https://files.pythonhosted.org/packages/ba/24/1bbb34397cb992d205cbff3414dd3356727c5e025631f3d48865871cc1cc/git-ls-anytree-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "1e7bb1cf5c74ac2e5ce8119e6f0cad2f", "sha256": "42c7788ca1397fda9ae08650364f92c7b3e67f1fe1a2162ec8b6675ddb7ec7b3" }, "downloads": -1, "filename": "git_ls_anytree-0.2.5.tar.gz", "has_sig": false, "md5_digest": "1e7bb1cf5c74ac2e5ce8119e6f0cad2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14000, "upload_time": "2017-11-12T23:39:03", "url": "https://files.pythonhosted.org/packages/71/d1/16ee7bd724c3f2ee8eb19dc6860ad2fac8ba985a34cba9cad1f7166f954a/git_ls_anytree-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "5437400bb76a44e4e1cdc361ca5905d6", "sha256": "25e97c63135f872be6e11d5eef7c1d54574bb00561081d09bdcfe03e9ed2ebfa" }, "downloads": -1, "filename": "git_ls_anytree-0.2.6.linux-x86_64.tar.gz", "has_sig": true, "md5_digest": "5437400bb76a44e4e1cdc361ca5905d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12397, "upload_time": "2017-11-13T01:13:04", "url": "https://files.pythonhosted.org/packages/d8/f3/44785b86402528474a08e74f5e3db846e9da9393bd2ee6b5ba2e453dbe13/git_ls_anytree-0.2.6.linux-x86_64.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "a05e26032a32611aba97cb7f94b028e3", "sha256": "99d48abf98dd08d41c9e0049de6a9b4ab371360ae16ca60feab9bab2004e9728" }, "downloads": -1, "filename": "git_ls_anytree-0.2.7.tar.gz", "has_sig": false, "md5_digest": "a05e26032a32611aba97cb7f94b028e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9036, "upload_time": "2017-11-13T01:32:31", "url": "https://files.pythonhosted.org/packages/81/24/acdc73bfab900ac37702e98703e48b201b5b3829082ddb0bda89b4973f8d/git_ls_anytree-0.2.7.tar.gz" } ], "0.2.8": [ { "comment_text": "", "digests": { "md5": "204ac6891846b92965c4d7744fe0356e", "sha256": "0a17cc666f3f9d03ad52e59d1cb4f0b8f375fabf30b3f7182935a4f65302d3d3" }, "downloads": -1, "filename": "git_ls_anytree-0.2.8.tar.gz", "has_sig": false, "md5_digest": "204ac6891846b92965c4d7744fe0356e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9047, "upload_time": "2017-11-13T01:39:53", "url": "https://files.pythonhosted.org/packages/89/94/8d52bb098c2468460eaf9e3f403a6979da7838a0aa832d83d60a52e70470/git_ls_anytree-0.2.8.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "7314fff059ec919a35a2d8ba9d6d3c83", "sha256": "ed34870c9f1f8d6febf82fde5782ff506cb8ca6c86cec83f246d30857d8f0fe1" }, "downloads": -1, "filename": "git-ls-anytree-0.3.0.tar.gz", "has_sig": false, "md5_digest": "7314fff059ec919a35a2d8ba9d6d3c83", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9786, "upload_time": "2017-11-13T03:27:18", "url": "https://files.pythonhosted.org/packages/f9/60/935d0e1ce556af4e160d840cae6a2b31d11a4081b634d6e203ebbd465210/git-ls-anytree-0.3.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "4c80d0532afca93cb6481b7403c7bb0f", "sha256": "43203b8484e67d2fcd6f4f7eeaa4e84ab95656c0b3f0775af125b73d110173b2" }, "downloads": -1, "filename": "git-ls-anytree-0.4.1.tar.gz", "has_sig": false, "md5_digest": "4c80d0532afca93cb6481b7403c7bb0f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10233, "upload_time": "2017-11-19T06:08:49", "url": "https://files.pythonhosted.org/packages/f5/3e/7bc8b8a07f8437b919f10d4fef2890070f4552dedc45cf8e7ccac5720f3c/git-ls-anytree-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4c80d0532afca93cb6481b7403c7bb0f", "sha256": "43203b8484e67d2fcd6f4f7eeaa4e84ab95656c0b3f0775af125b73d110173b2" }, "downloads": -1, "filename": "git-ls-anytree-0.4.1.tar.gz", "has_sig": false, "md5_digest": "4c80d0532afca93cb6481b7403c7bb0f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10233, "upload_time": "2017-11-19T06:08:49", "url": "https://files.pythonhosted.org/packages/f5/3e/7bc8b8a07f8437b919f10d4fef2890070f4552dedc45cf8e7ccac5720f3c/git-ls-anytree-0.4.1.tar.gz" } ] }