Merge pull request #76 from krishnaglick/master

Adding "Include" Functionality
This commit is contained in:
Alan Hamlett 2017-09-14 17:46:55 -07:00 committed by GitHub
commit aa3f2e8af6
3 changed files with 7 additions and 0 deletions

View File

@ -13,3 +13,4 @@ Patches and Suggestions
- Jimmy Selgen Nielsen <jimmy.selgen@gmail.com>
- Patrik Kernstock <info@pkern.at>
- Krishna Glick <krishnaglick@gmail.com>

View File

@ -462,6 +462,7 @@ class SendHeartbeatsThread(threading.Thread):
self.debug = SETTINGS.get('debug')
self.api_key = SETTINGS.get('api_key', '')
self.ignore = SETTINGS.get('ignore', [])
self.include = SETTINGS.get('include', [])
self.hidefilenames = SETTINGS.get('hidefilenames')
self.proxy = SETTINGS.get('proxy')
@ -520,6 +521,8 @@ class SendHeartbeatsThread(threading.Thread):
cmd.extend(['--cursorpos', heartbeat['cursorpos']])
for pattern in self.ignore:
cmd.extend(['--exclude', pattern])
for pattern in self.include:
cmd.extend(['--include', pattern])
if self.debug:
cmd.append('--verbose')
if self.hidefilenames:

View File

@ -17,6 +17,9 @@
// POSIX regular expressions will not be logged.
"ignore": ["^/tmp/", "^/etc/", "^/var/(?!www/).*", "COMMIT_EDITMSG$", "PULLREQ_EDITMSG$", "MERGE_MSG$", "TAG_EDITMSG$"],
// Include files; Files (including absolute paths) that match one of these
"include": [".*"],
// Status bar message. Set to false to hide status bar message.
// Defaults to true.
"status_bar_message": true,