1
0
Fork 0
mirror of synced 2024-09-20 11:32:53 -04:00
Commit graph

29 commits

Author SHA1 Message Date
Anish Athalye
f52bbd1eec Add default options
This feature was implemented with feedback from Aleks Kamko
<aykamko@gmail.com> and Casey Rodarmor <casey@rodarmor.com>.
2016-03-03 09:42:50 -05:00
Casey Rodarmor
eeb4c284fb Add plugin loader 2016-02-06 15:14:35 -05:00
Anish Athalye
582edd6bd3 Fix compatibility with Python 3
This patch removes a stray print statement that was causing problems
with Python 3.
2016-01-15 01:21:16 -05:00
Anish Athalye
47ad7f4d3b Use file extension to select config file parser
This patch makes Dotbot provide better error messages when parsing JSON
files.
2016-01-13 13:46:41 -05:00
Anish Athalye
c48d16cbce Use standard library JSON parser for JSON files
This patch reverts the changes to the README made in
57265f78b4 and makes it so that Dotbot
supports JSON files with tab characters.
2016-01-13 11:29:12 -05:00
Anish Athalye
4381c4cabb Use safe_load function to load YAML
In our use case, we are *not* reading arbitrary input that could be
malicious. Still, because we know that what we're reading is made up of
only dictionaries and lists and not arbitrary Python objects, we might
as well use the more restrictive `safe_load` function rather than the
`load` function.
2015-08-03 17:47:32 -07:00
Anish Athalye
fd7f3b8551 Add environment variable expansion in link paths
This feature was proposed by Brian Knobbs <brian@redlattice.com>.
2015-05-12 20:28:58 -04:00
Anish Athalye
3725d21684 Add functionality to overwrite broken links
This commit adds an option to the extended configuration syntax for
linking files and directories. The relink option is a safe alternative
to forcibly linking that only removes broken symbolic links, so it
cannot result in data loss.
2015-05-02 22:30:14 -04:00
Andreas Ntaflos
1a10f88c43 Handle force creation of symlinked directories
Check if entry to force-create (delete) is a symlink and if so, simply
unlink it. Don't try to run rmtree on the underlying directory, which
will fail anyway.
2015-04-27 22:58:22 +02:00
Anish Athalye
3c60899895 Improve error message for malformed files
This patch makes Dotbot warn the user and gracefully exit when the
configuration file is not a list.
2015-04-26 19:46:14 -04:00
Joshua Blum
56d8d05e77 Provide exception information when reading config 2015-04-24 18:33:13 -04:00
Anish Athalye
fd08ddacd3 Fix style
Fix formatting of keyword arguments according to PEP 8.
2015-04-24 18:26:20 -04:00
Anish Athalye
38c0f65801 Add more options for shell commands
This commit introduces an extended configuration syntax for shell
commands. This syntax allows for specifying whether the stdin, stdout,
and stderr streams are enabled.
2015-02-03 11:53:05 -05:00
Anish Athalye
0b4b79e422 Allow nonexistent directories to be cleaned
Make nonexistent directories be skipped when cleaning.
2015-01-26 10:38:08 -05:00
Anish Athalye
69502854aa Fix compatibility
This commit fixes usage of the Singleton metaclass so that it is
compatible with both Python 2 and Python 3.
2015-01-26 10:36:36 -05:00
Anish Athalye
c638e25941 Clean up code
Fix typos and remove unused code.
2015-01-26 10:36:11 -05:00
Anish Athalye
bc43348f42 Fix bug with forced links not working in all cases
This commit fixes a bug where forced links did not work on certain types
of bad links. Until this fix, forced links only worked if the original
was a real file or directory. This commit fixes this, so that the forced
link option also works when the original is a broken or incorrect
symbolic link.
2014-11-09 09:08:13 -05:00
Anish Athalye
33d602bb93 Add YAML support
Add support for YAML format configuration files. In addition, this
commit adds instructions about YAML config files to the README, and it
also changes the README to encourage use of YAML instead of JSON.
2014-10-27 20:31:40 -04:00
Anish Athalye
afebc0bb2f Add functionality to create parent directories
This commit introduces an additional option for extended configuration
syntax for linking. It adds the "create" parameter which results in
automatically creating a parent directory if necessary before linking a
file.
2014-10-22 14:44:40 -04:00
Anish Athalye
13c925be87 Add functionality to forcibly link items
This commit introduces an extended configuration syntax for linking
files and directories. Currently, this syntax allows for specifying
items to be forcibly linked, overwriting existing files or directories
if necessary.

The extended configuration syntax was proposed by Travers McInerney
<travers@mcinerney.me>.
2014-10-22 14:42:23 -04:00
Anish Athalye
1733b54c87 Fix whitespace error 2014-10-17 10:05:47 -04:00
Anish Athalye
09a80230f5 Clean up code 2014-08-20 14:00:00 -07:00
Anish Athalye
92ed009245 Add keyboard interrupt handler 2014-07-19 00:29:49 -07:00
Anish Athalye
5394184d14 Display better error message when linking fails
When failing to symbolically linking files, display the names of the
files that could not be linked. This makes it easier to troubleshoot the
error without having to manually figure out which files failed to link.
2014-07-17 13:40:08 -07:00
Anish Athalye
a97096ef96 Make Linker check for existence of targets
Linker now reports an error when links are configured to point to
nonexistent targets. This fixes the old behavior where Linker silently
created invalid links.
2014-07-15 18:25:53 -07:00
Anish Athalye
7200832465 Fix source compatibility with Python 3
According to PEP 394, `python` should only be used in the shebang line
for scripts that are source compatible with both Python 2 and Python 3.

In previous versions of Dotbot, on certain systems where `python`
referred to `python3`, running Dotbot would throw an exception due to a
SyntaxError. This can be fixed by making Dotbot source compatible with
both Python 2 and Python 3.
2014-06-14 23:56:33 -07:00
Anish Athalye
abb825048b Add Cleaner executor 2014-06-08 11:32:45 -07:00
Anish Athalye
e85dbfb7dd Remove code duplication in executors 2014-04-24 15:41:34 -04:00
Anish Athalye
60a560e976 Initial commit 2014-03-20 18:57:56 -04:00