From b4870fb1c65c30fbeb4bfa234a3ad43d121475f8 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Thu, 30 Aug 2018 09:27:19 -0400 Subject: Change docs to markdown format --- AUTHORS.md | 16 ++++ AUTHORS.rst | 16 ---- HISTORY.md | 100 +++++++++++++++++++++ HISTORY.rst | 100 --------------------- LICENSE.md | 18 ++++ LICENSE.rst | 18 ---- MANIFEST.in | 2 +- README.md | 244 +++++++++++++++++++++++++++++++++++++++++++++++++ README.rst | 250 --------------------------------------------------- dotfiles/__init__.py | 2 +- setup.py | 7 +- 11 files changed, 384 insertions(+), 389 deletions(-) create mode 100644 AUTHORS.md delete mode 100644 AUTHORS.rst create mode 100644 HISTORY.md delete mode 100644 HISTORY.rst create mode 100644 LICENSE.md delete mode 100644 LICENSE.rst create mode 100644 README.md delete mode 100644 README.rst diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..3bb3e48 --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,16 @@ +Dotfiles is developed and maintained by the following folks: + +- Jon Bernard +- Anaël Beutot +- Remco Wendt +- Sebastian Rahlf +- Reinout van Rees +- Daniel Harding +- Gary Oberbrunner +- Alexandre Rossi +- Luper Rouch +- Jesús García Crespo +- Jay Sweeney +- Alexandre Viau +- Michael Barrett +- Ivan Malison diff --git a/AUTHORS.rst b/AUTHORS.rst deleted file mode 100644 index 3bb3e48..0000000 --- a/AUTHORS.rst +++ /dev/null @@ -1,16 +0,0 @@ -Dotfiles is developed and maintained by the following folks: - -- Jon Bernard -- Anaël Beutot -- Remco Wendt -- Sebastian Rahlf -- Reinout van Rees -- Daniel Harding -- Gary Oberbrunner -- Alexandre Rossi -- Luper Rouch -- Jesús García Crespo -- Jay Sweeney -- Alexandre Viau -- Michael Barrett -- Ivan Malison diff --git a/HISTORY.md b/HISTORY.md new file mode 100644 index 0000000..8e31c89 --- /dev/null +++ b/HISTORY.md @@ -0,0 +1,100 @@ +History +------- + +0.9.0 ++++++ + +* Completely new git-like UI based on Click +* Behaviour change to symlink files at any depth + - backwards incompatible, see README.md +* Lots of refactoring and cleanups +* Several new tests to improve coverage + +0.6.4 ++++++ + +* Add no_dot_prefix option +* Fix error in syntax for missing repo message +* Expands ~'s in config file path + +0.6.3 ++++++ + +* Prevent adding toplevel package directories (bugfix) +* Only replace existing dotfiles on remove operation (bugfix) + +0.6.2 ++++++ + +* Fix single-sync in python 3.x (map is lazy) +* Fix sync --force regression +* Fix unit tests to exit with the correct return code + +0.6.1 ++++++ + +* Add ability to sync only specified files +* Create non-existent package directories +* Mention using Dropbox to synchronize a dotfiles repository + +0.6.0 ++++++ + +* Add "packages" feature +* Add --dry-run option +* Much needed code cleanup + +0.5.6 ++++++ + +* Restore python 3 compatibility + +0.5.5 ++++++ + +* Add support for Windows symlinks with Python 2 + +0.5.4 ++++++ + +* More Python 3 fixes + +0.5.3 ++++++ + +* Update remaining references to 'unmanaged' +* Allow ~ in configuration file external targets +* Make source compatible with Python 3 +* Add specific Python version trove classifiers + +0.5.2 ++++++ + +* Improve wording of "unmanaged" with "unsynced" +* Fix adding a directory with a trailing slash +* Mention support for directories in documentation + +0.5.1 ++++++ + +* Fix license formatting + +0.5.0 ++++++ + +* Add support for in-repo configuration files + +0.4.4 ++++++ + +* Restore python 2.5 compatibility + +0.4.3 ++++++ + +* Add glob style pattern support for the ignore option + +0.4.2 ++++++ + +* Fix bug when syncing an unmanaged directory symlink diff --git a/HISTORY.rst b/HISTORY.rst deleted file mode 100644 index affc4f7..0000000 --- a/HISTORY.rst +++ /dev/null @@ -1,100 +0,0 @@ -History -------- - -0.9.0 -+++++ - -* Completely new git-like UI based on Click -* Behaviour change to symlink files at any depth - - backwards incompatible, see README.rst -* Lots of refactoring and cleanups -* Several new tests to improve coverage - -0.6.4 -+++++ - -* Add no_dot_prefix option -* Fix error in syntax for missing repo message -* Expands ~'s in config file path - -0.6.3 -+++++ - -* Prevent adding toplevel package directories (bugfix) -* Only replace existing dotfiles on remove operation (bugfix) - -0.6.2 -+++++ - -* Fix single-sync in python 3.x (map is lazy) -* Fix sync --force regression -* Fix unit tests to exit with the correct return code - -0.6.1 -+++++ - -* Add ability to sync only specified files -* Create non-existent package directories -* Mention using Dropbox to synchronize a dotfiles repository - -0.6.0 -+++++ - -* Add "packages" feature -* Add --dry-run option -* Much needed code cleanup - -0.5.6 -+++++ - -* Restore python 3 compatibility - -0.5.5 -+++++ - -* Add support for Windows symlinks with Python 2 - -0.5.4 -+++++ - -* More Python 3 fixes - -0.5.3 -+++++ - -* Update remaining references to 'unmanaged' -* Allow ~ in configuration file external targets -* Make source compatible with Python 3 -* Add specific Python version trove classifiers - -0.5.2 -+++++ - -* Improve wording of "unmanaged" with "unsynced" -* Fix adding a directory with a trailing slash -* Mention support for directories in documentation - -0.5.1 -+++++ - -* Fix license formatting - -0.5.0 -+++++ - -* Add support for in-repo configuration files - -0.4.4 -+++++ - -* Restore python 2.5 compatibility - -0.4.3 -+++++ - -* Add glob style pattern support for the ignore option - -0.4.2 -+++++ - -* Fix bug when syncing an unmanaged directory symlink diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..df94cbe --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,18 @@ +License +------- + +ISC License. :: + + Copyright (c) 2011-2018, Jon Bernard + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/LICENSE.rst b/LICENSE.rst deleted file mode 100644 index df94cbe..0000000 --- a/LICENSE.rst +++ /dev/null @@ -1,18 +0,0 @@ -License -------- - -ISC License. :: - - Copyright (c) 2011-2018, Jon Bernard - - Permission to use, copy, modify, and/or distribute this software for any - purpose with or without fee is hereby granted, provided that the above - copyright notice and this permission notice appear in all copies. - - THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/MANIFEST.in b/MANIFEST.in index bb37a27..efa752e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include *.rst +include *.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..52d03ff --- /dev/null +++ b/README.md @@ -0,0 +1,244 @@ +# Dotfile Management Made Easy + +`dotfiles` is a tool to make managing your dotfile symlinks in `$HOME` +easy, allowing you to keep all your dotfiles in a single directory. + +Hosting is up to you. You can use a VCS like git, Dropbox, or even rsync +to distribute your dotfiles repository across multiple hosts. + +One or more repositories can be specified at runtime or with an +environment variable, so you can manage multiple repositories without +hassle. + +You can choose to have your dotfiles linked with symbolic links or +copied into place, either way `dotfiles` will keep track of what's +missing and what's different. + +`dotfiles` is unique in the way it manages links and copies. The entire +directory structure leading to a file is preserved and only the file +itself is considered managed. This allows managed and unmanaged files +to live next to each other without needing to specify complicated ignore +rules. If you want to be less selective, you can specify a directory +that contains several files, and `dotfiles` will grab all of them in +whatever hierarchy they exist. + +## Upgrading From An Old Version + +Much has changed in the most recent version. If you're considering +upgrading it's probably best to unlink everything and start with an +empty repository. This can be done with the following command: + + $ dotfiles --unsync + +## Installation + +There are a few ways to install this thing. The easiest way is using +whatever package manager is available on your OS if there is an official +package available. + +If not, you can install globally with pip: + + $ pip install dotfiles + +If you don't want to or don't have permission to install it globally, +you can install it just for your user: + + $ pip install --user dotfiles + +If you just want to run it directly from the source tree, you can do +that too: + + $ git clone https://github.com/jbernard/dotfiles + $ cd dotfiles + $ git submodule update --init + $ ./bin/dotfiles --help + +Note: the source tree example above will run whatever code has been +committed to your current checkout, whereas pip will fetch the latest +official version from pypi. This might be what you want, but you should +be aware. + +## Getting Help And Discovering Commands + +`dotfiles` uses click for its CLI interface, so every subcommand accepts +the `--help` flag to offer additional information on what is available. +The aim is for this information to be sufficient for use. At some point +I'll write a manpage, but do file a bug if any of the usage information +is inaccurate or misleading. + +## A Quick Example + + + + + + + +Interface +--------- + +``-a, --add `` + Add dotfile(s) to the repository. + +``-c, --check`` + Check for missing or unsynced dotfiles. + +``-l, --list`` + List currently managed dotfiles, one per line. + +``-r, --remove `` + Remove dotfile(s) from the repository. + +``-s, --sync [file...]`` + Update dotfile symlinks. You can overwrite colliding files with ``-f`` or + ``--force``. All dotfiles are assumed if you do not specify any files to + this command. + +``-m, --move `` + Move dotfiles repository to another location, updating all symlinks in the + process. + +For all commands you can use the ``--dry-run`` option, which will print actions +and won't modify anything on your drive. + +Installation +------------ + +To install dotfiles, simply: :: + + $ pip install dotfiles + +Or, if you absolutely must: :: + + $ easy_install dotfiles + +But, you really shouldn't do that. + +If you want to work with the latest version, you can install it from `the +repository`_:: + + $ git clone https://github.com/jbernard/dotfiles + $ cd dotfiles + $ ./bin/dotfiles --help + +Examples +-------- + +To install your dotfiles on a new machine, you might do this: :: + + $ git clone https://github.com/me/my-dotfiles Dotfiles + $ dotfiles --sync + +To add '~/.vimrc' to your repository: :: + + $ dotfiles --add ~/.vimrc (relative paths work also) + +To make it available to all your hosts: :: + + $ cd ~/Dotfiles + $ git add vimrc + $ git commit -m "Added vimrc, welcome aboard!" + $ git push + +You get the idea. Type ``dotfiles --help`` to see the available options. + +Configuration +------------- + +You can choose to create a configuration file to store personal customizations. +By default, ``dotfiles`` will look for ``~/.dotfilesrc``. You can change this +with the ``-C`` flag. An example configuration file might look like: :: + + [dotfiles] + repository = ~/Dotfiles + ignore = [ + '.git', + '.gitignore', + '*.swp'] + externals = { + '.bzr.log': '/dev/null', + '.uml': '/tmp'} + +You can also store your configuration file inside your repository. Put your +settings in ``.dotfilesrc`` at the root of your repository and ``dotfiles`` will +find it. Note that ``ignore`` and ``externals`` are appended to any values +previously discovered. + +Prefixes +-------- + +Dotfiles are stored in the repository with no prefix by default. So, +``~/.bashrc`` will link to ``~/Dotfiles/bashrc``. If your files already have a +prefix, ``.`` is common, but I've also seen ``_``, then you can specify this +in the configuration file and ``dotfiles`` will do the right thing. An example +configuration in ``~/.dotfilesrc`` might look like: :: + + [dotfiles] + prefix = . + +Externals +--------- + +You may want to link some dotfiles to external locations. For example, ``bzr`` +writes debug information to ``~/.bzr.log`` and there is no easy way to disable +it. For that, I link ``~/.bzr.log`` to ``/dev/null``. Since ``/dev/null`` is +not within the repository, this is called an external. You can have as many of +these as you like. The list of externals is specified in the configuration +file: :: + + [dotfiles] + externals = { + '.bzr.log': '/dev/null', + '.adobe': '/tmp', + '.macromedia': '/tmp'} + +Ignores +------- + +If you're using a VCS to manage your repository of dotfiles, you'll want to +tell ``dotfiles`` to ignore VCS-related files. For example, I use ``git``, so +I have the following in my ``~/.dotfilesrc``: :: + + [dotfiles] + ignore = [ + '.git', + '.gitignore', + '*.swp'] + +Any file you list in ``ignore`` will be skipped. The ``ignore`` option supports +glob file patterns. + +Packages +-------- + +Many programs store their configuration in ``~/.config``. It's quite cluttered +and you probably don't want to keep all its content in your repository. For this +situation you can use the ``packages`` setting:: + + [dotfiles] + packages = ['config'] + +This tells ``dotfiles`` that the contents of the ``config`` subdirectory of +your repository must be symlinked to ``~/.config``. If for example you have a +directory ``config/awesome`` in your repository, it will be symlinked to +``~/.config/awesome``. + +This feature allows one additional level of nesting, but further subdirectories +are not eligible for being a package. For example, ``config`` is valid, but +``config/transmission`` is not valid. Arbitrary nesting is a feature under +current consideration. + +At the moment, packages can not be added or removed through the command line +interface. They must be constructed and configured manually. Once this is +done, ``sync``, ``list``, ``check``, and ``move`` will do the right thing. +Support for ``add`` and ``remove`` is a current TODO item. + +Contribute +---------- + +If you'd like to contribute, simply fork `the repository`_, commit your changes, +make sure tests pass, and send a pull request. Go ahead and add yourself to +AUTHORS_ or I'll do it when I merge your changes. + +.. _`the repository`: https://github.com/jbernard/dotfiles +.. _AUTHORS: https://github.com/jbernard/dotfiles/blob/master/AUTHORS.md diff --git a/README.rst b/README.rst deleted file mode 100644 index 310887c..0000000 --- a/README.rst +++ /dev/null @@ -1,250 +0,0 @@ -Dotfile Management Made Easy -============================ - -``dotfiles`` is a tool to make managing your dotfile symlinks in -``$HOME`` easy, allowing you to keep all your dotfiles in a single -directory. - -Hosting is up to you. You can use a VCS like git, Dropbox, or even rsync -to distribute your dotfiles repository across multiple hosts. - -One or more repositories can be specified at runtime or with an -environment variable, so you can manage multiple repositories without -hassle. See the Configuration_ section below for further details. - -You can choose to have your dotfiles linked with symbolic links or -copied into place, either way ``dotfiles`` will keep track of what's -missing and what's different. - -``dotfiles`` is unique in the way it manages links and copies. The -entire directory structure leading to a file is preserved and only the -file itself is considered managed. This allows managed and unmanaged -files to live next to each other without needing to specify complicated -ignore rules. If you want to be less selective, you can specify a -directory that contains several files, and ``dotfiles`` will grab all of -them in whatever hierarchy they exist. - -Upgrading From An Old Version ------------------------------ - -Much has changed in the most recent version. If you're considering -upgrading it's probably best to unlink everything and start with an -empty repository. This can be done with the following command: - - $ dotfiles --unsync - -Installation ------------- - -There are a few ways to install this thing. The easiest way is using -whatever package manager is available on your OS if there is an official -package available. - -If not, you can install globally with pip: - - $ pip install dotfiles - -If you don't want to or don't have permission to install it globally, -you can install it just for your user: - - $ pip install --user dotfiles - -If you just want to run it directly from the source tree, you can do -that too: - - $ git clone https://github.com/jbernard/dotfiles - $ cd dotfiles - $ git submodule update --init - $ ./bin/dotfiles --help - -Note: the source tree example above will run whatever code has been -committed to your current checkout, whereas pip will fetch the latest -official version from pypi. This might be what you want, but you should -be aware. - -Getting Help And Discovering Commands -------------------------------------- - -``dotfiles`` uses click for its CLI interface, so every subcommand -accepts the ``--help`` flag to offer additional information on what is -available. The aim is for this information to be sufficient for use. -At some point I'll write a manpage, but do file a bug if any of the -usage information is inaccurate or misleading. - -A Quick Example ---------------- - - - - - - - -Interface ---------- - -``-a, --add `` - Add dotfile(s) to the repository. - -``-c, --check`` - Check for missing or unsynced dotfiles. - -``-l, --list`` - List currently managed dotfiles, one per line. - -``-r, --remove `` - Remove dotfile(s) from the repository. - -``-s, --sync [file...]`` - Update dotfile symlinks. You can overwrite colliding files with ``-f`` or - ``--force``. All dotfiles are assumed if you do not specify any files to - this command. - -``-m, --move `` - Move dotfiles repository to another location, updating all symlinks in the - process. - -For all commands you can use the ``--dry-run`` option, which will print actions -and won't modify anything on your drive. - -Installation ------------- - -To install dotfiles, simply: :: - - $ pip install dotfiles - -Or, if you absolutely must: :: - - $ easy_install dotfiles - -But, you really shouldn't do that. - -If you want to work with the latest version, you can install it from `the -repository`_:: - - $ git clone https://github.com/jbernard/dotfiles - $ cd dotfiles - $ ./bin/dotfiles --help - -Examples --------- - -To install your dotfiles on a new machine, you might do this: :: - - $ git clone https://github.com/me/my-dotfiles Dotfiles - $ dotfiles --sync - -To add '~/.vimrc' to your repository: :: - - $ dotfiles --add ~/.vimrc (relative paths work also) - -To make it available to all your hosts: :: - - $ cd ~/Dotfiles - $ git add vimrc - $ git commit -m "Added vimrc, welcome aboard!" - $ git push - -You get the idea. Type ``dotfiles --help`` to see the available options. - -Configuration -------------- - -You can choose to create a configuration file to store personal customizations. -By default, ``dotfiles`` will look for ``~/.dotfilesrc``. You can change this -with the ``-C`` flag. An example configuration file might look like: :: - - [dotfiles] - repository = ~/Dotfiles - ignore = [ - '.git', - '.gitignore', - '*.swp'] - externals = { - '.bzr.log': '/dev/null', - '.uml': '/tmp'} - -You can also store your configuration file inside your repository. Put your -settings in ``.dotfilesrc`` at the root of your repository and ``dotfiles`` will -find it. Note that ``ignore`` and ``externals`` are appended to any values -previously discovered. - -Prefixes --------- - -Dotfiles are stored in the repository with no prefix by default. So, -``~/.bashrc`` will link to ``~/Dotfiles/bashrc``. If your files already have a -prefix, ``.`` is common, but I've also seen ``_``, then you can specify this -in the configuration file and ``dotfiles`` will do the right thing. An example -configuration in ``~/.dotfilesrc`` might look like: :: - - [dotfiles] - prefix = . - -Externals ---------- - -You may want to link some dotfiles to external locations. For example, ``bzr`` -writes debug information to ``~/.bzr.log`` and there is no easy way to disable -it. For that, I link ``~/.bzr.log`` to ``/dev/null``. Since ``/dev/null`` is -not within the repository, this is called an external. You can have as many of -these as you like. The list of externals is specified in the configuration -file: :: - - [dotfiles] - externals = { - '.bzr.log': '/dev/null', - '.adobe': '/tmp', - '.macromedia': '/tmp'} - -Ignores -------- - -If you're using a VCS to manage your repository of dotfiles, you'll want to -tell ``dotfiles`` to ignore VCS-related files. For example, I use ``git``, so -I have the following in my ``~/.dotfilesrc``: :: - - [dotfiles] - ignore = [ - '.git', - '.gitignore', - '*.swp'] - -Any file you list in ``ignore`` will be skipped. The ``ignore`` option supports -glob file patterns. - -Packages --------- - -Many programs store their configuration in ``~/.config``. It's quite cluttered -and you probably don't want to keep all its content in your repository. For this -situation you can use the ``packages`` setting:: - - [dotfiles] - packages = ['config'] - -This tells ``dotfiles`` that the contents of the ``config`` subdirectory of -your repository must be symlinked to ``~/.config``. If for example you have a -directory ``config/awesome`` in your repository, it will be symlinked to -``~/.config/awesome``. - -This feature allows one additional level of nesting, but further subdirectories -are not eligible for being a package. For example, ``config`` is valid, but -``config/transmission`` is not valid. Arbitrary nesting is a feature under -current consideration. - -At the moment, packages can not be added or removed through the command line -interface. They must be constructed and configured manually. Once this is -done, ``sync``, ``list``, ``check``, and ``move`` will do the right thing. -Support for ``add`` and ``remove`` is a current TODO item. - -Contribute ----------- - -If you'd like to contribute, simply fork `the repository`_, commit your changes, -make sure tests pass, and send a pull request. Go ahead and add yourself to -AUTHORS_ or I'll do it when I merge your changes. - -.. _`the repository`: https://github.com/jbernard/dotfiles -.. _AUTHORS: https://github.com/jbernard/dotfiles/blob/master/AUTHORS.rst diff --git a/dotfiles/__init__.py b/dotfiles/__init__.py index 31d95b1..2f762b6 100644 --- a/dotfiles/__init__.py +++ b/dotfiles/__init__.py @@ -6,7 +6,7 @@ allowing you to keep all your configuration files in a single directory. :copyright: (c) 2011-2018 by Jon Bernard. - :license: ISC, see LICENSE.rst for more details. + :license: ISC, see LICENSE.md for more details. """ __version__ = '0.9.dev0' diff --git a/setup.py b/setup.py index c640ddb..f3e6f78 100644 --- a/setup.py +++ b/setup.py @@ -9,9 +9,10 @@ setup( author_email='jbernard@jbernard.io', description='Easily manage your dotfiles', url='https://github.com/jbernard/dotfiles', - long_description=(open('README.rst').read() + '\n\n' + - open('LICENSE.rst').read() + '\n\n' + - open('HISTORY.rst').read()), + long_description_content_type='text/markdown', + long_description=(open('README.md').read() + '\n\n' + + open('LICENSE.md').read() + '\n\n' + + open('HISTORY.md').read()), license='ISC', packages=['dotfiles'], setup_requires=[ -- cgit v1.2.3