{ "info": { "author": "Kevin Wurster", "author_email": "wursterk@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "FS Nav\n======\n\n[![Build Status](https://travis-ci.org/geowurster/FS-Nav.svg?branch=master)](https://travis-ci.org/geowurster/FS-Nav) [![Coverage Status](https://coveralls.io/repos/geowurster/FS-Nav/badge.svg?branch=master)](https://coveralls.io/r/geowurster/FS-Nav?branch=master)\n\nFile System Navigation shortcuts for the commandline\n\n\nOverview\n--------\n\nIn short, `FS Nav` allows users to navigate to directories by typing in a\nsingle word and pressing return.\n\nLearning to use the commandline can be daunting but required in order to use\nspecific tools. The goal of `FS Nav` is to make navigating to common locations\neasier and slightly more intuitive both for new users and those that find\nthemselves navigating complex file systems. \n\nWhen set up `FS Nav` allows the user to navigate to the `desktop` like so:\n\n $ pwd\n /Users/geowurster\n $ desktop\n $ pwd\n /Users/geowurster/Desktop\n\nNOTE: The above functionality does not yet support the `Windows` commandline\nbut works with [cygwin](http://cygwin.org).\n\n\nCommandline Utilities\n---------------------\n\n#### nav ####\n\nThe `nav` utility is responsible for driving the file system navigation. There\nare several sub-commands, the most important of which is `nav get`, which\nprints out an alias's path.\n\n $ nav get home\n /Users/geowurster\n\nIn order to see a list of all currently recognized aliases, use `nav aliases`.\n \n $ nav aliases\n {'applications': '/Applications',\n 'desk': '/Users/geowurster/Desktop',\n 'desktop': '/Users/geowurster/Desktop',\n ...}\n \nUser defined aliases can be added with `nav config addalias`. New aliases can\nbe added and default aliases can be re-defined but default aliases can not be\nfully deleted.\n \n $ nav config addalias fsnav=~/github/FS-Nav desk=~/github\n $ nav get fsnav\n /Users/geowurster/github/FS-Nav\n \n # Re-assign a default alias\n $ nav get desk\n /Users/geowurster/github\n \n # Deleting a re-assigned default alias makes it revert to its original value\n $ nav config deletealias desk\n $ nav get desk\n /Users/geowurster/Desktop\n\nSee `nav config --help` for additional commands.\n\n\n#### count ####\n\nA bonus utility of sorts - quickly count items on the file system. Handles\nwildcard expansion and only counts paths that actually exist.\n\n $ cd github/FS-Nav\n $ count *\n 9\n $ count * fsnav/*\n 19\n\n\nInstallation\n------------\n\nVia pip:\n\n $ pip install fsnav\n\nMaster branch:\n\n $ git clone https://github.com/geowurster/FS-Nav\n $ cd FS-Nav\n $ python setup.py install\n\n\nSetup\n-----\n\nOnce installed, `FS Nav` requires the user to add a startup command to their\nprofile. In order to just try `FS-Hav`, do `eval $(nav startup generate)`.\n\nMac, Linux, Cygwin, etc.\n \n $ nav startup profile >> ~/.bash_profile\n $ source ~/.bash_profile\n\nWindows commandline \"one-word navigation\" is not yet supported.\n\nVerify that everything is working properly with:\n \n $ cd ~/\n $ pwd\n /Users/geowurster\n $ desktop\n $ pwd\n /Users/geowurster/Desktop\n\n\nPython API\n----------\n\nFor detailed information about a given object, do `help()`.\n\n#### Loading aliases ####\n\nLoad only the default aliases `FS-Nav` defines on import.\n\n from pprint import pprint\n \n import fsnav\n \n aliases = fsnav.Aliases(fsnav.DEFAULT_ALIASES)\n\n#### Working with the configfile ####\n\nThe configfile is `JSON` encoded and currently only contains user-defined\naliases in a section called `aliases`. The path to the configfile is stored\nin `fsnav.CONFIGFILE` and the name of the section containing the aliases is\nstored in `fsnav.CONFIGFILE_ALIAS_SECTION`.\n \n {\n 'aliases': {\n 'fsnav': '/Users/geowurster/github/FS-Nav/'\n }\n }\n\nLoad the aliases in the configfile:\n\n import json\n \n import fsnav\n \n with open(fsnav.CONFIGFILE) as f:\n cfg_aliases = json.load(f)[fsnav.CONFIGFILE_ALIAS_SECTION]\n \n aliases = fsnav.Aliases(cfg_aliases)\n\n#### Loading multiple sets of aliases ####\n\nNote that the `list()` call is required for Python 3. Note that the aliases\nfrom the configfile are loaded last in order to overwrite any default aliases\nwith the same name.\n\n import fsnav\n \n all_aliases = list(fsnav.DEFAULT_ALIASES.items()) + list(cfg_aliases.items()) \n aliases = fsnav.Aliases(all_aliases.copy())\n\n#### The `Aliases()` class ####\n\n`Aliases()` subclasses `dict()` but overrides a few methods for `alias` and\n`path` validation. A handful of `FS Nav` specific methods are also present.\nGenerally, an instance of `Aliases()` acts just like an instance of `dict()`.\n\n import fsnav\n \n aliases = fsnav.Aliases()\n new_aliases = {'desk': '~/Desktop', 'home': '~/'}\n \n for a, p in new_aliases.items():\n aliases[a] = p\n assert sorted(new_aliases.keys()) == sorted(aliases.keys())\n \n del aliases['desk']\n assert 'desk' not in aliases\n \n aliases.update({'desk': '~/Desktop')\n assert aliases['desk'] == new_aliases['desk']\n\nFor more information see `help(fsnav.Aliases)`\n\n#### Counting items on the file system ####\n\nThe `count` utility directly calls this function.\n \n import fsnav\n \n num_files = fsnav.count('/Users/geowurster/github/FS-Nav/*')\n", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/geowurster/FS-Nav", "keywords": null, "license": "New BSD License", "maintainer": null, "maintainer_email": null, "name": "fsnav", "package_url": "https://pypi.org/project/fsnav/", "platform": null, "project_url": "https://pypi.org/project/fsnav/", "project_urls": { "Homepage": "https://github.com/geowurster/FS-Nav" }, "release_url": "https://pypi.org/project/fsnav/0.9.2/", "requires_dist": null, "requires_python": null, "summary": "FS Nav - File System Navigation shortcuts for the commandline", "version": "0.9.2" }, "last_serial": 1408853, "releases": { "0.9": [ { "comment_text": "", "digests": { "md5": "5556aea00db11f9765a1cdf7abdf2b17", "sha256": "68b28493e16b592db597869fc7a6f7fc084697df178452d4929a401e6a92e385" }, "downloads": -1, "filename": "fsnav-0.9.tar.gz", "has_sig": false, "md5_digest": "5556aea00db11f9765a1cdf7abdf2b17", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14496, "upload_time": "2014-12-27T05:05:50", "url": "https://files.pythonhosted.org/packages/9f/4e/3105181a509c50db84184b813513f390f2a0f1fee8d5b8f0fa26d3efea48/fsnav-0.9.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "cc9f8db82f11e2eea66753d412c4b1a4", "sha256": "2825d7260463e6332f8e80d5f694bb84161ef51c13261e595e4fca1bda4870a2" }, "downloads": -1, "filename": "fsnav-0.9.1.tar.gz", "has_sig": false, "md5_digest": "cc9f8db82f11e2eea66753d412c4b1a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14563, "upload_time": "2015-01-02T22:31:10", "url": "https://files.pythonhosted.org/packages/f9/e4/01bb868f40afde7d9f6a307cbd6b495f949bf0ce208a639f7c128ab664cf/fsnav-0.9.1.tar.gz" } ], "0.9.2": [ { "comment_text": "", "digests": { "md5": "c920ac6aad395c7bd331ecd554dfd2de", "sha256": "01b94ba5e5e9189d364522c35fbe672db4582cc9a1e86c2f25f9ff1ce9555633" }, "downloads": -1, "filename": "fsnav-0.9.2.tar.gz", "has_sig": false, "md5_digest": "c920ac6aad395c7bd331ecd554dfd2de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14823, "upload_time": "2015-02-04T03:25:24", "url": "https://files.pythonhosted.org/packages/e5/85/682a273446d97df6586784c8c699b15cc1ee44cf5b00765bb9fe7c5c348d/fsnav-0.9.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c920ac6aad395c7bd331ecd554dfd2de", "sha256": "01b94ba5e5e9189d364522c35fbe672db4582cc9a1e86c2f25f9ff1ce9555633" }, "downloads": -1, "filename": "fsnav-0.9.2.tar.gz", "has_sig": false, "md5_digest": "c920ac6aad395c7bd331ecd554dfd2de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14823, "upload_time": "2015-02-04T03:25:24", "url": "https://files.pythonhosted.org/packages/e5/85/682a273446d97df6586784c8c699b15cc1ee44cf5b00765bb9fe7c5c348d/fsnav-0.9.2.tar.gz" } ] }