Skip to content
This repository was archived by the owner on Oct 9, 2021. It is now read-only.

Commit 27e2d13

Browse files
committed
Ability to only track folders containing a .wakatime-project file
1 parent 1540845 commit 27e2d13

22 files changed

Lines changed: 351 additions & 86 deletions

README.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,15 @@ format. An example config file with all available options::
6060
[settings]
6161
debug = false
6262
api_key = your-api-key
63-
hidefilenames = false
63+
hide_filenames = false
6464
exclude =
6565
^COMMIT_EDITMSG$
6666
^TAG_EDITMSG$
6767
^/var/(?!www/).*
6868
^/etc/
6969
include =
7070
.*
71+
only_include_with_project_file = false
7172
offline = true
7273
proxy = https://user:pass@localhost:8080
7374
no_ssl_verify = false

tests/samples/configs/has_ssl_verify_disabled.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[settings]
22
verbose = true
33
api_key = d491a956-c8f2-44a9-98a7-987814bd71ba
4-
logfile = /tmp/waka
5-
hidefilenames = true
4+
log_file = /tmp/waka
5+
hide_filenames = true
66
exclude =
77
^COMMIT_EDITMSG$
88
^TAG_EDITMSG$
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[settings]
22
debug = false
33
api_key = 033c47c9-0441-4eb5-8b3f-b51f27b31049
4-
hidefilenames =
4+
hide_filenames =
55
missingfile
66
python\.py$
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[settings]
2+
api_key = 1090a6ae-855f-4be7-b8fb-3edbaf1aa3ec
3+
include_only_with_project_file = true
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[settings]
22
debug = false
33
api_key = 033c47c9-0441-4eb5-8b3f-b51f27b31049
4-
hidefilenames = invalid(regex
4+
hide_filenames = invalid(regex

tests/samples/configs/paranoid.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ include =
1212
\(invalid regex)
1313
includeme
1414
offline = true
15-
hidefilenames = true
15+
hide_filenames = true
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[settings]
2+
debug = false
3+
api_key = c21f8ebd-6a6a-48a0-900b-0870db3d7afe
4+
api_url = https://api.wakatime.com/api/v1/heartbeats
5+
ignore =
6+
COMMIT_EDITMSG$
7+
TAG_EDITMSG$
8+
exclude =
9+
excludeme
10+
\(invalid regex)
11+
include =
12+
\(invalid regex)
13+
includeme
14+
offline = true
15+
hidefilenames = true

tests/samples/output/configs_test_config_file_not_passed_in_command_line_args

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ usage: wakatime [-h] [--entity FILE] [--key KEY] [--write] [--plugin PLUGIN]
22
[--time time] [--lineno LINENO] [--cursorpos CURSORPOS]
33
[--entity-type ENTITY_TYPE] [--proxy PROXY] [--no-ssl-verify]
44
[--project PROJECT] [--alternate-project ALTERNATE_PROJECT]
5-
[--language LANGUAGE] [--hostname HOSTNAME] [--disableoffline]
6-
[--hidefilenames] [--exclude EXCLUDE] [--include INCLUDE]
7-
[--extra-heartbeats] [--logfile LOGFILE] [--apiurl API_URL]
5+
[--language LANGUAGE] [--hostname HOSTNAME]
6+
[--disable-offline] [--hide-filenames] [--exclude EXCLUDE]
7+
[--include INCLUDE] [--include-only-with-project-file]
8+
[--extra-heartbeats] [--log-file LOG_FILE] [--api-url API_URL]
89
[--timeout TIMEOUT] [--config CONFIG] [--verbose] [--version]
910
wakatime: error: Missing api key. Find your api key from wakatime.com/settings.

tests/samples/output/configs_test_missing_config_file

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ usage: wakatime [-h] [--entity FILE] [--key KEY] [--write] [--plugin PLUGIN]
22
[--time time] [--lineno LINENO] [--cursorpos CURSORPOS]
33
[--entity-type ENTITY_TYPE] [--proxy PROXY] [--no-ssl-verify]
44
[--project PROJECT] [--alternate-project ALTERNATE_PROJECT]
5-
[--language LANGUAGE] [--hostname HOSTNAME] [--disableoffline]
6-
[--hidefilenames] [--exclude EXCLUDE] [--include INCLUDE]
7-
[--extra-heartbeats] [--logfile LOGFILE] [--apiurl API_URL]
5+
[--language LANGUAGE] [--hostname HOSTNAME]
6+
[--disable-offline] [--hide-filenames] [--exclude EXCLUDE]
7+
[--include INCLUDE] [--include-only-with-project-file]
8+
[--extra-heartbeats] [--log-file LOG_FILE] [--api-url API_URL]
89
[--timeout TIMEOUT] [--config CONFIG] [--verbose] [--version]
910
wakatime: error: Missing api key. Find your api key from wakatime.com/settings.

tests/samples/output/main_test_timeout_passed_via_command_line

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ usage: wakatime [-h] [--entity FILE] [--key KEY] [--write] [--plugin PLUGIN]
22
[--time time] [--lineno LINENO] [--cursorpos CURSORPOS]
33
[--entity-type ENTITY_TYPE] [--proxy PROXY] [--no-ssl-verify]
44
[--project PROJECT] [--alternate-project ALTERNATE_PROJECT]
5-
[--language LANGUAGE] [--hostname HOSTNAME] [--disableoffline]
6-
[--hidefilenames] [--exclude EXCLUDE] [--include INCLUDE]
7-
[--extra-heartbeats] [--logfile LOGFILE] [--apiurl API_URL]
5+
[--language LANGUAGE] [--hostname HOSTNAME]
6+
[--disable-offline] [--hide-filenames] [--exclude EXCLUDE]
7+
[--include INCLUDE] [--include-only-with-project-file]
8+
[--extra-heartbeats] [--log-file LOG_FILE] [--api-url API_URL]
89
[--timeout TIMEOUT] [--config CONFIG] [--verbose] [--version]
910
wakatime: error: argument --timeout: invalid int value: 'abc'

0 commit comments

Comments
 (0)