{ "info": { "author": "Charles Thomas", "author_email": "ch@rlesthom.as", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: End Users/Desktop", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Topic :: Desktop Environment", "Topic :: System :: Installation/Setup", "Topic :: Utilities" ], "description": "======\nlinker\n======\n.. image:: https://travis-ci.org/charlesthomas/linker.svg?branch=master\n :target: https://travis-ci.org/charlesthomas/linker\n\n``linker`` is a tool for symlinking files based on the name of original file.\n\nPython Support\n--------------\n``linker`` is supported under python 2.7, 3.3, and 3.4\n\nThanks to `lanshark`_ for adding Python3 support!\n\nWhy use ``linker``?\n-------------------\n``linker`` takes a target directory and a destination directory as arguments,\nand links everything from the repo into its correct location, determined by the\nname of the target file. This allows you to track files in git, edit them in\nthe place you would normally find them, and deploy your config quickly to new\nmachines by cloning. Files common to all machines can be linked at the same time\nas config files unique to a specific host; all in the same repo.\n\nSee `Example`_ for further detail.\n\nUsage\n-----\n\n::\n\n Usage: linker.py [options] target destination\n\n Options:\n -h, --help show this help message and exit\n -i, --interactive Prompt for all changes\n -v, --verbose Print all changes\n -d, --dry-run Print all changes, but DON'T DO THEM\n -x, --exclude-common default is to link files in `hostname` and 'common'\n dirs. this will only link `hostname`\n --delete-existing delete existing files instead of moving them to\n original_name.back\n -m, --move-first move a file from its original location to the repo\n first, then link it back to its original location\n -c, --common-target only used with --move-to-target-first, this will move\n the original file to common, instead of hostname\n before linking back to its original location\n\nDeterministic File Names\n------------------------\n``linker`` makes a few assumptions:\n\n- The git repo (or whatever else the target path happens to be) will have at\n least one folder in it, which matches the hostname of the machine ``linker``\n is running on. This allows multiple machine configs to be kept in the same\n repo.\n\n- If a target file ends with \".dontlink\" it should be tracked in the repo, but\n not linked by ``linker``.\n\n- Underscores (_) in the target file should be replaced with slashes (/) in the\n symlink. This allows you to keep all the files for a single host in the same\n directory level of the repo, but be multiple levels deep where the link is\n made.\n\n- A double underscore in the target file is a literal underscore in the link\n name.\n\n- A file that starts with an underscore should be linked from ``/``, not from\n the destination root.\n\n- If a directory named \"common\" exists at the same level as the hostname\n directory, those files should be linked, too. (This allows some files to link\n on all machines in the repo.)\n\n- If a file already exists, it should be backed up (moved to\n original_name.back), unless you explicity include ``--delete-existing``.\n\nVanilla Example\n---------------\nThe user \"user\" keeps their dot files in a repo called \"dotfiles\" and\nthey want to use ``linker`` on a machine called \"hostname\".\n\n::\n\n - /home/user/git/dotfiles\n - hostname\n - .vimrc\n - .vim_colors_color__scheme.vim\n - crontab_backup.dontlink\n - _etc_hosts\n - common\n - .bashrc\n\nWith the command::\n\n linker /home/user/git/dotfiles /home/user\n\n``linker`` would make the following symlinks::\n\n - /home/user/.bashrc -> /home/user/git/dotfiles/common/.bashrc\n - /home/user/.vimrc -> /home/user/git/dotfiles/hostname/.vimrc\n - /home/user/vim/colors/color_scheme.vim -> /home/user/git/dotfiles/hostname/.vim_colors_color__scheme.vim\n - /etc/hosts -> /home/user/git/dotfiles/hostname/_etc_hosts\n\nNotice crontab_backup.dontlink wasn't linked anywhere.\n\nMove First Example\n------------------\nIf you already have your files named appropriately, using ``linker`` is easy. If\nyou don't, the naming scheme can be confusing. Using ``linker -m [-c]`` will\n*hopefully* make this easier.\n\n\"User\" has a repo \"dotfiles\" on a machine called \"hostname\" and wants to add\n``/etc/hosts`` to the dotfiles repo::\n\n linker -m /home/user/git/dotfiles /etc/hosts\n\n``linker`` will **move** ``/etc/hosts`` to\n``/home/user/git/dotfiles/hostname/_etc_hosts`` and then link that file back to\n``/etc/hosts``::\n\n - /etc/hosts -> /home/user/git/dotfiles/hostname/_etc_hosts\n\nDoing the same, but adding the ``-c`` option::\n\n linker -m -c /home/user/git/dotfiles /etc/hosts\n\n``linker`` will move ``/etc/hosts`` to\n``/home/user/git/dotfiles/common/_etc_hosts`` instead of\n``../hostname/_etc_hosts``::\n\n - /etc/hosts -> /home/user/git/dotfiles/common/_etc_hosts\n\nThis option was intended to be used **one file at a time**, and ``destination``\nmust be the full file path.\n\nTo Do\n-----\nSee `todo.md`_\n\n.. _`lanshark`: https://github.com/lanshark\n.. _Example: https://github.com/charlesthomas/linker#vanilla-example\n.. _todo.md: https://github.com/charlesthomas/linker/blob/master/todo.md", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/charlesthomas/linker", "keywords": null, "license": "The MIT License (MIT)\n\nCopyright (c) 2014 Charles Thomas\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", "maintainer": null, "maintainer_email": null, "name": "linker", "package_url": "https://pypi.org/project/linker/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/linker/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/charlesthomas/linker" }, "release_url": "https://pypi.org/project/linker/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "link files based on name", "version": "0.1.0" }, "last_serial": 1051697, "releases": { "0.0.0": [ { "comment_text": "", "digests": { "md5": "8502e24e8bb0a5f7b4a04cd5551c6996", "sha256": "80030e962c2cba6c85ef6653f20c59298b9d50155640c39411f90ebe755b30bd" }, "downloads": -1, "filename": "linker-0.0.0.tar.gz", "has_sig": false, "md5_digest": "8502e24e8bb0a5f7b4a04cd5551c6996", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4722, "upload_time": "2014-03-23T01:42:46", "url": "https://files.pythonhosted.org/packages/70/e1/07b3b7e1370b9508cb35fdd2e7edc338e510638cd3f3a5dadd0bea0597bf/linker-0.0.0.tar.gz" } ], "0.0.1": [ { "comment_text": "", "digests": { "md5": "4f27f46ad6545f6c3a37e4f64545caa9", "sha256": "7a1a1ec17d0e46273072eed6aa9ee41dfe12a1f12a33b731d964cc0033ca259a" }, "downloads": -1, "filename": "linker-0.0.1.tar.gz", "has_sig": false, "md5_digest": "4f27f46ad6545f6c3a37e4f64545caa9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4847, "upload_time": "2014-03-23T01:46:55", "url": "https://files.pythonhosted.org/packages/cf/57/fb5664ae4ea935f183f755658e05b61e90688faa22eacd95f808948cb486/linker-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c741610a68cac60e67c61020fa2f19cc", "sha256": "310bc226acd9eaca25ee2a3cd34abfffded59ecbbc1a7bcb7c73fa04db227425" }, "downloads": -1, "filename": "linker-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c741610a68cac60e67c61020fa2f19cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4934, "upload_time": "2014-03-23T16:17:21", "url": "https://files.pythonhosted.org/packages/2a/db/7b982513e97e3eb42ab89d90cd0e38469054e2eca80bb60a52574cadcc8c/linker-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "8f0d7d9e0ca60528272bfc4f148292ff", "sha256": "59542cf9a360c7e9efa75aabc231abc55d31e99cb79833e316ede97a017ac822" }, "downloads": -1, "filename": "linker-0.0.3.tar.gz", "has_sig": false, "md5_digest": "8f0d7d9e0ca60528272bfc4f148292ff", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4931, "upload_time": "2014-03-23T16:19:36", "url": "https://files.pythonhosted.org/packages/c4/21/8923a48b40f89c8f680f6397feefbfa397ce94df1d28e35f0ffac946b18c/linker-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "44e89e79a625449dc7a51579efac87fd", "sha256": "fb2dda3f6ad9bc0705c6416c8cc23430a613de116edbf66acefa8396c6a21ee3" }, "downloads": -1, "filename": "linker-0.0.4.tar.gz", "has_sig": false, "md5_digest": "44e89e79a625449dc7a51579efac87fd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5728, "upload_time": "2014-03-28T03:17:46", "url": "https://files.pythonhosted.org/packages/d2/9b/9ac3e1593e72d397707cfbf00c98269c97f6d2c5f7968d7ac52d3716d32f/linker-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "f4795e29d36468fe3c2a0816fd71594b", "sha256": "01ba75439ed64eaebfcdb6c24efbc18531c8b42bbae08c67befeab3d13c67c98" }, "downloads": -1, "filename": "linker-0.0.5.tar.gz", "has_sig": false, "md5_digest": "f4795e29d36468fe3c2a0816fd71594b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5959, "upload_time": "2014-04-03T20:55:03", "url": "https://files.pythonhosted.org/packages/c6/18/1ff61143683dbbeb9832c7e7887968aa17675f84199df0f88665d1b25356/linker-0.0.5.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "ddd91781e3be95ec27a375c2e504c0a8", "sha256": "2bbe6f29117c8d88ec454546123d79a04e0ef867dff593bea36a46eef0145d18" }, "downloads": -1, "filename": "linker-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ddd91781e3be95ec27a375c2e504c0a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6101, "upload_time": "2014-04-04T20:54:26", "url": "https://files.pythonhosted.org/packages/61/c8/cacd081ea450200d19ccc97fd805699bef5699ba93f3d09a8c9bb3c121dc/linker-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ddd91781e3be95ec27a375c2e504c0a8", "sha256": "2bbe6f29117c8d88ec454546123d79a04e0ef867dff593bea36a46eef0145d18" }, "downloads": -1, "filename": "linker-0.1.0.tar.gz", "has_sig": false, "md5_digest": "ddd91781e3be95ec27a375c2e504c0a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6101, "upload_time": "2014-04-04T20:54:26", "url": "https://files.pythonhosted.org/packages/61/c8/cacd081ea450200d19ccc97fd805699bef5699ba93f3d09a8c9bb3c121dc/linker-0.1.0.tar.gz" } ] }