1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-06 06:08:03 +00:00

- add ability to use "write transformation"

- only allow a single transformation per dotfile
- refactoring and bug fixes
This commit is contained in:
deadc0de6
2018-12-06 13:19:57 +01:00
parent 1d53602769
commit 37db5cd68c
9 changed files with 262 additions and 112 deletions

View File

@@ -9,9 +9,8 @@ represents a dotfile in dotdrop
class Dotfile:
def __init__(self, key, dst, src,
actions={}, trans=[],
link=False, cmpignore=[],
noempty=False):
actions={}, trans_r=None, trans_w=None,
link=False, cmpignore=[], noempty=False):
# key of dotfile in the config
self.key = key
# path where to install this dotfile
@@ -22,8 +21,10 @@ class Dotfile:
self.link = link
# list of actions
self.actions = actions
# list of transformations
self.trans = trans
# read transformation
self.trans_r = trans_r
# write transformation
self.trans_w = trans_w
# pattern to ignore when comparing
self.cmpignore = cmpignore
# do not deploy empty file