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

adding default_actions and dotfile src/dst paths to template these (for #125)

This commit is contained in:
deadc0de6
2019-05-01 15:55:51 +02:00
parent a4432b5696
commit 44a26a261d
10 changed files with 480 additions and 72 deletions

View File

@@ -40,6 +40,13 @@ class Dotfile:
self.noempty = noempty
self.upignore = upignore
def get_vars(self):
"""return this dotfile templating vars"""
_vars = {}
_vars['_dotfile_src'] = self.src
_vars['_dotfile_dst'] = self.dst
return _vars
def __str__(self):
msg = 'key:\"{}\", src:\"{}\", dst:\"{}\", link:\"{}\"'
return msg.format(self.key, self.src, self.dst, self.link.name.lower())