Added 'include' functionality

This commit is contained in:
Krishna Glick 2017-09-14 10:39:28 -04:00
parent aba72b0f1e
commit f4e53cd682
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> - Jimmy Selgen Nielsen <jimmy.selgen@gmail.com>
- Patrik Kernstock <info@pkern.at> - 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.debug = SETTINGS.get('debug')
self.api_key = SETTINGS.get('api_key', '') self.api_key = SETTINGS.get('api_key', '')
self.ignore = SETTINGS.get('ignore', []) self.ignore = SETTINGS.get('ignore', [])
self.include = SETTINGS.get('include', [])
self.hidefilenames = SETTINGS.get('hidefilenames') self.hidefilenames = SETTINGS.get('hidefilenames')
self.proxy = SETTINGS.get('proxy') self.proxy = SETTINGS.get('proxy')
@ -520,6 +521,8 @@ class SendHeartbeatsThread(threading.Thread):
cmd.extend(['--cursorpos', heartbeat['cursorpos']]) cmd.extend(['--cursorpos', heartbeat['cursorpos']])
for pattern in self.ignore: for pattern in self.ignore:
cmd.extend(['--exclude', pattern]) cmd.extend(['--exclude', pattern])
for pattern in self.include:
cmd.extend(['--include', pattern])
if self.debug: if self.debug:
cmd.append('--verbose') cmd.append('--verbose')
if self.hidefilenames: if self.hidefilenames:

View File

@ -17,6 +17,9 @@
// POSIX regular expressions will not be logged. // POSIX regular expressions will not be logged.
"ignore": ["^/tmp/", "^/etc/", "^/var/(?!www/).*", "COMMIT_EDITMSG$", "PULLREQ_EDITMSG$", "MERGE_MSG$", "TAG_EDITMSG$"], "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. // Status bar message. Set to false to hide status bar message.
// Defaults to true. // Defaults to true.
"status_bar_message": true, "status_bar_message": true,