mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Compare commits
1571 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
e86b77131a | ||
|
91942b68f2 | ||
|
65aa2c9877 | ||
|
971fcee8db | ||
|
46389463f3 | ||
|
a85e61f5f9 | ||
|
dadbb8c8f4 | ||
|
8eb4a25891 | ||
|
2fd9d623a1 | ||
|
3592ba45ca | ||
|
0b4b503086 | ||
|
9fb57845ed | ||
|
ac0aafc04d | ||
|
4d2027d983 | ||
|
a22c197d9b | ||
|
2ec2fc37a5 | ||
|
f71a326fe2 | ||
|
f844ff3afb | ||
|
582557e408 | ||
|
9446886b37 | ||
|
0035e479c8 | ||
|
6f0605d145 | ||
|
0a89786826 | ||
|
02db55a136 | ||
|
15769f21d0 | ||
|
cf3229e0cd | ||
|
7c12523139 | ||
|
369a59e25d | ||
|
a8b0fa897a | ||
|
6ecec4f149 | ||
|
f48b17269c | ||
|
6fcd74bb82 | ||
|
ddfc439c41 | ||
|
7c3d476def | ||
|
49109c77f7 | ||
|
a5f66588e7 | ||
|
2341446376 | ||
|
9a703dd78b | ||
|
767a18ad86 | ||
|
f55024b352 | ||
|
4b8b735a46 | ||
|
8068ffeb7d | ||
|
5783473cfa | ||
|
d341c21f4b | ||
|
b434e79b9b | ||
|
2f2df04478 | ||
|
d7da659b8b | ||
|
fd794707cd | ||
|
9ba22f656b | ||
|
c41411b97e | ||
|
56469d8db3 | ||
|
4cde3c7781 | ||
|
2246300740 | ||
|
190b06182f | ||
|
b2168be56e | ||
|
cf808dd09b | ||
|
90d672b2f2 | ||
|
68906edf49 | ||
|
14729b2bfd | ||
|
20a8c1aa9c | ||
|
e195453573 | ||
|
d6a0797bf2 | ||
|
f9a06540f1 | ||
|
4a820dd0e5 | ||
|
2430fe9f56 | ||
|
3521ebf6e8 | ||
|
a18f77bfad | ||
|
7e0f10223c | ||
|
727b6f5a58 | ||
|
aae1cf55cc | ||
|
acfafb0607 | ||
|
9abd6a60fa | ||
|
234e36bd7e | ||
|
1d38174162 | ||
|
7fbf21d700 | ||
|
ab2df7e10c | ||
|
d530f72075 | ||
|
f58e244cf6 | ||
|
bd01083ad6 | ||
|
7bb6aead0e | ||
|
52b5ac4f0c | ||
|
546f73d56c | ||
|
03b6ad6f08 | ||
|
47da77a382 | ||
|
1dbc28618d | ||
|
0f0b28bdf6 | ||
|
57a965b0d6 | ||
|
f6eac2d7bc | ||
|
944db701e4 | ||
|
f31168c4fd | ||
|
fd8298dfd1 | ||
|
a728d448cb | ||
|
441e82a3bd | ||
|
64fa5acccb | ||
|
d152a8beee | ||
|
5c6833a0df | ||
|
1ff75dd4cf | ||
|
4d3e9506e4 | ||
|
63462ac8ef | ||
|
cff8e7fae7 | ||
|
c10e67d4b5 | ||
|
e5f52587da | ||
|
35e5344e5c | ||
|
a746ab6975 | ||
|
63aa353db3 | ||
|
f84142553c | ||
|
b18c838a69 | ||
|
b2e0c520e8 | ||
|
b333a1499a | ||
|
0ab72ab7bb | ||
|
ebea03edcf | ||
|
35499987ce | ||
|
1afaa2ba45 | ||
|
9fc8eccba9 | ||
|
1b261acb5c | ||
|
dc6d9d4e12 | ||
|
21bdf18e98 | ||
|
b8c9f96db2 | ||
|
dd4899a07c | ||
|
6908e744e1 | ||
|
7f05fbcda5 | ||
|
33bb990583 | ||
|
9f94e8c63a | ||
|
84763f3947 | ||
|
36c4a7f428 | ||
|
65a9894bba | ||
|
98f3e33f8d | ||
|
0e4f5e8bf8 | ||
|
b527d9c4da | ||
|
f2fa715bb5 | ||
|
3ea1d4542a | ||
|
6593827a99 | ||
|
470a1deb22 | ||
|
9a2bd261c0 | ||
|
4205327b95 | ||
|
b1022d6d18 | ||
|
3c53af8c24 | ||
|
4064d42fed | ||
|
cb29f8126c | ||
|
7ce124aaab | ||
|
a7334b0c58 | ||
|
05b9d8adca | ||
|
b96d319b26 | ||
|
89edac3e8f | ||
|
8d517eeb5e | ||
|
589af9917a | ||
|
a43b302452 | ||
|
534514f558 | ||
|
2990ff4ac0 | ||
|
7643109c63 | ||
|
2f70693656 | ||
|
e23cec2897 | ||
|
34154620f6 | ||
|
57bf5c7417 | ||
|
c6567d15af | ||
|
450483791f | ||
|
3c63eee8d3 | ||
|
38e21605a4 | ||
|
87ce0d887e | ||
|
f7d99c5eff | ||
|
0f07cb6980 | ||
|
264b9875ea | ||
|
4192a02594 | ||
|
798d812f80 | ||
|
1712034a14 | ||
|
15b91b2d28 | ||
|
b8168ce7f2 | ||
|
f1b31f6f49 | ||
|
293ee105f7 | ||
|
a6da089bec | ||
|
2537a7f49a | ||
|
fcc2a211df | ||
|
f2517b3e64 | ||
|
cab3f9c658 | ||
|
6cc00f54d3 | ||
|
04f62d3de8 | ||
|
c9d65fd7e7 | ||
|
aa8ed14a1b | ||
|
2b10f8de88 | ||
|
c1f7e3acc9 | ||
|
0f36063696 | ||
|
9a366ffeb9 | ||
|
772bea0152 | ||
|
edf0aa5c14 | ||
|
d46546a86b | ||
|
bdf642b773 | ||
|
184b3744c2 | ||
|
c4ca3d9b2a | ||
|
c8562c533b | ||
|
e56b8693a2 | ||
|
5e44a01699 | ||
|
787d27b498 | ||
|
71a308b87f | ||
|
4a14acd89c | ||
|
e38ade946a | ||
|
585f6cc64c | ||
|
10ff19ff24 | ||
|
904df45548 | ||
|
6a5f4ba54d | ||
|
dae9135e1d | ||
|
caa721d6e1 | ||
|
48dda57473 | ||
|
30b0d8a981 | ||
|
9fb90c02f0 | ||
|
1a596fa635 | ||
|
d672f57c14 | ||
|
cae3ae7c4b | ||
|
17dc53256a | ||
|
9c9446fc0d | ||
|
de91ff797e | ||
|
5a2c5e2c59 | ||
|
432f4d2a44 | ||
|
95e048e40d | ||
|
8af1a077ae | ||
|
ed26de79cc | ||
|
027439fa3b | ||
|
0a1744d80a | ||
|
7aa9106320 | ||
|
2ca1be271e | ||
|
9b0f4a50e8 | ||
|
5d0781f2d8 | ||
|
510c5d576c | ||
|
fa5b35b27b | ||
|
fd91a48f58 | ||
|
077b4d078f | ||
|
a0e34507db | ||
|
e33ce62d8e | ||
|
e15a7b23f2 | ||
|
2054d7c801 | ||
|
df7499940c | ||
|
0f5b038c7f | ||
|
83bdb2bcf8 | ||
|
f051bdb239 | ||
|
e581646d31 | ||
|
391ce432a7 | ||
|
24ba1ee07c | ||
|
ae097d2e5c | ||
|
71d9e1b098 | ||
|
e9883ad60d | ||
|
d493c4d16f | ||
|
eef204c77e | ||
|
17d5ff95cd | ||
|
36acf84a04 | ||
|
5a9bdd4a7f | ||
|
1b04f753c6 | ||
|
716227c19a | ||
|
1e4f200219 | ||
|
a434668ff8 | ||
|
6714bc0903 | ||
|
135e978f87 | ||
|
1aeba34310 | ||
|
48468f8d4d | ||
|
89064ffe7c | ||
|
e9071488d4 | ||
|
90c3f0f0f2 | ||
|
c64277e225 | ||
|
484cb88ef8 | ||
|
cae65df68f | ||
|
9603cc2d1d | ||
|
bacdc82ede | ||
|
f104859679 | ||
|
2cf29e419d | ||
|
3fd813cd9c | ||
|
12892cbc61 | ||
|
056707d7c2 | ||
|
15df0ee2f4 | ||
|
898fc6d34a | ||
|
426414eb1f | ||
|
3dbfc14056 | ||
|
0b63a56e40 | ||
|
afc9e2d2af | ||
|
d38e2c4478 | ||
|
715ec4f952 | ||
|
4a3a3d10ac | ||
|
21889eeb23 | ||
|
2f96fcd0a8 | ||
|
767004f1eb | ||
|
4432fc1537 | ||
|
02ef02538d | ||
|
d3834271e0 | ||
|
aa5e5e70a9 | ||
|
068f0e46fd | ||
|
eed194ea83 | ||
|
0eb6fcc47c | ||
|
6c71564d3e | ||
|
35505394d1 | ||
|
988a9deee5 | ||
|
204e286caa | ||
|
f45c231f48 | ||
|
74154dcdf9 | ||
|
a68c20926b | ||
|
92285b194f | ||
|
dee6629860 | ||
|
e2b958988c | ||
|
a0a85a5383 | ||
|
e36d6ba78c | ||
|
cde24ef8f3 | ||
|
b6f2d1423e | ||
|
a1a11dffff | ||
|
6e79c55583 | ||
|
4a9dd411dd | ||
|
0911402926 | ||
|
86c7e127aa | ||
|
003951c422 | ||
|
c80c2fb657 | ||
|
5694b6d453 | ||
|
234943d9fd | ||
|
fdd10ce643 | ||
|
322dcf618c | ||
|
e554e5b297 | ||
|
0715af78fe | ||
|
75eb58d7c7 | ||
|
0e3295beec | ||
|
bc89be84b0 | ||
|
dc05338ae7 | ||
|
a5d55eb224 | ||
|
b6a666fe59 | ||
|
6981b53336 | ||
|
4a7bdeab3c | ||
|
4bb725db9e | ||
|
e43c37cc07 | ||
|
cda15e841b | ||
|
8212fec6e6 | ||
|
3a2b1c988a | ||
|
b49987f935 | ||
|
a732132498 | ||
|
12325ee39e | ||
|
3c405da087 | ||
|
d247ec0197 | ||
|
13b421b08e | ||
|
f0ca3b8a58 | ||
|
0384258032 | ||
|
222687cebe | ||
|
0c0838b345 | ||
|
9cd9a58759 | ||
|
a19c9c3e33 | ||
|
e035f3a15a | ||
|
ad650d3822 | ||
|
b552bec903 | ||
|
c6f6036f5a | ||
|
5e7e8667a7 | ||
|
f99e333039 | ||
|
31b0f1131e | ||
|
45dad9779e | ||
|
d712769511 | ||
|
880168989c | ||
|
97fa1e51bd | ||
|
0b3a326fe3 | ||
|
93f8172029 | ||
|
dbab6be1d4 | ||
|
cc8f5f76ba | ||
|
5a99bbf30b | ||
|
394da85e62 | ||
|
8613add2df | ||
|
daf1e61335 | ||
|
894afaa66f | ||
|
4dda2e4160 | ||
|
af4f4ed83f | ||
|
216124437a | ||
|
ad2ad7437e | ||
|
f895591e8e | ||
|
4e057db343 | ||
|
72ae0ccd8b | ||
|
cb0b2f19cf | ||
|
409cafc402 | ||
|
04ade97cbc | ||
|
2adb7db4b3 | ||
|
a2ec97d2d9 | ||
|
531e29396f | ||
|
70b626ffe8 | ||
|
53ed90dab5 | ||
|
a7d615b5ba | ||
|
15d760dd10 | ||
|
db55ad59de | ||
|
3393454e0a | ||
|
fd57ff0724 | ||
|
72619a99a4 | ||
|
62e3523d29 | ||
|
e453408457 | ||
|
eab42ade1d | ||
|
80edeef484 | ||
|
e396cf1533 | ||
|
38ec02f62d | ||
|
b1cdb67c2d | ||
|
36f0b6e4b5 | ||
|
60810aff60 | ||
|
507cba20bc | ||
|
bf861da0e3 | ||
|
c1abf82b3c | ||
|
9bba9b33fc | ||
|
740e107aab | ||
|
62f4a17459 | ||
|
42a1720620 | ||
|
3007571704 | ||
|
28059c9f66 | ||
|
14602299a1 | ||
|
fcf78b7d14 | ||
|
538971c28e | ||
|
a6d1aafdf8 | ||
|
47b5abe06c | ||
|
7cfc5e0c66 | ||
|
14fca518ac | ||
|
0ae44a4d5c | ||
|
55c383f11c | ||
|
bc1142d7be | ||
|
46d51eebf9 | ||
|
629661df05 | ||
|
8dde85989d | ||
|
e32565d3b2 | ||
|
a1eaccb397 | ||
|
e98a65c3da | ||
|
f9c11bf16f | ||
|
3554684ffb | ||
|
dfe55583d8 | ||
|
11fdb2472e | ||
|
6c1828234a | ||
|
2c6e546e1a | ||
|
25bcd15793 | ||
|
e05c21e86f | ||
|
7ab898c718 | ||
|
eed4cafdfa | ||
|
f5df6b826e | ||
|
087aabcfe7 | ||
|
115595383d | ||
|
ad49c70e5b | ||
|
4bc4a4342f | ||
|
f2692b0fb7 | ||
|
579b14a4e0 | ||
|
0b3e22e9b9 | ||
|
45f156598e | ||
|
b1fba82bed | ||
|
d7cacefb8d | ||
|
2b1ad14adf | ||
|
f32488263e | ||
|
cb90d95965 | ||
|
7fc1ae4e4b | ||
|
ac39734f6d | ||
|
558a8a0aa4 | ||
|
6ce81d2065 | ||
|
28fb6d9920 | ||
|
9a75ac6214 | ||
|
9551428908 | ||
|
5fac24d73b | ||
|
2f5963596e | ||
|
da1654baa7 | ||
|
bd004d6844 | ||
|
1acaeb6ef8 | ||
|
b178c913d2 | ||
|
e46d9eb02c | ||
|
ca241b5d6f | ||
|
d91a7f88c9 | ||
|
5224a46ee7 | ||
|
965481f589 | ||
|
b0d706199f | ||
|
fc4e68a150 | ||
|
a21d8a06f5 | ||
|
7ce90d92df | ||
|
bca635087c | ||
|
e96dac34e3 | ||
|
d0f00890e1 | ||
|
752cda88e3 | ||
|
571526b993 | ||
|
b8710d6c45 | ||
|
8221cb9173 | ||
|
beccd014f6 | ||
|
b344b36b68 | ||
|
6747784acd | ||
|
4eeb6d67a9 | ||
|
a876c1257d | ||
|
ce0151becc | ||
|
c1f9c910e1 | ||
|
cc169f1674 | ||
|
5f1aeec5ae | ||
|
3e7d5157b2 | ||
|
e679a981da | ||
|
86b32b3f9f | ||
|
fa0d8761ae | ||
|
ac2817613b | ||
|
e1d4e60216 | ||
|
a7facc85fa | ||
|
091b2b975f | ||
|
2020c9683a | ||
|
4cbbedc42e | ||
|
c149ef699f | ||
|
7b56b70368 | ||
|
d88b3ebaac | ||
|
10f761dbcb | ||
|
cde904ff08 | ||
|
04ff03ab1c | ||
|
35a8b0e1b5 | ||
|
21255cc875 | ||
|
e9f2500637 | ||
|
140dd553e0 | ||
|
3a388fba23 | ||
|
af64882306 | ||
|
e71038ccf2 | ||
|
37efebf122 | ||
|
b7f8ec5ae2 | ||
|
53e795384b | ||
|
3d4059de02 | ||
|
703619bf0a | ||
|
1686c9a6a9 | ||
|
ed1e6b2508 | ||
|
746ead5747 | ||
|
5a6424839d | ||
|
b8c87c7dd8 | ||
|
21d0c8491f | ||
|
1a0b0e6886 | ||
|
a8034fb33e | ||
|
5291a31afd | ||
|
58299c2efa | ||
|
e1f1d0a410 | ||
|
ac18990a8c | ||
|
f3ac07cd73 | ||
|
f1ed15a8e4 | ||
|
5f23a0c11f | ||
|
ff2f07812d | ||
|
05b20ba4b7 | ||
|
64f055d708 | ||
|
1981dbf383 | ||
|
4ec9d33a6f | ||
|
9f6a72d674 | ||
|
c259e80721 | ||
|
9bea20442f | ||
|
98de21374a | ||
|
d1ed36a547 | ||
|
8b9b326a59 | ||
|
297978b104 | ||
|
3d513e9c00 | ||
|
31926fd4a7 | ||
|
d9464c4a22 | ||
|
e19409d278 | ||
|
325551c227 | ||
|
07bcb79a22 | ||
|
251e34af22 | ||
|
31ae08d4ca | ||
|
06ffc6cd3d | ||
|
c8b62d8b3e | ||
|
3a6bbee6d4 | ||
|
48882ef759 | ||
|
758296f973 | ||
|
a51dd30e7a | ||
|
4d5722b5e9 | ||
|
99a0d7f0ae | ||
|
80698d5d23 | ||
|
558dfd92c6 | ||
|
4b83183d02 | ||
|
d968c03c7a | ||
|
b86467155e | ||
|
307d8aead0 | ||
|
c8a14e7685 | ||
|
f81c0adb0f | ||
|
53ee5b7d8a | ||
|
fdf6e000cb | ||
|
7e6e8b2042 | ||
|
b9cf3dc5a2 | ||
|
435bc59a01 | ||
|
b3fc9e39db | ||
|
d62356f930 | ||
|
4d20fa1195 | ||
|
428ff80f1d | ||
|
a0b45fe891 | ||
|
b53f69b472 | ||
|
f09923b5b8 | ||
|
20792c13f0 | ||
|
14c2e0c627 | ||
|
c6a10295c1 | ||
|
bf85d4b144 | ||
|
244a86cb7e | ||
|
1fda7492e4 | ||
|
996de81ecd | ||
|
c97e4e1078 | ||
|
f873baea7f | ||
|
a6468c585b | ||
|
29d3a16491 | ||
|
251e3fe10d | ||
|
b2093314f0 | ||
|
5bbbda22aa | ||
|
a18fce88ac | ||
|
7c22408636 | ||
|
e8bc58043f | ||
|
867576c249 | ||
|
d81891f6cc | ||
|
777bcd08b6 | ||
|
c16560decd | ||
|
5bed417faa | ||
|
e081222531 | ||
|
200dbcc03c | ||
|
11b174288b | ||
|
1bfca29d17 | ||
|
837dc92cfc | ||
|
83b98e4a03 | ||
|
b36cb5cf5e | ||
|
0d11940004 | ||
|
ada434b3c3 | ||
|
a99af9a091 | ||
|
41c301fd7c | ||
|
516a8b3da7 | ||
|
263d3ec994 | ||
|
59501353e7 | ||
|
90321636c3 | ||
|
663de7d37f | ||
|
7030eecbdd | ||
|
900d0d0ea5 | ||
|
5261325771 | ||
|
c230853364 | ||
|
47941026f2 | ||
|
22b40ff0ec | ||
|
6a3a5ea7ec | ||
|
e7e1463181 | ||
|
f3839d6cca | ||
|
a8fae544c4 | ||
|
581a28f6ec | ||
|
dd4438d4a9 | ||
|
3c21afef6d | ||
|
54c0739674 | ||
|
d82eda1933 | ||
|
20e30fdefc | ||
|
b934096832 | ||
|
3c95d8e39d | ||
|
0be63a404c | ||
|
4c9990bafd | ||
|
d7b0669796 | ||
|
97bf42045b | ||
|
7f89620225 | ||
|
d5478af03a | ||
|
be3ad2d769 | ||
|
8c328f01e7 | ||
|
e9cd22f082 | ||
|
a64e026b4b | ||
|
a8d11390fe | ||
|
cb636881c3 | ||
|
f6871385f5 | ||
|
db9f3c7b99 | ||
|
0fd763805a | ||
|
80539def51 | ||
|
d399073695 | ||
|
e7a42e05b5 | ||
|
f1303bcc2f | ||
|
fa1bdade76 | ||
|
9a1b350f4e | ||
|
9e71c782e1 | ||
|
40657d78a2 | ||
|
b90ae573c3 | ||
|
946e79509d | ||
|
26cd4f775f | ||
|
1dab3746b6 | ||
|
b0a114da8a | ||
|
c2ba8d40d3 | ||
|
031ecf0a76 | ||
|
6f632292cb | ||
|
2918e49346 | ||
|
e43430e7ad | ||
|
9a8771d66a | ||
|
90287c657d | ||
|
8008e108e6 | ||
|
2fa69d1895 | ||
|
b97cb8dd05 | ||
|
8937fa2f45 | ||
|
149228dd1c | ||
|
ed9ef3268e | ||
|
91cbe0c2df | ||
|
226796099c | ||
|
6b67baa65f | ||
|
419d43670c | ||
|
68e56eaa10 | ||
|
f5e0aec6b6 | ||
|
9e53aed174 | ||
|
270daf31ea | ||
|
d3b6bc503a | ||
|
cdf37f053c | ||
|
5b4a49d11f | ||
|
ca18a14d43 | ||
|
25234e03da | ||
|
e98b15ca2c | ||
|
189c667928 | ||
|
6266ed883a | ||
|
c6c56a1a83 | ||
|
1b608759ec | ||
|
4b8ae6cce9 | ||
|
c9eff660f6 | ||
|
b99a451e1d | ||
|
9e1b660e61 | ||
|
2afbf682e4 | ||
|
5937dcc645 | ||
|
3e84dc2b6e | ||
|
d87a597e3f | ||
|
b352cc3df7 | ||
|
c13c21b340 | ||
|
016bef7f79 | ||
|
260ad3e968 | ||
|
a1526b97e8 | ||
|
cf3cda3b13 | ||
|
02a39915dd | ||
|
cd893736ee | ||
|
1fa73fc3ba | ||
|
fc95a6c1a0 | ||
|
895b33ccdd | ||
|
4e529b49e6 | ||
|
4ef6eb76c6 | ||
|
6b2a53e7a7 | ||
|
a340aa6fa0 | ||
|
abfdad01fe | ||
|
f91e2c3fb0 | ||
|
0629e28105 | ||
|
45b9555633 | ||
|
61bfd97939 | ||
|
c5b36d8f6d | ||
|
0bc29fee35 | ||
|
9a21a2c314 | ||
|
0306ecd746 | ||
|
aca0ff6a74 | ||
|
a2fc558e93 | ||
|
99e3f1008d | ||
|
35742da1da | ||
|
0be50f33ac | ||
|
0a019f60d7 | ||
|
07ed1ea60e | ||
|
00ce724e53 | ||
|
90575dddd2 | ||
|
1a13bc2420 | ||
|
c6d929c674 | ||
|
658718d166 | ||
|
6015698171 | ||
|
f56cc483b4 | ||
|
e16e63f46a | ||
|
15d2e2edb1 | ||
|
df035ee313 | ||
|
7f5d09c508 | ||
|
cee6bd94bd | ||
|
47651fb102 | ||
|
5af3ad471f | ||
|
3c01065bd6 | ||
|
54bffb6291 | ||
|
4837413fbc | ||
|
8434b4c892 | ||
|
acf6785bba | ||
|
110afdad01 | ||
|
7823d1d2e8 | ||
|
410dca728c | ||
|
336e11959d | ||
|
2c1e7fc2c9 | ||
|
b7bd6e3817 | ||
|
617a702441 | ||
|
4aa0f4e43b | ||
|
ef71ad2ced | ||
|
ca0345a0b4 | ||
|
8290988213 | ||
|
596825ec1e | ||
|
aeba4fad4b | ||
|
bacb661573 | ||
|
7c2d6b4c42 | ||
|
fae38e8e64 | ||
|
711908971c | ||
|
c08c937efe | ||
|
301eddafd4 | ||
|
b29e06076b | ||
|
e289c3194a | ||
|
36607f43ad | ||
|
f934f21638 | ||
|
7b9dbdc943 | ||
|
92139d1ba7 | ||
|
11a8f396b7 | ||
|
02bdb405fa | ||
|
b0d6790abe | ||
|
555a1c6def | ||
|
f5e8011906 | ||
|
c366fbb017 | ||
|
8d84f9b7f0 | ||
|
3b30fd6abe | ||
|
6a3708383f | ||
|
771026cc7d | ||
|
be6eb016af | ||
|
7ef9fa0ffe | ||
|
71db72d205 | ||
|
35ee67faa5 | ||
|
90dd200dc8 | ||
|
e720bc7812 | ||
|
1b8ba1ac7b | ||
|
f1533ad391 | ||
|
96132632e9 | ||
|
42137fef2e | ||
|
d913936970 | ||
|
c8f294129c | ||
|
f4ab8cd5e2 | ||
|
9de738362a | ||
|
9b89215e50 | ||
|
c25a3a7d59 | ||
|
b914e3879b | ||
|
08a81914ed | ||
|
00f56a5f3a | ||
|
bf877f5fa7 | ||
|
d6208b4730 | ||
|
248fddf3f4 | ||
|
98afcb7a9e | ||
|
85e31e17f6 | ||
|
e13e82a2b4 | ||
|
bb10669b09 | ||
|
2f9025ae2d | ||
|
93ef3ea429 | ||
|
1bfd26a55c | ||
|
425a08522e | ||
|
330035b107 | ||
|
a13a284fb4 | ||
|
64985c3beb | ||
|
f61f66841b | ||
|
6fea40dc9b | ||
|
9e2bc00b15 | ||
|
1ce29f4930 | ||
|
37ef3e0f62 | ||
|
86bb78d16b | ||
|
d76db44b72 | ||
|
979c7294eb | ||
|
d735047e09 | ||
|
7d0aae1465 | ||
|
78166d3cda | ||
|
00acaa2165 | ||
|
e28bdac0ee | ||
|
e9c6f904b2 | ||
|
f737c53864 | ||
|
1ee3e6d213 | ||
|
9fccd721e0 | ||
|
4c3abf5aca | ||
|
78057fc8df | ||
|
9f81207037 | ||
|
56975bc80a | ||
|
e9014ecb19 | ||
|
8d3763d0a6 | ||
|
8cf50fe92c | ||
|
bb59d527eb | ||
|
5e1abc1ad9 | ||
|
b1aba81cd1 | ||
|
842a24ed1e | ||
|
c83618143e | ||
|
18859ed41e | ||
|
cfc7a8c092 | ||
|
35b7c97791 | ||
|
79bc78a5f7 | ||
|
33ea383046 | ||
|
26ca1618ab | ||
|
bb3c24df73 | ||
|
9b23da07ba | ||
|
e059eeb625 | ||
|
04616ddff5 | ||
|
a620d4fc4c | ||
|
8ca807ee57 | ||
|
7756df16bb | ||
|
3ad04c4969 | ||
|
ba7645a732 | ||
|
8ababedab1 | ||
|
89020c7581 | ||
|
348b2ffa5d | ||
|
6de3f0f5b9 | ||
|
074bd6a803 | ||
|
a6466449b1 | ||
|
4ff64532b2 | ||
|
7dd4e4909b | ||
|
36fbad54d8 | ||
|
32884e5de4 | ||
|
0cd9605a5e | ||
|
78db4fec85 | ||
|
e441e7ebf1 | ||
|
f83e57c0b7 | ||
|
6662c7f18e | ||
|
921d5d1753 | ||
|
9f7ff56f46 | ||
|
001fde13df | ||
|
3fd1651726 | ||
|
ef20be2eee | ||
|
27ecabfb18 | ||
|
5a0b9dfb88 | ||
|
7d99c12220 | ||
|
7056a4489a | ||
|
7fed7577ea | ||
|
66ae65cea4 | ||
|
2c673ae616 | ||
|
d4e0b0956f | ||
|
596bfbac02 | ||
|
e8881ef715 | ||
|
886d9d931f | ||
|
bbf5b12057 | ||
|
993853a8bc | ||
|
faa2098912 | ||
|
37c614245f | ||
|
e213e6b337 | ||
|
bc0d79df7b | ||
|
aef3286769 | ||
|
a781c20088 | ||
|
3d25caabca | ||
|
237a05d056 | ||
|
1c1ce4893a | ||
|
3758ade094 | ||
|
5979564483 | ||
|
e8f38ffda6 | ||
|
23bd900204 | ||
|
0c8c1989b7 | ||
|
12a006f5a8 | ||
|
b184c8ae9f | ||
|
34d6d03b43 | ||
|
bd2f73aea5 | ||
|
c21b7c32a8 | ||
|
87f029a1a3 | ||
|
85fc8f28a1 | ||
|
3faefc1051 | ||
|
3a3394e240 | ||
|
42843b1798 | ||
|
e1e620a573 | ||
|
8bd0bf722c | ||
|
b783e6bf78 | ||
|
e56731a404 | ||
|
2bd7c43006 | ||
|
b4a65a3e4d | ||
|
ecdeac7d90 | ||
|
b7639f5460 | ||
|
ac63b5bb8a | ||
|
b471d585ed | ||
|
d0095f9e62 | ||
|
03733084e6 | ||
|
8835f532cc | ||
|
ff77a3deb0 | ||
|
01d82e3745 | ||
|
42f6a4e171 | ||
|
fcda904e1b | ||
|
fd95a0f2a6 | ||
|
0206fd6baf | ||
|
2d739959f9 | ||
|
2886e58b0d | ||
|
46a4c82e1a | ||
|
471687543c | ||
|
2fce7a129a | ||
|
f1c2a4248f | ||
|
1365b6023b | ||
|
f2c10902b3 | ||
|
0f9e07259e | ||
|
35797d2db6 | ||
|
cbae7449b0 | ||
|
b98ce54750 | ||
|
74d2fbe833 | ||
|
5740b689be | ||
|
925930f76f | ||
|
10f020405f | ||
|
70c5e02ca9 | ||
|
d212037ff5 | ||
|
d0308142a3 | ||
|
ccaca4f1c0 | ||
|
55937c4c40 | ||
|
56067aef86 | ||
|
c3115237a4 | ||
|
a56c1fa923 | ||
|
d5e06fe0c2 | ||
|
5545e4f220 | ||
|
869269c4e8 | ||
|
c3a54de181 | ||
|
68a7553648 | ||
|
02b0be0b22 | ||
|
52aba305b4 | ||
|
9d4609e0c2 | ||
|
db5d50c9af | ||
|
e1da955893 | ||
|
68b64a3ae7 | ||
|
022de7804b | ||
|
2612194f46 | ||
|
68eb640f1e | ||
|
a8bde9ecbe | ||
|
d08a5baf60 | ||
|
265cacf3dc | ||
|
4bc92bcce8 | ||
|
ed50751518 | ||
|
7b514fbd7e | ||
|
fce8b69459 | ||
|
17935970fb | ||
|
1e3b54d1f4 | ||
|
69d44d5ea0 | ||
|
21c444c8a4 | ||
|
51b4d42e8d | ||
|
bc80b9f60b | ||
|
d4a6e7189c | ||
|
fa77db52b6 | ||
|
767e49f27c | ||
|
3407968a32 | ||
|
4c5bda4858 | ||
|
720a51ff82 | ||
|
3bd7041426 | ||
|
c930aaf0b2 | ||
|
f43285e0bb | ||
|
7e022fe132 | ||
|
da2f21c0f6 | ||
|
8df08c4b1f | ||
|
e8bb4070d9 | ||
|
14e7619075 | ||
|
67658e172c | ||
|
3a716bcf9a | ||
|
51e4325f0b | ||
|
264f49fd2c | ||
|
3f5fe6f3e5 | ||
|
250eff740e | ||
|
523a0bec2c | ||
|
5337656c58 | ||
|
5270501fac | ||
|
f05c36c29e | ||
|
44b5e36905 | ||
|
c6caffcdf8 | ||
|
81a7fc52a8 | ||
|
146cbb598a | ||
|
c832db9ddb | ||
|
faf365baa1 | ||
|
8a274f8409 | ||
|
e68dbe4e67 | ||
|
3a5759e2b5 | ||
|
f21e9cc0ae | ||
|
1efb97733d | ||
|
28f9b55e4f | ||
|
2efa6eed7c | ||
|
f28605cdf8 | ||
|
9b6947dc98 | ||
|
34ac1a7002 | ||
|
33207b158a | ||
|
9229dd07d4 | ||
|
491e08ff91 | ||
|
3464abbde3 | ||
|
da0e1dbd5b | ||
|
0db7e7c533 | ||
|
97ca61ac97 | ||
|
3e2d6eb5fa | ||
|
ecd95ba2d2 | ||
|
4e46fff145 | ||
|
0bd2d176d8 | ||
|
06a785d770 | ||
|
d372e1029f | ||
|
787d1a3ba9 | ||
|
b6b695290c | ||
|
275ea37a01 | ||
|
98eb3c9013 | ||
|
dbc047516d | ||
|
94d63306d4 | ||
|
2ba50f2a73 | ||
|
59429b097d | ||
|
e1ad1f3065 | ||
|
b0c175dd57 | ||
|
d3d6161c22 | ||
|
59e4c5b673 | ||
|
da660a7ad8 | ||
|
7b8b8aca0c | ||
|
c55b542204 | ||
|
10772c2190 | ||
|
d6254ebba6 | ||
|
681dd85ce6 | ||
|
a1aafbeade | ||
|
c17678013d | ||
|
33ec8528a1 | ||
|
b9d1017754 | ||
|
7b4c77b7da | ||
|
7234f83073 | ||
|
a02e2a2247 | ||
|
52023a4db0 | ||
|
4c2b52cdbb | ||
|
45da40e4c9 | ||
|
3a02a2a4b3 | ||
|
57f1bac497 | ||
|
3e8bbd02ea | ||
|
82c89668a0 | ||
|
b790b27000 | ||
|
8436b74ac1 | ||
|
4c0f7650dd | ||
|
73391b06e4 | ||
|
cfd3c731ba | ||
|
a6d18e286a | ||
|
324666a3ec | ||
|
6de0449b8c | ||
|
fccd062b85 | ||
|
1b1ce69378 | ||
|
bba54368f4 | ||
|
ac31ea2291 | ||
|
991119e5c5 | ||
|
24cf82cc53 | ||
|
f4886fdb7a | ||
|
923d70e0df | ||
|
6c2c52abf2 | ||
|
16c1b2ad87 | ||
|
3291ce008a | ||
|
31fb0208d0 | ||
|
2ef3c24b67 | ||
|
d46108ac05 | ||
|
50cc9669c5 | ||
|
c0ff2847fe | ||
|
c0bc6842d5 | ||
|
0f5b9d1397 | ||
|
b75beba06b | ||
|
4b629db0d9 | ||
|
e4895d7119 | ||
|
704ca22fed | ||
|
7422cc3822 | ||
|
0bc6965681 | ||
|
7a70ed75be | ||
|
7a7df7d4a7 | ||
|
a2e705adb0 | ||
|
30530a8593 | ||
|
edcb6d0ca4 | ||
|
4160d4e770 | ||
|
582e29aab6 | ||
|
d59dc6ee5b | ||
|
e48452dd9d | ||
|
d405308d1d | ||
|
ce1f2b30e4 | ||
|
5e18538f14 | ||
|
ab94bd34ac | ||
|
d94e28fa2d | ||
|
b6dc9e8ca0 | ||
|
452e6f20db | ||
|
00ccf8a95b | ||
|
83018d252c | ||
|
1f9c100ad5 | ||
|
cadf7e718b | ||
|
1324e8ffe3 | ||
|
e9bd5e2fb9 | ||
|
b62969e07c | ||
|
1e90f33aae | ||
|
f14158a358 | ||
|
f1d240d5fc | ||
|
d2d1be764d | ||
|
292122b8e5 | ||
|
30f9311fd1 | ||
|
9a9c5ed85f | ||
|
db68c9cce8 | ||
|
ae61d2f7ad | ||
|
4f8a4c9dc2 | ||
|
e593a0d007 | ||
|
7ddf4a566d | ||
|
0801f9bf4c | ||
|
29da0bf82e | ||
|
6319f8d922 | ||
|
eca0d0bf48 | ||
|
75f6e84fb0 | ||
|
f96cb98a67 | ||
|
2b19ccea1c | ||
|
122ea31e45 | ||
|
d1a7d5d8c4 | ||
|
375c296f56 | ||
|
540535b95e | ||
|
4fc8185058 | ||
|
561f4d16a0 | ||
|
26d695265d | ||
|
92e16b7197 | ||
|
769e8b34ba | ||
|
895320dbd8 | ||
|
9015134418 | ||
|
470f726a5b | ||
|
4e658dde00 | ||
|
9b086f4c41 | ||
|
6eb57a9ade | ||
|
4b26402b28 | ||
|
c2e240014d | ||
|
60895c84a2 | ||
|
372ec72491 | ||
|
d520ef67f8 | ||
|
3681cba45d | ||
|
76545d196b | ||
|
379d035b63 | ||
|
f7fc82dca1 | ||
|
f143efe4e2 | ||
|
5f61a90eb7 | ||
|
5bbddcf2ee | ||
|
2e7f242056 | ||
|
b4e3b7e3a2 | ||
|
135518a341 | ||
|
b07f3c5e67 | ||
|
c308d1b6c2 | ||
|
2da3344612 | ||
|
2b2cdf912b | ||
|
15a88c2566 | ||
|
eff0d55c28 | ||
|
66c8cba965 | ||
|
c9bfbb0771 | ||
|
85217be1b5 | ||
|
0104f97805 | ||
|
774c465f57 | ||
|
5a39bc00ce | ||
|
ca81aa5134 | ||
|
08c7e768c0 | ||
|
d76f6807cc | ||
|
1626d176b0 | ||
|
2a944b3f0a | ||
|
a6a75ee691 | ||
|
2831152015 | ||
|
f4f2901e58 | ||
|
6ec608f539 | ||
|
404453cadd | ||
|
1f82d26ac2 | ||
|
b5fd3de755 | ||
|
58644228ea | ||
|
8b739fa321 | ||
|
5f57edb212 | ||
|
ad3796f5a8 | ||
|
c82b6d8f94 | ||
|
743aa0992f | ||
|
007c1773a8 | ||
|
3ee4980412 | ||
|
71a5ad3fab | ||
|
34b7ef1a60 | ||
|
f19f1ee86d | ||
|
b85b3f7ccc | ||
|
c1eb75de1a | ||
|
7413ffabb1 | ||
|
778f3e279c | ||
|
cff4c061b2 | ||
|
9d38f5439d | ||
|
c6ab669edf | ||
|
9a9f3804e8 | ||
|
cc2ff457e6 | ||
|
e846fdeef8 | ||
|
f86f099fa5 | ||
|
eb11ec34f2 | ||
|
8bc2103b0c | ||
|
fb3ea54854 | ||
|
4f0b0fedb8 | ||
|
c4bdf74942 | ||
|
bf84bfe4b0 | ||
|
32bb91a1a2 | ||
|
3a65dad743 | ||
|
5dbce09e4f | ||
|
9244d60abe | ||
|
ae13a3394d | ||
|
a4a3d4e531 | ||
|
56f9435c03 | ||
|
d8e30af188 | ||
|
70f9422a4e | ||
|
6ba561170e | ||
|
f2099254a7 | ||
|
182b49962f | ||
|
c75f00cb12 | ||
|
8ce2242b52 | ||
|
6216076b74 | ||
|
1fa2176412 | ||
|
97307b2583 | ||
|
d9c362ee9f | ||
|
98f0d5fa4b | ||
|
0bf595d4f1 | ||
|
a98aa8592a | ||
|
93d91c9313 | ||
|
cb9eed2b70 | ||
|
1513b80ca5 | ||
|
6f9b837d26 | ||
|
bc8b82ed9d | ||
|
0f369cbc32 | ||
|
b47d39465f | ||
|
3ca8ca9d76 | ||
|
8e7799b3c1 | ||
|
485c6a8e3c | ||
|
77cbdc9017 | ||
|
276e94a092 | ||
|
042f602ddb | ||
|
7a93824027 | ||
|
90362dea4b | ||
|
745ecbf94d | ||
|
55bc078c47 | ||
|
3b1add3b2c | ||
|
02e0666697 | ||
|
c4d58ece81 | ||
|
d2385b962f | ||
|
a06cbcbd7f | ||
|
725b0ee79b | ||
|
5b183af93e | ||
|
cfd5dfe09c | ||
|
ba9ed05013 | ||
|
f183a854c8 | ||
|
ce7234179c | ||
|
b9fc08e098 | ||
|
dd4d85e337 | ||
|
09ea4cd874 | ||
|
d8f337884f | ||
|
a283dd8ed8 | ||
|
aeb76e9c57 | ||
|
9a877b5e04 | ||
|
5db30c0e8d | ||
|
ed4fbf01d0 | ||
|
d8bb0debd9 | ||
|
2fb1a06ca0 | ||
|
44a2634a85 | ||
|
a86bd4c3f6 | ||
|
523b75e211 | ||
|
0c0c6e94e0 | ||
|
f0771cd013 | ||
|
c050292a8d | ||
|
a2f5db7847 | ||
|
3eb3183249 | ||
|
f8dae61804 | ||
|
b6d09d66d4 | ||
|
9a167ba29b | ||
|
5bd6b26a60 | ||
|
7d080bb01a | ||
|
bc31e25547 | ||
|
34bf319c2e | ||
|
bca6772a07 | ||
|
18cc6c34ad | ||
|
387cf3d142 | ||
|
29f3d90232 | ||
|
accfa70ba5 | ||
|
405beea6d3 | ||
|
3cc19dc27c | ||
|
b2cef43355 | ||
|
6879695e89 | ||
|
7c1152ac1d | ||
|
2f7a294ac8 | ||
|
cb64f7df22 | ||
|
313ad4c935 | ||
|
85014a4ded | ||
|
4863901859 | ||
|
0a2addb532 | ||
|
f62f9a0926 | ||
|
f7b69fac7c | ||
|
5620db2046 | ||
|
6bdb0cee38 | ||
|
a9eec596ab | ||
|
37d61fb732 | ||
|
6a44ba8fcc | ||
|
1aee849280 | ||
|
9160d1fb0e | ||
|
6a41935e61 | ||
|
d410f548b8 | ||
|
c35034d587 | ||
|
cbb147f41e | ||
|
b4b39d87c0 | ||
|
2f2599b34f | ||
|
5fec87812e | ||
|
a2e67fa498 | ||
|
2ee83d30bb | ||
|
ec4b34c9f5 | ||
|
5f054c8ffd | ||
|
f6ed8b6b45 | ||
|
ea3368a25a | ||
|
46c31103b8 | ||
|
9b8ce06990 | ||
|
cd35d1e0a3 | ||
|
98d370ed94 | ||
|
18e5619246 | ||
|
7f3daaac59 | ||
|
42821b3102 | ||
|
e9e62c2065 | ||
|
42461c6e55 | ||
|
bebc8362e8 | ||
|
03b1abd740 | ||
|
db746802c9 | ||
|
8c4346f8b8 | ||
|
197b3a50ef | ||
|
2067a73072 | ||
|
78fc097818 | ||
|
18ed770fe2 | ||
|
04fae35f5b | ||
|
a3717a5a8c | ||
|
521687e0a4 | ||
|
d1670413cc | ||
|
7be64c0558 | ||
|
de2db5208a | ||
|
eafeb3c6ea | ||
|
c328ba4c11 | ||
|
0d2667685e | ||
|
210723cd74 | ||
|
6765404bee | ||
|
bc0813b8c7 | ||
|
0b59a3b62f | ||
|
075402315e | ||
|
68ed842c87 | ||
|
018d2af3ae | ||
|
aedcf9dd51 | ||
|
9095fe8526 | ||
|
8c4bf5abc6 | ||
|
4e8c85bc34 | ||
|
75f3e8f998 | ||
|
a5f98c138a | ||
|
e6a55d5a7b | ||
|
9cf44d6795 | ||
|
a53593f8c6 | ||
|
d77415783a | ||
|
ea302d80ca | ||
|
ac87145749 | ||
|
5b05ca6e72 | ||
|
2d0706c40b | ||
|
a9c5dc3be8 | ||
|
b22a9ead17 | ||
|
4c923d2592 | ||
|
8e9d99e567 | ||
|
61d6cc4974 | ||
|
433be669b1 | ||
|
fa0edec74b | ||
|
b8417c99c9 | ||
|
3e727c52ff | ||
|
6ab7eb4022 | ||
|
b1a2ae0d8f | ||
|
382cf145e8 | ||
|
c1f8ebce75 | ||
|
14abd422b2 | ||
|
3a96c303a8 | ||
|
378cce8726 | ||
|
17d53ca39a | ||
|
305dd78ad4 | ||
|
ed8d357881 | ||
|
9d7b91a024 | ||
|
ce2a9b3301 | ||
|
2d7cafa3bf | ||
|
bcf899df72 | ||
|
5abd701b40 | ||
|
b310dcd69e | ||
|
e99bb9c1a5 | ||
|
7a14c39d81 | ||
|
c579b13705 | ||
|
ee98726c7f | ||
|
e03b65b442 | ||
|
66a16af97d | ||
|
881448abfe | ||
|
870fd911ff | ||
|
ddc228b5d2 | ||
|
8e37cb15ef | ||
|
d1cd382512 | ||
|
879fa92777 | ||
|
451d45359d | ||
|
95d40adf05 | ||
|
16e68371d8 | ||
|
7e3a8fdcd6 | ||
|
3958177a8e | ||
|
f14766a1c0 | ||
|
de00f6ab1f | ||
|
e97283433f | ||
|
6e30961f25 | ||
|
f4a68140d3 | ||
|
d0c1a5db96 | ||
|
5445309aa0 | ||
|
a1aae6206f | ||
|
b7be868798 | ||
|
388851f02d | ||
|
40cdfe7146 | ||
|
a18625f427 | ||
|
f60ce6967d | ||
|
eef8015158 | ||
|
fa357294fb | ||
|
5eb21d82b6 | ||
|
cb3a0d5fc9 | ||
|
c6a7d5d340 | ||
|
3eaf0a323a | ||
|
88fdf9702b | ||
|
bd2c6e5c9f | ||
|
25a21f75c0 | ||
|
58a3b67ce9 | ||
|
de4e285cf6 | ||
|
79733145f4 | ||
|
6fd9430ef8 | ||
|
6227b2bcdb | ||
|
bc967be9e2 | ||
|
a8e3602817 | ||
|
03e186a0cc | ||
|
b855b9bee2 | ||
|
643840e0da | ||
|
59f0bc6cfc | ||
|
f09d08bda2 | ||
|
d35927f728 | ||
|
9dae0ac995 | ||
|
2ed3c087b8 | ||
|
fb4c6e04aa | ||
|
b50c762dab | ||
|
9f878c9e12 | ||
|
a89e32141f | ||
|
d174bd1497 | ||
|
2807a2200e | ||
|
6f98ecccf7 | ||
|
4b3f957c61 | ||
|
cfdfb044da | ||
|
d0faa3cb40 | ||
|
eaa8825aa5 | ||
|
4b5045a0bb | ||
|
5593f19e1c | ||
|
daa422aee4 | ||
|
8b2fc71f92 | ||
|
c489f2a4f4 | ||
|
ea88f5eece | ||
|
5f07cb6db4 | ||
|
b4868a54e6 | ||
|
ae081e4b9f | ||
|
0403b75fe8 | ||
|
d3eef146cb | ||
|
8df624f2c0 | ||
|
e55cf754b3 | ||
|
a8e9f69c22 | ||
|
265149ca11 | ||
|
ad15679588 | ||
|
b6d845b734 | ||
|
8ad8d942d0 | ||
|
3259e16ada | ||
|
8bc217e9a1 | ||
|
fea83a38b2 | ||
|
9b41e6e732 | ||
|
d4558f533a | ||
|
0b6a589827 | ||
|
92c2cfc498 | ||
|
4c6aacac50 | ||
|
6e053fc117 | ||
|
50726b4f07 | ||
|
6c22ad6d27 | ||
|
095041be61 | ||
|
0790493c53 | ||
|
fcbfd8e9a7 | ||
|
12a895b9df | ||
|
5e1fdef5d4 | ||
|
27b4274d38 | ||
|
73e0e18ebc | ||
|
37356679cc | ||
|
1630fb96b7 | ||
|
3db2848169 | ||
|
fbf89448af | ||
|
936acc0326 | ||
|
cf661e7e15 | ||
|
f043830bc4 | ||
|
b43c9485b8 | ||
|
54201a2075 | ||
|
58228834fc | ||
|
db7e4b960c | ||
|
7385dd82d9 | ||
|
347466d792 | ||
|
84f7cd8539 | ||
|
aa313bdaa4 | ||
|
c9c7e124cc | ||
|
293e191f1e | ||
|
6098d67d92 | ||
|
795e2475dd | ||
|
66e5e9a3d0 | ||
|
27a806ae6d | ||
|
1a7fa62619 | ||
|
58b512b8b2 | ||
|
c5d21bc084 | ||
|
f3c4b709df | ||
|
f334604071 | ||
|
d48a3a6d8c | ||
|
9008caecae | ||
|
ad6b231f74 | ||
|
951fed29bd | ||
|
1699ec0010 | ||
|
211bb6b2f0 | ||
|
0c436a9f2f | ||
|
ec6af9ddf8 | ||
|
14f8f93e76 | ||
|
3b4126c302 | ||
|
a8c4c1967b | ||
|
29e67a0d8a | ||
|
7264dd5625 | ||
|
8030380f89 | ||
|
c28c31aedb | ||
|
63ce6a9f3f | ||
|
3b1aa9994f | ||
|
28ccc9797a | ||
|
14d85715b0 | ||
|
1f93ae7972 | ||
|
90f150df3d | ||
|
8a7fc81580 | ||
|
8a4c3ac121 | ||
|
95df0f6cda | ||
|
373d2bc504 | ||
|
75db34a270 | ||
|
c61e77469f | ||
|
659797c3fa | ||
|
3122f2fee9 | ||
|
97790d6168 | ||
|
884864c970 | ||
|
d78878d4c8 | ||
|
2c418bd359 | ||
|
da51b25c1c | ||
|
54a04dfb49 | ||
|
857b5adec4 | ||
|
fb873e1463 | ||
|
96bef17f44 | ||
|
4dcaa152c7 | ||
|
b67339662c | ||
|
3ffefcd2d8 | ||
|
60794cb3e1 |
@ -413,9 +413,675 @@
|
||||
"name": "Max Beizer",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/2006658?v=4",
|
||||
"profile": "https://www.maxbeizer.com",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "E3V3A",
|
||||
"name": "E:V:A",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/194392?v=4",
|
||||
"profile": "http://tinyurl.com/nwmj4as",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "GaboFDC",
|
||||
"name": "Gabriel",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/1425500?v=4",
|
||||
"profile": "https://github.com/GaboFDC",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "AndrewScibek",
|
||||
"name": "Andrew Scibek",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/10111411?v=4",
|
||||
"profile": "https://github.com/AndrewScibek",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "FriedCosey",
|
||||
"name": "FriedCosey",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/29709822?v=4",
|
||||
"profile": "https://github.com/FriedCosey",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "michelegera",
|
||||
"name": "Michele Gerarduzzi",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/3891?v=4",
|
||||
"profile": "https://michelegera.dev/",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "rudolphjacksonm",
|
||||
"name": "Jack Morris",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/13438569?v=4",
|
||||
"profile": "https://github.com/rudolphjacksonm",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "foorb",
|
||||
"name": "foorb",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/14993807?v=4",
|
||||
"profile": "https://github.com/foorb",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "baberlevi",
|
||||
"name": "Levi Baber",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/5819098?v=4",
|
||||
"profile": "http://researchit.las.iastate.edu",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "gnanderson",
|
||||
"name": "Graham Anderson",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/38514?v=4",
|
||||
"profile": "https://github.com/gnanderson",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "bosr",
|
||||
"name": "Romain Bossart",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/1936828?v=4",
|
||||
"profile": "https://github.com/bosr",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "sosiska",
|
||||
"name": "Kirill Motkov",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/969838?v=4",
|
||||
"profile": "http://eonix.ru",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "Choromanski",
|
||||
"name": "Brian Choromanski",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/3665694?v=4",
|
||||
"profile": "http://www.BrianChoromanski.com",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "Sean-Der",
|
||||
"name": "Sean DuBois",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/1302304?v=4",
|
||||
"profile": "http://siobud.com",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "gary-kim",
|
||||
"name": "Gary Kim",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/47195730?v=4",
|
||||
"profile": "https://github.com/gary-kim",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "DylanBartels",
|
||||
"name": "Dylan",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/6660171?v=4",
|
||||
"profile": "https://dylanbartels.com",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "l13t",
|
||||
"name": "Dmytro Prokhorenkov",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/1990354?v=4",
|
||||
"profile": "http://liet.me",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "elliotrushton",
|
||||
"name": "Elliot",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/590442?v=4",
|
||||
"profile": "https://github.com/elliotrushton",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "chenrui333",
|
||||
"name": "chenrui",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/1580956?v=4",
|
||||
"profile": "http://chenrui.dev",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "sudermanjr",
|
||||
"name": "Andrew Suderman",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/7624765?v=4",
|
||||
"profile": "https://github.com/sudermanjr",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "rwhogg",
|
||||
"name": "Bob 'Wombat' Hogg",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/2373856?v=4",
|
||||
"profile": "https://github.com/rwhogg",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "hxw",
|
||||
"name": "Christopher Hall",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/143462?v=4",
|
||||
"profile": "https://github.com/hxw",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "hneiva",
|
||||
"name": "Heitor Neiva",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/3451557?v=4",
|
||||
"profile": "https://github.com/hneiva",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "herbygillot",
|
||||
"name": "Herby Gillot",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/618376?v=4",
|
||||
"profile": "https://github.com/herbygillot",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "brudil",
|
||||
"name": "James Canning",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/382352?v=4",
|
||||
"profile": "http://brudil.com",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "jeffz",
|
||||
"name": "jeffz",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/45892?v=4",
|
||||
"profile": "https://twitter.com/jeffz4000",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "mikkeljuhl",
|
||||
"name": "Mikkel Jeppesen Juhl",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/1764035?v=4",
|
||||
"profile": "https://mikkeljuhl.com",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "lesteenman",
|
||||
"name": "Erik",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/963290?v=4",
|
||||
"profile": "https://github.com/lesteenman",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "nyourchuck",
|
||||
"name": "Nate Yourchuck",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/155574?v=4",
|
||||
"profile": "https://github.com/nyourchuck",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "Ameobea",
|
||||
"name": "Casey Primozic",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/4335849?v=4",
|
||||
"profile": "https://cprimozic.net/",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "andor-pierdelacabeza",
|
||||
"name": "Alvaro [Andor]",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/2430915?v=4",
|
||||
"profile": "http://pierdelacabeza.com/maruja",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "Midnight-Conqueror",
|
||||
"name": "Joel Valentine",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/17101621?v=4",
|
||||
"profile": "https://github.com/Midnight-Conqueror",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "v-braun",
|
||||
"name": "Viktor Braun",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/4738210?v=4",
|
||||
"profile": "https://www.viktor-braun.de",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "ChrisDBrown",
|
||||
"name": "ChrisDBrown",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/3877652?v=4",
|
||||
"profile": "https://www.chrisdbrown.co.uk/",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "Narengowda",
|
||||
"name": "Narendra L",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/582821?v=4",
|
||||
"profile": "https://narengowda.github.io/",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "ibaum",
|
||||
"name": "ibaum",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/24609103?v=4",
|
||||
"profile": "https://github.com/ibaum",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "noxer",
|
||||
"name": "Tim Scheuermann",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/566185?v=4",
|
||||
"profile": "https://github.com/noxer",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "indradhanush",
|
||||
"name": "Indradhanush Gupta",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/2682729?v=4",
|
||||
"profile": "https://indradhanush.github.io/",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "VictorAvelar",
|
||||
"name": "Victor Hugo Avelar Ossorio",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/7926849?v=4",
|
||||
"profile": "https://victoravelar.com",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "scw007",
|
||||
"name": "Steven Whitehead",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/4001640?v=4",
|
||||
"profile": "https://github.com/scw007",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "lawrencecraft",
|
||||
"name": "Lawrence Craft",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/660580?v=4",
|
||||
"profile": "https://github.com/lawrencecraft",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "aviaviavi",
|
||||
"name": "Avi Press",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1388071?v=4",
|
||||
"profile": "http://avi.press",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "Tardog",
|
||||
"name": "Sarah Kraßnigg",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/22562624?v=4",
|
||||
"profile": "https://github.com/Tardog",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "jmks",
|
||||
"name": "Jason Schweier",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/4923990?v=4",
|
||||
"profile": "http://jmks.ca",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "massa1240",
|
||||
"name": "Massa",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/8268483?v=4",
|
||||
"profile": "https://github.com/massa1240",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "Boot-Error",
|
||||
"name": "Vighnesh SK",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/8546140?v=4",
|
||||
"profile": "http://boot-error.github.io",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "alexfornuto",
|
||||
"name": "Alex Fornuto",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/2349184?v=4",
|
||||
"profile": "http://alexfornuto.com",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "stevenwhitehead",
|
||||
"name": "stevenwhitehead",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/30630257?v=4",
|
||||
"profile": "https://github.com/stevenwhitehead",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "jdenoy-saagie",
|
||||
"name": "Johan Denoyer",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/55875303?v=4",
|
||||
"profile": "https://github.com/jdenoy-saagie",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "caalberts",
|
||||
"name": "Albert Salim",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/4749355?v=4",
|
||||
"profile": "https://albertsalim.dev",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "felicianotech",
|
||||
"name": "Ricardo N Feliciano",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/6017470?v=4",
|
||||
"profile": "https://Feliciano.Tech",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "3mard",
|
||||
"name": "Omer Davutoglu",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/42009880?v=4",
|
||||
"profile": "https://github.com/3mard",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "hemu",
|
||||
"name": "Hemu",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/1871299?v=4",
|
||||
"profile": "https://github.com/hemu",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "Daanikus",
|
||||
"name": "Dan Bent",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/18027087?v=4",
|
||||
"profile": "https://github.com/Daanikus",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "C123R",
|
||||
"name": "C123R",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/20225764?v=4",
|
||||
"profile": "https://cizer.dev",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "madepolli",
|
||||
"name": "Matjaž Depolli",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/7237000?v=4",
|
||||
"profile": "https://github.com/madepolli",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "schoentoon",
|
||||
"name": "Toon Schoenmakers",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/417618?v=4",
|
||||
"profile": "https://blog.schoentoon.blue",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "TDHTTTT",
|
||||
"name": "TDHTTTT",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/24703459?v=4",
|
||||
"profile": "http://tdhttt.com",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "jottr",
|
||||
"name": "jottr",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/2744198?v=4",
|
||||
"profile": "https://github.com/jottr",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "NickyMateev",
|
||||
"name": "Nikolay Mateev",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/15074116?v=4",
|
||||
"profile": "https://www.linkedin.com/in/nikolay-mateev-79187b167/",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "Gibstick",
|
||||
"name": "Charlie Wang",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1320418?v=4",
|
||||
"profile": "https://charliewang.io",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "liyiheng",
|
||||
"name": "liyiheng",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/16461061?v=4",
|
||||
"profile": "https://github.com/liyiheng",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "bjoernw",
|
||||
"name": "Bjoern Weidlich",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/1467156?v=4",
|
||||
"profile": "https://bjoern.svbtle.com",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "firecat53",
|
||||
"name": "Scott Hansen",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/568113?v=4",
|
||||
"profile": "https://github.com/firecat53",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "davidsbond",
|
||||
"name": "David Bond",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/6227720?v=4",
|
||||
"profile": "https://davidsbond.github.io",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "yesnault",
|
||||
"name": "Yvonnick Esnault",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/395454?v=4",
|
||||
"profile": "https://github.com/yesnault",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "leterio",
|
||||
"name": "Vinícius Letério",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/15060358?v=4",
|
||||
"profile": "https://github.com/leterio",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "acaloiaro",
|
||||
"name": "Adriano",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/3331648?v=4",
|
||||
"profile": "https://adriano.fyi",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "jonhadfield",
|
||||
"name": "Jon Hadfield",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/843944?v=4",
|
||||
"profile": "https://github.com/jonhadfield",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "Tdnshah",
|
||||
"name": "Tejas Shah",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/13272752?v=4",
|
||||
"profile": "https://github.com/Tdnshah",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "mogensen",
|
||||
"name": "Frederik Mogensen",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/592710?v=4",
|
||||
"profile": "https://github.com/mogensen",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "rsaarelm",
|
||||
"name": "Risto Saarelma",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/41840?v=4",
|
||||
"profile": "https://github.com/rsaarelm",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "sam-github",
|
||||
"name": "Sam Roberts",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/17607?v=4",
|
||||
"profile": "https://sam-github.github.io/",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "gerchardon",
|
||||
"name": "gerchardon",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/5973160?v=4",
|
||||
"profile": "https://github.com/gerchardon",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "mryanmurphy",
|
||||
"name": "Matt",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/641427?v=4",
|
||||
"profile": "https://github.com/mryanmurphy",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "ripienaar",
|
||||
"name": "R.I.Pienaar",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/82342?v=4",
|
||||
"profile": "http://devco.net/",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "fmotrifork",
|
||||
"name": "Frederik Mogensen",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/18327738?v=4",
|
||||
"profile": "https://github.com/fmotrifork",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "aeter",
|
||||
"name": "aeter",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/238607?v=4",
|
||||
"profile": "https://github.com/aeter",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "timhwang21",
|
||||
"name": "Tim Hwang",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/5831434?v=4",
|
||||
"profile": "http://timhwang21.gitbook.io",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "cyingfan",
|
||||
"name": "Ying Fan Chong",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/10404961?v=4",
|
||||
"profile": "http://about.me/yingfan",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "MartinJohns",
|
||||
"name": "Martin Johns",
|
||||
"avatar_url": "https://avatars1.githubusercontent.com/u/5269069?v=4",
|
||||
"profile": "https://github.com/MartinJohns",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "jamietanna",
|
||||
"name": "Jamie Tanna",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/3315059?v=4",
|
||||
"profile": "https://www.jvt.me",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "trimble",
|
||||
"name": "Todd Trimble",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/371317?v=4",
|
||||
"profile": "https://github.com/trimble",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "mhanberg",
|
||||
"name": "Mitchell Hanberg",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/5523984?v=4",
|
||||
"profile": "https://www.mitchellhanberg.com",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "franga2000",
|
||||
"name": "Miha Frangež",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/3891092?v=4",
|
||||
"profile": "https://franga2000.com",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "sahilister",
|
||||
"name": "Sahil Dhiman",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/52946452?v=4",
|
||||
"profile": "https://blog.sahilister.in/",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "applegreengrape",
|
||||
"name": "Pingzhou | 平舟",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/17727004?v=4",
|
||||
"profile": "https://pzoo.netlify.app/",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "YuviGold",
|
||||
"name": "Yuval Goldberg",
|
||||
"avatar_url": "https://avatars0.githubusercontent.com/u/29873449?v=4",
|
||||
"profile": "https://github.com/YuviGold",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "dabcoder",
|
||||
"name": "David Bouchare",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/5034531?v=4",
|
||||
"profile": "https://github.com/dabcoder",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "stone",
|
||||
"name": "Fredrik Steen",
|
||||
"avatar_url": "https://avatars3.githubusercontent.com/u/29077?v=4",
|
||||
"profile": "https://github.com/stone",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "zye1996",
|
||||
"name": "zye1996",
|
||||
"avatar_url": "https://avatars2.githubusercontent.com/u/28901953?v=4",
|
||||
"profile": "https://github.com/zye1996",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "pgaxatte",
|
||||
"name": "Pierre Gaxatte",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/30696904?v=4",
|
||||
"profile": "https://github.com/pgaxatte",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "xntrik",
|
||||
"name": "Christian Frichot",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/678260?v=4",
|
||||
"profile": "https://xntrik.wtf",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "LKaemmerling",
|
||||
"name": "Lukas Kämmerling",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/4281581?v=4",
|
||||
"profile": "https://lukas-kaemmerling.de",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "inetAnt",
|
||||
"name": "Antoine Meillet",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/1765366?v=4",
|
||||
"profile": "https://inetant.net/",
|
||||
"contributions": []
|
||||
},
|
||||
{
|
||||
"login": "cclauss",
|
||||
"name": "Christian Clauss",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/3709715?v=4",
|
||||
"profile": "https://www.patreon.com/cclauss",
|
||||
"contributions": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7
|
||||
"contributorsPerLine": 7,
|
||||
"commitConvention": "none"
|
||||
}
|
||||
|
1
.github/FUNDING.yml
vendored
Normal file
1
.github/FUNDING.yml
vendored
Normal file
@ -0,0 +1 @@
|
||||
github: senorprogrammer
|
16
.github/ISSUE_TEMPLATE/Bug.md
vendored
16
.github/ISSUE_TEMPLATE/Bug.md
vendored
@ -1,16 +1,6 @@
|
||||
---
|
||||
name: Bug Report
|
||||
about: Something is broken?
|
||||
name: 🐞 Report a Bug
|
||||
about: Tell us what's broken
|
||||
---
|
||||
|
||||
#### What's the problem?
|
||||
|
||||
|
||||
#### How did you expect it to behave?
|
||||
|
||||
|
||||
#### Operating system
|
||||
|
||||
#### Terminal program & version
|
||||
|
||||
#### WTF version
|
||||
## What's broken?
|
||||
|
11
.github/ISSUE_TEMPLATE/Feature.md
vendored
11
.github/ISSUE_TEMPLATE/Feature.md
vendored
@ -1,11 +1,6 @@
|
||||
---
|
||||
name: Feature Request
|
||||
about: You have a neat idea that should be implemented?
|
||||
name: ⚡️ Request a Feature
|
||||
about: Tell us what it should do
|
||||
---
|
||||
|
||||
#### What problem does this solve?
|
||||
|
||||
|
||||
#### How do envision it working?
|
||||
|
||||
|
||||
## What should it do?
|
||||
|
6
.github/ISSUE_TEMPLATE/Support.md
vendored
6
.github/ISSUE_TEMPLATE/Support.md
vendored
@ -1,8 +1,8 @@
|
||||
---
|
||||
name: ❓ Support Question
|
||||
about: Have a problem that you can't figure out?
|
||||
name: ❓Ask a Question
|
||||
about: Tell us how we can help
|
||||
---
|
||||
|
||||
#### What problem are you having and how can we help?
|
||||
## How can we help?
|
||||
|
||||
|
||||
|
5
.github/PULL_REQUEST_TEMPLATE/Improvement.md
vendored
5
.github/PULL_REQUEST_TEMPLATE/Improvement.md
vendored
@ -3,9 +3,6 @@ name: Improvement
|
||||
about: You have some improvement to make wtf better?
|
||||
---
|
||||
|
||||
#### What problem does this solve?
|
||||
|
||||
|
||||
#### Is this related to an existing Issue? If so, which one?
|
||||
Thanks for submitting a pull request. Please provide enough information so that others can review your pull request.
|
||||
|
||||
|
||||
|
4
.github/PULL_REQUEST_TEMPLATE/Other.md
vendored
4
.github/PULL_REQUEST_TEMPLATE/Other.md
vendored
@ -3,9 +3,7 @@ name: Other
|
||||
about: You have some other ideas you want to introduce?
|
||||
---
|
||||
|
||||
<!-- Thanks for submitting a pull request! Please provide enough information so that others can review your pull request. -->
|
||||
|
||||
#### What problem does this solve?
|
||||
Thanks for submitting a pull request. Please provide enough information so that others can review your pull request.
|
||||
|
||||
|
||||
|
||||
|
11
.github/dependabot.yml
vendored
Normal file
11
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: gomod
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: daily
|
||||
open-pull-requests-limit: 10
|
||||
reviewers:
|
||||
- senorprogrammer
|
||||
assignees:
|
||||
- senorprogrammer
|
51
.github/workflows/codeql-analysis.yml
vendored
Normal file
51
.github/workflows/codeql-analysis.yml
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
name: "Code scanning - action"
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: '0 3 * * 3,6'
|
||||
|
||||
jobs:
|
||||
CodeQL-Build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v1
|
||||
# Override language selection by uncommenting this and choosing your languages
|
||||
# with:
|
||||
# languages: go, javascript, csharp, python, cpp, java
|
||||
|
||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||
# If this step fails, then you should remove it and run the build manually (see below)
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v1
|
||||
|
||||
# ℹ️ Command-line programs to run using the OS shell.
|
||||
# 📚 https://git.io/JvXDl
|
||||
|
||||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
||||
# and modify them (or add more) to build your code if your project
|
||||
# uses a compiled language
|
||||
|
||||
#- run: |
|
||||
# make bootstrap
|
||||
# make release
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v1
|
22
.github/workflows/golangci-lint.yml
vendored
Normal file
22
.github/workflows/golangci-lint.yml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
name: golangci-lint
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- v*
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
jobs:
|
||||
golangci:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v2
|
||||
with:
|
||||
# Required: the version of golangci-lint is required and must be
|
||||
# specified without patch version: we always use the latest patch version.
|
||||
# https://github.com/golangci/golangci-lint/releases
|
||||
version: v1.39
|
||||
args: ./...
|
30
.github/workflows/goreleaser.yml
vendored
Normal file
30
.github/workflows/goreleaser.yml
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
name: goreleaser
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
-
|
||||
name: Set up Go
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
-
|
||||
name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
|
70
.github/workflows/staticcheck.yml
vendored
Normal file
70
.github/workflows/staticcheck.yml
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
name: static check
|
||||
on: pull_request
|
||||
|
||||
jobs:
|
||||
imports:
|
||||
name: Imports
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: check
|
||||
uses: grandcolline/golang-github-actions@4356d0458ea4bfdb55fcb296437812acef970f9b
|
||||
with:
|
||||
run: imports
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
errcheck:
|
||||
name: Errcheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: check
|
||||
uses: grandcolline/golang-github-actions@4356d0458ea4bfdb55fcb296437812acef970f9b
|
||||
with:
|
||||
run: errcheck
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
#lint:
|
||||
#name: Lint
|
||||
#runs-on: ubuntu-latest
|
||||
#steps:
|
||||
#- uses: actions/checkout@master
|
||||
#- name: check
|
||||
#uses: grandcolline/golang-github-actions@4356d04
|
||||
#with:
|
||||
#run: lint
|
||||
#token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
shadow:
|
||||
name: Shadow
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: check
|
||||
uses: grandcolline/golang-github-actions@4356d0458ea4bfdb55fcb296437812acef970f9b
|
||||
with:
|
||||
run: shadow
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
staticcheck:
|
||||
name: StaticCheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: check
|
||||
uses: grandcolline/golang-github-actions@4356d0458ea4bfdb55fcb296437812acef970f9b
|
||||
with:
|
||||
run: staticcheck
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
#sec:
|
||||
#name: Sec
|
||||
#runs-on: ubuntu-latest
|
||||
#steps:
|
||||
#- uses: actions/checkout@master
|
||||
#- name: check
|
||||
#uses: grandcolline/golang-github-actions@4356d04
|
||||
#with:
|
||||
#run: sec
|
||||
#token: ${{ secrets.GITHUB_TOKEN }}
|
||||
#flags: "-exclude=G104"
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -19,6 +19,7 @@ gcal/client_secret.json
|
||||
gspreadsheets/client_secret.json
|
||||
profile.pdf
|
||||
report.*
|
||||
.vscode
|
||||
|
||||
# All things node
|
||||
node_modules/
|
||||
|
18
.golangci.yml
Normal file
18
.golangci.yml
Normal file
@ -0,0 +1,18 @@
|
||||
run:
|
||||
timeout: 2m
|
||||
|
||||
linters:
|
||||
enable:
|
||||
- vet
|
||||
- errcheck
|
||||
- staticcheck
|
||||
# - dupl
|
||||
# - funlen
|
||||
# - goconst
|
||||
# - gocritic
|
||||
- gofmt
|
||||
# - golint
|
||||
# - misspell
|
||||
# - stylecheck
|
||||
- unconvert
|
||||
# - whitespace
|
@ -1,15 +1,30 @@
|
||||
before:
|
||||
hooks:
|
||||
- make install
|
||||
env:
|
||||
- GO111MODULE=on
|
||||
- GOPROXY="https://proxy.golang.org,direct"
|
||||
|
||||
archives:
|
||||
- id: default
|
||||
wrap_in_directory: true
|
||||
|
||||
builds:
|
||||
- binary: wtf
|
||||
- binary: wtfutil
|
||||
goos:
|
||||
- darwin
|
||||
- linux
|
||||
goarch:
|
||||
- 386
|
||||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
|
||||
archive:
|
||||
wrap_in_directory: true
|
||||
before:
|
||||
hooks:
|
||||
- make install
|
||||
|
||||
brews:
|
||||
-
|
||||
name: wtfutil
|
||||
homepage: 'https://wtfutil.com'
|
||||
description: 'The personal information dashboard for your terminal.'
|
||||
tap:
|
||||
owner: wtfutil
|
||||
name: homebrew-wtfutil
|
||||
|
@ -1,13 +1,14 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- "1.10.x"
|
||||
- "1.11.x"
|
||||
sudo: false
|
||||
- "1.16.x"
|
||||
|
||||
before_install:
|
||||
# Make sure travis builds work for forks
|
||||
- mkdir -p $TRAVIS_BUILD_DIR $GOPATH/src/github.com/wtfutil
|
||||
- test ! -d $GOPATH/src/github.com/wtfutil/wtf && mv $TRAVIS_BUILD_DIR $GOPATH/src/github.com/wtfutil/wtf || true
|
||||
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/github.com/wtfutil/wtf
|
||||
- cd $HOME/gopath/src/github.com/wtfutil/wtf
|
||||
- export GOPROXY="https://proxy.golang.org,direct"
|
||||
|
||||
script: go get ./... && go get github.com/go-test/deep && go test -v github.com/wtfutil/wtf/wtf_tests/...
|
||||
script: go get ./... && ./scripts/check-uncommitted-vendor-files.sh && go test -v github.com/wtfutil/wtf/...
|
||||
|
584
CHANGELOG.md
584
CHANGELOG.md
@ -4,8 +4,590 @@
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Yahoo Finance module added, by [@inetAnt](https://github.com/inetAnt)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Fixed error closing the Jira module response body, [#1070](https://github.com/wtfutil/wtf/issues/1070) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
|
||||
## v0.36.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* HealthChecks module added, by [@stone](https://github.com/stone)
|
||||
* Asana module added, by [@xntrik](https://github.com/xntrik)
|
||||
* Kubernetes module now displays the Ready Replicas and Total Replicas count, by [@LKaemmerling](https://github.com/LKaemmerling)
|
||||
* Now builds using Go 1.16, which provides support for Apple's M1 ARM hardware, by [@LKaemmerling](https://github.com/LKaemmerling)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Numerous dangling response bodies closed, by [@dabcoder](https://github.com/dabcoder)
|
||||
* HackerNews read-on-response error fixed, by [@LKaemmerling](https://github.com/LKaemmerling)
|
||||
* CircleCI read-on-response error fixed, by [@dabcoder](https://github.com/dabcoder)
|
||||
|
||||
## v0.35.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* CircleCI module now supports `numberOfBuilds` setting defining how many builds to display, [#1020](https://github.com/wtfutil/wtf/issues/1020) by [@dabcoder](https://github.com/dabcoder)
|
||||
* The <kbd>\\</kbd> key now opens module documentation in the browser for the currently-focused module, by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* Krisinformation module added, by [@stone](https://github.com/stone)
|
||||
* Covid module has been added, by [@dabcoder](https://github.com/dabcoder)
|
||||
* Support for a "Language" configuration key added. Supports any BCP 47 tag for identifying a langauge, by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* CryptoLive prices update again, [#1041](https://github.com/wtfutil/wtf/issues/1041) by [@zye1996](https://github.com/zye1996)
|
||||
|
||||
## v0.34.0
|
||||
2020-11-08
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* DigitalOcean module now supports custom column definitions in the default layout. See [the docs](https://wtfutil.com/modules/digitalocean/) for details, [#986](https://github.com/wtfutil/wtf/issues/986) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* Finnhub stock quotes module added, [#930](https://github.com/wtfutil/wtf/issues/930) by [@applegreengrape](https://github.com/applegreengrape)
|
||||
* Grafana Alerts module added, by [@schoentoon](https://github.com/schoentoon)
|
||||
|
||||
### 👍 Updated
|
||||
|
||||
* Updated `google.golang.org/api` from 0.30.0 to 0.33.0
|
||||
* Updated `github.com/digitalocean/godo` from 1.46.0 to 1.52.0
|
||||
* Updated `github.com/xanzy/go-gitlab` from 0.38.1 to 0.39.0
|
||||
* Updated `github.com/zorkian/go-datadog-api` from 2.29.0+incompatible to 2.30.0+incompatible
|
||||
* Updated `golang.org/x/text` from 0.3.3 to 0.3.4
|
||||
|
||||
## v0.33.0
|
||||
2020-10-13
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* FeedReader module supports [display mode switching](https://github.com/wtfutil/wtf/pull/976) via the `t` key, by [@cyingfan](https://github.com/cyingfan)
|
||||
* Clocks module now supports `natural` ordering option, [#896](https://github.com/wtfutil/wtf/issues/896) by [@seanstoppable](https://github.com/Seanstoppable)
|
||||
* Exit banner message added, by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* [UptimeRobot module added](https://github.com/wtfutil/wtf/pull/983), by [@franga2000](https://github.com/franga2000)
|
||||
* Gitlab module now defaults the domain to `https://gitlab.com`, by [@jmks](https://github.com/jmks)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Exchange Rates module now displays rates in alphabetical order, sorted by the base rate, by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* Feed Reader module no longer crashes on feeds that don't have a published date, [#958](https://github.com/wtfutil/wtf/issues/958) by [@cyingfan](https://github.com/cyingfan)
|
||||
* Stray blank lines no longer appear at the end of highlightable lists, [#977](https://github.com/wtfutil/wtf/pull/977) by [@cyingfan](https://github.com/cyingfan)
|
||||
* `config.yml` now properly set to `0600` instead of `0666`, by [@cyingfan](https://github.com/cyingfan)
|
||||
* Now blank-imports the `time/tzinfo` package to provide timezone support for Windows users, [#994](https://github.com/wtfutil/wtf/issues/994) by [@trimble](https://github.com/trimble)
|
||||
|
||||
### 👍 Updated
|
||||
|
||||
* Updated `github.com/gdamore/tcell` from 1.3.0 to 1.4.0
|
||||
* Updated `github.com/shirou/gopsutil` from 2.20.7+incompatible to 2.20.9+incompatible
|
||||
* Updated `github.com/mmcdole/gofeed` from 1.0.0 to 1.1.0
|
||||
* Updated `github.com/digitalocean/godo` from 1.42.1 to 1.46.0
|
||||
* Updated `github.com/xanzy/go-gitlab` from 0.33.0 to 0.38.1
|
||||
* Updated `github.com/adlio/trello` from 1.7.0 to 1.8.0
|
||||
* Updated `github.com/alecthomas/chroma` from 0.8.0 to 0.8.1
|
||||
* Updated `github.com/nicklaw5/helix` from 0.5.9 to 0.7.0
|
||||
|
||||
* Now requires Go 1.15 for compilation in Dockerfiles and go.mod, by [@seanstoppable](https://github.com/Seanstoppable)
|
||||
|
||||
## v0.32.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* PagerDuty module now supports `showOncallEnd` setting, which determines whether or not to display the oncall rotation end date, by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* Exchange Rates module now supports `precision` setting, which determines how many decimal places to display, [#897](https://github.com/wtfutil/wtf/issues/897) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Todo module's edit modal now shows up quickly, [#876](https://github.com/wtfutil/wtf/issues/876) by [@aeter](https://github.com/aeter)
|
||||
* Jira module title now displays properly, [#942](https://github.com/wtfutil/wtf/issues/942) by [@timhwang21](https://github.com/timhwang21)
|
||||
|
||||
### 👍 Updated
|
||||
|
||||
* Updated `alecthomas/chroma` from 0.7.3 to 0.8.0
|
||||
* Updated `digitalocean/godo` from 1.38.0 to 1.42.1
|
||||
* Updated `google.golang.org/api` from 0.29.0 to 0.30.0
|
||||
* Updated `shirou/gopsutil` from 2.20.6+incompatible to 2.20.7+incompatible
|
||||
|
||||
## v0.31.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* [docker-credential-helpers](https://github.com/docker/docker-credential-helpers) support added to provide optional securing of module secrets, [#517](https://github.com/wtfutil/wtf/issues/517) by [@sam-github](https://github.com/sam-github)
|
||||
* `make lint` now uses [golangci-lint](https://github.com/golangci/golangci-lint-action), by [@sam-github](https://github.com/sam-github)
|
||||
* GitHub module now supports per-section configuration, [#864](https://github.com/wtfutil/wtf/issues/864) by [@mryanmurphy](https://github.com/mryanmurphy)
|
||||
* PagerDuty module now accepts Team ID and User ID as filters, by [@mryanmurphy](https://github.com/mryanmurphy)
|
||||
* Weather module now supports a `useEmoji` setting, toggling the use of emoji characters in the title, by [@jonhadfield](https://github.com/jonhadfield)
|
||||
* Pocket documentation added, by [@3mard](https://github.com/3mard)
|
||||
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* GitLab Todo module now allows domain to be set, defaults to `https://gitlab.com`, by [@gerchardon](https://github.com/gerchardon)
|
||||
* Pi-hole module now works with Pi-hole v4 and v5, by [@jonhadfield](https://github.com/jonhadfield)
|
||||
* Null pointer exception fixed in VictorOps module, by [@ripienaar](https://github.com/ripienaar)
|
||||
|
||||
### 👍 Updated
|
||||
|
||||
* Updated `google.golang.org/api` from 0.25.0 to 0.29.0
|
||||
* Updated `pkg/profile` from 1.4.0 to 1.5.0
|
||||
* Updated `nicklaw5/helix` from 0.5.8 to 0.5.9
|
||||
* Updated `digitalocean/godo` from 1.37.0 to 1.38.0
|
||||
* Updated `gopkg.in/yaml.v2` from 2.2.8 to 2.3.0
|
||||
* Updated `xanzy/go-gitlab` from 0.31.0 to 0.33.0
|
||||
* Updated `stretchr/testify` from 1.5.1 to 1.6.1
|
||||
* Updated `golang.org/x/text` from 0.3.2 to 0.3.3
|
||||
* Updated `shirou/gopsutil` from 2.20.4+incompatible to 2.20.6+incompatible
|
||||
|
||||
## v0.30.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Expansive keyboard controls for the [GitLab](https://wtfutil.com/modules/gitlab/) module, by [@mogensen](https://github.com/mogensen)
|
||||
* [IPInfo](https://wtfutil.com/modules/ipaddress/ipinfo/) module now supports IPv6 lookup, by [@acaloiaro](https://github.com/acaloiaro)
|
||||
* The GitHub repo now runs a set of actions that lint PRs for code quality and conformity and comment in-line on the PRs. See here for action details https://github.com/wtfutil/wtf/actions
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Random capital letters around display, [#811](https://github.com/wtfutil/wtf/issues/811) by [@jonhadfield](https://github.com/jonhadfield)
|
||||
* [Feed Reader](https://wtfutil.com/modules/feedreader/) module now properly sorts multi-feed items by date, by [@rsaarelm](https://github.com/rsaarelm)
|
||||
|
||||
### 👍 Updated
|
||||
|
||||
* Updated `zorkian/go-datadog-api` from 2.28.0+incompatible to 2.29.0+incompatible
|
||||
* Updated `shirou/gopsutil` from 2.20.3+incompatible to 2.20.4+incompatible
|
||||
* Updated `google.golang.org/api` from 0.22.0 to 0.23.0
|
||||
|
||||
## 0.29.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* gCal module now has a `showEndTime` boolean option for displaying meeting end times, by [@acaloiaro](https://github.com/acaloiaro)
|
||||
* [Pi-hole](https://wtfutil.com/modules/pihole/) module added, by [@jonhadfield](https://github.com/jonhadfield)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Docker module subheading display, [#847](https://github.com/wtfutil/wtf/issues/847) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* Improved display of currencies for the Exchange Rate module, by [@indradhanush](https://github.com/indradhanush)
|
||||
|
||||
### 👍 Updated
|
||||
|
||||
* Updated `nicklaw5/helix` from 0.5.7 to 0.5.8
|
||||
* Updated `digitalocean/godo` from 1.34.0 to 1.35.1
|
||||
* Updated `xanzy/go-gitlab` from 0.28.0 to 0.31.0
|
||||
* Updated `shirou/gopsutil` from 2.20.2+incompatible to 2.20.3+incompatible
|
||||
* Updated `alecthomas/chroma` from 0.7.1 to 0.7.2
|
||||
* Updated `google.golang.org/api` from 0.21.0 to 0.22.0
|
||||
|
||||
## v0.28.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Support for customizing CPU, Mem, and Swap display in ResourceUsage, by [@leterio](https://github.com/leterio)
|
||||
|
||||
### 👍 Updated
|
||||
|
||||
* Now prefers Go 1.14 for compilation (should still work under 1.13 however)
|
||||
* Updated `shirou/gopsutil` from 2.20.1+incompatible to 2.20.2+incompatible
|
||||
* Updated `google.golang.org/api` from 0.17.0 to 0.20.0
|
||||
* Updated `digitalocean/godo` from 1.30.0 to 1.32.0
|
||||
* Updated `xanzy/go-gitlab` from 0.26.0 to 0.28.0
|
||||
* Updated `adlio/trello` from 1.6.0 to 1.7.0
|
||||
* Updated `zorkian/go-datadog-api` from 2.27.0+incompatible to 2.28.0+incompatible
|
||||
|
||||
## 0.27.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* GitLab Todo module added, by [@elliotrushton](https://github.com/elliotrushton)
|
||||
* [CDS](https://wtfutil.com/modules/cds/) module added, by [@yesnault](https://github.com/yesnault)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* The `vendor` directory has been removed, [#792](https://github.com/wtfutil/wtf/issues/792) by [@bjoernw](https://github.com/bjoernw)
|
||||
|
||||
### 👍 Updated
|
||||
|
||||
* Updated `zorkian/go-datadog-api` from 2.26.0+incompatible to 2.27.0+incompatible
|
||||
* Updated `google.golang.org/api` from 0.15.0 to 0.17.0
|
||||
* Updated `github.com/nicklaw5/helix` from 0.5.5 to 0.5.7
|
||||
* Updated `xanzy/go-gitlab` from 0.23.0 to 0.26.0
|
||||
* Updated `stretchr/testify` from o.4.0 to 0.5.1
|
||||
|
||||
## 0.26.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* `myName` config setting added to PagerDuty module, by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* `withDate` config setting added to Digital Clock module, by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* Twitch module added, by [@bjoernw](https://github.com/bjoernw)
|
||||
* HackerNews module now opens HN comments when there is no alternative external link, [#758](https://github.com/wtfutil/wtf/issues/758) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* gCal module now now allows users to hide all-day events, [#733](https://github.com/wtfutil/wtf/issues/733) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* SpaceX module added, by [@bjoernw](https://github.com/bjoernw)
|
||||
* Support for obeying `XDG_CONFIG_HOME` when set, [#699](https://github.com/wtfutil/wtf/issues/699) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Module templating working again, [#748](https://github.com/wtfutil/wtf/issues/748) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* CmdRunner title spacing issue fixed, [#784](https://github.com/wtfutil/wtf/issues/784) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* Colors in cmdrunner fixed when using nodejs chalk et al., [#618](https://github.com/wtfutil/wtf/issues/618) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* Docker buid instructions updated and improved, by [@firecat53](https://github.com/firecat53)
|
||||
* Kubernetes module can now be used with multiple contexts, [#809](https://github.com/wtfutil/wtf/issues/809) by [@davidsbond](https://github.com/davidsbond)
|
||||
|
||||
### 👍 Updated
|
||||
|
||||
* Updated `digitalocean/godo` from 1.22.0 to 1.30.0
|
||||
* Updated `google.golang.org/api` from 0.14.0 to 0.15.0
|
||||
* Updated `alecthomas/chroma` from 0.7.0 to 0.7.1
|
||||
* Updated `pkg/errors` from 0.8.1 to 0.9.1
|
||||
* Updated `xanzy/go-gitlab` from 0.22.2 to 0.23.0
|
||||
* Updated `shirou/gopsutil` from 2.19.11 to 2.20.1
|
||||
* Updated `zorkian/go-datadog-api` from 2.25.0 to 2.26.0
|
||||
* Updated `gopkg.in/yaml.v2` from 2.2.7 to 2.2.8
|
||||
* Updated `nicklaw5/helix` from 0.5.4 to 0.5.5
|
||||
|
||||
## 0.25.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* [DigitalOcean](https://wtfutil.com/modules/digitalocean/) module added, by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* [Transmission](https://wtfutil.com/modules/transmission/) module now supports a `hideComplete` configuration setting, by [@schoentoon](https://github.com/schoentoon)
|
||||
* Pocket module added, [#742] by [@3mard](https://github.com/3mard)
|
||||
* [Exchange Rates](https://wtfutil.com/modules/exchange_rates/) module added, by [@schoentoon](https://github.com/schoentoon)
|
||||
* [GitHub](https://wtfutil.com/modules/github/) modules supports 'p' keyboard command to open **p**ull requests, by [@NickyMateev](https://github.com/NickyMateev)
|
||||
* [GitHub](https://wtfutil.com/modules/github/) modules supports 'i' keyboard command to open **i**ssues, by [@NickyMateev](https://github.com/NickyMateev)
|
||||
* [Jenkins](https://wtfutil.com/modules/jenkins/) module now supports multi-configuration projects, by [@NickyMateev](https://github.com/NickyMateev)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Subreddit out of bounds error fixed, [#753](https://github.com/wtfutil/wtf/issues/753) by [@TDHTTTT](https://github.com/TDHTTTT)
|
||||
* Homebrew builds now contain version information, [#557](https://github.com/wtfutil/wtf/issues/557) by [@jottr](https://github.com/jottr)
|
||||
* CmdRunner flicker problem, [#732](https://github.com/wtfutil/wtf/issues/732) by [@Gibstick](https://github.com/Gibstick)
|
||||
|
||||
### 👍 Updated
|
||||
|
||||
* Switched from `gocenter.io` as the Go proxy to `proxy.golang.org`, by [@chenrui333](https://github.com/chenrui333)
|
||||
* Updated `go-datadog-api` to version 2.25.0+incompatible
|
||||
* Updated `adlio/trello` to version 1.6.0
|
||||
* Updated `alecthomas/chroma` to version 0.7.0
|
||||
* Updated `olekukonko/tablewriter` to version 0.0.3
|
||||
* Updated `pkg/profile` to version 1.4.0
|
||||
* Updated `yaml.v2` to 2.2.7
|
||||
* Updated `google.golang.org/api` to 0.14.0
|
||||
* Updated `xanzy/go-gitlab` to 0.22.2
|
||||
* Uodated `shirou/gopsutil` to 2.19.11+incompatible
|
||||
|
||||
|
||||
## v0.24.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Proper, usable [Docker file](https://github.com/wtfutil/wtf/blob/master/Dockerfile) added, by [@Boot-Error](https://github.com/Boot-Error)
|
||||
* [GitLab](https://wtfutil.com/modules/gitlab/) module displays issues assigned to, and opened by, the user, by [@caalberts](https://github.com/caalberts)
|
||||
* [TravisCI](https://wtfutil.com/modules/travisci/) now checks for uncommitted vendor changes, by [@indradhanush](https://github.com/indradhanush)
|
||||
* Football module added, by [@C123R](https://github.com/C123R)
|
||||
* [resourceuseage](https://wtfutil.com/modules/resourceusage/) now supports a `cpuCombined` setting, by [@madepolli](https://github.com/madepolli)
|
||||
* [Twitter Stats](https://wtfutil.com/modules/twitter/twittertweets/) module added, by [@Ameobea](https://github.com/Ameobea)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Github PRs do not count against issues, by [@alexfornuto](https://github.com/alexfornuto)
|
||||
* Todo scrolling now works properly, [#707](https://github.com/wtfutil/wtf/issues/707) by [3mard](https://github.com/3mard)
|
||||
* Configs with a missing `color` key now load properly, [#718](https://github.com/wtfutil/wtf/issues/718) and [#730](https://github.com/wtfutil/wtf/issues/730) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
|
||||
## 0.23.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* [Azure DevOps](https://wtfutil.com/modules/azure-devops/) module added, by [@v-braun](https://github.com/v-braun)
|
||||
* [Dev.to](https://wtfutil.com/modules/devto/) module added, by [@VictorAvelar](https://github.com/VictorAvelar)
|
||||
* [TravisCI]() module now supports enterprise endpoints, [#652](https://github.com/wtfutil/wtf/issues/652) by [@scw007](https://github.com/scw007)
|
||||
* [Subreddit](https://wtfutil.com/modules/subreddit/) module added, by [@lawrencecraft](https://github.com/lawrencecraft)
|
||||
* [gCal](https://wtfutil.com/modules/google/gcal/) module now supports a `hourFormat` setting for defining whether to display 12 or 24-hour times, [#665](https://github.com/wtfutil/wtf/issues/665) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* [Scarf](https://scarf.sh) installation instructions added to README, by [@aviaviavi](https://github.com/aviaviavi)
|
||||
* Spotify widget now supports colour themes, [#659](https://github.com/wtfutil/wtf/issues/659) by [@Tardog](https://github.com/Tardog)
|
||||
* [Buildkite](https://wtfutil.com/modules/buildkite/) module added, by [@jmks](https://github.com/jmks)
|
||||
* [Improvements](https://github.com/wtfutil/wtf/pull/680) to the [CmdRunner](https://wtfutil.com/modules/cmdrunner/) module, by [@noxer](https://github.com/noxer)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* gCal calendar event time colour can now be changed by setting the `eventTime` configuration setting, [#638](https://github.com/wtfutil/wtf/issues/638) by [@indradhanush](https://github.com/indradhanush)
|
||||
* [Clocks](https://wtfutil.com/modules/clocks/) now obeys global row colour settings, [#658](https://github.com/wtfutil/wtf/issues/658) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* [Transmission](https://wtfutil.com/modules/transmission/) module no longer blocks rendering when a Transmission daemon cannot be found, [#661](https://github.com/wtfutil/wtf/issues/661) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* [Trello](https://wtfutil.com/modules/trello/) module now respects project list order, [#664](https://github.com/wtfutil/wtf/issues/664) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* [Todo](https://wtfutil.com/modules/todo/) module now respects checkbox settings, [#616](https://github.com/wtfutil/wtf/issues/616) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* [Todoist](https://wtfutil.com/modules/todoist/) module now properly handles todo items with due date and times, [#645](https://github.com/wtfutil/wtf/issues/645) by [@massa1240](https://github.com/massa1240)
|
||||
* Invalid pointer error in [Azure DevOps](https://wtfutil.com/modules/azure-devops/) fixed by [@Boot-Error](https://github.com/Boot-Error)
|
||||
* Renamed slice error in [Dev](https://wtfutil.com/modules/devto/) fixed by [@Boot-Error](https://github.com/Boot-Error)
|
||||
|
||||
### 👍 Updated
|
||||
|
||||
* Updated `go-datadog-api` to version v2.24.0
|
||||
* Updated `go-github` to version 26.13
|
||||
* Updated `watcher` to version 1.0.7
|
||||
* Updated `google-api-go-client` to version 0.10.0
|
||||
* Updated `chroma` to version 0.6.7
|
||||
* Updated `go-gitlab` to version 0.20.1
|
||||
* Updated `trello` to version 1.4.0
|
||||
* Updated `tcell` to version 1.3.0
|
||||
* Updated `gopsutil` to version 2.19.9+incompatible
|
||||
* Updated `yaml` to version 2.2.4
|
||||
|
||||
## v0.22.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* [Arpansagovau](https://wtfutil.com/modules/weather_services/arpansagovau/) (arpansa.gov.au) module added, by [@jeffz](https://github.com/jeffz)
|
||||
* 'calendarReadLevel' setting added to gCal module, by [@mikkeljuhl](https://github.com/mikkeljuhl)
|
||||
* Todoist module now catches and displays API errors, by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* TravisCI sort orders now configurable, by [@nyourchuck](https://github.com/nyourchuck)
|
||||
* Google Analytics module now supports real-time metrics, [#581](https://github.com/wtfutil/wtf/issues/581) by [@Ameobea](https://github.com/Ameobea)
|
||||
* Colors in configuration can now be defined using long-form hex, i.e.: #ff0000, by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* GitHub module pull requests are now selectable and openable via keyboard, [#547](https://github.com/wtfutil/wtf/issues/547) by [@Midnight-Conqueror](https://github.com/Midnight-Conqueror)
|
||||
* [Docker](https://wtfutil.com/modules/docker/) module added, [#594](https://github.com/wtfutil/wtf/issues/594) by [@v-braun](https://github.com/v-braun)
|
||||
* NewRelic module now supports displaying data from multiple apps, [#471](https://github.com/wtfutil/wtf/issues/471) by [@ChrisDBrown](https://github.com/ChrisDBrown) and [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* [Digital Clock](https://wtfutil.com/modules/digitalclock/) module added, by [@Narengowda](https://github.com/Narengowda)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* ScrollableWidget bounds checking error fixed, [#578](https://github.com/wtfutil/wtf/issues/578) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* Now properly URL-decodes Jenkins branch names, [#575](https://github.com/wtfutil/wtf/issues/575) by [@lesteenman](https://github.com/lesteenman)
|
||||
* Jira column sizes render properly, [#574](https://github.com/wtfutil/wtf/issues/574) by [@lesteenman](https://github.com/lesteenman)
|
||||
* Todoist module updated to latest API version, by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* gCal colour highlighting working again, [#611](https://github.com/wtfutil/wtf/issues/611) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* Per-module background and text colour settings working again, [#568](https://github.com/wtfutil/wtf/issues/568) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* Git module no longer forces sorting of repositories, [#608](https://github.com/wtfutil/wtf/pull/608) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* GitHub PR icons render properly without phantom characters, by [@Midnight-Conqueror](https://github.com/Midnight-Conqueror)
|
||||
* GitLab configuration now takes a list of project paths, [#566](https://github.com/wtfutil/wtf/issues/566) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* Kubernetes configuration segfault fixed, [#549](https://github.com/wtfutil/wtf/issues/549) by [@ibaum](https://github.com/ibaum)
|
||||
|
||||
## v0.21.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Power Soure module support added for FreeBSD, by [@hxw](https://github.com/hxw)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Power indicator displays ∞ on Linux when fully-charged and on AC power, [#534](https://github.com/wtfutil/wtf/issues/534) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* Default background color is now the terminal background color, making transparency support possible in MacOS and Linux, by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* `xdg-open` now used as the opener for HTTP/HTTPS by default, by [@hxw](https://github.com/hxw)
|
||||
* Transmission port over-ride now working, [#565](https://github.com/wtfutil/wtf/issues/565) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* Default config is now created on first run, [#553](https://github.com/wtfutil/wtf/issues/553) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
|
||||
## v0.20.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Kubernetes module added, [#142](https://github.com/wtfutil/wtf/issues/142) by [@sudermanjr](https://github.com/sudermanjr)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Tab and Esc keys work properly in modal dialogs, [#520](https://github.com/wtfutil/wtf/issues/520) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* `wtfutil -m` flag now works with non-enabled modules, [#529](https://github.com/wtfutil/wtf/issues/529) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* Jenkins job filtering preserved across redraws, [#532](https://github.com/wtfutil/wtf/issues/532) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
|
||||
## v0.19.1
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Dockerfile, by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* Add build targets for arm and arm64 architectures, by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
|
||||
## v0.19.0
|
||||
|
||||
### ☠️ Breaking Change
|
||||
|
||||
* HIBP module now requires an API key to operate. See [Authentication and the Have I Been Pwned API](https://www.troyhunt.com/authentication-and-the-have-i-been-pwned-api/) for more details, [#508](https://github.com/wtfutil/wtf/issues/508) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* OpsGenie module now supports "region" configuration option ("us" or "eu"), by [@l13t](https://github.com/l13t)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Fixes the error message shown when an explicitly-specified custom config file cannot be found or cannot be read, by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* Rollbar module works again, [#507](https://github.com/wtfutil/wtf/issues/507) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* The default config that gets installed on first run is much improved, [#504](https://github.com/wtfutil/wtf/issues/504) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
* Default config file is now `chmod 0600` to ensure only the owning user can read it, by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
|
||||
## v0.18.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Google Analytics module, by [@DylanBartels](https://github.com/DylanBartels)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Now created ~/.config if that directory is missing, [#510](https://github.com/wtfutil/wtf/issues/510) by [@senorprogrammer](https://github.com/senorprogrammer)
|
||||
|
||||
## v0.17.1
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Fixes an issue in which the default config file was not being created on first run
|
||||
|
||||
## v0.17.0
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* FeedReader story sorting bug fixed
|
||||
* NewRelic dependency vendored
|
||||
|
||||
## v0.16.1
|
||||
## v0.16.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Config and recipe added for installing via Homebrew
|
||||
|
||||
## v0.15.0
|
||||
|
||||
### ❗️Changed
|
||||
|
||||
* The installed binary has been renamed from `wtf` to `wtfutil`. [Read more about it here](https://wtfutil.com/blog/2019-07-10-wtfutil-release/).
|
||||
|
||||
## v0.14.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* CmdRunner module now supports custom titles, by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* FeedReader module added (https://wtfutil.com/modules/feedreader/), a rudimentary Rss & Atom feed reader
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Cryptolive module works again, [#481](https://github.com/wtfutil/wtf/issues/481) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* gCal module now supports setting an explicit time zone via the "timezone" config attribute, [#382](https://github.com/wtfutil/wtf/issues/382) by [@jeangovil](https://github.com/jeangovil)
|
||||
* Misconfigured module positions in `config.yaml` now attempt to provide informative error messages on launch, [#482](https://github.com/wtfutil/wtf/issues/482)
|
||||
|
||||
## v0.13.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Transmission module addedd (https://wtfutil.com/modules/transmission/)
|
||||
|
||||
## v0.12.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Textfile module's text wrapping is configurable via the 'wrapText' boolean setting
|
||||
* Have I Been Pwned (HIBP) module added (https://wtfutil.com/modules/hibp/)
|
||||
|
||||
## v0.11.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* GitHub module now supports custom queries for issues and pull requests, by [@Sean-Der](https://github.com/Sean-Der)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Todoist now properly updates list items when Refresh is called
|
||||
* Keyboard modal displays properly when tabbing between widgets, [#467](https://github.com/wtfutil/wtf/issues/467)
|
||||
|
||||
## v0.10.3
|
||||
|
||||
### ❗️Changed
|
||||
|
||||
* Invalid glog dependency removed, by [@bosr](https://github.com/bosr)
|
||||
|
||||
## v0.10.2
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Weather module no longer crashes if there's no weather data or no internet connection
|
||||
* Gitlab no longer prevents installing with missing param, [#455](https://github.com/wtfutil/wtf/issues/455)
|
||||
|
||||
## v0.10.1
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Trello now displays multiple lists properly, [#454](https://github.com/wtfutil/wtf/issues/454)
|
||||
|
||||
## v0.10.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* DataDog module is now scrollable and interactive, by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* Focusable hot key numbers are now assigned in a stable order, [#435](https://github.com/wtfutil/wtf/issues/435) by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* Zendesk widget now has help text, by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* Scrollable widget added to provide common keyboard-navigation list functionality, by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* Logging functionality extracted out from Log module, by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* Improved sample configs with up-to-date attributes and examples, by [@retgits](https://github.com/retgits)
|
||||
* PagerDuty config now supports schedule filtering using the `scheduleIDs` config option, by [@senporprogrammer](https://github.com/senporprogrammer)
|
||||
|
||||
## v0.9.2
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Keyboard management system for modules reworked. Now has a KeyboardWidget to simplify adding keyboard commands
|
||||
|
||||
### Fixed
|
||||
|
||||
* WTF versions are now prefixed with `v` again so module systems pick up the latest versions
|
||||
|
||||
## 0.9.1
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Increased the pagination limit for GitHub to 100, by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* Support for multiple instances of the same widget added, by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
|
||||
## 0.9.0
|
||||
|
||||
* Null release
|
||||
|
||||
## 0.8.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Dependencies are now managed and installed using Go modules. See README.md for details, [#406](https://github.com/wtfutil/wtf/issues/406) by [@retgits](https://github.com/retgits)
|
||||
|
||||
## 0.7.2
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* NBA Scores now navigable via arrow keys, [#415](https://github.com/wtfutil/wtf/issues/415)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Multi-page sigils off-by-one error fixed, [#413](https://github.com/wtfutil/wtf/issues/413)
|
||||
* Many points of potential and probable race conditions have been improved to not have race conditions. WTF should be quite a bit more stable now
|
||||
* In the Twitter module, the following have been fixed:
|
||||
* Help text says "Twitter" instead of "TextFile"
|
||||
* Keyboard-command "o" opens the current Twitter handle in the browser
|
||||
* Keyboard-command "o" is documented in the help text
|
||||
|
||||
## 0.7.1
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* HackerNews row selections are visible again, [#411](https://github.com/wtfutil/wtf/issues/411)
|
||||
|
||||
## 0.7.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Jenkins now supports coloured balls, [#358](https://github.com/wtfutil/wtf/issues/358) by [@rudolphjacksonm](https://github.com/rudolphjacksonm)
|
||||
* Jenkins now supports regular expressions, [#359](https://github.com/wtfutil/wtf/issues/359) by [@rudolphjacksonm](https://github.com/rudolphjacksonm)
|
||||
* Complete refactoring of the module settings system, reducing the dependency on `config` and making it possible to configure modules by other means, by [@senporprogrammer](https://github.com/senporprogrammer)
|
||||
|
||||
## 0.6.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Jira widget navigable via up/down arrow keys, by [@jdenoy](https://github.com/jdenoy)
|
||||
* Windows security module improved, by [@E3V3A](https://github.com/E3V3A)
|
||||
* Function modules moved into the `/modules` directory, by [@Seanstoppable](https://github.com/Seanstoppable)
|
||||
* NBA Score module added by [@FriedCosey](https://github.com/FriedCosey)
|
||||
|
||||
### 🐞 Fixed
|
||||
|
||||
* Now displays an error on start-up if a widget has mis-configured `position` attributes ([#389](https://github.com/wtfutil/wtf/issues/389) by @senporprogrammer)
|
||||
|
||||
## 0.5.0
|
||||
|
||||
### ⚡️ Added
|
||||
|
||||
* Resource Usage module added by [@nicholas-eden](https://github.com/nicholas-eden)
|
||||
* Recursive repo search in Git module ([#126](https://github.com/wtfutil/wtf/issues/126) by [@anandsudhir](http://github.com/anandsudhir))
|
||||
* Recursive repo search in Git module ([#126](https://github.com/wtfutil/wtf/issues/126) by [@anandsudhir](http://github.com/anandsudhir))
|
||||
* HTTP/HTTPS handling in OpenFile() util function by [@jdenoy](https://github.com/jdenoy)
|
||||
* Honor system http proxies when using non-default transport by [@skymeyer](https://github.com/skymeyer)
|
||||
* VictorOps module added by [ImDevinC](https://github.com/ImDevinC)
|
||||
|
@ -1,17 +1,13 @@
|
||||
# Contributing
|
||||
|
||||
When contributing to this repository, please first discuss the change you wish to make via issue,
|
||||
email, or any other method with the owners of this repository before making a change.
|
||||
|
||||
Note that we have a code of conduct. Please follow it in all your interactions with the project.
|
||||
|
||||
## Pull Request Process
|
||||
|
||||
1. Ensure any install or build dependencies are removed before the end of the layer when doing a
|
||||
build.
|
||||
2. Update the static documentation with details of changes to the interface, this includes new environment
|
||||
variables, useful file locations and configuration parameters.
|
||||
Documentation lives in the `_site` directory and is a [Hugo](https://gohugo.io) app. See Hugo's documentation for usage.
|
||||
|
||||
Documentation lives at [wtfdocs](https://github.com/wtfutil/wtfdocs) and is a [Hugo](https://gohugo.io) app. See Hugo's documentation for usage.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
@ -70,7 +66,7 @@ further defined and clarified by project maintainers.
|
||||
### Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
|
||||
reported by contacting the project owner at chriscummer@me.com. All
|
||||
complaints will be reviewed and investigated and will result in a response that
|
||||
is deemed necessary and appropriate to the circumstances. The project team is
|
||||
obligated to maintain confidentiality with regard to the reporter of an incident.
|
||||
|
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@ -0,0 +1,26 @@
|
||||
FROM golang:1.16-alpine as build
|
||||
|
||||
ARG version=master
|
||||
|
||||
RUN apk add git make ncurses && \
|
||||
git clone https://github.com/wtfutil/wtf.git $GOPATH/src/github.com/wtfutil/wtf && \
|
||||
cd $GOPATH/src/github.com/wtfutil/wtf && \
|
||||
git checkout $version
|
||||
|
||||
ENV GOPROXY=https://proxy.golang.org,direct
|
||||
ENV GO111MODULE=on
|
||||
ENV GOSUMDB=off
|
||||
|
||||
WORKDIR $GOPATH/src/github.com/wtfutil/wtf
|
||||
|
||||
ENV PATH=$PATH:./bin
|
||||
|
||||
RUN make build
|
||||
|
||||
FROM alpine
|
||||
|
||||
COPY --from=build /go/src/github.com/wtfutil/wtf/bin/wtfutil /usr/local/bin/
|
||||
RUN adduser -h /config -DG users -u 20000 wtf
|
||||
|
||||
USER wtf
|
||||
ENTRYPOINT ["wtfutil"]
|
18
Dockerfile.build
Normal file
18
Dockerfile.build
Normal file
@ -0,0 +1,18 @@
|
||||
FROM golang:1.16 as build
|
||||
|
||||
ARG version=master
|
||||
|
||||
RUN git clone https://github.com/wtfutil/wtf.git $GOPATH/src/github.com/wtfutil/wtf && \
|
||||
cd $GOPATH/src/github.com/wtfutil/wtf && \
|
||||
git checkout $version
|
||||
|
||||
ENV GOPROXY=https://proxy.golang.org,direct
|
||||
ENV GO111MODULE=on
|
||||
ENV GOSUMDB=off
|
||||
|
||||
WORKDIR $GOPATH/src/github.com/wtfutil/wtf
|
||||
|
||||
ENV PATH=$PATH:./bin
|
||||
|
||||
RUN make build && \
|
||||
cp bin/wtfutil /usr/local/bin/
|
463
Gopkg.lock
generated
463
Gopkg.lock
generated
@ -1,463 +0,0 @@
|
||||
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
|
||||
|
||||
|
||||
[[projects]]
|
||||
digest = "1:5ad08b0e14866764a6d7475eb11c9cf05cad9a52c442593bdfa544703ff77f61"
|
||||
name = "cloud.google.com/go"
|
||||
packages = ["compute/metadata"]
|
||||
pruneopts = "UT"
|
||||
revision = "0ebda48a7f143b1cce9eb37a8c1106ac762a3430"
|
||||
version = "v0.34.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:d1a104572273cfb58e801812704dca4fe2eab80f3b0144592a722a76c280c598"
|
||||
name = "code.cloudfoundry.org/bytefmt"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "2aa6f33b730c79971cfc3c742f279195b0abc627"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:e92f5581902c345eb4ceffdcd4a854fb8f73cf436d47d837d1ec98ef1fe0a214"
|
||||
name = "github.com/StackExchange/wmi"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "5d049714c4a64225c3c79a7cf7d02f7fb5b96338"
|
||||
version = "1.0.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:636ac9f696c988f0038afd43592f7a0fff29038588ab1064ba8ba3476bb41091"
|
||||
name = "github.com/adlio/trello"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "e4cc07c871d0ee17c5579131fc1c786efbb5fe2a"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:aa94227e54ee105fcd03f25c85d3e5bbe13d2f2d5eb02379b5b4db5320dfb371"
|
||||
name = "github.com/alecthomas/chroma"
|
||||
packages = [
|
||||
".",
|
||||
"formatters",
|
||||
"formatters/html",
|
||||
"lexers",
|
||||
"lexers/a",
|
||||
"lexers/b",
|
||||
"lexers/c",
|
||||
"lexers/circular",
|
||||
"lexers/d",
|
||||
"lexers/e",
|
||||
"lexers/f",
|
||||
"lexers/g",
|
||||
"lexers/h",
|
||||
"lexers/i",
|
||||
"lexers/internal",
|
||||
"lexers/j",
|
||||
"lexers/k",
|
||||
"lexers/l",
|
||||
"lexers/m",
|
||||
"lexers/n",
|
||||
"lexers/o",
|
||||
"lexers/p",
|
||||
"lexers/q",
|
||||
"lexers/r",
|
||||
"lexers/s",
|
||||
"lexers/t",
|
||||
"lexers/v",
|
||||
"lexers/w",
|
||||
"lexers/x",
|
||||
"lexers/y",
|
||||
"styles",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "881a441774f9d707d3b7852025b7f2149a556182"
|
||||
version = "v0.6.2"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:a7955b3402449f2e9ef351d0d6d9d42af3e0b24967340b738078d80c90deb6c2"
|
||||
name = "github.com/andygrunwald/go-gerrit"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "f48c3d16616fdb85d96efcead2402bfd339d8c89"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:6d7646b01dbbacd8c50be0cbddbcb633619f819e51f47a4114c8d4518ae7ac02"
|
||||
name = "github.com/briandowns/openweathermap"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "5f41b7c9d92de5d74bf32f4486375c7547bc8a3c"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:166438587ed45ac211dab8a3ecebf4fa0c186d0db63430fb9127bbc2e5fcdc67"
|
||||
name = "github.com/cenkalti/backoff"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "1e4cf3da559842a91afcb6ea6141451e6c30c618"
|
||||
version = "v2.1.1"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:710109527a119c813d4fac773712dd92f449ed7c2f7b81f49822f94d290c8f72"
|
||||
name = "github.com/danwakefield/fnmatch"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "cbb64ac3d964b81592e64f957ad53df015803288"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:e3e85f98942fe3b51b8f9316d8d1dc1925353b26639d456030368ae278bb0475"
|
||||
name = "github.com/darkSasori/todoist"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "ec6b38b374ab9c60cc9716d2083ae66eb9383d03"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:ffe9824d294da03b391f44e1ae8281281b4afc1bdaa9588c9097785e3af10cec"
|
||||
name = "github.com/davecgh/go-spew"
|
||||
packages = ["spew"]
|
||||
pruneopts = "UT"
|
||||
revision = "8991bc29aa16c548c550c7ff78260e27b9ab7c73"
|
||||
version = "v1.1.1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:72dc2b6056e7097f829260e4a2ff08d32fec6017df1982a66e110ab4128486f8"
|
||||
name = "github.com/dlclark/regexp2"
|
||||
packages = [
|
||||
".",
|
||||
"syntax",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "487489b64fb796de2e55f4e8a4ad1e145f80e957"
|
||||
version = "v1.1.6"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:6f9339c912bbdda81302633ad7e99a28dfa5a639c864061f1929510a9a64aa74"
|
||||
name = "github.com/dustin/go-humanize"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "9f541cc9db5d55bce703bd99987c9d5cb8eea45e"
|
||||
version = "v1.0.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:0e16b03c72bd42739ca68d055c10369e60d17838428f512f3b29ae115ba788e0"
|
||||
name = "github.com/gdamore/encoding"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "6289cdc94c00ac4aa177771c5fce7af2f96b626d"
|
||||
version = "v1.0.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:937011a37a09b93be68052dfb3195fcfbff33b9472b37401b54027e9954906fb"
|
||||
name = "github.com/gdamore/tcell"
|
||||
packages = [
|
||||
".",
|
||||
"terminfo",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "aaadc574a6ed8dc3abe56036ca130dcee1ee6b6e"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:c96d16a4451e48e2c44b2c3531fd8ec9248d822637f1911a88959ca0bcae4a64"
|
||||
name = "github.com/go-ole/go-ole"
|
||||
packages = [
|
||||
".",
|
||||
"oleutil",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "39dc8486bd0952279431257138bc428275b86797"
|
||||
version = "v1.2.2"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:b3d20bcdedab2050e6bc58e52f4fdc46f710b4c74e1a1ecee262ebec1aee7b6e"
|
||||
name = "github.com/godbus/dbus"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "2ff6f7ffd60f0f2410b3105864bdd12c7894f844"
|
||||
version = "v5.0.1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:97df918963298c287643883209a2c3f642e6593379f97ab400c2a2e219ab647d"
|
||||
name = "github.com/golang/protobuf"
|
||||
packages = ["proto"]
|
||||
pruneopts = "UT"
|
||||
revision = "aa810b61a9c79d51363740d207bb46cf8e620ed5"
|
||||
version = "v1.2.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:fc71ff099a9d9e73a66556c3115c78ca64cd7f01e08a7eddcaddcba5e8fa02fd"
|
||||
name = "github.com/google/go-github"
|
||||
packages = ["github"]
|
||||
pruneopts = "UT"
|
||||
revision = "ce65dacfeac482f2a13b59e19c5a25947282c171"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:a63cff6b5d8b95638bfe300385d93b2a6d9d687734b863da8e09dc834510a690"
|
||||
name = "github.com/google/go-querystring"
|
||||
packages = ["query"]
|
||||
pruneopts = "UT"
|
||||
revision = "44c6ddd0a2342c386950e880b658017258da92fc"
|
||||
version = "v1.0.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:a2cff208d4759f6ba1b1cd228587b0a1869f95f22542ec9cd17fff64430113c7"
|
||||
name = "github.com/jessevdk/go-flags"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "c6ca198ec95c841fdb89fc0de7496fed11ab854e"
|
||||
version = "v1.4.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:c65a16ac77d0b1aefc7009cabb6ac5ad05def02025f5be85f450c03f52cc6f86"
|
||||
name = "github.com/lucasb-eyer/go-colorful"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "345fbb3dbcdb252d9985ee899a84963c0fa24c82"
|
||||
version = "v1.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:0356f3312c9bd1cbeda81505b7fd437501d8e778ab66998ef69f00d7f9b3a0d7"
|
||||
name = "github.com/mattn/go-runewidth"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "3ee7d812e62a0804a7d0a324e0249ca2db3476d3"
|
||||
version = "v0.0.4"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:2277d06c9dcd34d70119b624115f3d74672647322349bb76a8adedbc623a3955"
|
||||
name = "github.com/olebedev/config"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "57f804269e64d41bfe46efb76232c47f49d40902"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:cf31692c14422fa27c83a05292eb5cbe0fb2775972e8f1f8446a71549bd8980b"
|
||||
name = "github.com/pkg/errors"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "ba968bfe8b2f7e042a574c888954fccecfa385b4"
|
||||
version = "v0.8.1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:cfa0d7741863a0e1d30e0ccdd4b48a96a471cdb47892303de8b92c3713af3e77"
|
||||
name = "github.com/pkg/profile"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "5b67d428864e92711fcbd2f8629456121a56d91f"
|
||||
version = "v1.2.1"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:0028cb19b2e4c3112225cd871870f2d9cf49b9b4276531f03438a88e94be86fe"
|
||||
name = "github.com/pmezard/go-difflib"
|
||||
packages = ["difflib"]
|
||||
pruneopts = "UT"
|
||||
revision = "792786c7400a136282c1664665ae0a8db921c6c2"
|
||||
version = "v1.0.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:46f5782e57d221d76a19fb9c9c4f2b139f1d85ae7115a95e945a79221e1a7031"
|
||||
name = "github.com/radovskyb/watcher"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "3818ec23ec59ea15084fe26bfb114b3bb58aa132"
|
||||
version = "v1.0.5"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:0f44ebd1757c5725456f2d6c564b196dd96593e68fda7236e345642940b9a88a"
|
||||
name = "github.com/rivo/tview"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "36893a66979260e9758701ae306ec0d69c0f53c8"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:afee7cbe8cde64304b8bd397d5832b0e60c93f8b158e4102254558d2f862b0a6"
|
||||
name = "github.com/shirou/gopsutil"
|
||||
packages = [
|
||||
"cpu",
|
||||
"internal/common",
|
||||
"mem",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "ccc1c1016bc5d10e803189ee43417c50cdde7f1b"
|
||||
version = "v2.18.12"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:93ff598337cb35c40079a1ba766729c20eb1756e37f5740eac4c8e943f59664d"
|
||||
name = "github.com/sticreations/spotigopher"
|
||||
packages = ["spotigopher"]
|
||||
pruneopts = "UT"
|
||||
revision = "98632f6f94b087f2582be76980f76bc070d37176"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:972c2427413d41a1e06ca4897e8528e5a1622894050e2f527b38ddf0f343f759"
|
||||
name = "github.com/stretchr/testify"
|
||||
packages = ["assert"]
|
||||
pruneopts = "UT"
|
||||
revision = "ffdc059bfe9ce6a4e144ba849dbedead332c6053"
|
||||
version = "v1.3.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:fc5ea767f62a8a35b136db9e8629dc7718aea555c8480e44695a7d0894ae8303"
|
||||
name = "github.com/xanzy/go-gitlab"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "d85a1530126065c71277db28196ec196daafc9dc"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:3b19ea715e070a74397f3cfe950f0b555e66a3c23461e553777f52112a81b0e6"
|
||||
name = "github.com/yfronto/newrelic"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "7c9c2852e8f9e69a80bff4f4f1fe4cdd15eeba19"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:1ff6915a45fb06d272e614e72219aa058aefc545f597a708eb0cc6cb778c344a"
|
||||
name = "github.com/zmb3/spotify"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "a4bd83f60e06ab58f3516c61680d0532aabf470e"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:0af28605549b0c849891b2ea4e99de9fe20d2f48d3ae5d42f9b06391e02a466e"
|
||||
name = "github.com/zorkian/go-datadog-api"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "66f4fd4202d9d3e543608051a91a09eebc870966"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:f8b491a7c25030a895a0e579742d07136e6958e77ef2d46e769db8eec4e58fcd"
|
||||
name = "golang.org/x/net"
|
||||
packages = [
|
||||
"context",
|
||||
"context/ctxhttp",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "915654e7eabcea33ae277abbecf52f0d8b7a9fdc"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:c58bbfb91df5a7eae08cb9894f9897165f254e459f07666986cd448f9be4ad35"
|
||||
name = "golang.org/x/oauth2"
|
||||
packages = [
|
||||
".",
|
||||
"google",
|
||||
"internal",
|
||||
"jws",
|
||||
"jwt",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "36a7019397c4c86cf59eeab3bc0d188bac444277"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:5ee4df7ab18e945607ac822de8d10b180baea263b5e8676a1041727543b9c1e4"
|
||||
name = "golang.org/x/sys"
|
||||
packages = [
|
||||
"unix",
|
||||
"windows",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "48ac38b7c8cbedd50b1613c0fccacfc7d88dfcdf"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:37672ad5821719e2df8509c2edd4ba5ae192463237c73c3a2d24ef8b2bc9e36f"
|
||||
name = "golang.org/x/text"
|
||||
packages = [
|
||||
"encoding",
|
||||
"encoding/internal/identifier",
|
||||
"internal/gen",
|
||||
"transform",
|
||||
"unicode/cldr",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "f21a4dfb5e38f5895301dc265a8def02365cc3d0"
|
||||
version = "v0.3.0"
|
||||
|
||||
[[projects]]
|
||||
branch = "master"
|
||||
digest = "1:4b5fd36b449e451b5b4a4e8b31870c9230647f409413f13169ab93af268311da"
|
||||
name = "google.golang.org/api"
|
||||
packages = [
|
||||
"calendar/v3",
|
||||
"gensupport",
|
||||
"googleapi",
|
||||
"googleapi/internal/uritemplates",
|
||||
"sheets/v4",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "455dee39f703f70d67ceea7c56a61041712c1447"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:fa026a5c59bd2df343ec4a3538e6288dcf4e2ec5281d743ae82c120affe6926a"
|
||||
name = "google.golang.org/appengine"
|
||||
packages = [
|
||||
".",
|
||||
"internal",
|
||||
"internal/app_identity",
|
||||
"internal/base",
|
||||
"internal/datastore",
|
||||
"internal/log",
|
||||
"internal/modules",
|
||||
"internal/remote_api",
|
||||
"internal/urlfetch",
|
||||
"urlfetch",
|
||||
]
|
||||
pruneopts = "UT"
|
||||
revision = "e9657d882bb81064595ca3b56cbe2546bbabf7b1"
|
||||
version = "v1.4.0"
|
||||
|
||||
[[projects]]
|
||||
digest = "1:4d2e5a73dc1500038e504a8d78b986630e3626dc027bc030ba5c75da257cdb96"
|
||||
name = "gopkg.in/yaml.v2"
|
||||
packages = ["."]
|
||||
pruneopts = "UT"
|
||||
revision = "51d6538a90f86fe93ac480b35f37b2be17fef232"
|
||||
version = "v2.2.2"
|
||||
|
||||
[solve-meta]
|
||||
analyzer-name = "dep"
|
||||
analyzer-version = 1
|
||||
input-imports = [
|
||||
"code.cloudfoundry.org/bytefmt",
|
||||
"github.com/adlio/trello",
|
||||
"github.com/alecthomas/chroma/formatters",
|
||||
"github.com/alecthomas/chroma/lexers",
|
||||
"github.com/alecthomas/chroma/styles",
|
||||
"github.com/andygrunwald/go-gerrit",
|
||||
"github.com/briandowns/openweathermap",
|
||||
"github.com/darkSasori/todoist",
|
||||
"github.com/dustin/go-humanize",
|
||||
"github.com/gdamore/tcell",
|
||||
"github.com/google/go-github/github",
|
||||
"github.com/jessevdk/go-flags",
|
||||
"github.com/olebedev/config",
|
||||
"github.com/pkg/profile",
|
||||
"github.com/radovskyb/watcher",
|
||||
"github.com/rivo/tview",
|
||||
"github.com/shirou/gopsutil/cpu",
|
||||
"github.com/shirou/gopsutil/mem",
|
||||
"github.com/sticreations/spotigopher/spotigopher",
|
||||
"github.com/stretchr/testify/assert",
|
||||
"github.com/xanzy/go-gitlab",
|
||||
"github.com/yfronto/newrelic",
|
||||
"github.com/zmb3/spotify",
|
||||
"github.com/zorkian/go-datadog-api",
|
||||
"golang.org/x/oauth2",
|
||||
"golang.org/x/oauth2/google",
|
||||
"google.golang.org/api/calendar/v3",
|
||||
"google.golang.org/api/sheets/v4",
|
||||
"gopkg.in/yaml.v2",
|
||||
]
|
||||
solver-name = "gps-cdcl"
|
||||
solver-version = 1
|
107
Gopkg.toml
107
Gopkg.toml
@ -1,107 +0,0 @@
|
||||
# Gopkg.toml example
|
||||
#
|
||||
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
|
||||
# for detailed Gopkg.toml documentation.
|
||||
#
|
||||
# required = ["github.com/user/thing/cmd/thing"]
|
||||
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
|
||||
#
|
||||
# [[constraint]]
|
||||
# name = "github.com/user/project"
|
||||
# version = "1.0.0"
|
||||
#
|
||||
# [[constraint]]
|
||||
# name = "github.com/user/project2"
|
||||
# branch = "dev"
|
||||
# source = "github.com/myfork/project2"
|
||||
#
|
||||
# [[override]]
|
||||
# name = "github.com/x/y"
|
||||
# version = "2.4.0"
|
||||
#
|
||||
# [prune]
|
||||
# non-go = false
|
||||
# go-tests = true
|
||||
# unused-packages = true
|
||||
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/briandowns/openweathermap"
|
||||
branch = "master"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/gdamore/tcell"
|
||||
branch = "master"
|
||||
|
||||
#[[constraint]]
|
||||
#name = "github.com/go-test/deep"
|
||||
#version = "1.0.1"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/google/go-github"
|
||||
branch = "master"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/xanzy/go-gitlab"
|
||||
branch = "master"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/andygrunwald/go-gerrit"
|
||||
branch = "master"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/jessevdk/go-flags"
|
||||
version = "1.4.0"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/olebedev/config"
|
||||
branch = "master"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/radovskyb/watcher"
|
||||
version = "1.0.2"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/rivo/tview"
|
||||
branch = "master"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/yfronto/newrelic"
|
||||
branch = "master"
|
||||
|
||||
[[constraint]]
|
||||
name = "golang.org/x/oauth2"
|
||||
branch = "master"
|
||||
|
||||
[[constraint]]
|
||||
name = "google.golang.org/api"
|
||||
branch = "master"
|
||||
|
||||
[[constraint]]
|
||||
name = "gopkg.in/yaml.v2"
|
||||
version = "2.2.1"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/adlio/trello"
|
||||
branch = "master"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/darkSasori/todoist"
|
||||
branch = "master"
|
||||
|
||||
[prune]
|
||||
go-tests = true
|
||||
unused-packages = true
|
||||
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "github.com/zorkian/go-datadog-api"
|
||||
|
||||
[[constraint]]
|
||||
branch = "master"
|
||||
name = "code.cloudfoundry.org/bytefmt"
|
||||
|
||||
[[constraint]]
|
||||
name = "github.com/shirou/gopsutil"
|
||||
version = "2.18.10"
|
54
LICENSE.md
54
LICENSE.md
@ -1,6 +1,8 @@
|
||||
Copyright 2018, Chris Cummer
|
||||
*Mozilla Public License, version 2.0*
|
||||
|
||||
Mozilla Public License, version 2.0 1. Definitions 1.1. “Contributor” means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.
|
||||
1. Definitions
|
||||
|
||||
1.1. “Contributor” means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.
|
||||
|
||||
1.2. “Contributor Version” means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor’s Contribution.
|
||||
|
||||
@ -24,9 +26,9 @@ that the Covered Software was made available under the terms of version 1.1 or e
|
||||
|
||||
1.10. “Modifications” means any of the following:
|
||||
|
||||
any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or
|
||||
any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or
|
||||
|
||||
any new file in Source Code Form that contains any Covered Software.
|
||||
any new file in Source Code Form that contains any Covered Software.
|
||||
|
||||
1.11. “Patent Claims” of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.
|
||||
|
||||
@ -36,7 +38,9 @@ any new file in Source Code Form that contains any Covered Software.
|
||||
|
||||
1.14. “You” (or “Your”) means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
|
||||
|
||||
2. License Grants and Conditions 2.1. Grants Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
|
||||
2. License Grants and Conditions
|
||||
|
||||
2.1. Grants Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
|
||||
|
||||
under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and
|
||||
|
||||
@ -62,7 +66,9 @@ This License does not grant any rights in the trademarks, service marks, or logo
|
||||
|
||||
2.7. Conditions Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.
|
||||
|
||||
3. Responsibilities 3.1. Distribution of Source Form All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients’ rights in the Source Code Form.
|
||||
3. Responsibilities
|
||||
|
||||
3.1. Distribution of Source Form All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients’ rights in the Source Code Form.
|
||||
|
||||
3.2. Distribution of Executable Form If You distribute Covered Software in Executable Form then:
|
||||
|
||||
@ -76,23 +82,37 @@ You may distribute such Executable Form under the terms of this License, or subl
|
||||
|
||||
3.5. Application of Additional Terms You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction.
|
||||
|
||||
4. Inability to Comply Due to Statute or Regulation If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
|
||||
4. Inability to Comply Due to Statute or Regulation
|
||||
|
||||
5. Termination 5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.
|
||||
If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
|
||||
|
||||
5. Termination
|
||||
|
||||
5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.
|
||||
|
||||
5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.
|
||||
|
||||
5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.
|
||||
|
||||
6. Disclaimer of Warranty Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.
|
||||
6. Disclaimer of Warranty
|
||||
|
||||
7. Limitation of Liability Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party’s negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.
|
||||
Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.
|
||||
|
||||
8. Litigation Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party’s ability to bring cross-claims or counter-claims.
|
||||
7. Limitation of Liability
|
||||
|
||||
9. Miscellaneous This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.
|
||||
Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party’s negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.
|
||||
|
||||
10. Versions of the License 10.1. New Versions Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.
|
||||
8. Litigation
|
||||
|
||||
Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party’s ability to bring cross-claims or counter-claims.
|
||||
|
||||
9. Miscellaneous
|
||||
|
||||
This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.
|
||||
|
||||
10. Versions of the License
|
||||
|
||||
10.1. New Versions Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.
|
||||
|
||||
10.2. Effect of New Versions You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.
|
||||
|
||||
@ -100,10 +120,14 @@ You may distribute such Executable Form under the terms of this License, or subl
|
||||
|
||||
10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.
|
||||
|
||||
Exhibit A - Source Code Form License Notice This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
Exhibit A - Source Code Form License Notice
|
||||
|
||||
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
|
||||
|
||||
You may add additional accurate notices of copyright ownership.
|
||||
|
||||
Exhibit B - “Incompatible With Secondary Licenses” Notice This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0.
|
||||
Exhibit B - “Incompatible With Secondary Licenses” Notice
|
||||
|
||||
This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the Mozilla Public License, v. 2.0.
|
||||
|
173
Makefile
173
Makefile
@ -1,41 +1,164 @@
|
||||
.PHONY: contrib_check dependencies install run size test
|
||||
.PHONY: build clean contrib_check coverage docker-build docker-install help install isntall lint run size test uninstall
|
||||
|
||||
# detect GOPATH if not set
|
||||
ifndef $(GOPATH)
|
||||
$(info GOPATH is not set, autodetecting..)
|
||||
TESTPATH := $(dir $(abspath ../../..))
|
||||
DIRS := bin pkg src
|
||||
# create a ; separated line of tests and pass it to shell
|
||||
MISSING_DIRS := $(shell $(foreach entry,$(DIRS),test -d "$(TESTPATH)$(entry)" || echo "$(entry)";))
|
||||
ifeq ($(MISSING_DIRS),)
|
||||
$(info Found GOPATH: $(TESTPATH))
|
||||
export GOPATH := $(TESTPATH)
|
||||
else
|
||||
$(info ..missing dirs "$(MISSING_DIRS)" in "$(TESTDIR)")
|
||||
$(info GOPATH autodetection failed)
|
||||
endif
|
||||
$(info GOPATH is not set, autodetecting..)
|
||||
TESTPATH := $(dir $(abspath ../../..))
|
||||
DIRS := bin pkg src
|
||||
|
||||
# create a ; separated line of tests and pass it to shell
|
||||
MISSING_DIRS := $(shell $(foreach entry,$(DIRS),test -d "$(TESTPATH)$(entry)" || echo "$(entry)";))
|
||||
ifeq ($(MISSING_DIRS),)
|
||||
$(info Found GOPATH: $(TESTPATH))
|
||||
export GOPATH := $(TESTPATH)
|
||||
else
|
||||
$(info ..missing dirs "$(MISSING_DIRS)" in "$(TESTDIR)")
|
||||
$(info GOPATH autodetection failed)
|
||||
endif
|
||||
endif
|
||||
|
||||
build:
|
||||
go build -o bin/wtf
|
||||
# Set go modules to on and use GoCenter for immutable modules
|
||||
export GO111MODULE = on
|
||||
export GOPROXY = https://proxy.golang.org,direct
|
||||
|
||||
contrib_check:
|
||||
# Determines the path to this Makefile
|
||||
THIS_FILE := $(lastword $(MAKEFILE_LIST))
|
||||
|
||||
APP=wtfutil
|
||||
|
||||
define HEADER
|
||||
____ __ ____ .___________. _______
|
||||
\ \ / \ / / | || ____|
|
||||
\ \/ \/ / `---| |----`| |__
|
||||
\ / | | | __|
|
||||
\ /\ / | | | |
|
||||
\__/ \__/ |__| |__|
|
||||
|
||||
endef
|
||||
export HEADER
|
||||
|
||||
# -------------------- Actions -------------------- #
|
||||
|
||||
## build: builds a local version
|
||||
build:
|
||||
@echo "$$HEADER"
|
||||
@echo "Building..."
|
||||
go build -o bin/${APP}
|
||||
@echo "Done building"
|
||||
|
||||
## clean: removes old build cruft
|
||||
clean:
|
||||
rm -rf ./dist
|
||||
rm -rf ./bin/${APP}
|
||||
@echo "Done cleaning"
|
||||
|
||||
## contrib-check: checks for any contributors who have not been given due credit
|
||||
contrib-check:
|
||||
npx all-contributors-cli check
|
||||
|
||||
## coverage: figures out and displays test code coverage
|
||||
coverage:
|
||||
go test -coverprofile=coverage.out ./...
|
||||
go tool cover -html=coverage.out
|
||||
|
||||
## docker-build: builds in docker
|
||||
docker-build:
|
||||
@echo "Building ${APP} in Docker..."
|
||||
docker build -t wtfutil:build --build-arg=version=master -f Dockerfile.build .
|
||||
@echo "Done with docker build"
|
||||
|
||||
## docker-install: installs a local version of the app from docker build
|
||||
docker-install:
|
||||
@echo "Installing..."
|
||||
docker create --name wtf_build wtfutil:build
|
||||
docker cp wtf_build:/usr/local/bin/wtfutil ~/.local/bin/
|
||||
$(eval INSTALLPATH = $(shell which ${APP}))
|
||||
@echo "${APP} installed into ${INSTALLPATH}"
|
||||
docker rm wtf_build
|
||||
|
||||
## gosec: runs the gosec static security scanner against the source code
|
||||
gosec:
|
||||
gosec -tests ./...
|
||||
|
||||
## help: prints this help message
|
||||
help:
|
||||
@echo "Usage: \n"
|
||||
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
|
||||
|
||||
## isntall: an alias for 'install'
|
||||
isntall:
|
||||
@$(MAKE) -f $(THIS_FILE) install
|
||||
|
||||
## install: installs a local version of the app
|
||||
install:
|
||||
go clean
|
||||
go install -ldflags="-s -w -X main.version=$(shell git describe --always --abbrev=6) -X main.date=$(shell date +%FT%T%z)"
|
||||
which wtf
|
||||
$(eval GOVERS = $(shell go version))
|
||||
@echo "$$HEADER"
|
||||
@echo "Installing ${APP} with ${GOVERS}..."
|
||||
@go clean
|
||||
@go install -ldflags="-s -w -X main.version=$(shell git describe --always --abbrev=6) -X main.date=$(shell date +%FT%T%z)"
|
||||
@mv ~/go/bin/wtf ~/go/bin/${APP}
|
||||
$(eval INSTALLPATH = $(shell which ${APP}))
|
||||
@echo "${APP} installed into ${INSTALLPATH}"
|
||||
|
||||
## lint: runs a number of code quality checks against the source code
|
||||
lint:
|
||||
structcheck ./...
|
||||
varcheck ./...
|
||||
golangci-lint cache clean
|
||||
golangci-lint run
|
||||
|
||||
# lint:
|
||||
# @echo "\033[35mhttps://github.com/kisielk/errcheck\033[0m"
|
||||
# errcheck ./app
|
||||
# errcheck ./cfg
|
||||
# errcheck ./flags
|
||||
# errcheck ./help
|
||||
# errcheck ./logger
|
||||
# errcheck ./modules/...
|
||||
# errcheck ./utils
|
||||
# errcheck ./view
|
||||
# errcheck ./wtf
|
||||
# errcheck ./main.go
|
||||
|
||||
# @echo "\033[35mhttps://golang.org/cmd/vet/k\033[0m"
|
||||
# go vet ./app
|
||||
# go vet ./cfg
|
||||
# go vet ./flags
|
||||
# go vet ./help
|
||||
# go vet ./logger
|
||||
# go vet ./modules/...
|
||||
# go vet ./utils
|
||||
# go vet ./view
|
||||
# go vet ./wtf
|
||||
# go vet ./main.go
|
||||
|
||||
# @echo "\033[35m# https://staticcheck.io/docs/k\033[0m"
|
||||
# staticcheck ./app
|
||||
# staticcheck ./cfg
|
||||
# staticcheck ./flags
|
||||
# staticcheck ./help
|
||||
# staticcheck ./logger
|
||||
# staticcheck ./modules/...
|
||||
# staticcheck ./utils
|
||||
# staticcheck ./view
|
||||
# staticcheck ./wtf
|
||||
# staticcheck ./main.go
|
||||
|
||||
# @echo "\033[35m# https://github.com/mdempsky/unconvert\033[0m"
|
||||
# unconvert ./...
|
||||
|
||||
## loc: displays the lines of code (LoC) count
|
||||
loc:
|
||||
@loc --exclude _sample_configs/ _site/ docs/ Makefile *.md
|
||||
|
||||
## run: executes the locally-installed version
|
||||
run: build
|
||||
bin/wtf
|
||||
|
||||
size:
|
||||
loc --exclude vendor/ _sample_configs/ _site/ docs/ Makefile *.md *.toml
|
||||
@echo "$$HEADER"
|
||||
bin/${APP}
|
||||
|
||||
## test: runs the test suite
|
||||
test: build
|
||||
@echo "$$HEADER"
|
||||
go test ./...
|
||||
|
||||
## uninstall: uninstals a locally-installed version
|
||||
uninstall:
|
||||
@rm ~/go/bin/${APP}
|
||||
|
433
README.md
433
README.md
@ -1,75 +1,435 @@
|
||||
<p align="center">
|
||||
<img src="./images/logo_transparent.png?raw=true" title="WTF" alt="WTF" width="560" height="560" />
|
||||
</p>
|
||||
|
||||
[](#contributors)
|
||||
[](#contributors)
|
||||
[](https://travis-ci.com/wtfutil/wtf)
|
||||
[](https://gitter.im/wtfutil/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
[](https://twitter.com/wtfutil)
|
||||
[](https://goreportcard.com/report/github.com/wtfutil/wtf)
|
||||
<p align="center">
|
||||
<a href="#contributors"><img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-114-orange.svg?style=flat-square"></a>
|
||||
<a href="https://travis-ci.com/wtfutil/wtf"><img alt="Travis Status" src="https://img.shields.io/travis/com/wtfutil/wtf/master.svg?label=travis&maxAge=43200"></a>
|
||||
<a href="https://goreportcard.com/report/github.com/wtfutil/wtf"><img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/wtfutil/wtf"></a>
|
||||
<a href="https://twitter.com/wtfutil"><img alt="Twitter" src="https://img.shields.io/badge/follow-on%20twitter-blue.svg"></a>
|
||||
</p>
|
||||
|
||||
# WTF
|
||||
WTF (aka 'wtfutil') is the personal information dashboard for your terminal, providing at-a-glance access to your very important but infrequently-needed stats and data.
|
||||
|
||||
A personal terminal-based dashboard utility, designed for
|
||||
displaying infrequently-needed, but very important, daily data.
|
||||
Used by thousands of developers and tech people around the world, WTF is free and open-source. To support the continued use and development of WTF, please consider sponsoring WTF via [GitHub Sponsors](https://github.com/sponsors/senorprogrammer).
|
||||
|
||||
Follow [on Twitter](https://twitter.com/wtfutil) for news and latest updates.
|
||||
### Are you a contributor or sponsor?
|
||||
|
||||
Awesome! [See here](https://wtfutil.com/#exit-message) for how you can change the exit message, the message WTF shows when quitting, to something special just for you.
|
||||
|
||||
#
|
||||
|
||||
<p></p>
|
||||
|
||||
* [Installation](#installation)
|
||||
* [Installing via Homebrew](#installing-via-homebrew)
|
||||
* [Installing via MacPorts](#installing-via-macports)
|
||||
* [Installing a Binary](#installing-a-binary)
|
||||
* [Installing from Source](#installing-from-source)
|
||||
* [Running via Docker](#running-via-docker)
|
||||
* [Communication](#communication)
|
||||
* [Slack](#slack)
|
||||
* [Twitter](#twitter)
|
||||
* [Documentation](#documentation)
|
||||
* [Modules](#modules)
|
||||
* [Getting Bugs Fixed or Features Added](#getting-bugs-fixed-or-features-added)
|
||||
* [Contributing to the Source Code](#contributing-to-the-source-code)
|
||||
* [Adding Dependencies](#adding-dependencies)
|
||||
* [Contributing to the Documentation](#contributing-to-the-documentation)
|
||||
* [Contributors](#contributors)
|
||||
* [Acknowledgements](#acknowledgments)
|
||||
|
||||
<p align="center">
|
||||
<img src="./images/screenshot.jpg" title="screenshot" width="720" height="420" />
|
||||
</p>
|
||||
|
||||
## Quick Start
|
||||
## Installation
|
||||
|
||||
[Download and run the latest binary](https://github.com/wtfutil/wtf/releases) or install from source:
|
||||
### Installing via Homebrew
|
||||
|
||||
The simplest way from Homebrew:
|
||||
|
||||
```console
|
||||
brew install wtfutil
|
||||
|
||||
wtfutil
|
||||
```
|
||||
|
||||
That version can sometimes lag a bit, as recipe updates take time to get accepted into `homebrew-core`. If you always want the bleeding edge of releases, you can tap it:
|
||||
|
||||
```console
|
||||
brew tap wtfutil/wtfutil
|
||||
brew install wtfutil
|
||||
|
||||
wtfutil
|
||||
```
|
||||
|
||||
### Installing via MacPorts
|
||||
|
||||
You can also install via [MacPorts](https://www.macports.org/):
|
||||
|
||||
```console
|
||||
sudo port selfupdate
|
||||
sudo port install wtfutil
|
||||
|
||||
wtfutil
|
||||
```
|
||||
|
||||
### Installing a Binary
|
||||
|
||||
[Download the latest binary](https://github.com/wtfutil/wtf/releases) from GitHub.
|
||||
|
||||
WTF is a stand-alone binary. Once downloaded, copy it to a location you can run executables from (ie: `/usr/local/bin/`), and set the permissions accordingly:
|
||||
|
||||
```bash
|
||||
chmod a+x /usr/local/bin/wtfutil
|
||||
```
|
||||
|
||||
and you should be good to go.
|
||||
|
||||
### Installing from Source
|
||||
|
||||
If you want to run the build command from within your `$GOPATH`:
|
||||
|
||||
```bash
|
||||
# Set the Go proxy
|
||||
export GOPROXY="https://proxy.golang.org,direct"
|
||||
|
||||
# Disable the Go checksum database
|
||||
export GOSUMDB=off
|
||||
|
||||
# Enable Go modules
|
||||
export GO111MODULE=on
|
||||
|
||||
go get -u github.com/wtfutil/wtf
|
||||
cd $GOPATH/src/github.com/wtfutil/wtf
|
||||
make install
|
||||
make run
|
||||
```
|
||||
|
||||
**Note:** WTF is _only_ compatible with Go versions **1.9.2** or later. It currently _does not_ compile with `gccgo`.
|
||||
If you want to run the build command from a folder that is not in your `$GOPATH`:
|
||||
|
||||
```bash
|
||||
# Set the Go proxy
|
||||
export GOPROXY="https://proxy.golang.org,direct"
|
||||
|
||||
go get -u github.com/wtfutil/wtf
|
||||
cd $GOPATH/src/github.com/wtfutil/wtf
|
||||
make install
|
||||
make run
|
||||
```
|
||||
|
||||
### Installing from Source using Docker
|
||||
|
||||
All building is done inside a docker container. You can then copy the binary to
|
||||
your local machine.
|
||||
|
||||
```bash
|
||||
curl -o Dockerfile.build https://raw.githubusercontent.com/wtfutil/wtf/master/Dockerfile.build
|
||||
docker build -f Dockerfile.build -t wtfutil --build-arg=version=master .
|
||||
docker create --name wtf_build wtfutil
|
||||
docker cp wtf_build:/usr/local/bin/wtfutil ~/.local/bin
|
||||
docker rm wtf_build
|
||||
```
|
||||
|
||||
**Note:** WTF is _only_ compatible with Go versions **1.16.0** or later (due to the use of Go modules and newer standard library functions). If you would like to use `gccgo` to compile, you _must_ use `gccgo-9` or later which introduces support for Go modules.
|
||||
|
||||
### Installing via Arch User Repository
|
||||
|
||||
Arch Linux users can utilise the [wtfutil](https://aur.archlinux.org/packages/wtfutil) package to build it from source, or [wtfutil-bin](https://aur.archlinux.org/packages/wtfutil-bin/) to install pre-built binaries.
|
||||
|
||||
## Running via Docker
|
||||
|
||||
You can run `wtf` inside a docker container:
|
||||
|
||||
```bash
|
||||
# download or create the Dockerfile
|
||||
curl -o Dockerfile https://raw.githubusercontent.com/wtfutil/wtf/master/Dockerfile
|
||||
|
||||
# build the docker container
|
||||
docker build -t wtfutil .
|
||||
|
||||
# or for a particular tag or branch
|
||||
docker build --build-arg=version=v0.25.0 -t wtfutil .
|
||||
|
||||
# run the container
|
||||
docker run -it wtfutil
|
||||
|
||||
# run container with a local config file
|
||||
docker run -it -v path/to/config.yml:/config/config.yml wtfutil --config=/config/config.yml
|
||||
```
|
||||
|
||||
## Communication
|
||||
|
||||
### Slack
|
||||
|
||||
If you’re a member of the Gophers Slack community (https://invite.slack.golangbridge.org) there’s a WTFUtil channel you should join for all your WTF questions, development conversations, etc.
|
||||
|
||||
Find #wtfutil on https://gophers.slack.com/ and join us.
|
||||
|
||||
### Twitter
|
||||
|
||||
Also, follow [on Twitter](https://twitter.com/wtfutil) for news and latest updates.
|
||||
|
||||
## Documentation
|
||||
|
||||
See [https://wtfutil.com](https://wtfutil.com) for the definitive
|
||||
documentation. Here's some short-cuts:
|
||||
|
||||
* [Installation](http://wtfutil.com/posts/installation/)
|
||||
* [Configuration](http://wtfutil.com/posts/configuration/)
|
||||
* [Module Documentation](http://wtfutil.com/posts/modules/)
|
||||
* [Installation](https://wtfutil.com/quick_start/)
|
||||
* [Configuration](https://wtfutil.com/configuration/files/)
|
||||
* [Module Documentation](https://wtfutil.com/modules/)
|
||||
|
||||
### Contributing to the Documentation
|
||||
## Modules
|
||||
|
||||
Documenation now lives in its own repository here: [https://github.com/wtfutil/wtfdocs](https://github.com/wtfutil/wtfdocs).
|
||||
Modules are the chunks of functionality that make WTF useful. Modules are added and configured by including their configuration values in your `config.yml` file. The documentation for each module describes how to configure them.
|
||||
|
||||
Please make all additions and updates to documentation in that repository.
|
||||
Some interesting modules you might consider adding to get you started:
|
||||
|
||||
* [DigitalOcean](https://wtfutil.com/modules/digitalocean/)
|
||||
* [GitHub](https://wtfutil.com/modules/github/)
|
||||
* [Google Calendar](https://wtfutil.com/modules/google/gcal/)
|
||||
* [HackerNews](https://wtfutil.com/modules/hackernews/)
|
||||
* [Have I Been Pwned](https://wtfutil.com/modules/hibp/)
|
||||
* [NewRelic](https://wtfutil.com/modules/newrelic/)
|
||||
* [OpsGenie](https://wtfutil.com/modules/opsgenie/)
|
||||
* [Security](https://wtfutil.com/modules/security/)
|
||||
* [Transmission](https://wtfutil.com/modules/transmission/)
|
||||
* [Trello](https://wtfutil.com/modules/trello/)
|
||||
|
||||
## Getting Bugs Fixed or Features Added
|
||||
|
||||
WTF is open-source software, informally maintained by a small collection of volunteers who come and go at their leisure. There are absolutely no guarantees that, even if an issue is opened for them, bugs will be fixed or features added.
|
||||
|
||||
If there is a bug that you really need to have fixed or a feature you really want to have implemented, you can greatly increase your chances of that happening by creating a bounty on [BountySource](https://www.bountysource.com) to provide an incentive for someone to tackle it.
|
||||
|
||||
## Contributing to the Source Code
|
||||
|
||||
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests.
|
||||
First, kindly read [Talk, then code](https://dave.cheney.net/2019/02/18/talk-then-code) by Dave Cheney. It's great advice and will often save a lot of time and effort.
|
||||
|
||||
Next, kindly read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests.
|
||||
|
||||
Then create your branch, write your code, submit your PR, and join the rest of the awesome people who've contributed their time and effort towards WTF. Without their contributors, WTF wouldn't be possible.
|
||||
|
||||
Don't worry if you've never written Go before, or never contributed to an open source project before, or that your code won't be good enough. For a surprising number of people WTF has been their first Go project, or first open source contribution. If you're here, and you've read this far, you're the right stuff.
|
||||
|
||||
## Contributing to the Documentation
|
||||
|
||||
Documentation now lives in its own repository here: [https://github.com/wtfutil/wtfdocs](https://github.com/wtfutil/wtfdocs).
|
||||
|
||||
Please make all additions and updates to documentation in that repository.
|
||||
|
||||
### Adding Dependencies
|
||||
|
||||
Dependency management in WTF is handled by [dep](https://github.com/golang/dep). See that page for installation and usage details.
|
||||
|
||||
If the work you're doing requires the addition of a new dependency,
|
||||
please be sure to use `dep` to [vendor your dependencies](https://golang.github.io/dep/docs/daily-dep.html#adding-a-new-dependency).
|
||||
Dependency management in WTF is handled by [Go modules](https://github.com/golang/go/wiki/Modules). Please check out that page for more details on how Go modules work.
|
||||
|
||||
## Contributors
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
|
||||
<!-- prettier-ignore -->
|
||||
| [<img src="https://avatars0.githubusercontent.com/u/6413?v=4" width="48px;" alt="Chris Cummer"/><br /><sub><b>Chris Cummer</b></sub>](https://twitter.com/senorprogrammer)<br /> | [<img src="https://avatars2.githubusercontent.com/u/3252403?v=4" width="48px;" alt="Anand Sudhir Prayaga"/><br /><sub><b>Anand Sudhir Prayaga</b></sub>](https://github.com/anandsudhir)<br /> | [<img src="https://avatars1.githubusercontent.com/u/34973359?v=4" width="48px;" alt="Hossein Mehrabi"/><br /><sub><b>Hossein Mehrabi</b></sub>](https://github.com/jeangovil)<br /> | [<img src="https://avatars0.githubusercontent.com/u/11779018?v=4" width="48px;" alt="FengYa"/><br /><sub><b>FengYa</b></sub>](https://github.com/Fengyalv)<br /> | [<img src="https://avatars2.githubusercontent.com/u/17337753?v=4" width="48px;" alt="deltax"/><br /><sub><b>deltax</b></sub>](https://fluxionnetwork.github.io/fluxion/)<br /> | [<img src="https://avatars0.githubusercontent.com/u/1319630?v=4" width="48px;" alt="Bill Keenan"/><br /><sub><b>Bill Keenan</b></sub>](https://github.com/BillKeenan)<br /> | [<img src="https://avatars2.githubusercontent.com/u/118081?v=4" width="48px;" alt="June S"/><br /><sub><b>June S</b></sub>](http://blog.sapara.com)<br /> |
|
||||
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
|
||||
| [<img src="https://avatars3.githubusercontent.com/u/16461061?v=4" width="48px;" alt="liyiheng"/><br /><sub><b>liyiheng</b></sub>](https://github.com/XanthusL)<br /> | [<img src="https://avatars2.githubusercontent.com/u/9014288?v=4" width="48px;" alt="baustinanki"/><br /><sub><b>baustinanki</b></sub>](https://github.com/baustinanki)<br /> | [<img src="https://avatars0.githubusercontent.com/u/371475?v=4" width="48px;" alt="lucus lee"/><br /><sub><b>lucus lee</b></sub>](https://github.com/lixin9311)<br /> | [<img src="https://avatars1.githubusercontent.com/u/7537841?v=4" width="48px;" alt="Mike Lloyd"/><br /><sub><b>Mike Lloyd</b></sub>](https://github.com/mxplusb)<br /> | [<img src="https://avatars3.githubusercontent.com/u/10998?v=4" width="48px;" alt="Sergio Rubio"/><br /><sub><b>Sergio Rubio</b></sub>](http://rubiojr.rbel.co)<br /> | [<img src="https://avatars3.githubusercontent.com/u/17374492?v=4" width="48px;" alt="Farhad Farahi"/><br /><sub><b>Farhad Farahi</b></sub>](https://github.com/FarhadF)<br /> | [<img src="https://avatars1.githubusercontent.com/u/634604?v=4" width="48px;" alt="Lasantha Kularatne"/><br /><sub><b>Lasantha Kularatne</b></sub>](http://lasantha.blogspot.com/)<br /> |
|
||||
| [<img src="https://avatars1.githubusercontent.com/u/823331?v=4" width="48px;" alt="Mark Old"/><br /><sub><b>Mark Old</b></sub>](https://github.com/dlom)<br /> | [<img src="https://avatars0.githubusercontent.com/u/5546718?v=4" width="48px;" alt="flw"/><br /><sub><b>flw</b></sub>](http://flw.tools/)<br /> | [<img src="https://avatars0.githubusercontent.com/u/6024927?v=4" width="48px;" alt="David Barda"/><br /><sub><b>David Barda</b></sub>](https://github.com/davebarda)<br /> | [<img src="https://avatars2.githubusercontent.com/u/4261980?v=4" width="48px;" alt="Geoff Lee"/><br /><sub><b>Geoff Lee</b></sub>](https://github.com/matrinox)<br /> | [<img src="https://avatars3.githubusercontent.com/u/1022918?v=4" width="48px;" alt="George Opritescu"/><br /><sub><b>George Opritescu</b></sub>](http://international.github.io)<br /> | [<img src="https://avatars3.githubusercontent.com/u/497310?v=4" width="48px;" alt="Grazfather"/><br /><sub><b>Grazfather</b></sub>](https://twitter.com/Grazfather)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1691120?v=4" width="48px;" alt="Michael Cordell"/><br /><sub><b>Michael Cordell</b></sub>](http://www.mikecordell.com/)<br /> |
|
||||
| [<img src="https://avatars2.githubusercontent.com/u/1215497?v=4" width="48px;" alt="Patrick José Pereira"/><br /><sub><b>Patrick José Pereira</b></sub>](http://patrick.ibexcps.com)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1483092?v=4" width="48px;" alt="sherod taylor"/><br /><sub><b>sherod taylor</b></sub>](https://github.com/sherodtaylor)<br /> | [<img src="https://avatars2.githubusercontent.com/u/3062663?v=4" width="48px;" alt="Andrew Scott"/><br /><sub><b>Andrew Scott</b></sub>](http://cogentia.io)<br /> | [<img src="https://avatars1.githubusercontent.com/u/12018440?v=4" width="48px;" alt="Lassi Piironen"/><br /><sub><b>Lassi Piironen</b></sub>](https://github.com/lsipii)<br /> | [<img src="https://avatars0.githubusercontent.com/u/14799210?v=4" width="48px;" alt="BlackWebWolf"/><br /><sub><b>BlackWebWolf</b></sub>](https://github.com/BlackWebWolf)<br /> | [<img src="https://avatars0.githubusercontent.com/u/1894885?v=4" width="48px;" alt="andrewzolotukhin"/><br /><sub><b>andrewzolotukhin</b></sub>](https://github.com/andrewzolotukhin)<br /> | [<img src="https://avatars1.githubusercontent.com/u/8568280?v=4" width="48px;" alt="Leon Stigter"/><br /><sub><b>Leon Stigter</b></sub>](https://retgits.github.io)<br /> |
|
||||
| [<img src="https://avatars3.githubusercontent.com/u/21756?v=4" width="48px;" alt="Amr Tamimi"/><br /><sub><b>Amr Tamimi</b></sub>](https://tamimi.se)<br /> | [<img src="https://avatars3.githubusercontent.com/u/3717137?v=4" width="48px;" alt="Jagdeep Singh"/><br /><sub><b>Jagdeep Singh</b></sub>](https://jagdeep.me)<br /> | [<img src="https://avatars0.githubusercontent.com/u/889171?v=4" width="48px;" alt="Lineu Felipe"/><br /><sub><b>Lineu Felipe</b></sub>](https://github.com/darkSasori)<br /> | [<img src="https://avatars2.githubusercontent.com/u/159124?v=4" width="48px;" alt="Konstantin"/><br /><sub><b>Konstantin</b></sub>](https://github.com/kvj)<br /> | [<img src="https://avatars2.githubusercontent.com/u/6044920?v=4" width="48px;" alt="Brendan O'Leary"/><br /><sub><b>Brendan O'Leary</b></sub>](http://www.brendanoleary.com)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1226441?v=4" width="48px;" alt="bertl4398"/><br /><sub><b>bertl4398</b></sub>](https://github.com/bertl4398)<br /> | [<img src="https://avatars2.githubusercontent.com/u/6553695?v=4" width="48px;" alt="Ferenc-"/><br /><sub><b>Ferenc-</b></sub>](https://github.com/Ferenc-)<br /> |
|
||||
| [<img src="https://avatars1.githubusercontent.com/u/952036?v=4" width="48px;" alt="Rohan Verma"/><br /><sub><b>Rohan Verma</b></sub>](http://rohanverma.net)<br /> | [<img src="https://avatars1.githubusercontent.com/u/19293566?v=4" width="48px;" alt="Tim Fitzgerald"/><br /><sub><b>Tim Fitzgerald</b></sub>](https://github.com/fimtitzgerald)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1081051?v=4" width="48px;" alt="Federico Ruggi"/><br /><sub><b>Federico Ruggi</b></sub>](https://github.com/ruggi)<br /> | [<img src="https://avatars2.githubusercontent.com/u/7293328?v=4" width="48px;" alt="Craig Woodward"/><br /><sub><b>Craig Woodward</b></sub>](https://github.com/ctwoodward)<br /> | [<img src="https://avatars3.githubusercontent.com/u/15367484?v=4" width="48px;" alt="ReadmeCritic"/><br /><sub><b>ReadmeCritic</b></sub>](https://twitter.com/ReadmeCritic)<br /> | [<img src="https://avatars0.githubusercontent.com/u/141402?v=4" width="48px;" alt="Eugene"/><br /><sub><b>Eugene</b></sub>](https://github.com/jdevelop)<br /> | [<img src="https://avatars1.githubusercontent.com/u/12983705?s=460&v=4" width="48px;" alt="Kenny Wu"/><br /><sub><b>Kenny Wu</b></sub>](https://github.com/Trinergy)<br /> |
|
||||
| [<img src="https://avatars0.githubusercontent.com/u/538234?v=4" width="48px;" alt="Renán Romero"/><br /><sub><b>Renán Romero</b></sub>](http://www.romeroruiz.com)<br /> | [<img src="https://avatars1.githubusercontent.com/u/5031240?v=4" width="48px;" alt="Bastian Groß"/><br /><sub><b>Bastian Groß</b></sub>](https://github.com/sticreations)<br /> | [<img src="https://avatars1.githubusercontent.com/u/2496835?v=4" width="48px;" alt="nicholas-eden"/><br /><sub><b>nicholas-eden</b></sub>](https://github.com/nicholas-eden)<br /> | [<img src="https://avatars1.githubusercontent.com/u/279390?v=4" width="48px;" alt="Dan Rabinowitz"/><br /><sub><b>Dan Rabinowitz</b></sub>](https://github.com/danrabinowitz)<br /> | [<img src="https://avatars1.githubusercontent.com/u/6897575?v=4" width="48px;" alt="David Missmann"/><br /><sub><b>David Missmann</b></sub>](https://github.com/dvdmssmnn)<br /> | [<img src="https://avatars2.githubusercontent.com/u/882006?v=4" width="48px;" alt="Mathias Weber"/><br /><sub><b>Mathias Weber</b></sub>](https://github.com/mweb)<br /> | [<img src="https://avatars1.githubusercontent.com/u/32081703?v=4" width="48px;" alt="TheRedSpy15"/><br /><sub><b>TheRedSpy15</b></sub>](https://github.com/TheRedSpy15)<br /> |
|
||||
| [<img src="https://avatars0.githubusercontent.com/u/9569897?v=4" width="48px;" alt="Harald Nordgren"/><br /><sub><b>Harald Nordgren</b></sub>](https://www.linkedin.com/in/harald-nordgren-44778192)<br /> | [<img src="https://avatars0.githubusercontent.com/u/11583824?v=4" width="48px;" alt="Matei Alexandru Gardus"/><br /><sub><b>Matei Alexandru Gardus</b></sub>](http://stormfirefox1.github.io)<br /> | [<img src="https://avatars2.githubusercontent.com/u/1523955?v=4" width="48px;" alt="Sean Smith"/><br /><sub><b>Sean Smith</b></sub>](https://github.com/Seanstoppable)<br /> | [<img src="https://avatars1.githubusercontent.com/u/1646238?v=4" width="48px;" alt="Halil Kaskavalci"/><br /><sub><b>Halil Kaskavalci</b></sub>](http://kaskavalci.com)<br /> | [<img src="https://avatars2.githubusercontent.com/u/246715?v=4" width="48px;" alt="Johan Denoyer"/><br /><sub><b>Johan Denoyer</b></sub>](http://www.johandenoyer.fr)<br /> | [<img src="https://avatars1.githubusercontent.com/u/593516?v=4" width="48px;" alt="Jelle Vink"/><br /><sub><b>Jelle Vink</b></sub>](https://skymeyer.be)<br /> | [<img src="https://avatars1.githubusercontent.com/u/3997333?v=4" width="48px;" alt="Devin Collins"/><br /><sub><b>Devin Collins</b></sub>](http://imdevinc.com)<br /> |
|
||||
| [<img src="https://avatars3.githubusercontent.com/u/18333?v=4" width="48px;" alt="Danne Stayskal"/><br /><sub><b>Danne Stayskal</b></sub>](http://danne.stayskal.com/)<br /> | [<img src="https://avatars1.githubusercontent.com/u/2006658?v=4" width="48px;" alt="Max Beizer"/><br /><sub><b>Max Beizer</b></sub>](https://www.maxbeizer.com)<br /> |
|
||||
<!-- prettier-ignore-start -->
|
||||
<!-- markdownlint-disable -->
|
||||
<table>
|
||||
<tr>
|
||||
<td align="center"><a href="https://twitter.com/senorprogrammer"><img src="https://avatars0.githubusercontent.com/u/6413?v=4" width="48px;" alt=""/><br /><sub><b>Chris Cummer</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/anandsudhir"><img src="https://avatars2.githubusercontent.com/u/3252403?v=4" width="48px;" alt=""/><br /><sub><b>Anand Sudhir Prayaga</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/jeangovil"><img src="https://avatars1.githubusercontent.com/u/34973359?v=4" width="48px;" alt=""/><br /><sub><b>Hossein Mehrabi</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/Fengyalv"><img src="https://avatars0.githubusercontent.com/u/11779018?v=4" width="48px;" alt=""/><br /><sub><b>FengYa</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://fluxionnetwork.github.io/fluxion/"><img src="https://avatars2.githubusercontent.com/u/17337753?v=4" width="48px;" alt=""/><br /><sub><b>deltax</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/BillKeenan"><img src="https://avatars0.githubusercontent.com/u/1319630?v=4" width="48px;" alt=""/><br /><sub><b>Bill Keenan</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://blog.sapara.com"><img src="https://avatars2.githubusercontent.com/u/118081?v=4" width="48px;" alt=""/><br /><sub><b>June S</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/XanthusL"><img src="https://avatars3.githubusercontent.com/u/16461061?v=4" width="48px;" alt=""/><br /><sub><b>liyiheng</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/baustinanki"><img src="https://avatars2.githubusercontent.com/u/9014288?v=4" width="48px;" alt=""/><br /><sub><b>baustinanki</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/lixin9311"><img src="https://avatars0.githubusercontent.com/u/371475?v=4" width="48px;" alt=""/><br /><sub><b>lucus lee</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/mxplusb"><img src="https://avatars1.githubusercontent.com/u/7537841?v=4" width="48px;" alt=""/><br /><sub><b>Mike Lloyd</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://rubiojr.rbel.co"><img src="https://avatars3.githubusercontent.com/u/10998?v=4" width="48px;" alt=""/><br /><sub><b>Sergio Rubio</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/FarhadF"><img src="https://avatars3.githubusercontent.com/u/17374492?v=4" width="48px;" alt=""/><br /><sub><b>Farhad Farahi</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://lasantha.blogspot.com/"><img src="https://avatars1.githubusercontent.com/u/634604?v=4" width="48px;" alt=""/><br /><sub><b>Lasantha Kularatne</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/dlom"><img src="https://avatars1.githubusercontent.com/u/823331?v=4" width="48px;" alt=""/><br /><sub><b>Mark Old</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://flw.tools/"><img src="https://avatars0.githubusercontent.com/u/5546718?v=4" width="48px;" alt=""/><br /><sub><b>flw</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/davebarda"><img src="https://avatars0.githubusercontent.com/u/6024927?v=4" width="48px;" alt=""/><br /><sub><b>David Barda</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/matrinox"><img src="https://avatars2.githubusercontent.com/u/4261980?v=4" width="48px;" alt=""/><br /><sub><b>Geoff Lee</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://international.github.io"><img src="https://avatars3.githubusercontent.com/u/1022918?v=4" width="48px;" alt=""/><br /><sub><b>George Opritescu</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://twitter.com/Grazfather"><img src="https://avatars3.githubusercontent.com/u/497310?v=4" width="48px;" alt=""/><br /><sub><b>Grazfather</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://www.mikecordell.com/"><img src="https://avatars2.githubusercontent.com/u/1691120?v=4" width="48px;" alt=""/><br /><sub><b>Michael Cordell</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="http://patrick.ibexcps.com"><img src="https://avatars2.githubusercontent.com/u/1215497?v=4" width="48px;" alt=""/><br /><sub><b>Patrick José Pereira</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/sherodtaylor"><img src="https://avatars2.githubusercontent.com/u/1483092?v=4" width="48px;" alt=""/><br /><sub><b>sherod taylor</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://cogentia.io"><img src="https://avatars2.githubusercontent.com/u/3062663?v=4" width="48px;" alt=""/><br /><sub><b>Andrew Scott</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/lsipii"><img src="https://avatars1.githubusercontent.com/u/12018440?v=4" width="48px;" alt=""/><br /><sub><b>Lassi Piironen</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/BlackWebWolf"><img src="https://avatars0.githubusercontent.com/u/14799210?v=4" width="48px;" alt=""/><br /><sub><b>BlackWebWolf</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/andrewzolotukhin"><img src="https://avatars0.githubusercontent.com/u/1894885?v=4" width="48px;" alt=""/><br /><sub><b>andrewzolotukhin</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://retgits.github.io"><img src="https://avatars1.githubusercontent.com/u/8568280?v=4" width="48px;" alt=""/><br /><sub><b>Leon Stigter</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://tamimi.se"><img src="https://avatars3.githubusercontent.com/u/21756?v=4" width="48px;" alt=""/><br /><sub><b>Amr Tamimi</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://jagdeep.me"><img src="https://avatars3.githubusercontent.com/u/3717137?v=4" width="48px;" alt=""/><br /><sub><b>Jagdeep Singh</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/darkSasori"><img src="https://avatars0.githubusercontent.com/u/889171?v=4" width="48px;" alt=""/><br /><sub><b>Lineu Felipe</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/kvj"><img src="https://avatars2.githubusercontent.com/u/159124?v=4" width="48px;" alt=""/><br /><sub><b>Konstantin</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://www.brendanoleary.com"><img src="https://avatars2.githubusercontent.com/u/6044920?v=4" width="48px;" alt=""/><br /><sub><b>Brendan O'Leary</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/bertl4398"><img src="https://avatars2.githubusercontent.com/u/1226441?v=4" width="48px;" alt=""/><br /><sub><b>bertl4398</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/Ferenc-"><img src="https://avatars2.githubusercontent.com/u/6553695?v=4" width="48px;" alt=""/><br /><sub><b>Ferenc-</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="http://rohanverma.net"><img src="https://avatars1.githubusercontent.com/u/952036?v=4" width="48px;" alt=""/><br /><sub><b>Rohan Verma</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/fimtitzgerald"><img src="https://avatars1.githubusercontent.com/u/19293566?v=4" width="48px;" alt=""/><br /><sub><b>Tim Fitzgerald</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/ruggi"><img src="https://avatars2.githubusercontent.com/u/1081051?v=4" width="48px;" alt=""/><br /><sub><b>Federico Ruggi</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/ctwoodward"><img src="https://avatars2.githubusercontent.com/u/7293328?v=4" width="48px;" alt=""/><br /><sub><b>Craig Woodward</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://twitter.com/ReadmeCritic"><img src="https://avatars3.githubusercontent.com/u/15367484?v=4" width="48px;" alt=""/><br /><sub><b>ReadmeCritic</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/jdevelop"><img src="https://avatars0.githubusercontent.com/u/141402?v=4" width="48px;" alt=""/><br /><sub><b>Eugene</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/Trinergy"><img src="https://avatars1.githubusercontent.com/u/12983705?s=460&v=4" width="48px;" alt=""/><br /><sub><b>Kenny Wu</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="http://www.romeroruiz.com"><img src="https://avatars0.githubusercontent.com/u/538234?v=4" width="48px;" alt=""/><br /><sub><b>Renán Romero</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/sticreations"><img src="https://avatars1.githubusercontent.com/u/5031240?v=4" width="48px;" alt=""/><br /><sub><b>Bastian Groß</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/nicholas-eden"><img src="https://avatars1.githubusercontent.com/u/2496835?v=4" width="48px;" alt=""/><br /><sub><b>nicholas-eden</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/danrabinowitz"><img src="https://avatars1.githubusercontent.com/u/279390?v=4" width="48px;" alt=""/><br /><sub><b>Dan Rabinowitz</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/dvdmssmnn"><img src="https://avatars1.githubusercontent.com/u/6897575?v=4" width="48px;" alt=""/><br /><sub><b>David Missmann</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/mweb"><img src="https://avatars2.githubusercontent.com/u/882006?v=4" width="48px;" alt=""/><br /><sub><b>Mathias Weber</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/TheRedSpy15"><img src="https://avatars1.githubusercontent.com/u/32081703?v=4" width="48px;" alt=""/><br /><sub><b>TheRedSpy15</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://www.linkedin.com/in/harald-nordgren-44778192"><img src="https://avatars0.githubusercontent.com/u/9569897?v=4" width="48px;" alt=""/><br /><sub><b>Harald Nordgren</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://stormfirefox1.github.io"><img src="https://avatars0.githubusercontent.com/u/11583824?v=4" width="48px;" alt=""/><br /><sub><b>Matei Alexandru Gardus</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/Seanstoppable"><img src="https://avatars2.githubusercontent.com/u/1523955?v=4" width="48px;" alt=""/><br /><sub><b>Sean Smith</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://kaskavalci.com"><img src="https://avatars1.githubusercontent.com/u/1646238?v=4" width="48px;" alt=""/><br /><sub><b>Halil Kaskavalci</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://www.johandenoyer.fr"><img src="https://avatars2.githubusercontent.com/u/246715?v=4" width="48px;" alt=""/><br /><sub><b>Johan Denoyer</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://skymeyer.be"><img src="https://avatars1.githubusercontent.com/u/593516?v=4" width="48px;" alt=""/><br /><sub><b>Jelle Vink</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://imdevinc.com"><img src="https://avatars1.githubusercontent.com/u/3997333?v=4" width="48px;" alt=""/><br /><sub><b>Devin Collins</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="http://danne.stayskal.com/"><img src="https://avatars3.githubusercontent.com/u/18333?v=4" width="48px;" alt=""/><br /><sub><b>Danne Stayskal</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://www.maxbeizer.com"><img src="https://avatars1.githubusercontent.com/u/2006658?v=4" width="48px;" alt=""/><br /><sub><b>Max Beizer</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://tinyurl.com/nwmj4as"><img src="https://avatars1.githubusercontent.com/u/194392?v=4" width="48px;" alt=""/><br /><sub><b>E:V:A</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/GaboFDC"><img src="https://avatars0.githubusercontent.com/u/1425500?v=4" width="48px;" alt=""/><br /><sub><b>Gabriel</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/AndrewScibek"><img src="https://avatars2.githubusercontent.com/u/10111411?v=4" width="48px;" alt=""/><br /><sub><b>Andrew Scibek</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/FriedCosey"><img src="https://avatars0.githubusercontent.com/u/29709822?v=4" width="48px;" alt=""/><br /><sub><b>FriedCosey</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://michelegera.dev/"><img src="https://avatars1.githubusercontent.com/u/3891?v=4" width="48px;" alt=""/><br /><sub><b>Michele Gerarduzzi</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/rudolphjacksonm"><img src="https://avatars3.githubusercontent.com/u/13438569?v=4" width="48px;" alt=""/><br /><sub><b>Jack Morris</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/foorb"><img src="https://avatars0.githubusercontent.com/u/14993807?v=4" width="48px;" alt=""/><br /><sub><b>foorb</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://researchit.las.iastate.edu"><img src="https://avatars0.githubusercontent.com/u/5819098?v=4" width="48px;" alt=""/><br /><sub><b>Levi Baber</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/gnanderson"><img src="https://avatars0.githubusercontent.com/u/38514?v=4" width="48px;" alt=""/><br /><sub><b>Graham Anderson</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/bosr"><img src="https://avatars2.githubusercontent.com/u/1936828?v=4" width="48px;" alt=""/><br /><sub><b>Romain Bossart</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://eonix.ru"><img src="https://avatars0.githubusercontent.com/u/969838?v=4" width="48px;" alt=""/><br /><sub><b>Kirill Motkov</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://www.BrianChoromanski.com"><img src="https://avatars1.githubusercontent.com/u/3665694?v=4" width="48px;" alt=""/><br /><sub><b>Brian Choromanski</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="http://siobud.com"><img src="https://avatars0.githubusercontent.com/u/1302304?v=4" width="48px;" alt=""/><br /><sub><b>Sean DuBois</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/gary-kim"><img src="https://avatars1.githubusercontent.com/u/47195730?v=4" width="48px;" alt=""/><br /><sub><b>Gary Kim</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://dylanbartels.com"><img src="https://avatars1.githubusercontent.com/u/6660171?v=4" width="48px;" alt=""/><br /><sub><b>Dylan</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://liet.me"><img src="https://avatars0.githubusercontent.com/u/1990354?v=4" width="48px;" alt=""/><br /><sub><b>Dmytro Prokhorenkov</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/elliotrushton"><img src="https://avatars1.githubusercontent.com/u/590442?v=4" width="48px;" alt=""/><br /><sub><b>Elliot</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://chenrui.dev"><img src="https://avatars3.githubusercontent.com/u/1580956?v=4" width="48px;" alt=""/><br /><sub><b>chenrui</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/sudermanjr"><img src="https://avatars0.githubusercontent.com/u/7624765?v=4" width="48px;" alt=""/><br /><sub><b>Andrew Suderman</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/rwhogg"><img src="https://avatars3.githubusercontent.com/u/2373856?v=4" width="48px;" alt=""/><br /><sub><b>Bob 'Wombat' Hogg</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/hxw"><img src="https://avatars0.githubusercontent.com/u/143462?v=4" width="48px;" alt=""/><br /><sub><b>Christopher Hall</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/hneiva"><img src="https://avatars1.githubusercontent.com/u/3451557?v=4" width="48px;" alt=""/><br /><sub><b>Heitor Neiva</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/herbygillot"><img src="https://avatars3.githubusercontent.com/u/618376?v=4" width="48px;" alt=""/><br /><sub><b>Herby Gillot</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://brudil.com"><img src="https://avatars3.githubusercontent.com/u/382352?v=4" width="48px;" alt=""/><br /><sub><b>James Canning</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://twitter.com/jeffz4000"><img src="https://avatars1.githubusercontent.com/u/45892?v=4" width="48px;" alt=""/><br /><sub><b>jeffz</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://mikkeljuhl.com"><img src="https://avatars0.githubusercontent.com/u/1764035?v=4" width="48px;" alt=""/><br /><sub><b>Mikkel Jeppesen Juhl</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/lesteenman"><img src="https://avatars1.githubusercontent.com/u/963290?v=4" width="48px;" alt=""/><br /><sub><b>Erik</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/nyourchuck"><img src="https://avatars1.githubusercontent.com/u/155574?v=4" width="48px;" alt=""/><br /><sub><b>Nate Yourchuck</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://cprimozic.net/"><img src="https://avatars3.githubusercontent.com/u/4335849?v=4" width="48px;" alt=""/><br /><sub><b>Casey Primozic</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://pierdelacabeza.com/maruja"><img src="https://avatars3.githubusercontent.com/u/2430915?v=4" width="48px;" alt=""/><br /><sub><b>Alvaro [Andor]</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/Midnight-Conqueror"><img src="https://avatars1.githubusercontent.com/u/17101621?v=4" width="48px;" alt=""/><br /><sub><b>Joel Valentine</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://www.viktor-braun.de"><img src="https://avatars0.githubusercontent.com/u/4738210?v=4" width="48px;" alt=""/><br /><sub><b>Viktor Braun</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://www.chrisdbrown.co.uk/"><img src="https://avatars3.githubusercontent.com/u/3877652?v=4" width="48px;" alt=""/><br /><sub><b>ChrisDBrown</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://narengowda.github.io/"><img src="https://avatars2.githubusercontent.com/u/582821?v=4" width="48px;" alt=""/><br /><sub><b>Narendra L</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/ibaum"><img src="https://avatars1.githubusercontent.com/u/24609103?v=4" width="48px;" alt=""/><br /><sub><b>ibaum</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/noxer"><img src="https://avatars3.githubusercontent.com/u/566185?v=4" width="48px;" alt=""/><br /><sub><b>Tim Scheuermann</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://indradhanush.github.io/"><img src="https://avatars0.githubusercontent.com/u/2682729?v=4" width="48px;" alt=""/><br /><sub><b>Indradhanush Gupta</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://victoravelar.com"><img src="https://avatars3.githubusercontent.com/u/7926849?v=4" width="48px;" alt=""/><br /><sub><b>Victor Hugo Avelar Ossorio</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/scw007"><img src="https://avatars3.githubusercontent.com/u/4001640?v=4" width="48px;" alt=""/><br /><sub><b>Steven Whitehead</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/lawrencecraft"><img src="https://avatars0.githubusercontent.com/u/660580?v=4" width="48px;" alt=""/><br /><sub><b>Lawrence Craft</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="http://avi.press"><img src="https://avatars1.githubusercontent.com/u/1388071?v=4" width="48px;" alt=""/><br /><sub><b>Avi Press</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/Tardog"><img src="https://avatars0.githubusercontent.com/u/22562624?v=4" width="48px;" alt=""/><br /><sub><b>Sarah Kraßnigg</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://jmks.ca"><img src="https://avatars1.githubusercontent.com/u/4923990?v=4" width="48px;" alt=""/><br /><sub><b>Jason Schweier</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/massa1240"><img src="https://avatars2.githubusercontent.com/u/8268483?v=4" width="48px;" alt=""/><br /><sub><b>Massa</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://boot-error.github.io"><img src="https://avatars3.githubusercontent.com/u/8546140?v=4" width="48px;" alt=""/><br /><sub><b>Vighnesh SK</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://alexfornuto.com"><img src="https://avatars3.githubusercontent.com/u/2349184?v=4" width="48px;" alt=""/><br /><sub><b>Alex Fornuto</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/stevenwhitehead"><img src="https://avatars0.githubusercontent.com/u/30630257?v=4" width="48px;" alt=""/><br /><sub><b>stevenwhitehead</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/jdenoy-saagie"><img src="https://avatars2.githubusercontent.com/u/55875303?v=4" width="48px;" alt=""/><br /><sub><b>Johan Denoyer</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://albertsalim.dev"><img src="https://avatars1.githubusercontent.com/u/4749355?v=4" width="48px;" alt=""/><br /><sub><b>Albert Salim</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://Feliciano.Tech"><img src="https://avatars1.githubusercontent.com/u/6017470?v=4" width="48px;" alt=""/><br /><sub><b>Ricardo N Feliciano</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/3mard"><img src="https://avatars3.githubusercontent.com/u/42009880?v=4" width="48px;" alt=""/><br /><sub><b>Omer Davutoglu</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/hemu"><img src="https://avatars0.githubusercontent.com/u/1871299?v=4" width="48px;" alt=""/><br /><sub><b>Hemu</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/Daanikus"><img src="https://avatars0.githubusercontent.com/u/18027087?v=4" width="48px;" alt=""/><br /><sub><b>Dan Bent</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://cizer.dev"><img src="https://avatars3.githubusercontent.com/u/20225764?v=4" width="48px;" alt=""/><br /><sub><b>C123R</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/madepolli"><img src="https://avatars1.githubusercontent.com/u/7237000?v=4" width="48px;" alt=""/><br /><sub><b>Matjaž Depolli</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://blog.schoentoon.blue"><img src="https://avatars1.githubusercontent.com/u/417618?v=4" width="48px;" alt=""/><br /><sub><b>Toon Schoenmakers</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://tdhttt.com"><img src="https://avatars2.githubusercontent.com/u/24703459?v=4" width="48px;" alt=""/><br /><sub><b>TDHTTTT</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/jottr"><img src="https://avatars0.githubusercontent.com/u/2744198?v=4" width="48px;" alt=""/><br /><sub><b>jottr</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://www.linkedin.com/in/nikolay-mateev-79187b167/"><img src="https://avatars3.githubusercontent.com/u/15074116?v=4" width="48px;" alt=""/><br /><sub><b>Nikolay Mateev</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://charliewang.io"><img src="https://avatars1.githubusercontent.com/u/1320418?v=4" width="48px;" alt=""/><br /><sub><b>Charlie Wang</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/liyiheng"><img src="https://avatars3.githubusercontent.com/u/16461061?v=4" width="48px;" alt=""/><br /><sub><b>liyiheng</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://bjoern.svbtle.com"><img src="https://avatars1.githubusercontent.com/u/1467156?v=4" width="48px;" alt=""/><br /><sub><b>Bjoern Weidlich</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/firecat53"><img src="https://avatars1.githubusercontent.com/u/568113?v=4" width="48px;" alt=""/><br /><sub><b>Scott Hansen</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://davidsbond.github.io"><img src="https://avatars3.githubusercontent.com/u/6227720?v=4" width="48px;" alt=""/><br /><sub><b>David Bond</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/yesnault"><img src="https://avatars3.githubusercontent.com/u/395454?v=4" width="48px;" alt=""/><br /><sub><b>Yvonnick Esnault</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/leterio"><img src="https://avatars0.githubusercontent.com/u/15060358?v=4" width="48px;" alt=""/><br /><sub><b>Vinícius Letério</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://adriano.fyi"><img src="https://avatars3.githubusercontent.com/u/3331648?v=4" width="48px;" alt=""/><br /><sub><b>Adriano</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/jonhadfield"><img src="https://avatars1.githubusercontent.com/u/843944?v=4" width="48px;" alt=""/><br /><sub><b>Jon Hadfield</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/Tdnshah"><img src="https://avatars2.githubusercontent.com/u/13272752?v=4" width="48px;" alt=""/><br /><sub><b>Tejas Shah</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/mogensen"><img src="https://avatars2.githubusercontent.com/u/592710?v=4" width="48px;" alt=""/><br /><sub><b>Frederik Mogensen</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/rsaarelm"><img src="https://avatars1.githubusercontent.com/u/41840?v=4" width="48px;" alt=""/><br /><sub><b>Risto Saarelma</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://sam-github.github.io/"><img src="https://avatars2.githubusercontent.com/u/17607?v=4" width="48px;" alt=""/><br /><sub><b>Sam Roberts</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/gerchardon"><img src="https://avatars0.githubusercontent.com/u/5973160?v=4" width="48px;" alt=""/><br /><sub><b>gerchardon</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/mryanmurphy"><img src="https://avatars2.githubusercontent.com/u/641427?v=4" width="48px;" alt=""/><br /><sub><b>Matt</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://devco.net/"><img src="https://avatars0.githubusercontent.com/u/82342?v=4" width="48px;" alt=""/><br /><sub><b>R.I.Pienaar</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/fmotrifork"><img src="https://avatars3.githubusercontent.com/u/18327738?v=4" width="48px;" alt=""/><br /><sub><b>Frederik Mogensen</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/aeter"><img src="https://avatars0.githubusercontent.com/u/238607?v=4" width="48px;" alt=""/><br /><sub><b>aeter</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://timhwang21.gitbook.io"><img src="https://avatars3.githubusercontent.com/u/5831434?v=4" width="48px;" alt=""/><br /><sub><b>Tim Hwang</b></sub></a><br /></td>
|
||||
<td align="center"><a href="http://about.me/yingfan"><img src="https://avatars1.githubusercontent.com/u/10404961?v=4" width="48px;" alt=""/><br /><sub><b>Ying Fan Chong</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/MartinJohns"><img src="https://avatars1.githubusercontent.com/u/5269069?v=4" width="48px;" alt=""/><br /><sub><b>Martin Johns</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://www.jvt.me"><img src="https://avatars0.githubusercontent.com/u/3315059?v=4" width="48px;" alt=""/><br /><sub><b>Jamie Tanna</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/trimble"><img src="https://avatars3.githubusercontent.com/u/371317?v=4" width="48px;" alt=""/><br /><sub><b>Todd Trimble</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://www.mitchellhanberg.com"><img src="https://avatars2.githubusercontent.com/u/5523984?v=4" width="48px;" alt=""/><br /><sub><b>Mitchell Hanberg</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://franga2000.com"><img src="https://avatars3.githubusercontent.com/u/3891092?v=4" width="48px;" alt=""/><br /><sub><b>Miha Frangež</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://blog.sahilister.in/"><img src="https://avatars0.githubusercontent.com/u/52946452?v=4" width="48px;" alt=""/><br /><sub><b>Sahil Dhiman</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://pzoo.netlify.app/"><img src="https://avatars2.githubusercontent.com/u/17727004?v=4" width="48px;" alt=""/><br /><sub><b>Pingzhou | 平舟</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/YuviGold"><img src="https://avatars0.githubusercontent.com/u/29873449?v=4" width="48px;" alt=""/><br /><sub><b>Yuval Goldberg</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/dabcoder"><img src="https://avatars3.githubusercontent.com/u/5034531?v=4" width="48px;" alt=""/><br /><sub><b>David Bouchare</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/stone"><img src="https://avatars3.githubusercontent.com/u/29077?v=4" width="48px;" alt=""/><br /><sub><b>Fredrik Steen</b></sub></a><br /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center"><a href="https://github.com/zye1996"><img src="https://avatars2.githubusercontent.com/u/28901953?v=4" width="48px;" alt=""/><br /><sub><b>zye1996</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://github.com/pgaxatte"><img src="https://avatars.githubusercontent.com/u/30696904?v=4" width="48px;" alt=""/><br /><sub><b>Pierre Gaxatte</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://xntrik.wtf"><img src="https://avatars.githubusercontent.com/u/678260?v=4" width="48px;" alt=""/><br /><sub><b>Christian Frichot</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://lukas-kaemmerling.de"><img src="https://avatars.githubusercontent.com/u/4281581?v=4" width="48px;" alt=""/><br /><sub><b>Lukas Kämmerling</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://inetant.net/"><img src="https://avatars.githubusercontent.com/u/1765366?v=4" width="48px;" alt=""/><br /><sub><b>Antoine Meillet</b></sub></a><br /></td>
|
||||
<td align="center"><a href="https://www.patreon.com/cclauss"><img src="https://avatars.githubusercontent.com/u/3709715?v=4" width="48px;" alt=""/><br /><sub><b>Christian Clauss</b></sub></a><br /></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!-- markdownlint-enable -->
|
||||
<!-- prettier-ignore-end -->
|
||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||
|
||||
## Acknowledgments
|
||||
@ -77,8 +437,7 @@ please be sure to use `dep` to [vendor your dependencies](https://golang.github.
|
||||
The inspiration for `WTF` came from Monica Dinculescu's
|
||||
[tiny-care-terminal](https://github.com/notwaldorf/tiny-care-terminal).
|
||||
|
||||
Many thanks to <a href="https://lendesk.com">Lendesk</a> for supporting this project by
|
||||
providing time to develop it.
|
||||
WTF is built atop [tcell](https://github.com/gdamore/tcell) and [tview](https://github.com/rivo/tview), fantastic projects both. WTF is built, packaged, and deployed via [GoReleaser](https://goreleaser.com).
|
||||
|
||||
<p align="center">
|
||||
<img src="./images/dude_wtf.png?raw=true" title="Dude WTF" width="251" height="201" />
|
||||
|
BIN
_sample_configs/bargraph_config.png
Normal file
BIN
_sample_configs/bargraph_config.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 196 KiB |
@ -14,9 +14,8 @@ wtf:
|
||||
graphIcon: "💀"
|
||||
graphStars: 25
|
||||
position:
|
||||
top: 2
|
||||
top: 1
|
||||
left: 0
|
||||
height: 2
|
||||
width: 2
|
||||
refreshInterval: 30
|
||||
updateInterval: 15
|
||||
refreshInterval: 30
|
@ -1,236 +0,0 @@
|
||||
wtf:
|
||||
colors:
|
||||
background: gray
|
||||
border:
|
||||
focusable: darkslateblue
|
||||
focused: orange
|
||||
normal: gray
|
||||
grid:
|
||||
# How _wide_ the columns are, in terminal characters. In this case we have
|
||||
# five columns, each of which are 37 characters wide
|
||||
columns: [37, 37, 37, 37, 37]
|
||||
|
||||
# How _high_ the rows are, in terminal lines. In this case we have five rows
|
||||
# that support ten line of text, and one of four
|
||||
rows: [10, 10, 10, 10, 10, 4]
|
||||
refreshInterval: 1
|
||||
mods:
|
||||
bamboohr:
|
||||
enabled: true
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
height: 2
|
||||
width: 1
|
||||
refreshInterval: 900
|
||||
clocks:
|
||||
colors:
|
||||
rows:
|
||||
even: "lightblue"
|
||||
odd: "white"
|
||||
enabled: true
|
||||
locations:
|
||||
# From https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
Avignon: "Europe/Paris"
|
||||
Barcelona: "Europe/Madrid"
|
||||
Dubai: "Asia/Dubai"
|
||||
UTC: "Etc/UTC"
|
||||
Vancouver: "America/Vancouver"
|
||||
Toronto: "America/Toronto"
|
||||
position:
|
||||
top: 3
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
# Valid options are: alphabetical, chronological
|
||||
sort: "alphabetical"
|
||||
cmdrunner:
|
||||
args: ["-g", "batt"]
|
||||
cmd: "pmset"
|
||||
enabled: true
|
||||
position:
|
||||
top: 6
|
||||
left: 2
|
||||
height: 1
|
||||
width: 2
|
||||
refreshInterval: 30
|
||||
gcal:
|
||||
colors:
|
||||
title: "red"
|
||||
description: "lightblue"
|
||||
highlights:
|
||||
- ['1on1|1\/11', 'green']
|
||||
- ['apple|google|aws', 'blue']
|
||||
- ['interview|meet\ ', 'lightseagreen']
|
||||
- ['lunch', 'yellow']
|
||||
past: "gray"
|
||||
conflictIcon: "🚨"
|
||||
currentIcon: "💥"
|
||||
displayResponseStatus: true
|
||||
email: "your.email@example.com"
|
||||
enabled: true
|
||||
eventCount: 12
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
height: 4
|
||||
width: 1
|
||||
refreshInterval: 300
|
||||
secretFile: "~/.config/wtf/gcal/client_secret.json"
|
||||
withLocation: true
|
||||
gspreadsheets:
|
||||
colors:
|
||||
values: "green"
|
||||
cells:
|
||||
names:
|
||||
- "Cell 1 name"
|
||||
- "Cell 2 name"
|
||||
addresses:
|
||||
- "A1"
|
||||
- "A2"
|
||||
enabled: true
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
width: 1
|
||||
height: 1
|
||||
refreshInterval: "300"
|
||||
secretFile: "~/.config/wtf/gspreadsheets/client_secret.json"
|
||||
sheetId: "id_of_google_spreadsheet"
|
||||
git:
|
||||
commitCount: 5
|
||||
enabled: true
|
||||
position:
|
||||
top: 0
|
||||
left: 2
|
||||
height: 2
|
||||
width: 3
|
||||
refreshInterval: 8
|
||||
repositories:
|
||||
- "/Users/chris/go/src/github.com/wtfutil/wtf"
|
||||
github:
|
||||
enabled: true
|
||||
position:
|
||||
top: 2
|
||||
left: 2
|
||||
height: 2
|
||||
width: 3
|
||||
refreshInterval: 300
|
||||
repositories:
|
||||
repo-name: "owner id"
|
||||
wtf: "wtfutil"
|
||||
username: "wtfutil"
|
||||
jira:
|
||||
colors:
|
||||
rows:
|
||||
even: "lightblue"
|
||||
odd: "white"
|
||||
domain: "https://company.atlassian.net"
|
||||
enabled: true
|
||||
position:
|
||||
top: 1
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
project: "WTF"
|
||||
refreshInterval: 900
|
||||
username: "chris.cummer"
|
||||
newrelic:
|
||||
applicationId: 10594735
|
||||
enabled: true
|
||||
deployCount: 10
|
||||
position:
|
||||
top: 4
|
||||
left: 2
|
||||
height: 2
|
||||
width: 3
|
||||
refreshInterval: 900
|
||||
opsgenie:
|
||||
displayEmpty: true
|
||||
enabled: true
|
||||
position:
|
||||
top: 2
|
||||
left: 0
|
||||
height: 2
|
||||
width: 1
|
||||
refreshInterval: 21600
|
||||
power:
|
||||
enabled: true
|
||||
position:
|
||||
top: 5
|
||||
left: 0
|
||||
height: 2
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
security:
|
||||
enabled: true
|
||||
position:
|
||||
top: 4
|
||||
left: 0
|
||||
height: 2
|
||||
width: 1
|
||||
refreshInterval: 3600
|
||||
status:
|
||||
enabled: false
|
||||
position:
|
||||
top: 5
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 1
|
||||
system:
|
||||
enabled: true
|
||||
position:
|
||||
top: 5
|
||||
left: 1
|
||||
height: 2
|
||||
width: 1
|
||||
refreshInterval: 3600
|
||||
todo:
|
||||
checkedIcon: "X"
|
||||
colors:
|
||||
checked: gray
|
||||
highlight:
|
||||
fore: "black"
|
||||
back: "orange"
|
||||
enabled: true
|
||||
filename: "todo.yml"
|
||||
position:
|
||||
top: 0
|
||||
left: 1
|
||||
height: 2
|
||||
width: 1
|
||||
refreshInterval: 3600
|
||||
weather:
|
||||
apiKey: [YOUR API KEY]
|
||||
# From http://openweathermap.org/help/city_list.txt
|
||||
cityids:
|
||||
- 3370352
|
||||
- 1283240
|
||||
WTF_OWM_API_KEY: [YOUR API KEY]
|
||||
colors:
|
||||
current: "lightblue"
|
||||
enabled: true
|
||||
language: "EN"
|
||||
position:
|
||||
top: 2
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 90
|
||||
tempUnit: "C"
|
||||
blockfolio:
|
||||
enabled: true
|
||||
displayHoldings: true
|
||||
refreshInterval: 400
|
||||
device_token: "device token here, you can find how to get it here https://github.com/bob6664569/blockfolio-api-client"
|
||||
colors:
|
||||
name: blue
|
||||
grows: green
|
||||
drop: red
|
||||
position:
|
||||
top: 3
|
||||
left: 1
|
||||
width: 1
|
||||
height: 1
|
21
_sample_configs/dynamic_sizing.yml
Normal file
21
_sample_configs/dynamic_sizing.yml
Normal file
@ -0,0 +1,21 @@
|
||||
wtf:
|
||||
mods:
|
||||
battery:
|
||||
type: power
|
||||
title: "⚡️"
|
||||
enabled: true
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
security_info:
|
||||
type: security
|
||||
enabled: true
|
||||
position:
|
||||
top: 0
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 3600
|
BIN
_sample_configs/kubernetes_config.png
Normal file
BIN
_sample_configs/kubernetes_config.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 278 KiB |
21
_sample_configs/kubernetes_config.yml
Normal file
21
_sample_configs/kubernetes_config.yml
Normal file
@ -0,0 +1,21 @@
|
||||
wtf:
|
||||
colors:
|
||||
border:
|
||||
focusable: darkslateblue
|
||||
focused: orange
|
||||
normal: gray
|
||||
grid:
|
||||
columns: [32, 32, 32, 32, 32, 32]
|
||||
rows: [10, 10, 10, 10, 10, 10]
|
||||
refreshInterval: 2
|
||||
mods:
|
||||
kubernetes:
|
||||
enabled: true
|
||||
kubeconfig: /Users/testuser/.kube/config
|
||||
namespaces: ["demo", "kube-system"]
|
||||
objects: ["nodes","deployments", "pods"]
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
height: 6
|
||||
width: 3
|
BIN
_sample_configs/sample_config.png
Normal file
BIN
_sample_configs/sample_config.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 891 KiB |
180
_sample_configs/sample_config.yml
Normal file
180
_sample_configs/sample_config.yml
Normal file
@ -0,0 +1,180 @@
|
||||
wtf:
|
||||
colors:
|
||||
background: black
|
||||
border:
|
||||
focusable: darkslateblue
|
||||
focused: orange
|
||||
normal: gray
|
||||
checked: yellow
|
||||
highlight:
|
||||
fore: black
|
||||
back: gray
|
||||
rows:
|
||||
even: yellow
|
||||
odd: white
|
||||
grid:
|
||||
# How _wide_ the columns are, in terminal characters. In this case we have
|
||||
# four columns, each of which are 35 characters wide.
|
||||
columns: [35, 35, 35, 35]
|
||||
# How _high_ the rows are, in terminal lines. In this case we have four rows
|
||||
# that support ten line of text and one of four.
|
||||
rows: [10, 10, 10, 10, 4]
|
||||
refreshInterval: 1
|
||||
openFileUtil: "open"
|
||||
mods:
|
||||
# You can have multiple widgets of the same type.
|
||||
# The "key" is the name of the widget and the type is the actual
|
||||
# widget you want to implement.
|
||||
europe_time:
|
||||
title: "Europe"
|
||||
type: clocks
|
||||
colors:
|
||||
rows:
|
||||
even: "lightblue"
|
||||
odd: "white"
|
||||
enabled: true
|
||||
locations:
|
||||
GMT: "Etc/GMT"
|
||||
Amsterdam: "Europe/Amsterdam"
|
||||
Berlin: "Europe/Berlin"
|
||||
Barcelona: "Europe/Madrid"
|
||||
Copenhagen: "Europe/Copenhagen"
|
||||
London: "Europe/London"
|
||||
Rome: "Europe/Rome"
|
||||
Stockholm: "Europe/Stockholm"
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
sort: "alphabetical"
|
||||
americas_time:
|
||||
title: "Americas"
|
||||
type: clocks
|
||||
colors:
|
||||
rows:
|
||||
even: "lightblue"
|
||||
odd: "white"
|
||||
enabled: true
|
||||
locations:
|
||||
UTC: "Etc/UTC"
|
||||
Vancouver: "America/Vancouver"
|
||||
New_York: "America/New_York"
|
||||
Sao_Paulo: "America/Sao_Paulo"
|
||||
Denver: "America/Denver"
|
||||
Iqaluit: "America/Iqaluit"
|
||||
Bahamas: "America/Nassau"
|
||||
Chicago: "America/Chicago"
|
||||
position:
|
||||
top: 0
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
sort: "alphabetical"
|
||||
battery:
|
||||
type: power
|
||||
title: "⚡️"
|
||||
enabled: true
|
||||
position:
|
||||
top: 1
|
||||
left: 3
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
todolist:
|
||||
type: todo
|
||||
checkedIcon: "X"
|
||||
colors:
|
||||
checked: gray
|
||||
highlight:
|
||||
fore: "black"
|
||||
back: "orange"
|
||||
enabled: true
|
||||
filename: "todo.yml"
|
||||
position:
|
||||
top: 1
|
||||
left: 0
|
||||
height: 2
|
||||
width: 1
|
||||
refreshInterval: 3600
|
||||
ip:
|
||||
type: ipinfo
|
||||
title: "My IP"
|
||||
colors:
|
||||
name: "lightblue"
|
||||
value: "white"
|
||||
enabled: true
|
||||
position:
|
||||
top: 0
|
||||
left: 2
|
||||
height: 1
|
||||
width: 2
|
||||
refreshInterval: 150
|
||||
security_info:
|
||||
type: security
|
||||
title: "Staying safe"
|
||||
enabled: true
|
||||
position:
|
||||
top: 1
|
||||
left: 2
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 3600
|
||||
readme:
|
||||
type: textfile
|
||||
enabled: true
|
||||
filePaths:
|
||||
- "~/.config/wtf/config.yml"
|
||||
format: true
|
||||
formatStyle: "monokai"
|
||||
position:
|
||||
top: 1
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
news:
|
||||
type: hackernews
|
||||
title: "HackerNews"
|
||||
enabled: true
|
||||
numberOfStories: 10
|
||||
position:
|
||||
top: 2
|
||||
left: 1
|
||||
height: 1
|
||||
width: 3
|
||||
storyType: top
|
||||
refreshInterval: 900
|
||||
resources:
|
||||
type: resourceusage
|
||||
enabled: true
|
||||
position:
|
||||
top: 3
|
||||
left: 0
|
||||
height: 2
|
||||
width: 1
|
||||
refreshInterval: 1
|
||||
uptime:
|
||||
type: cmdrunner
|
||||
args: [""]
|
||||
cmd: "uptime"
|
||||
enabled: true
|
||||
position:
|
||||
top: 4
|
||||
left: 1
|
||||
height: 1
|
||||
width: 3
|
||||
refreshInterval: 30
|
||||
disks:
|
||||
type: cmdrunner
|
||||
cmd: "df"
|
||||
args: ["-h"]
|
||||
enabled: true
|
||||
position:
|
||||
top: 3
|
||||
left: 1
|
||||
height: 1
|
||||
width: 3
|
||||
refreshInterval: 3600
|
17
_sample_configs/small_config.yml
Normal file
17
_sample_configs/small_config.yml
Normal file
@ -0,0 +1,17 @@
|
||||
wtf:
|
||||
grid:
|
||||
columns: [20, 20]
|
||||
rows: [3, 3]
|
||||
refreshInterval: 1
|
||||
mods:
|
||||
uptime:
|
||||
type: cmdrunner
|
||||
args: [""]
|
||||
cmd: "uptime"
|
||||
enabled: true
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 30
|
BIN
_sample_configs/uniconfig.png
Normal file
BIN
_sample_configs/uniconfig.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 210 KiB |
@ -1,15 +1,26 @@
|
||||
wtf:
|
||||
colors:
|
||||
background: black
|
||||
border:
|
||||
focusable: darkslateblue
|
||||
grid:
|
||||
columns: [40, 40]
|
||||
rows: [16]
|
||||
refreshInterval: 1
|
||||
mods:
|
||||
clocks:
|
||||
americas_time:
|
||||
title: "Americas"
|
||||
type: clocks
|
||||
enabled: true
|
||||
locations:
|
||||
Toronto: "America/Toronto"
|
||||
UTC: "Etc/UTC"
|
||||
Vancouver: "America/Vancouver"
|
||||
New_York: "America/New_York"
|
||||
Sao_Paolo: "America/Sao_Paulo"
|
||||
Denver: "America/Denver"
|
||||
Iqaluit: "America/Iqaluit"
|
||||
Bahamas: "America/Nassau"
|
||||
Chicago: "America/Chicago"
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
@ -21,7 +32,6 @@ wtf:
|
||||
enabled: true
|
||||
filePaths:
|
||||
- "~/.config/wtf/config.yml"
|
||||
- "~/.config/wtf/log.txt"
|
||||
format: true
|
||||
formatStyle: "vim"
|
||||
position:
|
||||
|
71
app/app_manager.go
Normal file
71
app/app_manager.go
Normal file
@ -0,0 +1,71 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
"github.com/rivo/tview"
|
||||
)
|
||||
|
||||
// WtfAppManager handles the instances of WtfApp, ensuring that they're displayed as requested
|
||||
type WtfAppManager struct {
|
||||
WtfApps []*WtfApp
|
||||
|
||||
selected int
|
||||
}
|
||||
|
||||
// NewAppManager creates and returns an instance of AppManager
|
||||
func NewAppManager() WtfAppManager {
|
||||
appMan := WtfAppManager{
|
||||
WtfApps: []*WtfApp{},
|
||||
}
|
||||
|
||||
return appMan
|
||||
}
|
||||
|
||||
// MakeNewWtfApp creates and starts a new instance of WtfApp from a set of configuration params
|
||||
func (appMan *WtfAppManager) MakeNewWtfApp(config *config.Config, configFilePath string) {
|
||||
wtfApp := NewWtfApp(tview.NewApplication(), config, configFilePath)
|
||||
appMan.Add(wtfApp)
|
||||
|
||||
wtfApp.Start()
|
||||
}
|
||||
|
||||
// Add adds a WtfApp to the collection of apps that the AppManager manages.
|
||||
// This app is then available for display onscreen.
|
||||
func (appMan *WtfAppManager) Add(wtfApp *WtfApp) {
|
||||
appMan.WtfApps = append(appMan.WtfApps, wtfApp)
|
||||
}
|
||||
|
||||
// Current returns the currently-displaying instance of WtfApp
|
||||
func (appMan *WtfAppManager) Current() (*WtfApp, error) {
|
||||
if appMan.selected < 0 || appMan.selected >= len(appMan.WtfApps) {
|
||||
return nil, errors.New("invalid app index selected")
|
||||
}
|
||||
|
||||
return appMan.WtfApps[appMan.selected], nil
|
||||
}
|
||||
|
||||
// Next cycles the WtfApps forward by one, making the next one in the list
|
||||
// the current one. If there are none after the current one, it wraps around.
|
||||
func (appMan *WtfAppManager) Next() (*WtfApp, error) {
|
||||
appMan.selected++
|
||||
|
||||
if appMan.selected >= len(appMan.WtfApps) {
|
||||
appMan.selected = 0
|
||||
}
|
||||
|
||||
return appMan.Current()
|
||||
}
|
||||
|
||||
// Prev cycles the WtfApps backwards by one, making the previous one in the
|
||||
// list the current one. If there are none before the current one, it wraps around.
|
||||
func (appMan *WtfAppManager) Prev() (*WtfApp, error) {
|
||||
appMan.selected--
|
||||
|
||||
if appMan.selected < 0 {
|
||||
appMan.selected = len(appMan.WtfApps) - 1
|
||||
}
|
||||
|
||||
return appMan.Current()
|
||||
}
|
67
app/display.go
Normal file
67
app/display.go
Normal file
@ -0,0 +1,67 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"github.com/olebedev/config"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
// Display is the container for the onscreen representation of a WtfApp
|
||||
type Display struct {
|
||||
Grid *tview.Grid
|
||||
config *config.Config
|
||||
}
|
||||
|
||||
// NewDisplay creates and returns a Display
|
||||
func NewDisplay(widgets []wtf.Wtfable, config *config.Config) *Display {
|
||||
display := Display{
|
||||
Grid: tview.NewGrid(),
|
||||
config: config,
|
||||
}
|
||||
|
||||
firstWidget := widgets[0]
|
||||
display.Grid.SetBackgroundColor(
|
||||
wtf.ColorFor(
|
||||
firstWidget.CommonSettings().Colors.WidgetTheme.Background,
|
||||
),
|
||||
)
|
||||
|
||||
display.build(widgets)
|
||||
|
||||
return &display
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (display *Display) add(widget wtf.Wtfable) {
|
||||
if widget.Disabled() {
|
||||
return
|
||||
}
|
||||
|
||||
display.Grid.AddItem(
|
||||
widget.TextView(),
|
||||
widget.CommonSettings().Top,
|
||||
widget.CommonSettings().Left,
|
||||
widget.CommonSettings().Height,
|
||||
widget.CommonSettings().Width,
|
||||
0,
|
||||
0,
|
||||
false,
|
||||
)
|
||||
}
|
||||
|
||||
func (display *Display) build(widgets []wtf.Wtfable) *tview.Grid {
|
||||
cols := utils.ToInts(display.config.UList("wtf.grid.columns"))
|
||||
rows := utils.ToInts(display.config.UList("wtf.grid.rows"))
|
||||
|
||||
display.Grid.SetColumns(cols...)
|
||||
display.Grid.SetRows(rows...)
|
||||
display.Grid.SetBorder(false)
|
||||
|
||||
for _, widget := range widgets {
|
||||
display.add(widget)
|
||||
}
|
||||
|
||||
return display.Grid
|
||||
}
|
104
app/exit_message.go
Normal file
104
app/exit_message.go
Normal file
@ -0,0 +1,104 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/logrusorgru/aurora"
|
||||
"github.com/olebedev/config"
|
||||
)
|
||||
|
||||
const exitMessageHeader = `
|
||||
____ __ ____ .___________. _______
|
||||
\ \ / \ / / | || ____|
|
||||
\ \/ \/ / ----| |-----| |__
|
||||
\ / | | | __|
|
||||
\ /\ / | | | |
|
||||
\__/ \__/ |__| |__|
|
||||
|
||||
the personal information dashboard for your terminal
|
||||
`
|
||||
|
||||
// DisplayExitMessage displays the onscreen exit message when the app quits
|
||||
func (wtfApp *WtfApp) DisplayExitMessage() {
|
||||
exitMessageIsDisplayable := readDisplayableConfig(wtfApp.config)
|
||||
|
||||
wtfApp.displayExitMsg(exitMessageIsDisplayable)
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (wtfApp *WtfApp) displayExitMsg(exitMessageIsDisplayable bool) string {
|
||||
// If a sponsor or contributor and opt out of seeing the exit message, do not display it
|
||||
if (wtfApp.ghUser.IsContributor || wtfApp.ghUser.IsSponsor) && !exitMessageIsDisplayable {
|
||||
return ""
|
||||
}
|
||||
|
||||
msgs := []string{}
|
||||
|
||||
msgs = append(msgs, aurora.Magenta(exitMessageHeader).String())
|
||||
|
||||
if wtfApp.ghUser.IsContributor {
|
||||
msgs = append(msgs, wtfApp.contributorThankYouMessage())
|
||||
}
|
||||
|
||||
if wtfApp.ghUser.IsSponsor {
|
||||
msgs = append(msgs, wtfApp.sponsorThankYouMessage())
|
||||
}
|
||||
|
||||
if !wtfApp.ghUser.IsContributor && !wtfApp.ghUser.IsSponsor {
|
||||
msgs = append(msgs, wtfApp.supportRequestMessage())
|
||||
}
|
||||
|
||||
displayMsg := strings.Join(msgs, "\n")
|
||||
|
||||
fmt.Println(displayMsg)
|
||||
|
||||
return displayMsg
|
||||
}
|
||||
|
||||
// readDisplayableConfig figures out whether or not the exit message should be displayed
|
||||
// per the user's wishes. It allows contributors and sponsors to opt out of the exit message
|
||||
func readDisplayableConfig(cfg *config.Config) bool {
|
||||
displayExitMsg := cfg.UBool("wtf.exitMessage.display", true)
|
||||
return displayExitMsg
|
||||
}
|
||||
|
||||
// readGitHubAPIKey attempts to find a GitHub API key somewhere in the configuration file
|
||||
func readGitHubAPIKey(cfg *config.Config) string {
|
||||
apiKey := cfg.UString("wtf.exitMessage.githubAPIKey", os.Getenv("WTF_GITHUB_TOKEN"))
|
||||
if apiKey != "" {
|
||||
return apiKey
|
||||
}
|
||||
|
||||
moduleConfig, err := cfg.Get("wtf.mods.github")
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
return moduleConfig.UString("apiKey", "")
|
||||
}
|
||||
|
||||
/* -------------------- Messaging -------------------- */
|
||||
|
||||
func (wtfApp *WtfApp) contributorThankYouMessage() string {
|
||||
str := " On behalf of all the users of WTF, thank you for contributing to the source code."
|
||||
str += fmt.Sprintf(" %s", aurora.Green("\n\n You rock."))
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (wtfApp *WtfApp) sponsorThankYouMessage() string {
|
||||
str := " Your sponsorship of WTF makes a difference. Thank you for sponsoring and supporting WTF."
|
||||
str += fmt.Sprintf(" %s", aurora.Green("\n\n You're awesome."))
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (wtfApp *WtfApp) supportRequestMessage() string {
|
||||
str := " The development and maintenance of WTF is supported by sponsorships.\n"
|
||||
str += fmt.Sprintf(" Please consider sponsoring WTF at %s\n", aurora.Green("https://github.com/sponsors/senorprogrammer"))
|
||||
|
||||
return str
|
||||
}
|
71
app/exit_message_test.go
Normal file
71
app/exit_message_test.go
Normal file
@ -0,0 +1,71 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/wtfutil/wtf/support"
|
||||
"gotest.tools/assert"
|
||||
)
|
||||
|
||||
func Test_displayExitMessage(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
isDisplayable bool
|
||||
isContributor bool
|
||||
isSponsor bool
|
||||
compareWith string
|
||||
expected string
|
||||
}{
|
||||
{
|
||||
name: "when not displayable",
|
||||
isDisplayable: false,
|
||||
isContributor: true,
|
||||
isSponsor: true,
|
||||
compareWith: "equals",
|
||||
expected: "",
|
||||
},
|
||||
{
|
||||
name: "when contributor",
|
||||
isDisplayable: true,
|
||||
isContributor: true,
|
||||
compareWith: "contains",
|
||||
expected: "thank you for contributing",
|
||||
},
|
||||
{
|
||||
name: "when sponsor",
|
||||
isDisplayable: true,
|
||||
isSponsor: true,
|
||||
compareWith: "contains",
|
||||
expected: "Thank you for sponsoring",
|
||||
},
|
||||
{
|
||||
name: "when user",
|
||||
isDisplayable: true,
|
||||
isContributor: false,
|
||||
isSponsor: false,
|
||||
compareWith: "contains",
|
||||
expected: "supported by sponsorships",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
wtfApp := WtfApp{}
|
||||
wtfApp.ghUser = &support.GitHubUser{
|
||||
IsContributor: tt.isContributor,
|
||||
IsSponsor: tt.isSponsor,
|
||||
}
|
||||
|
||||
actual := wtfApp.displayExitMsg(tt.isDisplayable)
|
||||
|
||||
if tt.compareWith == "equals" {
|
||||
assert.Equal(t, actual, tt.expected)
|
||||
}
|
||||
|
||||
if tt.compareWith == "contains" {
|
||||
assert.Equal(t, true, strings.Contains(actual, tt.expected))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
@ -1,9 +1,15 @@
|
||||
package wtf
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
// FocusState is a custom type that differentiates focusable scopes
|
||||
type FocusState int
|
||||
|
||||
const (
|
||||
@ -15,49 +21,33 @@ const (
|
||||
// FocusTracker is used by the app to track which onscreen widget currently has focus,
|
||||
// and to move focus between widgets.
|
||||
type FocusTracker struct {
|
||||
App *tview.Application
|
||||
Idx int
|
||||
Widgets []Wtfable
|
||||
Idx int
|
||||
IsFocused bool
|
||||
Widgets []wtf.Wtfable
|
||||
|
||||
config *config.Config
|
||||
tviewApp *tview.Application
|
||||
}
|
||||
|
||||
// NewFocusTracker creates and returns an instance of FocusTracker
|
||||
func NewFocusTracker(tviewApp *tview.Application, widgets []wtf.Wtfable, config *config.Config) FocusTracker {
|
||||
focusTracker := FocusTracker{
|
||||
tviewApp: tviewApp,
|
||||
Idx: -1,
|
||||
IsFocused: false,
|
||||
Widgets: widgets,
|
||||
|
||||
config: config,
|
||||
}
|
||||
|
||||
focusTracker.assignHotKeys()
|
||||
|
||||
return focusTracker
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
// AssignHotKeys assigns an alphabetic keyboard character to each focusable
|
||||
// widget so that the widget can be brought into focus by pressing that keyboard key
|
||||
func (tracker *FocusTracker) AssignHotKeys() {
|
||||
if !tracker.useNavShortcuts() {
|
||||
return
|
||||
}
|
||||
|
||||
usedKeys := make(map[string]bool)
|
||||
focusables := tracker.focusables()
|
||||
i := 1
|
||||
|
||||
for _, focusable := range focusables {
|
||||
if focusable.FocusChar() != "" {
|
||||
usedKeys[focusable.FocusChar()] = true
|
||||
}
|
||||
}
|
||||
for _, focusable := range focusables {
|
||||
if focusable.FocusChar() != "" {
|
||||
continue
|
||||
}
|
||||
if _, foundKey := usedKeys[string('0'+i)]; foundKey {
|
||||
for ; foundKey; _, foundKey = usedKeys[string('0'+i)] {
|
||||
i++
|
||||
}
|
||||
}
|
||||
|
||||
// Don't have nav characters > "9"
|
||||
if i >= 10 {
|
||||
break
|
||||
}
|
||||
|
||||
focusable.SetFocusChar(string('0' + i))
|
||||
i++
|
||||
}
|
||||
}
|
||||
|
||||
// FocusOn puts the focus on the item that belongs to the focus character passed in
|
||||
func (tracker *FocusTracker) FocusOn(char string) bool {
|
||||
if !tracker.useNavShortcuts() {
|
||||
return false
|
||||
@ -76,6 +66,7 @@ func (tracker *FocusTracker) FocusOn(char string) bool {
|
||||
tracker.focus(tracker.Idx)
|
||||
|
||||
hasFocusable = true
|
||||
tracker.IsFocused = true
|
||||
break
|
||||
}
|
||||
}
|
||||
@ -93,6 +84,8 @@ func (tracker *FocusTracker) Next() {
|
||||
tracker.blur(tracker.Idx)
|
||||
tracker.increment()
|
||||
tracker.focus(tracker.Idx)
|
||||
|
||||
tracker.IsFocused = true
|
||||
}
|
||||
|
||||
// None removes focus from the currently-focused widget.
|
||||
@ -114,14 +107,61 @@ func (tracker *FocusTracker) Prev() {
|
||||
tracker.blur(tracker.Idx)
|
||||
tracker.decrement()
|
||||
tracker.focus(tracker.Idx)
|
||||
|
||||
tracker.IsFocused = true
|
||||
}
|
||||
|
||||
// Refocus forces the focus back to the currently-selected item
|
||||
func (tracker *FocusTracker) Refocus() {
|
||||
tracker.focus(tracker.Idx)
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
// AssignHotKeys assigns an alphabetic keyboard character to each focusable
|
||||
// widget so that the widget can be brought into focus by pressing that keyboard key
|
||||
// Valid numbers are between 1 and 9, inclusive
|
||||
func (tracker *FocusTracker) assignHotKeys() {
|
||||
if !tracker.useNavShortcuts() {
|
||||
return
|
||||
}
|
||||
|
||||
usedKeys := make(map[string]bool)
|
||||
focusables := tracker.focusables()
|
||||
|
||||
// First, block out the explicitly-defined characters so they can't be automatically
|
||||
// assigned to other modules
|
||||
for _, focusable := range focusables {
|
||||
if focusable.FocusChar() != "" {
|
||||
usedKeys[focusable.FocusChar()] = true
|
||||
}
|
||||
}
|
||||
|
||||
focusNum := 1
|
||||
|
||||
// Range over all the modules and assign focus characters to any that are focusable
|
||||
// and don't have explicitly-defined focus characters
|
||||
for _, focusable := range focusables {
|
||||
if focusable.FocusChar() != "" {
|
||||
continue
|
||||
}
|
||||
|
||||
if _, foundKey := usedKeys[fmt.Sprint(focusNum)]; foundKey {
|
||||
for ; foundKey; _, foundKey = usedKeys[fmt.Sprint(focusNum)] {
|
||||
focusNum++
|
||||
}
|
||||
}
|
||||
|
||||
// Don't allow focus characters > "9"
|
||||
if focusNum >= 10 {
|
||||
break
|
||||
}
|
||||
|
||||
focusable.SetFocusChar(fmt.Sprint(focusNum))
|
||||
focusNum++
|
||||
}
|
||||
}
|
||||
|
||||
func (tracker *FocusTracker) blur(idx int) {
|
||||
widget := tracker.focusableAt(idx)
|
||||
if widget == nil {
|
||||
@ -131,11 +171,17 @@ func (tracker *FocusTracker) blur(idx int) {
|
||||
view := widget.TextView()
|
||||
view.Blur()
|
||||
|
||||
view.SetBorderColor(ColorFor(widget.BorderColor()))
|
||||
view.SetBorderColor(
|
||||
wtf.ColorFor(
|
||||
widget.BorderColor(),
|
||||
),
|
||||
)
|
||||
|
||||
tracker.IsFocused = false
|
||||
}
|
||||
|
||||
func (tracker *FocusTracker) decrement() {
|
||||
tracker.Idx = tracker.Idx - 1
|
||||
tracker.Idx--
|
||||
|
||||
if tracker.Idx < 0 {
|
||||
tracker.Idx = len(tracker.focusables()) - 1
|
||||
@ -149,14 +195,16 @@ func (tracker *FocusTracker) focus(idx int) {
|
||||
}
|
||||
|
||||
view := widget.TextView()
|
||||
view.SetBorderColor(ColorFor(Config.UString("wtf.colors.border.focused", "gray")))
|
||||
|
||||
tracker.App.SetFocus(view)
|
||||
tracker.App.Draw()
|
||||
view.SetBorderColor(
|
||||
wtf.ColorFor(
|
||||
widget.CommonSettings().Colors.BorderTheme.Focused,
|
||||
),
|
||||
)
|
||||
tracker.tviewApp.SetFocus(view)
|
||||
}
|
||||
|
||||
func (tracker *FocusTracker) focusables() []Wtfable {
|
||||
focusable := []Wtfable{}
|
||||
func (tracker *FocusTracker) focusables() []wtf.Wtfable {
|
||||
focusable := []wtf.Wtfable{}
|
||||
|
||||
for _, widget := range tracker.Widgets {
|
||||
if widget.Focusable() {
|
||||
@ -164,10 +212,24 @@ func (tracker *FocusTracker) focusables() []Wtfable {
|
||||
}
|
||||
}
|
||||
|
||||
// Sort for deterministic ordering
|
||||
sort.SliceStable(focusable, func(i, j int) bool {
|
||||
iTop := focusable[i].CommonSettings().Top
|
||||
jTop := focusable[j].CommonSettings().Top
|
||||
|
||||
if iTop < jTop {
|
||||
return true
|
||||
}
|
||||
if iTop == jTop {
|
||||
return focusable[i].CommonSettings().Left < focusable[j].CommonSettings().Left
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
return focusable
|
||||
}
|
||||
|
||||
func (tracker *FocusTracker) focusableAt(idx int) Wtfable {
|
||||
func (tracker *FocusTracker) focusableAt(idx int) wtf.Wtfable {
|
||||
if idx < 0 || idx >= len(tracker.focusables()) {
|
||||
return nil
|
||||
}
|
||||
@ -181,7 +243,7 @@ func (tracker *FocusTracker) focusState() FocusState {
|
||||
}
|
||||
|
||||
for _, widget := range tracker.Widgets {
|
||||
if widget.TextView() == tracker.App.GetFocus() {
|
||||
if widget.TextView() == tracker.tviewApp.GetFocus() {
|
||||
return widgetFocused
|
||||
}
|
||||
}
|
||||
@ -190,7 +252,7 @@ func (tracker *FocusTracker) focusState() FocusState {
|
||||
}
|
||||
|
||||
func (tracker *FocusTracker) increment() {
|
||||
tracker.Idx = tracker.Idx + 1
|
||||
tracker.Idx++
|
||||
|
||||
if tracker.Idx == len(tracker.focusables()) {
|
||||
tracker.Idx = 0
|
||||
@ -198,5 +260,5 @@ func (tracker *FocusTracker) increment() {
|
||||
}
|
||||
|
||||
func (tracker *FocusTracker) useNavShortcuts() bool {
|
||||
return Config.UBool("wtf.navigation.shortcuts", true)
|
||||
return tracker.config.UBool("wtf.navigation.shortcuts", true)
|
||||
}
|
81
app/module_validator.go
Normal file
81
app/module_validator.go
Normal file
@ -0,0 +1,81 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/logrusorgru/aurora"
|
||||
"github.com/wtfutil/wtf/cfg"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
// ModuleValidator is responsible for validating the state of a module's configuration
|
||||
type ModuleValidator struct{}
|
||||
|
||||
type widgetError struct {
|
||||
name string
|
||||
validationErrors []cfg.Validatable
|
||||
}
|
||||
|
||||
// NewModuleValidator creates and returns an instance of ModuleValidator
|
||||
func NewModuleValidator() *ModuleValidator {
|
||||
return &ModuleValidator{}
|
||||
}
|
||||
|
||||
// Validate rolls through all the enabled widgets and looks for configuration errors.
|
||||
// If it finds any it stringifies them, writes them to the console, and kills the app gracefully
|
||||
func (val *ModuleValidator) Validate(widgets []wtf.Wtfable) {
|
||||
validationErrors := validate(widgets)
|
||||
|
||||
if len(validationErrors) > 0 {
|
||||
fmt.Println()
|
||||
for _, error := range validationErrors {
|
||||
for _, message := range error.errorMessages() {
|
||||
fmt.Println(message)
|
||||
}
|
||||
}
|
||||
fmt.Println()
|
||||
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func validate(widgets []wtf.Wtfable) (widgetErrors []widgetError) {
|
||||
for _, widget := range widgets {
|
||||
error := widgetError{name: widget.Name()}
|
||||
|
||||
for _, val := range widget.CommonSettings().Validations() {
|
||||
if val.HasError() {
|
||||
error.validationErrors = append(error.validationErrors, val)
|
||||
}
|
||||
}
|
||||
|
||||
if len(error.validationErrors) > 0 {
|
||||
widgetErrors = append(widgetErrors, error)
|
||||
}
|
||||
}
|
||||
|
||||
return widgetErrors
|
||||
}
|
||||
|
||||
func (err widgetError) errorMessages() (messages []string) {
|
||||
widgetMessage := fmt.Sprintf(
|
||||
"%s in %s configuration",
|
||||
aurora.Red("Errors"),
|
||||
aurora.Yellow(
|
||||
fmt.Sprintf(
|
||||
"%s.position",
|
||||
err.name,
|
||||
),
|
||||
),
|
||||
)
|
||||
messages = append(messages, widgetMessage)
|
||||
|
||||
for _, e := range err.validationErrors {
|
||||
configMessage := fmt.Sprintf(" - %s\t%s %v", e.String(), aurora.Red("Error:"), e.Error())
|
||||
|
||||
messages = append(messages, configMessage)
|
||||
}
|
||||
|
||||
return messages
|
||||
}
|
102
app/module_validator_test.go
Normal file
102
app/module_validator_test.go
Normal file
@ -0,0 +1,102 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
"github.com/logrusorgru/aurora"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
const (
|
||||
valid = `
|
||||
wtf:
|
||||
mods:
|
||||
clocks:
|
||||
enabled: true
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 30`
|
||||
|
||||
invalid = `
|
||||
wtf:
|
||||
mods:
|
||||
clocks:
|
||||
enabled: true
|
||||
position:
|
||||
top: abc
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 30`
|
||||
)
|
||||
|
||||
func Test_NewModuleValidator(t *testing.T) {
|
||||
assert.IsType(t, &ModuleValidator{}, NewModuleValidator())
|
||||
}
|
||||
|
||||
func Test_validate(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
moduleName string
|
||||
config *config.Config
|
||||
expected []string
|
||||
}{
|
||||
{
|
||||
name: "valid config",
|
||||
moduleName: "clocks",
|
||||
config: func() *config.Config {
|
||||
cfg, _ := config.ParseYaml(valid)
|
||||
return cfg
|
||||
}(),
|
||||
expected: []string{},
|
||||
},
|
||||
{
|
||||
name: "invalid config",
|
||||
moduleName: "clocks",
|
||||
config: func() *config.Config {
|
||||
cfg, _ := config.ParseYaml(invalid)
|
||||
return cfg
|
||||
}(),
|
||||
expected: []string{
|
||||
fmt.Sprintf("%s in %s configuration", aurora.Red("Errors"), aurora.Yellow("clocks.position")),
|
||||
fmt.Sprintf(
|
||||
" - Invalid value for %s: 0 %s strconv.ParseInt: parsing \"abc\": invalid syntax",
|
||||
aurora.Yellow("top"),
|
||||
aurora.Red("Error:"),
|
||||
),
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
widget := MakeWidget(nil, nil, tt.moduleName, tt.config)
|
||||
|
||||
if widget == nil {
|
||||
t.Logf("Failed to create widget %s", tt.moduleName)
|
||||
t.FailNow()
|
||||
}
|
||||
|
||||
errs := validate([]wtf.Wtfable{widget})
|
||||
|
||||
if len(tt.expected) == 0 {
|
||||
assert.Empty(t, errs)
|
||||
} else {
|
||||
assert.NotEmpty(t, errs)
|
||||
|
||||
var actual []string
|
||||
for _, err := range errs {
|
||||
actual = append(actual, err.errorMessages()...)
|
||||
}
|
||||
|
||||
assert.Equal(t, tt.expected, actual)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
38
app/scheduler.go
Normal file
38
app/scheduler.go
Normal file
@ -0,0 +1,38 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
// Schedule kicks off the first refresh of a module's data and then queues the rest of the
|
||||
// data refreshes on a timer
|
||||
func Schedule(widget wtf.Wtfable) {
|
||||
widget.Refresh()
|
||||
|
||||
interval := time.Duration(widget.RefreshInterval()) * time.Second
|
||||
|
||||
if interval <= 0 {
|
||||
return
|
||||
}
|
||||
|
||||
timer := time.NewTicker(interval)
|
||||
|
||||
for {
|
||||
select {
|
||||
case <-timer.C:
|
||||
if widget.Enabled() {
|
||||
widget.Refresh()
|
||||
} else {
|
||||
timer.Stop()
|
||||
return
|
||||
}
|
||||
case quit := <-widget.QuitChan():
|
||||
if quit {
|
||||
timer.Stop()
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
362
app/widget_maker.go
Normal file
362
app/widget_maker.go
Normal file
@ -0,0 +1,362 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"github.com/olebedev/config"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/modules/asana"
|
||||
"github.com/wtfutil/wtf/modules/azuredevops"
|
||||
"github.com/wtfutil/wtf/modules/bamboohr"
|
||||
"github.com/wtfutil/wtf/modules/bargraph"
|
||||
"github.com/wtfutil/wtf/modules/buildkite"
|
||||
cdsfavorites "github.com/wtfutil/wtf/modules/cds/favorites"
|
||||
cdsqueue "github.com/wtfutil/wtf/modules/cds/queue"
|
||||
cdsstatus "github.com/wtfutil/wtf/modules/cds/status"
|
||||
"github.com/wtfutil/wtf/modules/circleci"
|
||||
"github.com/wtfutil/wtf/modules/clocks"
|
||||
"github.com/wtfutil/wtf/modules/cmdrunner"
|
||||
"github.com/wtfutil/wtf/modules/covid"
|
||||
"github.com/wtfutil/wtf/modules/cryptoexchanges/bittrex"
|
||||
"github.com/wtfutil/wtf/modules/cryptoexchanges/blockfolio"
|
||||
"github.com/wtfutil/wtf/modules/cryptoexchanges/cryptolive"
|
||||
"github.com/wtfutil/wtf/modules/datadog"
|
||||
"github.com/wtfutil/wtf/modules/devto"
|
||||
"github.com/wtfutil/wtf/modules/digitalclock"
|
||||
"github.com/wtfutil/wtf/modules/digitalocean"
|
||||
"github.com/wtfutil/wtf/modules/docker"
|
||||
"github.com/wtfutil/wtf/modules/exchangerates"
|
||||
"github.com/wtfutil/wtf/modules/feedreader"
|
||||
"github.com/wtfutil/wtf/modules/football"
|
||||
"github.com/wtfutil/wtf/modules/gcal"
|
||||
"github.com/wtfutil/wtf/modules/gerrit"
|
||||
"github.com/wtfutil/wtf/modules/git"
|
||||
"github.com/wtfutil/wtf/modules/github"
|
||||
"github.com/wtfutil/wtf/modules/gitlab"
|
||||
"github.com/wtfutil/wtf/modules/gitlabtodo"
|
||||
"github.com/wtfutil/wtf/modules/gitter"
|
||||
"github.com/wtfutil/wtf/modules/googleanalytics"
|
||||
"github.com/wtfutil/wtf/modules/grafana"
|
||||
"github.com/wtfutil/wtf/modules/gspreadsheets"
|
||||
"github.com/wtfutil/wtf/modules/hackernews"
|
||||
"github.com/wtfutil/wtf/modules/healthchecks"
|
||||
"github.com/wtfutil/wtf/modules/hibp"
|
||||
"github.com/wtfutil/wtf/modules/ipaddresses/ipapi"
|
||||
"github.com/wtfutil/wtf/modules/ipaddresses/ipinfo"
|
||||
"github.com/wtfutil/wtf/modules/jenkins"
|
||||
"github.com/wtfutil/wtf/modules/jira"
|
||||
"github.com/wtfutil/wtf/modules/krisinformation"
|
||||
"github.com/wtfutil/wtf/modules/kubernetes"
|
||||
"github.com/wtfutil/wtf/modules/logger"
|
||||
"github.com/wtfutil/wtf/modules/mercurial"
|
||||
"github.com/wtfutil/wtf/modules/nbascore"
|
||||
"github.com/wtfutil/wtf/modules/newrelic"
|
||||
"github.com/wtfutil/wtf/modules/opsgenie"
|
||||
"github.com/wtfutil/wtf/modules/pagerduty"
|
||||
"github.com/wtfutil/wtf/modules/pihole"
|
||||
"github.com/wtfutil/wtf/modules/pocket"
|
||||
"github.com/wtfutil/wtf/modules/power"
|
||||
"github.com/wtfutil/wtf/modules/resourceusage"
|
||||
"github.com/wtfutil/wtf/modules/rollbar"
|
||||
"github.com/wtfutil/wtf/modules/security"
|
||||
"github.com/wtfutil/wtf/modules/spacex"
|
||||
"github.com/wtfutil/wtf/modules/spotify"
|
||||
"github.com/wtfutil/wtf/modules/spotifyweb"
|
||||
"github.com/wtfutil/wtf/modules/status"
|
||||
"github.com/wtfutil/wtf/modules/stocks/finnhub"
|
||||
"github.com/wtfutil/wtf/modules/stocks/yfinance"
|
||||
"github.com/wtfutil/wtf/modules/subreddit"
|
||||
"github.com/wtfutil/wtf/modules/textfile"
|
||||
"github.com/wtfutil/wtf/modules/todo"
|
||||
"github.com/wtfutil/wtf/modules/todo_plus"
|
||||
"github.com/wtfutil/wtf/modules/transmission"
|
||||
"github.com/wtfutil/wtf/modules/travisci"
|
||||
"github.com/wtfutil/wtf/modules/twitch"
|
||||
"github.com/wtfutil/wtf/modules/twitter"
|
||||
"github.com/wtfutil/wtf/modules/twitterstats"
|
||||
"github.com/wtfutil/wtf/modules/unknown"
|
||||
"github.com/wtfutil/wtf/modules/uptimerobot"
|
||||
"github.com/wtfutil/wtf/modules/victorops"
|
||||
"github.com/wtfutil/wtf/modules/weatherservices/arpansagovau"
|
||||
"github.com/wtfutil/wtf/modules/weatherservices/prettyweather"
|
||||
"github.com/wtfutil/wtf/modules/weatherservices/weather"
|
||||
"github.com/wtfutil/wtf/modules/zendesk"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
// MakeWidget creates and returns instances of widgets
|
||||
func MakeWidget(
|
||||
tviewApp *tview.Application,
|
||||
pages *tview.Pages,
|
||||
moduleName string,
|
||||
config *config.Config,
|
||||
) wtf.Wtfable {
|
||||
var widget wtf.Wtfable
|
||||
|
||||
moduleConfig, _ := config.Get("wtf.mods." + moduleName)
|
||||
|
||||
// Don' try to initialize modules that don't exist
|
||||
if moduleConfig == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Don't try to initialize modules that aren't enabled
|
||||
if enabled := moduleConfig.UBool("enabled", false); !enabled {
|
||||
return nil
|
||||
}
|
||||
|
||||
// Always in alphabetical order
|
||||
switch moduleConfig.UString("type", moduleName) {
|
||||
case "arpansagovau":
|
||||
settings := arpansagovau.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = arpansagovau.NewWidget(tviewApp, settings)
|
||||
case "asana":
|
||||
settings := asana.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = asana.NewWidget(tviewApp, pages, settings)
|
||||
case "azuredevops":
|
||||
settings := azuredevops.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = azuredevops.NewWidget(tviewApp, pages, settings)
|
||||
case "bamboohr":
|
||||
settings := bamboohr.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = bamboohr.NewWidget(tviewApp, settings)
|
||||
case "bargraph":
|
||||
settings := bargraph.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = bargraph.NewWidget(tviewApp, settings)
|
||||
case "bittrex":
|
||||
settings := bittrex.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = bittrex.NewWidget(tviewApp, settings)
|
||||
case "blockfolio":
|
||||
settings := blockfolio.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = blockfolio.NewWidget(tviewApp, settings)
|
||||
case "buildkite":
|
||||
settings := buildkite.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = buildkite.NewWidget(tviewApp, pages, settings)
|
||||
case "cdsFavorites":
|
||||
settings := cdsfavorites.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = cdsfavorites.NewWidget(tviewApp, pages, settings)
|
||||
case "cdsQueue":
|
||||
settings := cdsqueue.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = cdsqueue.NewWidget(tviewApp, pages, settings)
|
||||
case "cdsStatus":
|
||||
settings := cdsstatus.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = cdsstatus.NewWidget(tviewApp, pages, settings)
|
||||
case "circleci":
|
||||
settings := circleci.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = circleci.NewWidget(tviewApp, settings)
|
||||
case "clocks":
|
||||
settings := clocks.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = clocks.NewWidget(tviewApp, settings)
|
||||
case "covid":
|
||||
settings := covid.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = covid.NewWidget(tviewApp, settings)
|
||||
case "cmdrunner":
|
||||
settings := cmdrunner.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = cmdrunner.NewWidget(tviewApp, settings)
|
||||
case "cryptolive":
|
||||
settings := cryptolive.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = cryptolive.NewWidget(tviewApp, settings)
|
||||
case "datadog":
|
||||
settings := datadog.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = datadog.NewWidget(tviewApp, pages, settings)
|
||||
case "devto":
|
||||
settings := devto.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = devto.NewWidget(tviewApp, pages, settings)
|
||||
case "digitalclock":
|
||||
settings := digitalclock.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = digitalclock.NewWidget(tviewApp, settings)
|
||||
case "digitalocean":
|
||||
settings := digitalocean.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = digitalocean.NewWidget(tviewApp, pages, settings)
|
||||
case "docker":
|
||||
settings := docker.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = docker.NewWidget(tviewApp, pages, settings)
|
||||
case "feedreader":
|
||||
settings := feedreader.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = feedreader.NewWidget(tviewApp, pages, settings)
|
||||
case "football":
|
||||
settings := football.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = football.NewWidget(tviewApp, pages, settings)
|
||||
case "gcal":
|
||||
settings := gcal.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = gcal.NewWidget(tviewApp, settings)
|
||||
case "gerrit":
|
||||
settings := gerrit.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = gerrit.NewWidget(tviewApp, pages, settings)
|
||||
case "git":
|
||||
settings := git.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = git.NewWidget(tviewApp, pages, settings)
|
||||
case "github":
|
||||
settings := github.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = github.NewWidget(tviewApp, pages, settings)
|
||||
case "gitlab":
|
||||
settings := gitlab.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = gitlab.NewWidget(tviewApp, pages, settings)
|
||||
case "gitlabtodo":
|
||||
settings := gitlabtodo.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = gitlabtodo.NewWidget(tviewApp, pages, settings)
|
||||
case "gitter":
|
||||
settings := gitter.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = gitter.NewWidget(tviewApp, pages, settings)
|
||||
case "googleanalytics":
|
||||
settings := googleanalytics.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = googleanalytics.NewWidget(tviewApp, settings)
|
||||
case "gspreadsheets":
|
||||
settings := gspreadsheets.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = gspreadsheets.NewWidget(tviewApp, settings)
|
||||
case "grafana":
|
||||
settings := grafana.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = grafana.NewWidget(tviewApp, pages, settings)
|
||||
case "hackernews":
|
||||
settings := hackernews.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = hackernews.NewWidget(tviewApp, pages, settings)
|
||||
case "healthchecks":
|
||||
settings := healthchecks.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = healthchecks.NewWidget(tviewApp, pages, settings)
|
||||
case "hibp":
|
||||
settings := hibp.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = hibp.NewWidget(tviewApp, settings)
|
||||
case "ipapi":
|
||||
settings := ipapi.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = ipapi.NewWidget(tviewApp, settings)
|
||||
case "ipinfo":
|
||||
settings := ipinfo.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = ipinfo.NewWidget(tviewApp, settings)
|
||||
case "jenkins":
|
||||
settings := jenkins.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = jenkins.NewWidget(tviewApp, pages, settings)
|
||||
case "jira":
|
||||
settings := jira.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = jira.NewWidget(tviewApp, pages, settings)
|
||||
case "kubernetes":
|
||||
settings := kubernetes.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = kubernetes.NewWidget(tviewApp, settings)
|
||||
case "krisinformation":
|
||||
settings := krisinformation.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = krisinformation.NewWidget(tviewApp, settings)
|
||||
case "logger":
|
||||
settings := logger.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = logger.NewWidget(tviewApp, settings)
|
||||
case "mercurial":
|
||||
settings := mercurial.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = mercurial.NewWidget(tviewApp, pages, settings)
|
||||
case "nbascore":
|
||||
settings := nbascore.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = nbascore.NewWidget(tviewApp, pages, settings)
|
||||
case "newrelic":
|
||||
settings := newrelic.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = newrelic.NewWidget(tviewApp, pages, settings)
|
||||
case "opsgenie":
|
||||
settings := opsgenie.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = opsgenie.NewWidget(tviewApp, settings)
|
||||
case "pagerduty":
|
||||
settings := pagerduty.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = pagerduty.NewWidget(tviewApp, settings)
|
||||
case "pihole":
|
||||
settings := pihole.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = pihole.NewWidget(tviewApp, pages, settings)
|
||||
case "power":
|
||||
settings := power.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = power.NewWidget(tviewApp, settings)
|
||||
case "prettyweather":
|
||||
settings := prettyweather.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = prettyweather.NewWidget(tviewApp, settings)
|
||||
case "pocket":
|
||||
settings := pocket.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = pocket.NewWidget(tviewApp, pages, settings)
|
||||
case "resourceusage":
|
||||
settings := resourceusage.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = resourceusage.NewWidget(tviewApp, settings)
|
||||
case "rollbar":
|
||||
settings := rollbar.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = rollbar.NewWidget(tviewApp, pages, settings)
|
||||
case "security":
|
||||
settings := security.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = security.NewWidget(tviewApp, settings)
|
||||
case "spacex":
|
||||
settings := spacex.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = spacex.NewWidget(tviewApp, settings)
|
||||
case "spotify":
|
||||
settings := spotify.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = spotify.NewWidget(tviewApp, pages, settings)
|
||||
case "spotifyweb":
|
||||
settings := spotifyweb.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = spotifyweb.NewWidget(tviewApp, pages, settings)
|
||||
case "status":
|
||||
settings := status.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = status.NewWidget(tviewApp, settings)
|
||||
case "subreddit":
|
||||
settings := subreddit.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = subreddit.NewWidget(tviewApp, pages, settings)
|
||||
case "textfile":
|
||||
settings := textfile.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = textfile.NewWidget(tviewApp, pages, settings)
|
||||
case "todo":
|
||||
settings := todo.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = todo.NewWidget(tviewApp, pages, settings)
|
||||
case "todo_plus":
|
||||
settings := todo_plus.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = todo_plus.NewWidget(tviewApp, pages, settings)
|
||||
case "todoist":
|
||||
settings := todo_plus.FromTodoist(moduleName, moduleConfig, config)
|
||||
widget = todo_plus.NewWidget(tviewApp, pages, settings)
|
||||
case "transmission":
|
||||
settings := transmission.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = transmission.NewWidget(tviewApp, pages, settings)
|
||||
case "travisci":
|
||||
settings := travisci.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = travisci.NewWidget(tviewApp, pages, settings)
|
||||
case "trello":
|
||||
settings := todo_plus.FromTrello(moduleName, moduleConfig, config)
|
||||
widget = todo_plus.NewWidget(tviewApp, pages, settings)
|
||||
case "twitch":
|
||||
settings := twitch.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = twitch.NewWidget(tviewApp, pages, settings)
|
||||
case "twitter":
|
||||
settings := twitter.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = twitter.NewWidget(tviewApp, pages, settings)
|
||||
case "twitterstats":
|
||||
settings := twitterstats.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = twitterstats.NewWidget(tviewApp, pages, settings)
|
||||
case "uptimerobot":
|
||||
settings := uptimerobot.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = uptimerobot.NewWidget(tviewApp, pages, settings)
|
||||
case "victorops":
|
||||
settings := victorops.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = victorops.NewWidget(tviewApp, settings)
|
||||
case "weather":
|
||||
settings := weather.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = weather.NewWidget(tviewApp, pages, settings)
|
||||
case "zendesk":
|
||||
settings := zendesk.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = zendesk.NewWidget(tviewApp, pages, settings)
|
||||
case "exchangerates":
|
||||
settings := exchangerates.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = exchangerates.NewWidget(tviewApp, pages, settings)
|
||||
case "finnhub":
|
||||
settings := finnhub.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = finnhub.NewWidget(tviewApp, settings)
|
||||
case "yfinance":
|
||||
settings := yfinance.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = yfinance.NewWidget(tviewApp, settings)
|
||||
default:
|
||||
settings := unknown.NewSettingsFromYAML(moduleName, moduleConfig, config)
|
||||
widget = unknown.NewWidget(tviewApp, settings)
|
||||
}
|
||||
|
||||
return widget
|
||||
}
|
||||
|
||||
// MakeWidgets creates and returns a collection of enabled widgets
|
||||
func MakeWidgets(tviewApp *tview.Application, pages *tview.Pages, config *config.Config) []wtf.Wtfable {
|
||||
widgets := []wtf.Wtfable{}
|
||||
|
||||
moduleNames, _ := config.Map("wtf.mods")
|
||||
|
||||
for moduleName := range moduleNames {
|
||||
widget := MakeWidget(tviewApp, pages, moduleName, config)
|
||||
|
||||
if widget != nil {
|
||||
widgets = append(widgets, widget)
|
||||
}
|
||||
}
|
||||
|
||||
return widgets
|
||||
}
|
77
app/widget_maker_test.go
Normal file
77
app/widget_maker_test.go
Normal file
@ -0,0 +1,77 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/wtfutil/wtf/modules/clocks"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
const (
|
||||
disabled = `
|
||||
wtf:
|
||||
mods:
|
||||
clocks:
|
||||
enabled: false
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 30`
|
||||
|
||||
enabled = `
|
||||
wtf:
|
||||
mods:
|
||||
clocks:
|
||||
enabled: true
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 30`
|
||||
)
|
||||
|
||||
func Test_MakeWidget(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
moduleName string
|
||||
config *config.Config
|
||||
expected wtf.Wtfable
|
||||
}{
|
||||
{
|
||||
name: "invalid module",
|
||||
moduleName: "",
|
||||
config: &config.Config{},
|
||||
expected: nil,
|
||||
},
|
||||
{
|
||||
name: "valid disabled module",
|
||||
moduleName: "clocks",
|
||||
config: func() *config.Config {
|
||||
cfg, _ := config.ParseYaml(disabled)
|
||||
return cfg
|
||||
}(),
|
||||
expected: nil,
|
||||
},
|
||||
{
|
||||
name: "valid enabled module",
|
||||
moduleName: "clocks",
|
||||
config: func() *config.Config {
|
||||
cfg, _ := config.ParseYaml(enabled)
|
||||
return cfg
|
||||
}(),
|
||||
expected: &clocks.Widget{},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
actual := MakeWidget(nil, nil, tt.moduleName, tt.config)
|
||||
assert.IsType(t, tt.expected, actual)
|
||||
})
|
||||
}
|
||||
}
|
201
app/wtf_app.go
Normal file
201
app/wtf_app.go
Normal file
@ -0,0 +1,201 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
_ "github.com/gdamore/tcell/terminfo/extended"
|
||||
"github.com/logrusorgru/aurora"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/radovskyb/watcher"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/cfg"
|
||||
"github.com/wtfutil/wtf/support"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
// WtfApp is the container for a collection of widgets that are all constructed from a single
|
||||
// configuration file and displayed together
|
||||
type WtfApp struct {
|
||||
TViewApp *tview.Application
|
||||
|
||||
config *config.Config
|
||||
configFilePath string
|
||||
display *Display
|
||||
focusTracker FocusTracker
|
||||
ghUser *support.GitHubUser
|
||||
pages *tview.Pages
|
||||
validator *ModuleValidator
|
||||
widgets []wtf.Wtfable
|
||||
}
|
||||
|
||||
// NewWtfApp creates and returns an instance of WtfApp
|
||||
func NewWtfApp(tviewApp *tview.Application, config *config.Config, configFilePath string) *WtfApp {
|
||||
wtfApp := &WtfApp{
|
||||
TViewApp: tviewApp,
|
||||
|
||||
config: config,
|
||||
configFilePath: configFilePath,
|
||||
pages: tview.NewPages(),
|
||||
}
|
||||
|
||||
wtfApp.TViewApp.SetBeforeDrawFunc(func(s tcell.Screen) bool {
|
||||
s.Clear()
|
||||
return false
|
||||
})
|
||||
|
||||
wtfApp.widgets = MakeWidgets(wtfApp.TViewApp, wtfApp.pages, wtfApp.config)
|
||||
wtfApp.display = NewDisplay(wtfApp.widgets, wtfApp.config)
|
||||
wtfApp.focusTracker = NewFocusTracker(wtfApp.TViewApp, wtfApp.widgets, wtfApp.config)
|
||||
wtfApp.validator = NewModuleValidator()
|
||||
|
||||
githubAPIKey := readGitHubAPIKey(wtfApp.config)
|
||||
wtfApp.ghUser = support.NewGitHubUser(githubAPIKey)
|
||||
|
||||
wtfApp.pages.AddPage("grid", wtfApp.display.Grid, true, true)
|
||||
|
||||
wtfApp.validator.Validate(wtfApp.widgets)
|
||||
|
||||
firstWidget := wtfApp.widgets[0]
|
||||
wtfApp.pages.Box.SetBackgroundColor(
|
||||
wtf.ColorFor(
|
||||
firstWidget.CommonSettings().Colors.WidgetTheme.Background,
|
||||
),
|
||||
)
|
||||
|
||||
wtfApp.TViewApp.SetInputCapture(wtfApp.keyboardIntercept)
|
||||
wtfApp.TViewApp.SetRoot(wtfApp.pages, true)
|
||||
|
||||
return wtfApp
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
// Run starts the underlying tview app
|
||||
func (wtfApp *WtfApp) Run() {
|
||||
if err := wtfApp.TViewApp.Run(); err != nil {
|
||||
fmt.Printf("\n%s %v\n", aurora.Red("ERROR"), err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
// Start initializes the app
|
||||
func (wtfApp *WtfApp) Start() {
|
||||
go wtfApp.scheduleWidgets()
|
||||
go wtfApp.watchForConfigChanges()
|
||||
|
||||
// FIXME: This should be moved to the AppManager
|
||||
go func() { _ = wtfApp.ghUser.Load() }()
|
||||
}
|
||||
|
||||
// Stop kills all the currently-running widgets in this app
|
||||
func (wtfApp *WtfApp) Stop() {
|
||||
wtfApp.stopAllWidgets()
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (wtfApp *WtfApp) stopAllWidgets() {
|
||||
for _, widget := range wtfApp.widgets {
|
||||
widget.Stop()
|
||||
}
|
||||
}
|
||||
|
||||
func (wtfApp *WtfApp) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
||||
// These keys are global keys used by the app. Widgets should not implement these keys
|
||||
switch event.Key() {
|
||||
case tcell.KeyCtrlC:
|
||||
wtfApp.Stop()
|
||||
wtfApp.TViewApp.Stop()
|
||||
wtfApp.DisplayExitMessage()
|
||||
case tcell.KeyCtrlR:
|
||||
wtfApp.refreshAllWidgets()
|
||||
return nil
|
||||
case tcell.KeyCtrlSpace:
|
||||
// FIXME: This can't reside in the app, the app doesn't know about
|
||||
// the AppManager. The AppManager needs to catch this one
|
||||
fmt.Println("Next app")
|
||||
return nil
|
||||
case tcell.KeyTab:
|
||||
wtfApp.focusTracker.Next()
|
||||
case tcell.KeyBacktab:
|
||||
wtfApp.focusTracker.Prev()
|
||||
return nil
|
||||
case tcell.KeyEsc:
|
||||
wtfApp.focusTracker.None()
|
||||
}
|
||||
|
||||
// Checks to see if any widget has been assigned the pressed key as its focus key
|
||||
if wtfApp.focusTracker.FocusOn(string(event.Rune())) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// If no specific widget has focus, then allow the key presses to fall through to the app
|
||||
if !wtfApp.focusTracker.IsFocused {
|
||||
switch string(event.Rune()) {
|
||||
case "/":
|
||||
return nil
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
||||
return event
|
||||
}
|
||||
|
||||
func (wtfApp *WtfApp) refreshAllWidgets() {
|
||||
for _, widget := range wtfApp.widgets {
|
||||
go widget.Refresh()
|
||||
}
|
||||
}
|
||||
|
||||
func (wtfApp *WtfApp) scheduleWidgets() {
|
||||
for _, widget := range wtfApp.widgets {
|
||||
go Schedule(widget)
|
||||
}
|
||||
}
|
||||
|
||||
func (wtfApp *WtfApp) watchForConfigChanges() {
|
||||
watch := watcher.New()
|
||||
|
||||
// Notify write events
|
||||
watch.FilterOps(watcher.Write)
|
||||
|
||||
go func() {
|
||||
for {
|
||||
select {
|
||||
case <-watch.Event:
|
||||
wtfApp.Stop()
|
||||
|
||||
config := cfg.LoadWtfConfigFile(wtfApp.configFilePath)
|
||||
newApp := NewWtfApp(wtfApp.TViewApp, config, wtfApp.configFilePath)
|
||||
openURLUtil := utils.ToStrs(config.UList("wtf.openUrlUtil", []interface{}{}))
|
||||
utils.Init(config.UString("wtf.openFileUtil", "open"), openURLUtil)
|
||||
|
||||
newApp.Start()
|
||||
case err := <-watch.Error:
|
||||
if err == watcher.ErrWatchedFileDeleted {
|
||||
// Usually happens because the watcher looks for the file as the OS is updating it
|
||||
continue
|
||||
}
|
||||
log.Fatalln(err)
|
||||
case <-watch.Closed:
|
||||
return
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
// Watch config file for changes.
|
||||
absPath, _ := utils.ExpandHomeDir(wtfApp.configFilePath)
|
||||
if err := watch.Add(absPath); err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
|
||||
// Start the watching process - it'll check for changes every 100ms.
|
||||
if err := watch.Start(time.Millisecond * 100); err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
}
|
@ -1,62 +0,0 @@
|
||||
package bamboohr
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
type Widget struct {
|
||||
wtf.TextWidget
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: wtf.NewTextWidget(app, "BambooHR", "bamboohr", false),
|
||||
}
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
client := NewClient("https://api.bamboohr.com/api/gateway.php")
|
||||
todayItems := client.Away(
|
||||
"timeOff",
|
||||
wtf.Now().Format(wtf.DateFormat),
|
||||
wtf.Now().Format(wtf.DateFormat),
|
||||
)
|
||||
|
||||
widget.View.SetTitle(widget.ContextualTitle(widget.Name))
|
||||
|
||||
widget.View.SetText(widget.contentFrom(todayItems))
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) contentFrom(items []Item) string {
|
||||
if len(items) == 0 {
|
||||
return fmt.Sprintf("\n\n\n\n\n\n\n\n%s", wtf.CenterText("[grey]no one[white]", 50))
|
||||
}
|
||||
|
||||
str := ""
|
||||
for _, item := range items {
|
||||
str = str + widget.format(item)
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (widget *Widget) format(item Item) string {
|
||||
var str string
|
||||
|
||||
if item.IsOneDay() {
|
||||
str = fmt.Sprintf(" [green]%s[white]\n %s\n\n", item.Name(), item.PrettyEnd())
|
||||
} else {
|
||||
str = fmt.Sprintf(" [green]%s[white]\n %s - %s\n\n", item.Name(), item.PrettyStart(), item.PrettyEnd())
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
214
cfg/common_settings.go
Normal file
214
cfg/common_settings.go
Normal file
@ -0,0 +1,214 @@
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
"golang.org/x/text/language"
|
||||
"golang.org/x/text/message"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultLanguageTag = "en-CA"
|
||||
)
|
||||
|
||||
type Module struct {
|
||||
Name string
|
||||
Type string
|
||||
}
|
||||
|
||||
type Sigils struct {
|
||||
Checkbox struct {
|
||||
Checked string
|
||||
Unchecked string
|
||||
}
|
||||
Paging struct {
|
||||
Normal string
|
||||
Selected string
|
||||
}
|
||||
}
|
||||
|
||||
// Common defines a set of common configuration settings applicable to all modules
|
||||
type Common struct {
|
||||
Module
|
||||
PositionSettings `help:"Defines where in the grid this module’s widget will be displayed."`
|
||||
Sigils
|
||||
|
||||
Colors ColorTheme
|
||||
Config *config.Config
|
||||
|
||||
DocPath string
|
||||
|
||||
Bordered bool `help:"Whether or not the module should be displayed with a border." values:"true, false" optional:"true" default:"true"`
|
||||
Enabled bool `help:"Whether or not this module is executed and if its data displayed onscreen." values:"true, false" optional:"true" default:"false"`
|
||||
Focusable bool `help:"Whether or not this module is focusable." values:"true, false" optional:"true" default:"false"`
|
||||
LanguageTag string `help:"The BCP 47 langauge tag to localize text to." values:"Any supported BCP 47 language tag." optional:"true" default:"en-CA"`
|
||||
RefreshInterval int `help:"How often, in seconds, this module will update its data." values:"A positive integer, 0..n." optional:"true"`
|
||||
Title string `help:"The title string to show when displaying this module" optional:"true"`
|
||||
|
||||
focusChar int `help:"Define one of the number keys as a short cut key to access the widget." optional:"true"`
|
||||
}
|
||||
|
||||
// NewCommonSettingsFromModule returns a common settings configuration tailed to the given module
|
||||
func NewCommonSettingsFromModule(name, defaultTitle string, defaultFocusable bool, moduleConfig *config.Config, globalConfig *config.Config) *Common {
|
||||
baseColors := NewDefaultColorTheme()
|
||||
|
||||
colorsConfig, err := globalConfig.Get("wtf.colors")
|
||||
if err != nil && strings.Contains(err.Error(), "Nonexistent map") {
|
||||
// Create a default colors config to fill in for the missing one
|
||||
// This comes into play when the configuration file does not contain a `colors:` key, i.e:
|
||||
//
|
||||
// wtf:
|
||||
// # colors: <- missing
|
||||
// refreshInterval: 1
|
||||
// openFileUtil: "open"
|
||||
//
|
||||
colorsConfig, _ = NewDefaultColorConfig()
|
||||
}
|
||||
|
||||
// And finally create a third instance to be the final default fallback in case there are empty or nil values in
|
||||
// the colors extracted from the config file (aka colorsConfig)
|
||||
defaultColorTheme := NewDefaultColorTheme()
|
||||
|
||||
baseColors.BorderTheme.Focusable = moduleConfig.UString("colors.border.focusable", colorsConfig.UString("border.focusable", defaultColorTheme.BorderTheme.Focusable))
|
||||
baseColors.BorderTheme.Focused = moduleConfig.UString("colors.border.focused", colorsConfig.UString("border.focused", defaultColorTheme.BorderTheme.Focused))
|
||||
baseColors.BorderTheme.Unfocusable = moduleConfig.UString("colors.border.normal", colorsConfig.UString("border.normal", defaultColorTheme.BorderTheme.Unfocusable))
|
||||
|
||||
baseColors.CheckboxTheme.Checked = moduleConfig.UString("colors.checked", colorsConfig.UString("checked", defaultColorTheme.CheckboxTheme.Checked))
|
||||
|
||||
baseColors.RowTheme.EvenForeground = moduleConfig.UString("colors.rows.even", colorsConfig.UString("rows.even", defaultColorTheme.RowTheme.EvenForeground))
|
||||
baseColors.RowTheme.OddForeground = moduleConfig.UString("colors.rows.odd", colorsConfig.UString("rows.odd", defaultColorTheme.RowTheme.OddForeground))
|
||||
|
||||
baseColors.TextTheme.Label = moduleConfig.UString("colors.label", colorsConfig.UString("label", defaultColorTheme.TextTheme.Label))
|
||||
baseColors.TextTheme.Subheading = moduleConfig.UString("colors.subheading", colorsConfig.UString("subheading", defaultColorTheme.TextTheme.Subheading))
|
||||
baseColors.TextTheme.Text = moduleConfig.UString("colors.text", colorsConfig.UString("text", defaultColorTheme.TextTheme.Text))
|
||||
baseColors.TextTheme.Title = moduleConfig.UString("colors.title", colorsConfig.UString("title", defaultColorTheme.TextTheme.Title))
|
||||
|
||||
baseColors.WidgetTheme.Background = moduleConfig.UString("colors.background", colorsConfig.UString("background", defaultColorTheme.WidgetTheme.Background))
|
||||
|
||||
common := Common{
|
||||
Colors: baseColors,
|
||||
|
||||
Module: Module{
|
||||
Name: name,
|
||||
Type: moduleConfig.UString("type", name),
|
||||
},
|
||||
|
||||
PositionSettings: NewPositionSettingsFromYAML(name, moduleConfig),
|
||||
|
||||
Bordered: moduleConfig.UBool("border", true),
|
||||
Config: moduleConfig,
|
||||
Enabled: moduleConfig.UBool("enabled", false),
|
||||
Focusable: moduleConfig.UBool("focusable", defaultFocusable),
|
||||
LanguageTag: globalConfig.UString("wtf.language", defaultLanguageTag),
|
||||
RefreshInterval: moduleConfig.UInt("refreshInterval", 300),
|
||||
Title: moduleConfig.UString("title", defaultTitle),
|
||||
|
||||
focusChar: moduleConfig.UInt("focusChar", -1),
|
||||
}
|
||||
|
||||
sigilsPath := "wtf.sigils"
|
||||
common.Sigils.Checkbox.Checked = globalConfig.UString(sigilsPath+".checkbox.checked", "x")
|
||||
common.Sigils.Checkbox.Unchecked = globalConfig.UString(sigilsPath+".checkbox.unchecked", " ")
|
||||
common.Sigils.Paging.Normal = globalConfig.UString(sigilsPath+".paging.normal", globalConfig.UString("wtf.paging.pageSigil", "*"))
|
||||
common.Sigils.Paging.Selected = globalConfig.UString(sigilsPath+".paging.select", globalConfig.UString("wtf.paging.selectedSigil", "_"))
|
||||
|
||||
return &common
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (common *Common) DefaultFocusedRowColor() string {
|
||||
return fmt.Sprintf(
|
||||
"%s:%s",
|
||||
common.Colors.RowTheme.HighlightedForeground,
|
||||
common.Colors.RowTheme.HighlightedBackground,
|
||||
)
|
||||
}
|
||||
|
||||
func (common *Common) DefaultRowColor() string {
|
||||
return fmt.Sprintf(
|
||||
"%s:%s",
|
||||
common.Colors.RowTheme.EvenForeground,
|
||||
common.Colors.RowTheme.EvenBackground,
|
||||
)
|
||||
}
|
||||
|
||||
// FocusChar returns the keyboard number assigned to the widget used to give onscreen
|
||||
// focus to this widget, as a string. Focus characters can be a range between 1 and 9
|
||||
func (common *Common) FocusChar() string {
|
||||
if common.focusChar <= 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
if common.focusChar > 9 {
|
||||
return ""
|
||||
}
|
||||
|
||||
return fmt.Sprint(common.focusChar)
|
||||
}
|
||||
|
||||
// LocalizedPrinter returns a message.Printer instance localized to the BCP 47 language
|
||||
// configuration value defined in 'wtf.language' config. If none exists, it defaults to
|
||||
// 'en-CA'. Use this to format numbers, etc.
|
||||
func (common *Common) LocalizedPrinter() (*message.Printer, error) {
|
||||
langTag, err := language.Parse(common.LanguageTag)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
prntr := message.NewPrinter(langTag)
|
||||
|
||||
return prntr, nil
|
||||
}
|
||||
|
||||
func (common *Common) RowColor(idx int) string {
|
||||
if idx%2 == 0 {
|
||||
return common.Colors.RowTheme.EvenForeground
|
||||
}
|
||||
|
||||
return common.Colors.RowTheme.OddForeground
|
||||
}
|
||||
|
||||
func (common *Common) RightAlignFormat(width int) string {
|
||||
borderOffset := 2
|
||||
return fmt.Sprintf("%%%ds", width-borderOffset)
|
||||
}
|
||||
|
||||
// PaginationMarker generates the pagination indicators that appear in the top-right corner
|
||||
// of multisource widgets
|
||||
func (common *Common) PaginationMarker(len, pos, width int) string {
|
||||
sigils := ""
|
||||
|
||||
if len > 1 {
|
||||
sigils = strings.Repeat(common.Sigils.Paging.Normal, pos)
|
||||
sigils += common.Sigils.Paging.Selected
|
||||
sigils += strings.Repeat(common.Sigils.Paging.Normal, len-1-pos)
|
||||
|
||||
sigils = "[lightblue]" + fmt.Sprintf(common.RightAlignFormat(width), sigils) + "[white]"
|
||||
}
|
||||
|
||||
return sigils
|
||||
}
|
||||
|
||||
// SetDocumentationPath is used to explicitly set the documentation path that should be opened
|
||||
// when the key to open the documentation is pressed.
|
||||
// Setting this is probably not necessary unless the module documentation is nested inside a
|
||||
// documentation subdirectory in the /wtfutildocs repo, or the module here has a different
|
||||
// name than the module's display name in the documentation (which ideally wouldn't be a thing).
|
||||
func (common *Common) SetDocumentationPath(path string) {
|
||||
common.DocPath = path
|
||||
}
|
||||
|
||||
// Validations aggregates all the validations from all the sub-sections in Common into a
|
||||
// single array of validations
|
||||
func (common *Common) Validations() []Validatable {
|
||||
validatables := []Validatable{}
|
||||
|
||||
for _, validation := range common.PositionSettings.Validations.validations {
|
||||
validatables = append(validatables, validation)
|
||||
}
|
||||
|
||||
return validatables
|
||||
}
|
194
cfg/common_settings_test.go
Normal file
194
cfg/common_settings_test.go
Normal file
@ -0,0 +1,194 @@
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var (
|
||||
testYaml = `
|
||||
wtf:
|
||||
colors:
|
||||
`
|
||||
|
||||
moduleConfig, _ = config.ParseYaml(testYaml)
|
||||
globalSettings, _ = config.ParseYaml(testYaml)
|
||||
|
||||
testCfg = NewCommonSettingsFromModule(
|
||||
"test",
|
||||
"Test Config",
|
||||
true,
|
||||
moduleConfig,
|
||||
globalSettings,
|
||||
)
|
||||
)
|
||||
|
||||
func Test_NewCommonSettingsFromModule(t *testing.T) {
|
||||
assert.Equal(t, true, testCfg.Bordered)
|
||||
assert.Equal(t, false, testCfg.Enabled)
|
||||
assert.Equal(t, true, testCfg.Focusable)
|
||||
assert.Equal(t, "test", testCfg.Module.Name)
|
||||
assert.Equal(t, "test", testCfg.Module.Type)
|
||||
assert.Equal(t, "", testCfg.FocusChar())
|
||||
assert.Equal(t, 300, testCfg.RefreshInterval)
|
||||
assert.Equal(t, "Test Config", testCfg.Title)
|
||||
}
|
||||
|
||||
func Test_DefaultFocusedRowColor(t *testing.T) {
|
||||
assert.Equal(t, "black:green", testCfg.DefaultFocusedRowColor())
|
||||
}
|
||||
|
||||
func Test_DefaultRowColor(t *testing.T) {
|
||||
assert.Equal(t, "white:transparent", testCfg.DefaultRowColor())
|
||||
}
|
||||
|
||||
func Test_FocusChar(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
before func(testCfg *Common)
|
||||
expectedChar string
|
||||
}{
|
||||
{
|
||||
name: "with negative focus char",
|
||||
before: func(testCfg *Common) {
|
||||
testCfg.focusChar = -1
|
||||
},
|
||||
expectedChar: "",
|
||||
},
|
||||
{
|
||||
name: "with positive focus char",
|
||||
before: func(testCfg *Common) {
|
||||
testCfg.focusChar = 3
|
||||
},
|
||||
expectedChar: "3",
|
||||
},
|
||||
{
|
||||
name: "with zero focus char",
|
||||
before: func(testCfg *Common) {
|
||||
testCfg.focusChar = 0
|
||||
},
|
||||
expectedChar: "",
|
||||
},
|
||||
{
|
||||
name: "with large focus char",
|
||||
before: func(testCfg *Common) {
|
||||
testCfg.focusChar = 10
|
||||
},
|
||||
expectedChar: "",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
tt.before(testCfg)
|
||||
|
||||
assert.Equal(t, tt.expectedChar, testCfg.FocusChar())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_RowColor(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
idx int
|
||||
expectedColor string
|
||||
}{
|
||||
{
|
||||
name: "odd rows, default",
|
||||
idx: 3,
|
||||
expectedColor: "lightblue",
|
||||
},
|
||||
{
|
||||
name: "even rows, default",
|
||||
idx: 8,
|
||||
expectedColor: "white",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
assert.Equal(t, tt.expectedColor, testCfg.RowColor(tt.idx))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_RightAlignFormat(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
width int
|
||||
expected string
|
||||
}{
|
||||
{
|
||||
name: "with zero",
|
||||
width: 0,
|
||||
expected: "%-2s",
|
||||
},
|
||||
{
|
||||
name: "with positive integer",
|
||||
width: 3,
|
||||
expected: "%1s",
|
||||
},
|
||||
{
|
||||
name: "with negative integer",
|
||||
width: -3,
|
||||
expected: "%-5s",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
assert.Equal(t, tt.expected, testCfg.RightAlignFormat(tt.width))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_PaginationMarker(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
len int
|
||||
pos int
|
||||
width int
|
||||
expected string
|
||||
}{
|
||||
{
|
||||
name: "with zero pages",
|
||||
len: 0,
|
||||
pos: 1,
|
||||
width: 5,
|
||||
expected: "",
|
||||
},
|
||||
{
|
||||
name: "with one page",
|
||||
len: 1,
|
||||
pos: 1,
|
||||
width: 5,
|
||||
expected: "",
|
||||
},
|
||||
{
|
||||
name: "with multiple pages",
|
||||
len: 3,
|
||||
pos: 1,
|
||||
width: 5,
|
||||
expected: "[lightblue]*_*[white]",
|
||||
},
|
||||
{
|
||||
name: "with negative pages",
|
||||
len: -3,
|
||||
pos: 1,
|
||||
width: 5,
|
||||
expected: "",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
assert.Equal(t, tt.expected, testCfg.PaginationMarker(tt.len, tt.pos, tt.width))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_Validations(t *testing.T) {
|
||||
assert.Equal(t, 4, len(testCfg.Validations()))
|
||||
}
|
@ -1,109 +1,43 @@
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
"github.com/wtfutil/wtf/logger"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
// ConfigDirV1 defines the path to the first version of configuration. Do not use this
|
||||
const ConfigDirV1 = "~/.wtf/"
|
||||
const (
|
||||
// XdgConfigDir defines the path to the minimal XDG-compatible configuration directory
|
||||
XdgConfigDir = "~/.config/"
|
||||
|
||||
// ConfigDirV2 defines the path to the second version of the configuration. Use this.
|
||||
const ConfigDirV2 = "~/.config/wtf/"
|
||||
// WtfConfigDirV1 defines the path to the first version of configuration. Do not use this
|
||||
WtfConfigDirV1 = "~/.wtf/"
|
||||
|
||||
/* -------------------- Config Migration -------------------- */
|
||||
// WtfConfigDirV2 defines the path to the second version of the configuration. Use this.
|
||||
WtfConfigDirV2 = "~/.config/wtf/"
|
||||
|
||||
// MigrateOldConfig copies any existing configuration from the old location
|
||||
// to the new, XDG-compatible location
|
||||
func MigrateOldConfig() {
|
||||
srcDir, _ := wtf.ExpandHomeDir(ConfigDirV1)
|
||||
destDir, _ := wtf.ExpandHomeDir(ConfigDirV2)
|
||||
// WtfConfigFile defines the name of the default config file
|
||||
WtfConfigFile = "config.yml"
|
||||
)
|
||||
|
||||
// If the old config directory doesn't exist, do not move
|
||||
if _, err := os.Stat(srcDir); os.IsNotExist(err) {
|
||||
return
|
||||
}
|
||||
|
||||
// If the new config directory already exists, do not move
|
||||
if _, err := os.Stat(destDir); err == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// Time to move
|
||||
err := Copy(srcDir, destDir)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
} else {
|
||||
logger.Log(fmt.Sprintf("Copied old config from %s to %s", srcDir, destDir))
|
||||
}
|
||||
|
||||
// Delete the old directory if the new one exists
|
||||
if _, err := os.Stat(destDir); err == nil {
|
||||
err := os.RemoveAll(srcDir)
|
||||
if err != nil {
|
||||
logger.Log(err.Error())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------- Config Migration -------------------- */
|
||||
|
||||
// ConfigDir returns the absolute path to the configuration directory
|
||||
func ConfigDir() (string, error) {
|
||||
configDir, err := wtf.ExpandHomeDir(ConfigDirV2)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return configDir, nil
|
||||
}
|
||||
|
||||
// CreateConfigDir creates the wtf/ directory in the user's home dir
|
||||
func CreateConfigDir() {
|
||||
configDir, _ := ConfigDir()
|
||||
|
||||
if _, err := os.Stat(configDir); os.IsNotExist(err) {
|
||||
err := os.Mkdir(configDir, os.ModePerm)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// CreateConfigFile creates a simple config file in the config directory if
|
||||
// one does not already exist
|
||||
func CreateConfigFile() {
|
||||
filePath, err := CreateFile("config.yml")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// If the file is empty, write to it
|
||||
file, _ := os.Stat(filePath)
|
||||
|
||||
if file.Size() == 0 {
|
||||
if ioutil.WriteFile(filePath, []byte(simpleConfig), 0644) != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
// CreateFile creates the named file in the config directory, if it does not already exist.
|
||||
// If the file exists it does not recreate it.
|
||||
// If successful, eturns the absolute path to the file
|
||||
// If successful, returns the absolute path to the file
|
||||
// If unsuccessful, returns an error
|
||||
func CreateFile(fileName string) (string, error) {
|
||||
configDir, err := ConfigDir()
|
||||
configDir, err := WtfConfigDir()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
filePath := fmt.Sprintf("%s/%s", configDir, fileName)
|
||||
filePath := filepath.Join(configDir, fileName)
|
||||
|
||||
// Check if the file already exists; if it does not, create it
|
||||
_, err = os.Stat(filePath)
|
||||
@ -121,81 +55,170 @@ func CreateFile(fileName string) (string, error) {
|
||||
return filePath, nil
|
||||
}
|
||||
|
||||
// LoadConfigFile loads the config.yml file to configure the app
|
||||
func LoadConfigFile(filePath string) *config.Config {
|
||||
absPath, _ := wtf.ExpandHomeDir(filePath)
|
||||
// Initialize takes care of settings up the initial state of WTF configuration
|
||||
// It ensures necessary directories and files exist
|
||||
func Initialize(hasCustom bool) {
|
||||
if !hasCustom {
|
||||
migrateOldConfig()
|
||||
}
|
||||
|
||||
// These always get created because this is where modules should write any permanent
|
||||
// data they need to persist between runs (i.e.: log, textfile, etc.)
|
||||
createWtfConfigDir()
|
||||
|
||||
if !hasCustom {
|
||||
createWtfConfigFile()
|
||||
chmodConfigFile()
|
||||
}
|
||||
}
|
||||
|
||||
// WtfConfigDir returns the absolute path to the configuration directory
|
||||
func WtfConfigDir() (string, error) {
|
||||
configDir := os.Getenv("XDG_CONFIG_HOME")
|
||||
if configDir == "" {
|
||||
configDir = WtfConfigDirV2
|
||||
} else {
|
||||
configDir += "/wtf/"
|
||||
}
|
||||
configDir, err := expandHomeDir(configDir)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return configDir, nil
|
||||
}
|
||||
|
||||
// LoadWtfConfigFile loads the specified config file
|
||||
func LoadWtfConfigFile(filePath string) *config.Config {
|
||||
absPath, _ := expandHomeDir(filePath)
|
||||
|
||||
cfg, err := config.ParseYamlFile(absPath)
|
||||
if err != nil {
|
||||
fmt.Println("\n\n\033[1m ERROR:\033[0m Could not load '\033[0;33mconfig.yml\033[0m'.\n Please add a \033[0;33mconfig.yml\033[0m file to your \033[0;33m~/.config/wtf\033[0m directory.\n See \033[1;34mhttps://github.com/wtfutil/wtf\033[0m for details.")
|
||||
fmt.Printf(" %s\n", err.Error())
|
||||
displayWtfConfigFileLoadError(absPath, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
return cfg
|
||||
}
|
||||
|
||||
const simpleConfig = `wtf:
|
||||
colors:
|
||||
border:
|
||||
focusable: darkslateblue
|
||||
focused: orange
|
||||
normal: gray
|
||||
grid:
|
||||
columns: [40, 40]
|
||||
rows: [13, 13, 4]
|
||||
refreshInterval: 1
|
||||
mods:
|
||||
clocks:
|
||||
colors:
|
||||
rows:
|
||||
even: "lightblue"
|
||||
odd: "white"
|
||||
enabled: true
|
||||
locations:
|
||||
Avignon: "Europe/Paris"
|
||||
Barcelona: "Europe/Madrid"
|
||||
Dubai: "Asia/Dubai"
|
||||
Vancouver: "America/Vancouver"
|
||||
Toronto: "America/Toronto"
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
sort: "alphabetical"
|
||||
security:
|
||||
enabled: true
|
||||
position:
|
||||
top: 1
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 3600
|
||||
status:
|
||||
enabled: true
|
||||
position:
|
||||
top: 2
|
||||
left: 0
|
||||
height: 1
|
||||
width: 2
|
||||
refreshInterval: 1
|
||||
system:
|
||||
enabled: true
|
||||
position:
|
||||
top: 0
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 3600
|
||||
textfile:
|
||||
enabled: true
|
||||
filePath: "~/.config/wtf/config.yml"
|
||||
position:
|
||||
top: 1
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 30
|
||||
`
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
// chmodConfigFile sets the mode of the config file to r+w for the owner only
|
||||
func chmodConfigFile() {
|
||||
configDir, _ := WtfConfigDir()
|
||||
relPath := filepath.Join(configDir, WtfConfigFile)
|
||||
absPath, _ := expandHomeDir(relPath)
|
||||
|
||||
_, err := os.Stat(absPath)
|
||||
if err != nil && os.IsNotExist(err) {
|
||||
return
|
||||
}
|
||||
|
||||
err = os.Chmod(absPath, 0600)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
// createWtfConfigDir creates the necessary directories for storing the default config file
|
||||
// If ~/.config/wtf is missing, it will try to create it
|
||||
func createWtfConfigDir() {
|
||||
wtfConfigDir, _ := WtfConfigDir()
|
||||
|
||||
if _, err := os.Stat(wtfConfigDir); os.IsNotExist(err) {
|
||||
err := os.MkdirAll(wtfConfigDir, os.ModePerm)
|
||||
if err != nil {
|
||||
displayWtfConfigDirCreateError(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// createWtfConfigFile creates a simple config file in the config directory if
|
||||
// one does not already exist
|
||||
func createWtfConfigFile() {
|
||||
filePath, err := CreateFile(WtfConfigFile)
|
||||
if err != nil {
|
||||
displayDefaultConfigCreateError(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// If the file is empty, write to it
|
||||
file, _ := os.Stat(filePath)
|
||||
|
||||
if file.Size() == 0 {
|
||||
if ioutil.WriteFile(filePath, []byte(defaultConfigFile), 0600) != nil {
|
||||
displayDefaultConfigWriteError(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Expand expands the path to include the home directory if the path
|
||||
// is prefixed with `~`. If it isn't prefixed with `~`, the path is
|
||||
// returned as-is.
|
||||
func expandHomeDir(path string) (string, error) {
|
||||
if len(path) == 0 {
|
||||
return path, nil
|
||||
}
|
||||
|
||||
if path[0] != '~' {
|
||||
return path, nil
|
||||
}
|
||||
|
||||
if len(path) > 1 && path[1] != '/' && path[1] != '\\' {
|
||||
return "", errors.New("cannot expand user-specific home dir")
|
||||
}
|
||||
|
||||
dir, err := home()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return filepath.Join(dir, path[1:]), nil
|
||||
}
|
||||
|
||||
// Dir returns the home directory for the executing user.
|
||||
// An error is returned if a home directory cannot be detected.
|
||||
func home() (string, error) {
|
||||
currentUser, err := user.Current()
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
if currentUser.HomeDir == "" {
|
||||
return "", errors.New("cannot find user-specific home dir")
|
||||
}
|
||||
|
||||
return currentUser.HomeDir, nil
|
||||
}
|
||||
|
||||
// migrateOldConfig copies any existing configuration from the old location
|
||||
// to the new, XDG-compatible location
|
||||
func migrateOldConfig() {
|
||||
srcDir, _ := expandHomeDir(WtfConfigDirV1)
|
||||
destDir, _ := WtfConfigDir()
|
||||
|
||||
// If the old config directory doesn't exist, do not move
|
||||
if _, err := os.Stat(srcDir); os.IsNotExist(err) {
|
||||
return
|
||||
}
|
||||
|
||||
// If the new config directory already exists, do not move
|
||||
if _, err := os.Stat(destDir); err == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// Time to move
|
||||
err := Copy(srcDir, destDir)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// Delete the old directory if the new one exists
|
||||
if _, err := os.Stat(destDir); err == nil {
|
||||
err := os.RemoveAll(srcDir)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -34,17 +34,17 @@ func fcopy(src, dest string, info os.FileInfo) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer f.Close()
|
||||
defer func() { _ = f.Close() }()
|
||||
|
||||
if err = os.Chmod(f.Name(), info.Mode()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
s, err := os.Open(src)
|
||||
s, err := os.Open(filepath.Clean(src))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer s.Close()
|
||||
defer func() { _ = f.Close() }()
|
||||
|
||||
_, err = io.Copy(f, s)
|
||||
return err
|
||||
|
109
cfg/default_color_theme.go
Normal file
109
cfg/default_color_theme.go
Normal file
@ -0,0 +1,109 @@
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"github.com/olebedev/config"
|
||||
"gopkg.in/yaml.v2"
|
||||
)
|
||||
|
||||
// BorderTheme defines the default color scheme for drawing widget borders
|
||||
type BorderTheme struct {
|
||||
Focusable string
|
||||
Focused string
|
||||
Unfocusable string
|
||||
}
|
||||
|
||||
// CheckboxTheme defines the default color scheme for drawing checkable rows in widgets
|
||||
type CheckboxTheme struct {
|
||||
Checked string
|
||||
}
|
||||
|
||||
// RowTheme defines the default color scheme for row text
|
||||
type RowTheme struct {
|
||||
EvenBackground string
|
||||
EvenForeground string
|
||||
|
||||
OddBackground string
|
||||
OddForeground string
|
||||
|
||||
HighlightedBackground string
|
||||
HighlightedForeground string
|
||||
}
|
||||
|
||||
// TextTheme defines the default color scheme for text rendering
|
||||
type TextTheme struct {
|
||||
Label string
|
||||
Subheading string
|
||||
Text string
|
||||
Title string
|
||||
}
|
||||
|
||||
// WidgetTheme defines the default color scheme for the widget rect itself
|
||||
type WidgetTheme struct {
|
||||
Background string
|
||||
}
|
||||
|
||||
// ColorTheme is an alamgam of all the default color settings
|
||||
type ColorTheme struct {
|
||||
BorderTheme
|
||||
CheckboxTheme
|
||||
RowTheme
|
||||
TextTheme
|
||||
WidgetTheme
|
||||
}
|
||||
|
||||
// NewDefaultColorTheme creates and returns an instance of DefaultColorTheme
|
||||
func NewDefaultColorTheme() ColorTheme {
|
||||
defaultTheme := ColorTheme{
|
||||
BorderTheme: BorderTheme{
|
||||
Focusable: "blue",
|
||||
Focused: "orange",
|
||||
Unfocusable: "gray",
|
||||
},
|
||||
|
||||
CheckboxTheme: CheckboxTheme{
|
||||
Checked: "gray",
|
||||
},
|
||||
|
||||
RowTheme: RowTheme{
|
||||
EvenBackground: "transparent",
|
||||
EvenForeground: "white",
|
||||
|
||||
OddBackground: "transparent",
|
||||
OddForeground: "lightblue",
|
||||
|
||||
HighlightedForeground: "black",
|
||||
HighlightedBackground: "green",
|
||||
},
|
||||
|
||||
TextTheme: TextTheme{
|
||||
Label: "lightblue",
|
||||
Subheading: "red",
|
||||
Text: "white",
|
||||
Title: "green",
|
||||
},
|
||||
|
||||
WidgetTheme: WidgetTheme{
|
||||
Background: "transparent",
|
||||
},
|
||||
}
|
||||
|
||||
return defaultTheme
|
||||
}
|
||||
|
||||
// NewDefaultColorConfig creates and returns a config.Config-compatible configuration struct
|
||||
// using a DefaultColorTheme to pre-populate all the relevant values
|
||||
func NewDefaultColorConfig() (*config.Config, error) {
|
||||
colorTheme := NewDefaultColorTheme()
|
||||
|
||||
yamlBytes, err := yaml.Marshal(colorTheme)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cfg, err := config.ParseYamlBytes(yamlBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return cfg, nil
|
||||
}
|
26
cfg/default_color_theme_test.go
Normal file
26
cfg/default_color_theme_test.go
Normal file
@ -0,0 +1,26 @@
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func Test_NewDefaultColorTheme(t *testing.T) {
|
||||
theme := NewDefaultColorTheme()
|
||||
|
||||
assert.Equal(t, "orange", theme.BorderTheme.Focused)
|
||||
assert.Equal(t, "red", theme.TextTheme.Subheading)
|
||||
assert.Equal(t, "transparent", theme.WidgetTheme.Background)
|
||||
}
|
||||
|
||||
func Test_NewDefaultColorConfig(t *testing.T) {
|
||||
cfg, err := NewDefaultColorConfig()
|
||||
|
||||
assert.Nil(t, err)
|
||||
|
||||
assert.Equal(t, "orange", cfg.UString("bordertheme.focused"))
|
||||
assert.Equal(t, "red", cfg.UString("texttheme.subheading"))
|
||||
assert.Equal(t, "transparent", cfg.UString("widgettheme.background"))
|
||||
assert.Equal(t, "", cfg.UString("widgettheme.missing"))
|
||||
}
|
@ -1,89 +1,104 @@
|
||||
wtf:
|
||||
package cfg
|
||||
|
||||
const defaultConfigFile = `wtf:
|
||||
colors:
|
||||
# background: gray
|
||||
border:
|
||||
focusable: darkslateblue
|
||||
focused: orange
|
||||
normal: gray
|
||||
grid:
|
||||
columns: [40, 40]
|
||||
rows: [13, 13, 4, 10]
|
||||
columns: [32, 32, 32, 32, 90]
|
||||
rows: [10, 10, 10, 4, 4, 90]
|
||||
refreshInterval: 1
|
||||
mods:
|
||||
clocks:
|
||||
clocks_a:
|
||||
colors:
|
||||
rows:
|
||||
even: "lightblue"
|
||||
odd: "white"
|
||||
enabled: true
|
||||
locations:
|
||||
Avignon: "Europe/Paris"
|
||||
Barcelona: "Europe/Madrid"
|
||||
Dubai: "Asia/Dubai"
|
||||
UTC: "Etc/UTC"
|
||||
Vancouver: "America/Vancouver"
|
||||
Toronto: "America/Toronto"
|
||||
position:
|
||||
top: 0
|
||||
left: 0
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
sort: "alphabetical"
|
||||
title: "Clocks A"
|
||||
type: "clocks"
|
||||
clocks_b:
|
||||
colors:
|
||||
rows:
|
||||
even: "lightblue"
|
||||
odd: "white"
|
||||
enabled: true
|
||||
locations:
|
||||
Paris: "Europe/Paris"
|
||||
Barcelona: "Europe/Madrid"
|
||||
Dubai: "Asia/Dubai"
|
||||
position:
|
||||
top: 0
|
||||
left: 2
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
sort: "alphabetical"
|
||||
title: "Clocks B"
|
||||
type: "clocks"
|
||||
feedreader:
|
||||
enabled: true
|
||||
feeds:
|
||||
- http://wtfutil.com/blog/index.xml
|
||||
feedLimit: 10
|
||||
position:
|
||||
top: 1
|
||||
left: 1
|
||||
width: 2
|
||||
height: 1
|
||||
refreshInterval: 14400
|
||||
ipinfo:
|
||||
colors:
|
||||
name: "lightblue"
|
||||
value: "white"
|
||||
enabled: true
|
||||
position:
|
||||
top: 3
|
||||
left: 0
|
||||
top: 2
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 150
|
||||
power:
|
||||
enabled: true
|
||||
position:
|
||||
top: 3
|
||||
left: 1
|
||||
top: 2
|
||||
left: 2
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
title: "⚡️"
|
||||
security:
|
||||
enabled: true
|
||||
position:
|
||||
top: 1
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 3600
|
||||
status:
|
||||
enabled: true
|
||||
position:
|
||||
top: 2
|
||||
left: 0
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 1
|
||||
system:
|
||||
enabled: true
|
||||
position:
|
||||
top: 0
|
||||
left: 1
|
||||
height: 1
|
||||
width: 1
|
||||
refreshInterval: 3600
|
||||
textfile:
|
||||
enabled: true
|
||||
filePaths:
|
||||
- "~/.config/wtf/config.yml"
|
||||
- "~/.config/wtf/log.txt"
|
||||
filePath: "~/.config/wtf/config.yml"
|
||||
format: true
|
||||
formatStyle: "vim"
|
||||
position:
|
||||
top: 1
|
||||
left: 1
|
||||
height: 2
|
||||
top: 0
|
||||
left: 0
|
||||
height: 4
|
||||
width: 1
|
||||
refreshInterval: 15
|
||||
refreshInterval: 30
|
||||
wrapText: false
|
||||
uptime:
|
||||
args: [""]
|
||||
cmd: "uptime"
|
||||
enabled: true
|
||||
position:
|
||||
top: 3
|
||||
left: 1
|
||||
height: 1
|
||||
width: 2
|
||||
refreshInterval: 30
|
||||
type: cmdrunner
|
||||
`
|
48
cfg/error_messages.go
Normal file
48
cfg/error_messages.go
Normal file
@ -0,0 +1,48 @@
|
||||
package cfg
|
||||
|
||||
// This file contains the error messages that get written to the terminal when
|
||||
// something goes wrong with the configuration process.
|
||||
//
|
||||
// As a general rule, if one of these has to be shown the app should then die
|
||||
// via os.Exit(1)
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/logrusorgru/aurora"
|
||||
)
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func displayError(err error) {
|
||||
fmt.Printf("%s %s\n\n", aurora.Red("Error:"), err.Error())
|
||||
}
|
||||
|
||||
func displayDefaultConfigCreateError(err error) {
|
||||
fmt.Printf("\n%s Could not create the default configuration file.\n", aurora.Red("ERROR"))
|
||||
fmt.Println()
|
||||
displayError(err)
|
||||
}
|
||||
|
||||
func displayDefaultConfigWriteError(err error) {
|
||||
fmt.Printf("\n%s Could not write the default configuration file.\n", aurora.Red("ERROR"))
|
||||
fmt.Println()
|
||||
displayError(err)
|
||||
}
|
||||
|
||||
func displayWtfConfigDirCreateError(err error) {
|
||||
fmt.Printf("\n%s Could not create the '%s' directory.\n", aurora.Red("ERROR"), aurora.Yellow(WtfConfigDirV2))
|
||||
fmt.Println()
|
||||
displayError(err)
|
||||
}
|
||||
|
||||
func displayWtfConfigFileLoadError(path string, err error) {
|
||||
fmt.Printf("\n%s Could not load '%s'.\n", aurora.Red("ERROR"), aurora.Yellow(path))
|
||||
fmt.Println()
|
||||
fmt.Println("This could mean one of two things:")
|
||||
fmt.Println()
|
||||
fmt.Println(" 1. That file doesn't exist.")
|
||||
fmt.Println(" 2. That file has a YAML syntax error. Try running it through http://www.yamllint.com to check for errors.")
|
||||
fmt.Println()
|
||||
displayError(err)
|
||||
}
|
28
cfg/parsers.go
Normal file
28
cfg/parsers.go
Normal file
@ -0,0 +1,28 @@
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
)
|
||||
|
||||
// ParseAsMapOrList takes a configuration key and attempts to parse it first as a map
|
||||
// and then as a list. Map entries are concatenated as "key/value"
|
||||
func ParseAsMapOrList(ymlConfig *config.Config, configKey string) []string {
|
||||
result := []string{}
|
||||
|
||||
mapItems, err := ymlConfig.Map(configKey)
|
||||
if err == nil {
|
||||
for key, value := range mapItems {
|
||||
result = append(result, fmt.Sprintf("%s/%s", value, key))
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
listItems := ymlConfig.UList(configKey)
|
||||
for _, listItem := range listItems {
|
||||
result = append(result, listItem.(string))
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
50
cfg/parsers_test.go
Normal file
50
cfg/parsers_test.go
Normal file
@ -0,0 +1,50 @@
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
)
|
||||
|
||||
func Test_ParseAsMapOrList(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
configKey string
|
||||
yaml string
|
||||
expectedCount int
|
||||
}{
|
||||
{
|
||||
name: "as empty set",
|
||||
configKey: "data",
|
||||
yaml: "",
|
||||
expectedCount: 0,
|
||||
},
|
||||
{
|
||||
name: "as map",
|
||||
configKey: "data",
|
||||
yaml: "data:\n a: cat\n b: dog",
|
||||
expectedCount: 2,
|
||||
},
|
||||
{
|
||||
name: "as list",
|
||||
configKey: "data",
|
||||
yaml: "data:\n - cat\n - dog\n - rat\n",
|
||||
expectedCount: 3,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
ymlConfig, err := config.ParseYaml(tt.yaml)
|
||||
if err != nil {
|
||||
t.Errorf("\nexpected: no error\n got: %v", err)
|
||||
}
|
||||
|
||||
actual := ParseAsMapOrList(ymlConfig, tt.configKey)
|
||||
|
||||
if tt.expectedCount != len(actual) {
|
||||
t.Errorf("\nexpected: %d\n got: %d", tt.expectedCount, len(actual))
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
51
cfg/position_settings.go
Normal file
51
cfg/position_settings.go
Normal file
@ -0,0 +1,51 @@
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"github.com/olebedev/config"
|
||||
)
|
||||
|
||||
const (
|
||||
positionPath = "position"
|
||||
)
|
||||
|
||||
// PositionSettings represents the onscreen location of a widget
|
||||
type PositionSettings struct {
|
||||
Validations *Validations
|
||||
|
||||
Height int
|
||||
Left int
|
||||
Top int
|
||||
Width int
|
||||
}
|
||||
|
||||
// NewPositionSettingsFromYAML creates and returns a new instance of cfg.Position
|
||||
func NewPositionSettingsFromYAML(moduleName string, moduleConfig *config.Config) PositionSettings {
|
||||
var currVal int
|
||||
var err error
|
||||
|
||||
validations := NewValidations()
|
||||
|
||||
// Parse the positional data from the config data
|
||||
currVal, err = moduleConfig.Int(positionPath + ".top")
|
||||
validations.append("top", newPositionValidation("top", currVal, err))
|
||||
|
||||
currVal, err = moduleConfig.Int(positionPath + ".left")
|
||||
validations.append("left", newPositionValidation("left", currVal, err))
|
||||
|
||||
currVal, err = moduleConfig.Int(positionPath + ".width")
|
||||
validations.append("width", newPositionValidation("width", currVal, err))
|
||||
|
||||
currVal, err = moduleConfig.Int(positionPath + ".height")
|
||||
validations.append("height", newPositionValidation("height", currVal, err))
|
||||
|
||||
pos := PositionSettings{
|
||||
Validations: validations,
|
||||
|
||||
Top: validations.intValueFor("top"),
|
||||
Left: validations.intValueFor("left"),
|
||||
Width: validations.intValueFor("width"),
|
||||
Height: validations.intValueFor("height"),
|
||||
}
|
||||
|
||||
return pos
|
||||
}
|
67
cfg/position_validation.go
Normal file
67
cfg/position_validation.go
Normal file
@ -0,0 +1,67 @@
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/logrusorgru/aurora"
|
||||
)
|
||||
|
||||
// Common examples of invalid position configuration are:
|
||||
//
|
||||
// position:
|
||||
// top: -3
|
||||
// left: 2
|
||||
// width: 0
|
||||
// height: 1
|
||||
//
|
||||
// position:
|
||||
// top: 3
|
||||
// width: 2
|
||||
// height: 1
|
||||
//
|
||||
// position:
|
||||
// top: 3
|
||||
// # left: 2
|
||||
// width: 2
|
||||
// height: 1
|
||||
//
|
||||
// position:
|
||||
// top: 3
|
||||
// left: 2
|
||||
// width: 2
|
||||
// height: 1
|
||||
//
|
||||
type positionValidation struct {
|
||||
err error
|
||||
name string
|
||||
intVal int
|
||||
}
|
||||
|
||||
func (posVal *positionValidation) Error() error {
|
||||
return posVal.err
|
||||
}
|
||||
|
||||
func (posVal *positionValidation) HasError() bool {
|
||||
return posVal.err != nil
|
||||
}
|
||||
|
||||
func (posVal *positionValidation) IntValue() int {
|
||||
return posVal.intVal
|
||||
}
|
||||
|
||||
// String returns the Stringer representation of the positionValidation
|
||||
func (posVal *positionValidation) String() string {
|
||||
return fmt.Sprintf("Invalid value for %s:\t%d", aurora.Yellow(posVal.name), posVal.intVal)
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func newPositionValidation(name string, intVal int, err error) *positionValidation {
|
||||
posVal := &positionValidation{
|
||||
err: err,
|
||||
name: name,
|
||||
intVal: intVal,
|
||||
}
|
||||
|
||||
return posVal
|
||||
}
|
26
cfg/position_validation_test.go
Normal file
26
cfg/position_validation_test.go
Normal file
@ -0,0 +1,26 @@
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var (
|
||||
posVal = &positionValidation{
|
||||
err: errors.New("Busted"),
|
||||
name: "top",
|
||||
intVal: -3,
|
||||
}
|
||||
)
|
||||
|
||||
func Test_Attributes(t *testing.T) {
|
||||
assert.EqualError(t, posVal.Error(), "Busted")
|
||||
assert.Equal(t, true, posVal.HasError())
|
||||
assert.Equal(t, -3, posVal.IntValue())
|
||||
|
||||
assert.Contains(t, posVal.String(), "Invalid")
|
||||
assert.Contains(t, posVal.String(), "top")
|
||||
assert.Contains(t, posVal.String(), "-3")
|
||||
}
|
224
cfg/secrets.go
Normal file
224
cfg/secrets.go
Normal file
@ -0,0 +1,224 @@
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"runtime"
|
||||
|
||||
"github.com/docker/docker-credential-helpers/client"
|
||||
"github.com/docker/docker-credential-helpers/credentials"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/wtfutil/wtf/logger"
|
||||
)
|
||||
|
||||
type SecretLoadParams struct {
|
||||
name string
|
||||
globalConfig *config.Config
|
||||
service string
|
||||
|
||||
secret *string
|
||||
}
|
||||
|
||||
// Load module secrets.
|
||||
//
|
||||
// The credential helpers impose this structure:
|
||||
//
|
||||
// SERVICE is mapped to a SECRET and USERNAME
|
||||
//
|
||||
// Only SECRET is secret, SERVICE and USERNAME are not, so this
|
||||
// API doesn't expose USERNAME.
|
||||
//
|
||||
// SERVICE was intended to be the URL of an API server, but
|
||||
// for hosted services that do not have or need a configurable
|
||||
// API server, its easier to just use the module name as the
|
||||
// SERVICE:
|
||||
//
|
||||
// cfg.ModuleSecret(name, globalConfig, &settings.apiKey).Load()
|
||||
//
|
||||
// The user will use the module name as the service, and the API key as
|
||||
// the secret, for example:
|
||||
//
|
||||
// % wtfutil save-secret circleci
|
||||
// Secret: ...
|
||||
//
|
||||
// If a module (such as pihole, jenkins, or github) might have multiple
|
||||
// instantiations each using a different API service (with its own unique
|
||||
// API key), then the module should use the API URL to lookup the secret.
|
||||
// For example, for github:
|
||||
//
|
||||
// cfg.ModuleSecret(name, globalConfig, &settings.apiKey).
|
||||
// Service(settings.baseURL).
|
||||
// Load()
|
||||
//
|
||||
// The user will use the API URL as the service, and the API key as the
|
||||
// secret, for example, with github configured as:
|
||||
//
|
||||
// -- config.yml
|
||||
// mods:
|
||||
// github:
|
||||
// baseURL: "https://github.mycompany.com/api/v3"
|
||||
// ...
|
||||
//
|
||||
// the secret must be saved as:
|
||||
//
|
||||
// % wtfutil save-secret https://github.mycompany.com/api/v3
|
||||
// Secret: ...
|
||||
//
|
||||
// If baseURL is not set in the configuration it will be the modules
|
||||
// default, and the SERVICE will default to the module name, "github",
|
||||
// and the user must save the secret as:
|
||||
//
|
||||
// % wtfutil save-secret github
|
||||
// Secret: ...
|
||||
//
|
||||
// Ideally, the individual module documentation would describe the
|
||||
// SERVICE name to use to save the secret.
|
||||
func ModuleSecret(name string, globalConfig *config.Config, secret *string) *SecretLoadParams {
|
||||
return &SecretLoadParams{
|
||||
name: name,
|
||||
globalConfig: globalConfig,
|
||||
secret: secret,
|
||||
service: name, // Default the service to the module name
|
||||
}
|
||||
}
|
||||
|
||||
func (slp *SecretLoadParams) Service(service string) *SecretLoadParams {
|
||||
if service != "" {
|
||||
slp.service = service
|
||||
}
|
||||
return slp
|
||||
}
|
||||
|
||||
func (slp *SecretLoadParams) Load() {
|
||||
configureSecret(
|
||||
slp.globalConfig,
|
||||
slp.service,
|
||||
slp.secret,
|
||||
)
|
||||
}
|
||||
|
||||
type Secret struct {
|
||||
Service string
|
||||
Secret string
|
||||
Username string
|
||||
Store string
|
||||
}
|
||||
|
||||
func configureSecret(
|
||||
globalConfig *config.Config,
|
||||
service string,
|
||||
secret *string,
|
||||
) {
|
||||
if service == "" {
|
||||
return
|
||||
}
|
||||
|
||||
if secret == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// Don't overwrite the secret if it was configured with yaml
|
||||
if *secret != "" {
|
||||
return
|
||||
}
|
||||
|
||||
cred, err := FetchSecret(globalConfig, service)
|
||||
|
||||
if err != nil {
|
||||
logger.Log(fmt.Sprintf("Loading secret failed: %s", err.Error()))
|
||||
return
|
||||
}
|
||||
|
||||
if cred == nil {
|
||||
// No secret store configued.
|
||||
return
|
||||
}
|
||||
|
||||
if secret != nil && *secret == "" {
|
||||
*secret = cred.Secret
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch secret for `service`. Service is customarily a URL, but can be any
|
||||
// identifier uniquely used by wtf to identify the service, such as the name
|
||||
// of the module. nil is returned if the secretStore global property is not
|
||||
// present or the secret is not found in that store.
|
||||
func FetchSecret(globalConfig *config.Config, service string) (*Secret, error) {
|
||||
prog := newProgram(globalConfig)
|
||||
|
||||
if prog == nil {
|
||||
// No secret store configured.
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
cred, err := client.Get(prog.runner, service)
|
||||
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("get %v from %v: %w", service, prog.store, err)
|
||||
}
|
||||
|
||||
return &Secret{
|
||||
Service: cred.ServerURL,
|
||||
Secret: cred.Secret,
|
||||
Username: cred.Username,
|
||||
Store: prog.store,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func StoreSecret(globalConfig *config.Config, secret *Secret) error {
|
||||
prog := newProgram(globalConfig)
|
||||
|
||||
if prog == nil {
|
||||
return errors.New("cannot store secrets: wtf.secretStore is not configured")
|
||||
}
|
||||
|
||||
cred := &credentials.Credentials{
|
||||
ServerURL: secret.Service,
|
||||
Username: secret.Username,
|
||||
Secret: secret.Secret,
|
||||
}
|
||||
|
||||
// docker-credential requires a username, but it isn't necessary for
|
||||
// all services. Use a default if a username was not set.
|
||||
if cred.Username == "" {
|
||||
cred.Username = "default"
|
||||
}
|
||||
|
||||
err := client.Store(prog.runner, cred)
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("store %v: %w", prog.store, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
type program struct {
|
||||
store string
|
||||
runner client.ProgramFunc
|
||||
}
|
||||
|
||||
func newProgram(globalConfig *config.Config) *program {
|
||||
secretStore := globalConfig.UString("wtf.secretStore", "(none)")
|
||||
|
||||
if secretStore == "(none)" {
|
||||
return nil
|
||||
}
|
||||
|
||||
if secretStore == "" {
|
||||
switch runtime.GOOS {
|
||||
case "windows":
|
||||
secretStore = "winrt"
|
||||
case "darwin":
|
||||
secretStore = "osxkeychain"
|
||||
default:
|
||||
secretStore = "secretservice"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return &program{
|
||||
secretStore,
|
||||
client.NewShellProgramFunc("docker-credential-" + secretStore),
|
||||
}
|
||||
}
|
9
cfg/validatable.go
Normal file
9
cfg/validatable.go
Normal file
@ -0,0 +1,9 @@
|
||||
package cfg
|
||||
|
||||
// Validatable is implemented by any value that validates a configuration setting
|
||||
type Validatable interface {
|
||||
Error() error
|
||||
HasError() bool
|
||||
String() string
|
||||
IntValue() int
|
||||
}
|
28
cfg/validations.go
Normal file
28
cfg/validations.go
Normal file
@ -0,0 +1,28 @@
|
||||
package cfg
|
||||
|
||||
// Validations represent a collection of config setting validations
|
||||
type Validations struct {
|
||||
validations map[string]Validatable
|
||||
}
|
||||
|
||||
// NewValidations creates and returns an instance of Validations
|
||||
func NewValidations() *Validations {
|
||||
vals := &Validations{
|
||||
validations: make(map[string]Validatable),
|
||||
}
|
||||
|
||||
return vals
|
||||
}
|
||||
|
||||
func (vals *Validations) append(key string, posVal Validatable) {
|
||||
vals.validations[key] = posVal
|
||||
}
|
||||
|
||||
func (vals *Validations) intValueFor(key string) int {
|
||||
val := vals.validations[key]
|
||||
if val != nil {
|
||||
return val.IntValue()
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
38
cfg/validations_test.go
Normal file
38
cfg/validations_test.go
Normal file
@ -0,0 +1,38 @@
|
||||
package cfg
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
var (
|
||||
vals = NewValidations()
|
||||
)
|
||||
|
||||
func Test_intValueFor(t *testing.T) {
|
||||
vals.append("left", newPositionValidation("left", 3, nil))
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
key string
|
||||
expected int
|
||||
}{
|
||||
{
|
||||
name: "with valid key",
|
||||
key: "left",
|
||||
expected: 3,
|
||||
},
|
||||
{
|
||||
name: "with invalid key",
|
||||
key: "cat",
|
||||
expected: 0,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
assert.Equal(t, tt.expected, vals.intValueFor(tt.key))
|
||||
})
|
||||
}
|
||||
}
|
@ -3,14 +3,18 @@ package checklist
|
||||
// Checklist is a module for creating generic checklist implementations
|
||||
// See 'Todo' for an implementation example
|
||||
type Checklist struct {
|
||||
Selected int
|
||||
|
||||
Items []*ChecklistItem
|
||||
|
||||
checkedIcon string
|
||||
selected int
|
||||
uncheckedIcon string
|
||||
}
|
||||
|
||||
func NewChecklist() Checklist {
|
||||
func NewChecklist(checkedIcon, uncheckedIcon string) Checklist {
|
||||
list := Checklist{
|
||||
Selected: -1,
|
||||
checkedIcon: checkedIcon,
|
||||
selected: -1,
|
||||
uncheckedIcon: uncheckedIcon,
|
||||
}
|
||||
|
||||
return list
|
||||
@ -18,14 +22,17 @@ func NewChecklist() Checklist {
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
// Add creates a new item in the checklist
|
||||
// Add creates a new checklist item and prepends it onto the existing
|
||||
// list of items. The new one is at the start of the list
|
||||
func (list *Checklist) Add(checked bool, text string) {
|
||||
item := ChecklistItem{
|
||||
Checked: checked,
|
||||
Text: text,
|
||||
}
|
||||
item := NewChecklistItem(
|
||||
checked,
|
||||
text,
|
||||
list.checkedIcon,
|
||||
list.uncheckedIcon,
|
||||
)
|
||||
|
||||
list.Items = append([]*ChecklistItem{&item}, list.Items...)
|
||||
list.Items = append([]*ChecklistItem{item}, list.Items...)
|
||||
}
|
||||
|
||||
// CheckedItems returns a slice of all the checked items
|
||||
@ -42,29 +49,15 @@ func (list *Checklist) CheckedItems() []*ChecklistItem {
|
||||
}
|
||||
|
||||
// Delete removes the selected item from the checklist
|
||||
func (list *Checklist) Delete() {
|
||||
list.Items = append(list.Items[:list.Selected], list.Items[list.Selected+1:]...)
|
||||
list.Prev()
|
||||
}
|
||||
|
||||
// Demote moves the selected item down in the checklist
|
||||
func (list *Checklist) Demote() {
|
||||
if list.IsUnselectable() {
|
||||
return
|
||||
func (list *Checklist) Delete(selectedIndex int) {
|
||||
if selectedIndex >= 0 && selectedIndex < len(list.Items) {
|
||||
list.Items = append(list.Items[:selectedIndex], list.Items[selectedIndex+1:]...)
|
||||
}
|
||||
|
||||
j := list.Selected + 1
|
||||
if j >= len(list.Items) {
|
||||
j = 0
|
||||
}
|
||||
|
||||
list.Swap(list.Selected, j)
|
||||
list.Selected = j
|
||||
}
|
||||
|
||||
// IsSelectable returns true if the checklist has selectable items, false if it does not
|
||||
func (list *Checklist) IsSelectable() bool {
|
||||
return list.Selected >= 0 && list.Selected < len(list.Items)
|
||||
return list.selected >= 0 && list.selected < len(list.Items)
|
||||
}
|
||||
|
||||
// IsUnselectable returns true if the checklist has no selectable items, false if it does
|
||||
@ -72,14 +65,6 @@ func (list *Checklist) IsUnselectable() bool {
|
||||
return !list.IsSelectable()
|
||||
}
|
||||
|
||||
// Next selects the next item in the checklist
|
||||
func (list *Checklist) Next() {
|
||||
list.Selected = list.Selected + 1
|
||||
if list.Selected >= len(list.Items) {
|
||||
list.Selected = 0
|
||||
}
|
||||
}
|
||||
|
||||
// LongestLine returns the length of the longest checklist item's text
|
||||
func (list *Checklist) LongestLine() int {
|
||||
maxLen := 0
|
||||
@ -93,54 +78,14 @@ func (list *Checklist) LongestLine() int {
|
||||
return maxLen
|
||||
}
|
||||
|
||||
// Prev selects the previous item in the checklist
|
||||
func (list *Checklist) Prev() {
|
||||
list.Selected = list.Selected - 1
|
||||
if list.Selected < 0 {
|
||||
list.Selected = len(list.Items) - 1
|
||||
}
|
||||
}
|
||||
|
||||
// Promote moves the selected item up in the checklist
|
||||
func (list *Checklist) Promote() {
|
||||
if list.IsUnselectable() {
|
||||
return
|
||||
}
|
||||
|
||||
j := list.Selected - 1
|
||||
if j < 0 {
|
||||
j = len(list.Items) - 1
|
||||
}
|
||||
|
||||
list.Swap(list.Selected, j)
|
||||
list.Selected = j
|
||||
}
|
||||
|
||||
// SelectedItem returns the currently-selected checklist item or nil if no item is selected
|
||||
func (list *Checklist) SelectedItem() *ChecklistItem {
|
||||
if list.IsUnselectable() {
|
||||
return nil
|
||||
}
|
||||
|
||||
return list.Items[list.Selected]
|
||||
}
|
||||
|
||||
func (list *Checklist) SetSelectedByItem(selectableItem *ChecklistItem) {
|
||||
// IndexByItem returns the index of a giving item if found, otherwise returns 0 with ok set to false
|
||||
func (list *Checklist) IndexByItem(selectableItem *ChecklistItem) (index int, ok bool) {
|
||||
for idx, item := range list.Items {
|
||||
if item == selectableItem {
|
||||
list.Selected = idx
|
||||
break
|
||||
return idx, true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Toggle switches the checked state of the currently-selected item
|
||||
func (list *Checklist) Toggle() {
|
||||
if list.IsUnselectable() {
|
||||
return
|
||||
}
|
||||
|
||||
list.SelectedItem().Toggle()
|
||||
return 0, false
|
||||
}
|
||||
|
||||
// UncheckedItems returns a slice of all the unchecked items
|
||||
@ -158,18 +103,7 @@ func (list *Checklist) UncheckedItems() []*ChecklistItem {
|
||||
|
||||
// Unselect removes the current select such that no item is selected
|
||||
func (list *Checklist) Unselect() {
|
||||
list.Selected = -1
|
||||
}
|
||||
|
||||
// Update sets the text of the currently-selected item to the provided text
|
||||
func (list *Checklist) Update(text string) {
|
||||
item := list.SelectedItem()
|
||||
|
||||
if item == nil {
|
||||
return
|
||||
}
|
||||
|
||||
item.Text = text
|
||||
list.selected = -1
|
||||
}
|
||||
|
||||
/* -------------------- Sort Interface -------------------- */
|
||||
|
@ -1,23 +1,34 @@
|
||||
package checklist
|
||||
|
||||
import (
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
// ChecklistItem is a module for creating generic checklist implementations
|
||||
// See 'Todo' for an implementation example
|
||||
type ChecklistItem struct {
|
||||
Checked bool
|
||||
Text string
|
||||
Checked bool
|
||||
CheckedIcon string
|
||||
Text string
|
||||
UncheckedIcon string
|
||||
}
|
||||
|
||||
func NewChecklistItem(checked bool, text string, checkedIcon, uncheckedIcon string) *ChecklistItem {
|
||||
item := &ChecklistItem{
|
||||
Checked: checked,
|
||||
CheckedIcon: checkedIcon,
|
||||
Text: text,
|
||||
UncheckedIcon: uncheckedIcon,
|
||||
}
|
||||
|
||||
return item
|
||||
}
|
||||
|
||||
// CheckMark returns the string used to indicate a ChecklistItem is checked or unchecked
|
||||
func (item *ChecklistItem) CheckMark() string {
|
||||
item.ensureItemIcons()
|
||||
|
||||
if item.Checked {
|
||||
return wtf.Config.UString("wtf.mods.todo.checkedIcon", "x")
|
||||
return item.CheckedIcon
|
||||
}
|
||||
|
||||
return " "
|
||||
return item.UncheckedIcon
|
||||
}
|
||||
|
||||
// Toggle changes the checked state of the ChecklistItem
|
||||
@ -25,3 +36,15 @@ func (item *ChecklistItem) CheckMark() string {
|
||||
func (item *ChecklistItem) Toggle() {
|
||||
item.Checked = !item.Checked
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (item *ChecklistItem) ensureItemIcons() {
|
||||
if item.CheckedIcon == "" {
|
||||
item.CheckedIcon = "x"
|
||||
}
|
||||
|
||||
if item.UncheckedIcon == "" {
|
||||
item.UncheckedIcon = " "
|
||||
}
|
||||
}
|
||||
|
36
checklist/checklist_item_test.go
Normal file
36
checklist/checklist_item_test.go
Normal file
@ -0,0 +1,36 @@
|
||||
package checklist
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func testChecklistItem() *ChecklistItem {
|
||||
item := NewChecklistItem(
|
||||
false,
|
||||
"test",
|
||||
"",
|
||||
"",
|
||||
)
|
||||
return item
|
||||
}
|
||||
|
||||
func Test_CheckMark(t *testing.T) {
|
||||
item := testChecklistItem()
|
||||
Equal(t, " ", item.CheckMark())
|
||||
|
||||
item.Toggle()
|
||||
Equal(t, "x", item.CheckMark())
|
||||
}
|
||||
|
||||
func Test_Toggle(t *testing.T) {
|
||||
item := testChecklistItem()
|
||||
Equal(t, false, item.Checked)
|
||||
|
||||
item.Toggle()
|
||||
Equal(t, true, item.Checked)
|
||||
|
||||
item.Toggle()
|
||||
Equal(t, false, item.Checked)
|
||||
}
|
436
checklist/checklist_test.go
Normal file
436
checklist/checklist_test.go
Normal file
@ -0,0 +1,436 @@
|
||||
package checklist
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func Test_NewCheckist(t *testing.T) {
|
||||
cl := NewChecklist("o", "-")
|
||||
|
||||
assert.IsType(t, Checklist{}, cl)
|
||||
assert.Equal(t, "o", cl.checkedIcon)
|
||||
assert.Equal(t, -1, cl.selected)
|
||||
assert.Equal(t, "-", cl.uncheckedIcon)
|
||||
assert.Equal(t, 0, len(cl.Items))
|
||||
}
|
||||
|
||||
func Test_Add(t *testing.T) {
|
||||
cl := NewChecklist("o", "-")
|
||||
cl.Add(true, "test item")
|
||||
|
||||
assert.Equal(t, 1, len(cl.Items))
|
||||
}
|
||||
|
||||
func Test_CheckedItems(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
expectedLen int
|
||||
checkedLen int
|
||||
before func(cl *Checklist)
|
||||
}{
|
||||
{
|
||||
name: "with no items",
|
||||
expectedLen: 0,
|
||||
checkedLen: 0,
|
||||
before: func(cl *Checklist) {},
|
||||
},
|
||||
{
|
||||
name: "with no checked items",
|
||||
expectedLen: 1,
|
||||
checkedLen: 0,
|
||||
before: func(cl *Checklist) {
|
||||
cl.Add(false, "unchecked item")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "with one checked item",
|
||||
expectedLen: 2,
|
||||
checkedLen: 1,
|
||||
before: func(cl *Checklist) {
|
||||
cl.Add(false, "unchecked item")
|
||||
cl.Add(true, "checked item")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "with multiple checked items",
|
||||
expectedLen: 3,
|
||||
checkedLen: 2,
|
||||
before: func(cl *Checklist) {
|
||||
cl.Add(false, "unchecked item")
|
||||
cl.Add(true, "checked item 11")
|
||||
cl.Add(true, "checked item 2")
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cl := NewChecklist("o", "-")
|
||||
tt.before(&cl)
|
||||
|
||||
assert.Equal(t, tt.expectedLen, len(cl.Items))
|
||||
assert.Equal(t, tt.checkedLen, len(cl.CheckedItems()))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_Delete(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
idx int
|
||||
expectedLen int
|
||||
}{
|
||||
{
|
||||
name: "with valid index",
|
||||
idx: 0,
|
||||
expectedLen: 0,
|
||||
},
|
||||
{
|
||||
name: "with invalid index",
|
||||
idx: 2,
|
||||
expectedLen: 1,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cl := NewChecklist("o", "-")
|
||||
|
||||
cl.Add(true, "test item")
|
||||
cl.Delete(tt.idx)
|
||||
|
||||
assert.Equal(t, tt.expectedLen, len(cl.Items))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_IsSelectable(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
selected int
|
||||
expected bool
|
||||
}{
|
||||
{
|
||||
name: "nothing selected",
|
||||
selected: -1,
|
||||
expected: false,
|
||||
},
|
||||
{
|
||||
name: "valid selection",
|
||||
selected: 1,
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
name: "invalid selection",
|
||||
selected: 3,
|
||||
expected: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cl := NewChecklist("o", "-")
|
||||
cl.Add(true, "test item 1")
|
||||
cl.Add(false, "test item 2")
|
||||
|
||||
cl.selected = tt.selected
|
||||
|
||||
assert.Equal(t, tt.expected, cl.IsSelectable())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_IsUnselectable(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
selected int
|
||||
expected bool
|
||||
}{
|
||||
{
|
||||
name: "nothing selected",
|
||||
selected: -1,
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
name: "valid selection",
|
||||
selected: 1,
|
||||
expected: false,
|
||||
},
|
||||
{
|
||||
name: "invalid selection",
|
||||
selected: 3,
|
||||
expected: true,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cl := NewChecklist("o", "-")
|
||||
cl.Add(true, "test item 1")
|
||||
cl.Add(false, "test item 2")
|
||||
|
||||
cl.selected = tt.selected
|
||||
|
||||
assert.Equal(t, tt.expected, cl.IsUnselectable())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_LongestLine(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
expectedLen int
|
||||
before func(cl *Checklist)
|
||||
}{
|
||||
{
|
||||
name: "with no items",
|
||||
expectedLen: 0,
|
||||
before: func(cl *Checklist) {},
|
||||
},
|
||||
{
|
||||
name: "with different-length items",
|
||||
expectedLen: 12,
|
||||
before: func(cl *Checklist) {
|
||||
cl.Add(true, "test item 1")
|
||||
cl.Add(false, "test item 22")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "with same-length items",
|
||||
expectedLen: 11,
|
||||
before: func(cl *Checklist) {
|
||||
cl.Add(true, "test item 1")
|
||||
cl.Add(false, "test item 2")
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cl := NewChecklist("o", "-")
|
||||
tt.before(&cl)
|
||||
|
||||
assert.Equal(t, tt.expectedLen, cl.LongestLine())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_IndexByItem(t *testing.T) {
|
||||
cl := NewChecklist("o", "-")
|
||||
cl.Add(false, "unchecked item")
|
||||
cl.Add(true, "checked item")
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
item *ChecklistItem
|
||||
expectedIdx int
|
||||
expectedOk bool
|
||||
}{
|
||||
{
|
||||
name: "with nil",
|
||||
item: nil,
|
||||
expectedIdx: 0,
|
||||
expectedOk: false,
|
||||
},
|
||||
{
|
||||
name: "with valid item",
|
||||
item: cl.Items[1],
|
||||
expectedIdx: 1,
|
||||
expectedOk: true,
|
||||
},
|
||||
{
|
||||
name: "with valid item",
|
||||
item: NewChecklistItem(false, "invalid", "x", " "),
|
||||
expectedIdx: 0,
|
||||
expectedOk: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
||||
idx, ok := cl.IndexByItem(tt.item)
|
||||
|
||||
assert.Equal(t, tt.expectedIdx, idx)
|
||||
assert.Equal(t, tt.expectedOk, ok)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_UncheckedItems(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
expectedLen int
|
||||
checkedLen int
|
||||
before func(cl *Checklist)
|
||||
}{
|
||||
{
|
||||
name: "with no items",
|
||||
expectedLen: 0,
|
||||
checkedLen: 0,
|
||||
before: func(cl *Checklist) {},
|
||||
},
|
||||
{
|
||||
name: "with no unchecked items",
|
||||
expectedLen: 1,
|
||||
checkedLen: 0,
|
||||
before: func(cl *Checklist) {
|
||||
cl.Add(true, "unchecked item")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "with one unchecked item",
|
||||
expectedLen: 2,
|
||||
checkedLen: 1,
|
||||
before: func(cl *Checklist) {
|
||||
cl.Add(false, "unchecked item")
|
||||
cl.Add(true, "checked item")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "with multiple unchecked items",
|
||||
expectedLen: 3,
|
||||
checkedLen: 2,
|
||||
before: func(cl *Checklist) {
|
||||
cl.Add(false, "unchecked item")
|
||||
cl.Add(true, "checked item 11")
|
||||
cl.Add(false, "checked item 2")
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cl := NewChecklist("o", "-")
|
||||
tt.before(&cl)
|
||||
|
||||
assert.Equal(t, tt.expectedLen, len(cl.Items))
|
||||
assert.Equal(t, tt.checkedLen, len(cl.UncheckedItems()))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_Unselect(t *testing.T) {
|
||||
cl := NewChecklist("o", "-")
|
||||
cl.Add(false, "unchecked item")
|
||||
|
||||
cl.selected = 0
|
||||
assert.Equal(t, 0, cl.selected)
|
||||
|
||||
cl.Unselect()
|
||||
assert.Equal(t, -1, cl.selected)
|
||||
}
|
||||
|
||||
/* -------------------- Sort Interface -------------------- */
|
||||
|
||||
func Test_Len(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
expectedLen int
|
||||
before func(cl *Checklist)
|
||||
}{
|
||||
{
|
||||
name: "with no items",
|
||||
expectedLen: 0,
|
||||
before: func(cl *Checklist) {},
|
||||
},
|
||||
{
|
||||
name: "with one item",
|
||||
expectedLen: 1,
|
||||
before: func(cl *Checklist) {
|
||||
cl.Add(false, "unchecked item")
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "with multiple items",
|
||||
expectedLen: 3,
|
||||
before: func(cl *Checklist) {
|
||||
cl.Add(false, "unchecked item")
|
||||
cl.Add(true, "checked item 1")
|
||||
cl.Add(false, "checked item 2")
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cl := NewChecklist("o", "-")
|
||||
tt.before(&cl)
|
||||
|
||||
assert.Equal(t, tt.expectedLen, cl.Len())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_Less(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
first string
|
||||
second string
|
||||
expected bool
|
||||
}{
|
||||
{
|
||||
name: "same",
|
||||
first: "",
|
||||
second: "",
|
||||
expected: false,
|
||||
},
|
||||
{
|
||||
name: "last less",
|
||||
first: "beta",
|
||||
second: "alpha",
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
name: "first less",
|
||||
first: "alpha",
|
||||
second: "beta",
|
||||
expected: false,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cl := NewChecklist("o", "-")
|
||||
cl.Add(false, tt.first)
|
||||
cl.Add(false, tt.second)
|
||||
|
||||
assert.Equal(t, tt.expected, cl.Less(0, 1))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func Test_Swap(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
first string
|
||||
second string
|
||||
expected bool
|
||||
}{
|
||||
{
|
||||
name: "same",
|
||||
first: "",
|
||||
second: "",
|
||||
},
|
||||
{
|
||||
name: "last less",
|
||||
first: "alpha",
|
||||
second: "beta",
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
cl := NewChecklist("o", "-")
|
||||
cl.Add(false, tt.first)
|
||||
cl.Add(false, tt.second)
|
||||
|
||||
cl.Swap(0, 1)
|
||||
|
||||
assert.Equal(t, tt.expected, cl.Items[0].Text == "beta")
|
||||
assert.Equal(t, tt.expected, cl.Items[1].Text == "alpha")
|
||||
})
|
||||
}
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
package wtftests
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/olebedev/config"
|
||||
. "github.com/stretchr/testify/assert"
|
||||
. "github.com/wtfutil/wtf/checklist"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
/* -------------------- CheckMark -------------------- */
|
||||
|
||||
func TestCheckMark(t *testing.T) {
|
||||
loadConfig()
|
||||
|
||||
item := ChecklistItem{}
|
||||
Equal(t, " ", item.CheckMark())
|
||||
|
||||
item = ChecklistItem{Checked: true}
|
||||
Equal(t, "x", item.CheckMark())
|
||||
}
|
||||
|
||||
/* -------------------- Toggle -------------------- */
|
||||
|
||||
func TestToggle(t *testing.T) {
|
||||
loadConfig()
|
||||
|
||||
item := ChecklistItem{}
|
||||
Equal(t, false, item.Checked)
|
||||
|
||||
item.Toggle()
|
||||
Equal(t, true, item.Checked)
|
||||
|
||||
item.Toggle()
|
||||
Equal(t, false, item.Checked)
|
||||
}
|
||||
|
||||
/* -------------------- helpers -------------------- */
|
||||
|
||||
func loadConfig() {
|
||||
wtf.Config, _ = config.ParseYamlFile("../_sample_configs/simple_config.yml")
|
||||
}
|
@ -1,80 +0,0 @@
|
||||
package circleci
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
type Widget struct {
|
||||
wtf.TextWidget
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: wtf.NewTextWidget(app, "CircleCI", "circleci", false),
|
||||
}
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
if widget.Disabled() {
|
||||
return
|
||||
}
|
||||
|
||||
builds, err := BuildsFor()
|
||||
|
||||
widget.View.SetTitle(fmt.Sprintf("%s - Builds", widget.Name))
|
||||
|
||||
var content string
|
||||
if err != nil {
|
||||
widget.View.SetWrap(true)
|
||||
content = err.Error()
|
||||
} else {
|
||||
widget.View.SetWrap(false)
|
||||
content = widget.contentFrom(builds)
|
||||
}
|
||||
|
||||
widget.View.SetText(content)
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) contentFrom(builds []*Build) string {
|
||||
var str string
|
||||
for idx, build := range builds {
|
||||
if idx > 10 {
|
||||
return str
|
||||
}
|
||||
|
||||
str = str + fmt.Sprintf(
|
||||
"[%s] %s-%d (%s) [white]%s\n",
|
||||
buildColor(build),
|
||||
build.Reponame,
|
||||
build.BuildNum,
|
||||
build.Branch,
|
||||
build.AuthorName,
|
||||
)
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func buildColor(build *Build) string {
|
||||
switch build.Status {
|
||||
case "failed":
|
||||
return "red"
|
||||
case "running":
|
||||
return "yellow"
|
||||
case "success":
|
||||
return "green"
|
||||
case "fixed":
|
||||
return "green"
|
||||
default:
|
||||
return "white"
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
package clocks
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
func (widget *Widget) display(clocks []Clock, dateFormat string, timeFormat string) {
|
||||
if len(clocks) == 0 {
|
||||
widget.View.SetText(fmt.Sprintf("\n%s", " no timezone data available"))
|
||||
return
|
||||
}
|
||||
|
||||
str := ""
|
||||
for idx, clock := range clocks {
|
||||
str = str + fmt.Sprintf(
|
||||
" [%s]%-12s %-10s %7s[white]\n",
|
||||
wtf.RowColor("clocks", idx),
|
||||
clock.Label,
|
||||
clock.Time(timeFormat),
|
||||
clock.Date(dateFormat),
|
||||
)
|
||||
}
|
||||
|
||||
widget.View.SetText(str)
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
package clocks
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
type Widget struct {
|
||||
wtf.TextWidget
|
||||
|
||||
clockColl ClockCollection
|
||||
dateFormat string
|
||||
timeFormat string
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: wtf.NewTextWidget(app, "World Clocks", "clocks", false),
|
||||
}
|
||||
|
||||
widget.clockColl = widget.buildClockCollection(wtf.Config.UMap("wtf.mods.clocks.locations"))
|
||||
|
||||
widget.dateFormat = wtf.Config.UString("wtf.mods.clocks.dateFormat", wtf.SimpleDateFormat)
|
||||
widget.timeFormat = wtf.Config.UString("wtf.mods.clocks.timeFormat", wtf.SimpleTimeFormat)
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
widget.display(widget.clockColl.Sorted(), widget.dateFormat, widget.timeFormat)
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) buildClockCollection(locData map[string]interface{}) ClockCollection {
|
||||
clockColl := ClockCollection{}
|
||||
|
||||
for label, locStr := range locData {
|
||||
timeLoc, err := time.LoadLocation(widget.sanitizeLocation(locStr.(string)))
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
clockColl.Clocks = append(clockColl.Clocks, NewClock(label, timeLoc))
|
||||
}
|
||||
|
||||
return clockColl
|
||||
}
|
||||
|
||||
func (widget *Widget) sanitizeLocation(locStr string) string {
|
||||
return strings.Replace(locStr, " ", "_", -1)
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
package cmdrunner
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
type Widget struct {
|
||||
wtf.TextWidget
|
||||
|
||||
args []string
|
||||
cmd string
|
||||
result string
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: wtf.NewTextWidget(app, "CmdRunner", "cmdrunner", false),
|
||||
|
||||
args: wtf.ToStrs(wtf.Config.UList("wtf.mods.cmdrunner.args")),
|
||||
cmd: wtf.Config.UString("wtf.mods.cmdrunner.cmd"),
|
||||
}
|
||||
|
||||
widget.View.SetWrap(true)
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
widget.execute()
|
||||
|
||||
title := tview.TranslateANSI(wtf.Config.UString("wtf.mods.cmdrunner.title", widget.String()))
|
||||
widget.View.SetTitle(title)
|
||||
|
||||
widget.View.SetText(widget.result)
|
||||
}
|
||||
|
||||
func (widget *Widget) String() string {
|
||||
args := strings.Join(widget.args, " ")
|
||||
|
||||
if args != "" {
|
||||
return fmt.Sprintf(" %s %s ", widget.cmd, args)
|
||||
}
|
||||
|
||||
return fmt.Sprintf(" %s ", widget.cmd)
|
||||
}
|
||||
|
||||
func (widget *Widget) execute() {
|
||||
cmd := exec.Command(widget.cmd, widget.args...)
|
||||
widget.result = tview.TranslateANSI(wtf.ExecuteCommand(cmd))
|
||||
}
|
@ -1,55 +0,0 @@
|
||||
package toplist
|
||||
|
||||
import "fmt"
|
||||
|
||||
func (widget *Widget) display() {
|
||||
str := ""
|
||||
for _, fromCurrency := range widget.list.items {
|
||||
str += fmt.Sprintf(
|
||||
"[%s]%s [%s](%s)\n",
|
||||
widget.colors.from.displayName,
|
||||
fromCurrency.displayName,
|
||||
widget.colors.from.name,
|
||||
fromCurrency.name,
|
||||
)
|
||||
str += makeToListText(fromCurrency.to, widget.colors)
|
||||
}
|
||||
|
||||
widget.Result = str
|
||||
}
|
||||
|
||||
func makeToListText(toList []*tCurrency, colors textColors) string {
|
||||
str := ""
|
||||
for _, toCurrency := range toList {
|
||||
str += makeToText(toCurrency, colors)
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func makeToText(toCurrency *tCurrency, colors textColors) string {
|
||||
str := ""
|
||||
str += fmt.Sprintf(" [%s]%s\n", colors.to.name, toCurrency.name)
|
||||
for _, info := range toCurrency.info {
|
||||
str += makeInfoText(info, colors)
|
||||
str += "\n\n"
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
func makeInfoText(info tInfo, colors textColors) string {
|
||||
return fmt.Sprintf(
|
||||
" [%s]Exchange: [%s]%s\n",
|
||||
colors.to.field,
|
||||
colors.to.value,
|
||||
info.exchange,
|
||||
) +
|
||||
fmt.Sprintf(
|
||||
" [%s]Volume(24h): [%s]%f-[%s]%f",
|
||||
colors.to.field,
|
||||
colors.to.value,
|
||||
info.volume24h,
|
||||
colors.to.value,
|
||||
info.volume24hTo,
|
||||
)
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
package datadog
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
datadog "github.com/zorkian/go-datadog-api"
|
||||
)
|
||||
|
||||
// Monitors returns a list of newrelic monitors
|
||||
func Monitors() ([]datadog.Monitor, error) {
|
||||
client := datadog.NewClient(apiKey(), applicationKey())
|
||||
|
||||
monitors, err := client.GetMonitorsByTags(wtf.ToStrs(wtf.Config.UList("wtf.mods.datadog.monitors.tags")))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return monitors, nil
|
||||
}
|
||||
|
||||
func apiKey() string {
|
||||
return wtf.Config.UString(
|
||||
"wtf.mods.datadog.apiKey",
|
||||
os.Getenv("WTF_DATADOG_API_KEY"),
|
||||
)
|
||||
}
|
||||
|
||||
func applicationKey() string {
|
||||
return wtf.Config.UString(
|
||||
"wtf.mods.datadog.applicationKey",
|
||||
os.Getenv("WTF_DATADOG_APPLICATION_KEY"),
|
||||
)
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
package datadog
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
datadog "github.com/zorkian/go-datadog-api"
|
||||
)
|
||||
|
||||
type Widget struct {
|
||||
wtf.TextWidget
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: wtf.NewTextWidget(app, "Datadog", "datadog", false),
|
||||
}
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
monitors, monitorErr := Monitors()
|
||||
|
||||
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s", widget.Name)))
|
||||
widget.View.Clear()
|
||||
|
||||
var content string
|
||||
if monitorErr != nil {
|
||||
widget.View.SetWrap(true)
|
||||
content = monitorErr.Error()
|
||||
} else {
|
||||
widget.View.SetWrap(false)
|
||||
content = widget.contentFrom(monitors)
|
||||
}
|
||||
|
||||
widget.View.SetText(content)
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) contentFrom(monitors []datadog.Monitor) string {
|
||||
var str string
|
||||
|
||||
triggeredMonitors := []datadog.Monitor{}
|
||||
|
||||
for _, monitor := range monitors {
|
||||
state := *monitor.OverallState
|
||||
switch state {
|
||||
case "Alert":
|
||||
triggeredMonitors = append(triggeredMonitors, monitor)
|
||||
}
|
||||
}
|
||||
if len(triggeredMonitors) > 0 {
|
||||
str = str + fmt.Sprintf(
|
||||
" %s\n",
|
||||
"[red]Triggered Monitors[white]",
|
||||
)
|
||||
for _, triggeredMonitor := range triggeredMonitors {
|
||||
str = str + fmt.Sprintf("[red] %s\n", *triggeredMonitor.Name)
|
||||
}
|
||||
} else {
|
||||
str = str + fmt.Sprintf(
|
||||
" %s\n",
|
||||
"[green]No Triggered Monitors[white]",
|
||||
)
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
122
flags/flags.go
122
flags/flags.go
@ -4,19 +4,42 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/chzyer/readline"
|
||||
goFlags "github.com/jessevdk/go-flags"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/wtfutil/wtf/cfg"
|
||||
"github.com/wtfutil/wtf/help"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
// Flags is the container for command line flag data
|
||||
type Flags struct {
|
||||
Config string `short:"c" long:"config" optional:"yes" description:"Path to config file"`
|
||||
Module string `short:"m" long:"module" optional:"yes" description:"Display info about a specific module, i.e.: 'wtf -m=todo'"`
|
||||
Module string `short:"m" long:"module" optional:"yes" description:"Display info about a specific module, i.e.: 'wtfutil -m=todo'"`
|
||||
Profile bool `short:"p" long:"profile" optional:"yes" description:"Profile application memory usage"`
|
||||
Version bool `short:"v" long:"version" description:"Show version info"`
|
||||
// Work-around go-flags misfeatures. If any sub-command is defined
|
||||
// then `wtf` (no sub-commands, the common usage), is warned about.
|
||||
Opt struct {
|
||||
Cmd string `positional-arg-name:"command"`
|
||||
Args []string `positional-arg-name:"args"`
|
||||
} `positional-args:"yes"`
|
||||
|
||||
hasCustom bool
|
||||
}
|
||||
|
||||
var EXTRA = `
|
||||
Commands:
|
||||
save-secret <service>
|
||||
service Service URL or module name of secret.
|
||||
Save a secret into the secret store. The secret will be prompted for.
|
||||
Requires wtf.secretStore to be configured. See individual modules for
|
||||
information on what service and secret means for their configuration,
|
||||
not all modules use secrets.
|
||||
`
|
||||
|
||||
// NewFlags creates an instance of Flags
|
||||
func NewFlags() *Flags {
|
||||
flags := Flags{}
|
||||
return &flags
|
||||
@ -24,51 +47,114 @@ func NewFlags() *Flags {
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
// ConfigFilePath returns the path to the currently-loaded config file
|
||||
func (flags *Flags) ConfigFilePath() string {
|
||||
return flags.Config
|
||||
}
|
||||
|
||||
func (flags *Flags) Display(version string) {
|
||||
// RenderIf displays special-case information based on the flags passed
|
||||
// in, if any flags were passed in
|
||||
func (flags *Flags) RenderIf(version, date string, config *config.Config) {
|
||||
if flags.HasModule() {
|
||||
help.Display(flags.Module)
|
||||
help.Display(flags.Module, config)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if flags.HasVersion() {
|
||||
fmt.Println(version)
|
||||
fmt.Printf("%s (%s)\n", version, date)
|
||||
os.Exit(0)
|
||||
}
|
||||
|
||||
if flags.Opt.Cmd == "" {
|
||||
return
|
||||
}
|
||||
|
||||
switch cmd := flags.Opt.Cmd; cmd {
|
||||
case "save-secret":
|
||||
var service, secret string
|
||||
args := flags.Opt.Args
|
||||
|
||||
if len(args) < 1 || args[0] == "" {
|
||||
fmt.Fprintf(os.Stderr, "save-secret: service required, see `%s --help`\n", os.Args[0])
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
service = args[0]
|
||||
|
||||
if len(args) > 1 {
|
||||
fmt.Fprintf(os.Stderr, "save-secret: too many arguments, see `%s --help`\n", os.Args[0])
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
b, err := readline.Password("Secret: ")
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
secret = string(b)
|
||||
secret = strings.TrimSpace(secret)
|
||||
|
||||
if secret == "" {
|
||||
fmt.Fprintf(os.Stderr, "save-secret: secret required, see `%s --help`\n", os.Args[0])
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
err = cfg.StoreSecret(config, &cfg.Secret{
|
||||
Service: service,
|
||||
Secret: secret,
|
||||
Username: "default",
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Saving secret for service %q: %s\n", service, err.Error())
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
fmt.Printf("Saved secret for service %q\n", service)
|
||||
os.Exit(0)
|
||||
default:
|
||||
fmt.Fprintf(os.Stderr, "Command `%s` is not supported, try `%s --help`\n", cmd, os.Args[0])
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func (flags *Flags) HasConfig() bool {
|
||||
return len(flags.Config) > 0
|
||||
// HasCustomConfig returns TRUE if a config path was passed in, FALSE if one was not
|
||||
func (flags *Flags) HasCustomConfig() bool {
|
||||
return flags.hasCustom
|
||||
}
|
||||
|
||||
// HasModule returns TRUE if a module name was passed in, FALSE if one was not
|
||||
func (flags *Flags) HasModule() bool {
|
||||
return len(flags.Module) > 0
|
||||
}
|
||||
|
||||
// HasVersion returns TRUE if the version flag was passed in, FALSE if it was not
|
||||
func (flags *Flags) HasVersion() bool {
|
||||
return flags.Version == true
|
||||
return flags.Version
|
||||
}
|
||||
|
||||
// Parse parses the incoming flags
|
||||
func (flags *Flags) Parse() {
|
||||
parser := goFlags.NewParser(flags, goFlags.Default)
|
||||
if _, err := parser.Parse(); err != nil {
|
||||
if flagsErr, ok := err.(*goFlags.Error); ok && flagsErr.Type == goFlags.ErrHelp {
|
||||
fmt.Println(EXTRA)
|
||||
os.Exit(0)
|
||||
}
|
||||
}
|
||||
|
||||
// If no config file is explicitly passed in as a param,
|
||||
// set the flag to the default config file
|
||||
if !flags.HasConfig() {
|
||||
homeDir, err := wtf.Home()
|
||||
if err != nil {
|
||||
fmt.Printf("Error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
flags.Config = filepath.Join(homeDir, ".config", "wtf", "config.yml")
|
||||
// If we have a custom config, then we're done parsing parameters, we don't need to
|
||||
// generate the default value
|
||||
flags.hasCustom = (len(flags.Config) > 0)
|
||||
if flags.hasCustom {
|
||||
return
|
||||
}
|
||||
|
||||
// If no config file is explicitly passed in as a param then set the flag to the default config file
|
||||
configDir, err := cfg.WtfConfigDir()
|
||||
if err != nil {
|
||||
fmt.Printf("Error: %v\n", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
flags.Config = filepath.Join(configDir, "config.yml")
|
||||
}
|
||||
|
@ -1,77 +0,0 @@
|
||||
package gcal
|
||||
|
||||
import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
type Widget struct {
|
||||
wtf.TextWidget
|
||||
|
||||
calEvents []*CalEvent
|
||||
ch chan struct{}
|
||||
mutex sync.Mutex
|
||||
app *tview.Application
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: wtf.NewTextWidget(app, "Calendar", "gcal", true),
|
||||
ch: make(chan struct{}),
|
||||
app: app,
|
||||
}
|
||||
|
||||
go updateLoop(&widget)
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Disable() {
|
||||
close(widget.ch)
|
||||
widget.TextWidget.Disable()
|
||||
}
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
if isAuthenticated() {
|
||||
widget.fetchAndDisplayEvents()
|
||||
return
|
||||
}
|
||||
widget.app.Suspend(authenticate)
|
||||
widget.Refresh()
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) fetchAndDisplayEvents() {
|
||||
calEvents, err := Fetch()
|
||||
if err != nil {
|
||||
widget.calEvents = []*CalEvent{}
|
||||
} else {
|
||||
widget.calEvents = calEvents
|
||||
}
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func updateLoop(widget *Widget) {
|
||||
interval := wtf.Config.UInt("wtf.mods.gcal.textInterval", 30)
|
||||
if interval == 0 {
|
||||
return
|
||||
}
|
||||
|
||||
tick := time.NewTicker(time.Duration(interval) * time.Second)
|
||||
defer tick.Stop()
|
||||
outer:
|
||||
for {
|
||||
select {
|
||||
case <-tick.C:
|
||||
widget.display()
|
||||
case <-widget.ch:
|
||||
break outer
|
||||
}
|
||||
}
|
||||
}
|
29
generator/settings.tpl
Normal file
29
generator/settings.tpl
Normal file
@ -0,0 +1,29 @@
|
||||
package {{(Lower .Name)}}
|
||||
|
||||
import (
|
||||
"github.com/olebedev/config"
|
||||
"github.com/wtfutil/wtf/cfg"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultFocusable = false
|
||||
defaultTitle = "{{(.Name)}}"
|
||||
)
|
||||
|
||||
// Settings defines the configuration properties for this module
|
||||
type Settings struct {
|
||||
common *cfg.Common
|
||||
|
||||
// Define your settings attributes here
|
||||
}
|
||||
|
||||
// NewSettingsFromYAML creates a new settings instance from a YAML config block
|
||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||
settings := Settings{
|
||||
common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig),
|
||||
|
||||
// Configure your settings attributes here. See http://github.com/olebedev/config for type details
|
||||
}
|
||||
|
||||
return &settings
|
||||
}
|
@ -36,17 +36,41 @@ func main() {
|
||||
widgetName,
|
||||
}
|
||||
|
||||
tpl, _ := template.New("textwidget.tpl").Funcs(template.FuncMap{
|
||||
"Lower": strings.ToLower,
|
||||
"Title": strings.Title,
|
||||
}).ParseFiles("generator/textwidget.tpl")
|
||||
createModuleDirectory(data)
|
||||
|
||||
err := os.Mkdir(strings.ToLower(widgetName), os.ModePerm)
|
||||
generateWidgetFile(data)
|
||||
generateSettingsFile(data)
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func createModuleDirectory(data struct{ Name string }) {
|
||||
err := os.MkdirAll(strings.ToLower(fmt.Sprintf("modules/%s", data.Name)), os.ModePerm)
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
out, err := os.Create(fmt.Sprintf("%s/widget.go", strings.ToLower(widgetName)))
|
||||
func generateWidgetFile(data struct{ Name string }) {
|
||||
tpl, _ := template.New("textwidget.tpl").Funcs(template.FuncMap{
|
||||
"Lower": strings.ToLower,
|
||||
}).ParseFiles("generator/textwidget.tpl")
|
||||
|
||||
out, err := os.Create(fmt.Sprintf("modules/%s/widget.go", strings.ToLower(data.Name)))
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
defer out.Close()
|
||||
|
||||
tpl.Execute(out, data)
|
||||
}
|
||||
|
||||
func generateSettingsFile(data struct{ Name string }) {
|
||||
tpl, _ := template.New("settings.tpl").Funcs(template.FuncMap{
|
||||
"Lower": strings.ToLower,
|
||||
}).ParseFiles("generator/settings.tpl")
|
||||
|
||||
out, err := os.Create(fmt.Sprintf("modules/%s/settings.go", strings.ToLower(data.Name)))
|
||||
if err != nil {
|
||||
fmt.Println(err.Error())
|
||||
}
|
||||
|
@ -1,69 +1,45 @@
|
||||
// Package {{(Lower .Name)}}
|
||||
package {{(Lower .Name)}}
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
"github.com/wtfutil/wtf/view"
|
||||
)
|
||||
|
||||
const HelpText = `
|
||||
Keyboard commands for {{(Title .Name)}}:
|
||||
`
|
||||
|
||||
// Widget is the container for your module's data
|
||||
type Widget struct {
|
||||
wtf.HelpfulWidget
|
||||
wtf.TextWidget
|
||||
view.TextWidget
|
||||
|
||||
settings *Settings
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
|
||||
// NewWidget creates and returns an instance of Widget
|
||||
func NewWidget(tviewApp *tview.Application, pages *tview.Pages, settings *Settings) *Widget {
|
||||
widget := Widget{
|
||||
HelpfulWidget: wtf.NewHelpfulWidget(app, pages, HelpText),
|
||||
TextWidget: wtf.NewTextWidget(app, "{{(Title .Name)}}", "{{(Lower .Name)}}", true),
|
||||
TextWidget: view.NewTextWidget(tviewApp, settings.common),
|
||||
|
||||
settings: settings,
|
||||
}
|
||||
|
||||
widget.HelpfulWidget.SetView(widget.View)
|
||||
widget.unselect()
|
||||
|
||||
widget.View.SetScrollable(true)
|
||||
widget.View.SetRegions(true)
|
||||
widget.View.SetInputCapture(widget.keyboardIntercept)
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
// Refresh updates the onscreen contents of the widget
|
||||
func (widget *Widget) Refresh() {
|
||||
|
||||
// The last call should always be to the display function
|
||||
widget.display()
|
||||
// The last call should always be to the display function
|
||||
widget.display()
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) content() string {
|
||||
return "This is my widget"
|
||||
}
|
||||
|
||||
func (widget *Widget) display() {
|
||||
widget.View.SetWrap(false)
|
||||
|
||||
widget.View.Clear()
|
||||
widget.View.SetTitle(widget.Name)
|
||||
widget.View.SetText("Some Text")
|
||||
widget.View.Highlight(strconv.Itoa(widget.selected)).ScrollToHighlight()
|
||||
}
|
||||
|
||||
func (widget *Widget) unselect() {
|
||||
widget.selected = -1
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
||||
// This switch statement could handle alphanumeric keys
|
||||
switch string(event.Rune()) {
|
||||
}
|
||||
|
||||
// This switch statement could handle events like the "enter" key
|
||||
switch event.Key() {
|
||||
}
|
||||
}
|
||||
widget.Redraw(func() (string, string, bool) {
|
||||
return widget.CommonSettings().Title, widget.content(), false
|
||||
})
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
package gerrit
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
func (widget *Widget) display() {
|
||||
|
||||
project := widget.currentGerritProject()
|
||||
if project == nil {
|
||||
widget.View.SetText(fmt.Sprintf("%s", " Gerrit project data is unavailable (1)"))
|
||||
return
|
||||
}
|
||||
|
||||
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s- %s", widget.Name, widget.title(project))))
|
||||
|
||||
str := wtf.SigilStr(len(widget.GerritProjects), widget.Idx, widget.View) + "\n"
|
||||
str = str + " [red]Stats[white]\n"
|
||||
str = str + widget.displayStats(project)
|
||||
str = str + "\n"
|
||||
str = str + " [red]Open Incoming Reviews[white]\n"
|
||||
str = str + widget.displayMyIncomingReviews(project, wtf.Config.UString("wtf.mods.gerrit.username"))
|
||||
str = str + "\n"
|
||||
str = str + " [red]My Outgoing Reviews[white]\n"
|
||||
str = str + widget.displayMyOutgoingReviews(project, wtf.Config.UString("wtf.mods.gerrit.username"))
|
||||
|
||||
widget.View.SetText(str)
|
||||
}
|
||||
|
||||
func (widget *Widget) displayMyIncomingReviews(project *GerritProject, username string) string {
|
||||
if len(project.IncomingReviews) == 0 {
|
||||
return " [grey]none[white]\n"
|
||||
}
|
||||
|
||||
str := ""
|
||||
for idx, r := range project.IncomingReviews {
|
||||
str = str + fmt.Sprintf(" [%s] [green]%d[white] [%s] %s\n", widget.rowColor(idx), r.Number, widget.rowColor(idx), r.Subject)
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (widget *Widget) displayMyOutgoingReviews(project *GerritProject, username string) string {
|
||||
if len(project.OutgoingReviews) == 0 {
|
||||
return " [grey]none[white]\n"
|
||||
}
|
||||
|
||||
str := ""
|
||||
for idx, r := range project.OutgoingReviews {
|
||||
str = str + fmt.Sprintf(" [%s] [green]%d[white] [%s] %s\n", widget.rowColor(idx+len(project.IncomingReviews)), r.Number, widget.rowColor(idx+len(project.IncomingReviews)), r.Subject)
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (widget *Widget) displayStats(project *GerritProject) string {
|
||||
str := fmt.Sprintf(
|
||||
" Reviews: %d\n",
|
||||
project.ReviewCount,
|
||||
)
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (widget *Widget) rowColor(index int) string {
|
||||
if widget.View.HasFocus() && (index == widget.selected) {
|
||||
return wtf.DefaultFocussedRowColor()
|
||||
}
|
||||
return wtf.RowColor("gerrit", index)
|
||||
}
|
||||
|
||||
func (widget *Widget) title(project *GerritProject) string {
|
||||
return fmt.Sprintf("[green]%s [white]", project.Path)
|
||||
}
|
238
gerrit/widget.go
238
gerrit/widget.go
@ -1,238 +0,0 @@
|
||||
package gerrit
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"regexp"
|
||||
|
||||
glb "github.com/andygrunwald/go-gerrit"
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
const HelpText = `
|
||||
Keyboard commands for Gerrit:
|
||||
|
||||
/: Show/hide this help window
|
||||
h: Show the previous project
|
||||
l: Show the next project
|
||||
j: Select the next review in the list
|
||||
k: Select the previous review in the list
|
||||
r: Refresh the data
|
||||
|
||||
arrow left: Show the previous project
|
||||
arrow right: Show the next project
|
||||
arrow down: Select the next review in the list
|
||||
arrow up: Select the previous review in the list
|
||||
|
||||
return: Open the selected review in a browser
|
||||
`
|
||||
|
||||
type Widget struct {
|
||||
wtf.HelpfulWidget
|
||||
wtf.TextWidget
|
||||
|
||||
gerrit *glb.Client
|
||||
|
||||
GerritProjects []*GerritProject
|
||||
Idx int
|
||||
selected int
|
||||
}
|
||||
|
||||
var (
|
||||
GerritURLPattern = regexp.MustCompile(`^(http|https)://(.*)$`)
|
||||
)
|
||||
|
||||
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
|
||||
widget := Widget{
|
||||
HelpfulWidget: wtf.NewHelpfulWidget(app, pages, HelpText),
|
||||
TextWidget: wtf.NewTextWidget(app, "Gerrit", "gerrit", true),
|
||||
|
||||
Idx: 0,
|
||||
}
|
||||
|
||||
widget.HelpfulWidget.SetView(widget.View)
|
||||
|
||||
widget.View.SetInputCapture(widget.keyboardIntercept)
|
||||
widget.unselect()
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
baseURL := wtf.Config.UString("wtf.mods.gerrit.domain")
|
||||
username := wtf.Config.UString("wtf.mods.gerrit.username")
|
||||
|
||||
password := wtf.Config.UString(
|
||||
"wtf.mods.gerrit.password",
|
||||
os.Getenv("WTF_GERRIT_PASSWORD"),
|
||||
)
|
||||
|
||||
verifyServerCertificate := wtf.Config.UBool("wtf.mods.gerrit.verifyServerCertificate", true)
|
||||
|
||||
httpClient := &http.Client{Transport: &http.Transport{
|
||||
TLSClientConfig: &tls.Config{
|
||||
InsecureSkipVerify: !verifyServerCertificate,
|
||||
},
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
},
|
||||
}
|
||||
|
||||
gerritUrl := baseURL
|
||||
submatches := GerritURLPattern.FindAllStringSubmatch(baseURL, -1)
|
||||
|
||||
if len(submatches) > 0 && len(submatches[0]) > 2 {
|
||||
submatch := submatches[0]
|
||||
gerritUrl = fmt.Sprintf(
|
||||
"%s://%s:%s@%s", submatch[1], username, password, submatch[2])
|
||||
}
|
||||
gerrit, err := glb.NewClient(gerritUrl, httpClient)
|
||||
if err != nil {
|
||||
widget.View.SetWrap(true)
|
||||
widget.View.SetTitle(widget.Name)
|
||||
widget.View.SetText(err.Error())
|
||||
return
|
||||
}
|
||||
widget.gerrit = gerrit
|
||||
widget.GerritProjects = widget.buildProjectCollection(wtf.Config.UList("wtf.mods.gerrit.projects"))
|
||||
|
||||
for _, project := range widget.GerritProjects {
|
||||
project.Refresh()
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) nextProject() {
|
||||
widget.Idx = widget.Idx + 1
|
||||
widget.unselect()
|
||||
if widget.Idx == len(widget.GerritProjects) {
|
||||
widget.Idx = 0
|
||||
}
|
||||
|
||||
widget.unselect()
|
||||
}
|
||||
|
||||
func (widget *Widget) prevProject() {
|
||||
widget.Idx = widget.Idx - 1
|
||||
if widget.Idx < 0 {
|
||||
widget.Idx = len(widget.GerritProjects) - 1
|
||||
}
|
||||
|
||||
widget.unselect()
|
||||
}
|
||||
|
||||
func (widget *Widget) nextReview() {
|
||||
widget.selected++
|
||||
project := widget.GerritProjects[widget.Idx]
|
||||
if widget.selected >= project.ReviewCount {
|
||||
widget.selected = 0
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) prevReview() {
|
||||
widget.selected--
|
||||
project := widget.GerritProjects[widget.Idx]
|
||||
if widget.selected < 0 {
|
||||
widget.selected = project.ReviewCount - 1
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) openReview() {
|
||||
sel := widget.selected
|
||||
project := widget.GerritProjects[widget.Idx]
|
||||
if sel >= 0 && sel < project.ReviewCount {
|
||||
change := glb.ChangeInfo{}
|
||||
if sel < len(project.IncomingReviews) {
|
||||
change = project.IncomingReviews[sel]
|
||||
} else {
|
||||
change = project.OutgoingReviews[sel-len(project.IncomingReviews)]
|
||||
}
|
||||
wtf.OpenFile(fmt.Sprintf("%s/%s/%d", wtf.Config.UString("wtf.mods.gerrit.domain"), "#/c", change.Number))
|
||||
}
|
||||
}
|
||||
|
||||
func (widget *Widget) unselect() {
|
||||
widget.selected = -1
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) buildProjectCollection(projectData []interface{}) []*GerritProject {
|
||||
gerritProjects := []*GerritProject{}
|
||||
|
||||
for _, name := range projectData {
|
||||
project := NewGerritProject(name.(string), widget.gerrit)
|
||||
gerritProjects = append(gerritProjects, project)
|
||||
}
|
||||
|
||||
return gerritProjects
|
||||
}
|
||||
|
||||
func (widget *Widget) currentGerritProject() *GerritProject {
|
||||
if len(widget.GerritProjects) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
if widget.Idx < 0 || widget.Idx >= len(widget.GerritProjects) {
|
||||
return nil
|
||||
}
|
||||
|
||||
return widget.GerritProjects[widget.Idx]
|
||||
}
|
||||
|
||||
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
||||
switch string(event.Rune()) {
|
||||
case "/":
|
||||
widget.ShowHelp()
|
||||
return nil
|
||||
case "h":
|
||||
widget.prevProject()
|
||||
return nil
|
||||
case "l":
|
||||
widget.nextProject()
|
||||
return nil
|
||||
case "j":
|
||||
widget.nextReview()
|
||||
return nil
|
||||
case "k":
|
||||
widget.prevReview()
|
||||
return nil
|
||||
case "r":
|
||||
widget.Refresh()
|
||||
return nil
|
||||
}
|
||||
|
||||
switch event.Key() {
|
||||
case tcell.KeyLeft:
|
||||
widget.prevProject()
|
||||
return nil
|
||||
case tcell.KeyRight:
|
||||
widget.nextProject()
|
||||
return nil
|
||||
case tcell.KeyDown:
|
||||
widget.nextReview()
|
||||
return nil
|
||||
case tcell.KeyUp:
|
||||
widget.prevReview()
|
||||
return nil
|
||||
case tcell.KeyEnter:
|
||||
widget.openReview()
|
||||
return nil
|
||||
case tcell.KeyEsc:
|
||||
widget.unselect()
|
||||
return event
|
||||
default:
|
||||
return event
|
||||
}
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
package github
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/google/go-github/github"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
func (widget *Widget) display() {
|
||||
repo := widget.currentGithubRepo()
|
||||
if repo == nil {
|
||||
widget.View.SetText(" GitHub repo data is unavailable ")
|
||||
return
|
||||
}
|
||||
|
||||
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %s", widget.Name, widget.title(repo))))
|
||||
|
||||
str := wtf.SigilStr(len(widget.GithubRepos), widget.Idx, widget.View) + "\n"
|
||||
str = str + " [red]Stats[white]\n"
|
||||
str = str + widget.displayStats(repo)
|
||||
str = str + "\n"
|
||||
str = str + " [red]Open Review Requests[white]\n"
|
||||
str = str + widget.displayMyReviewRequests(repo, wtf.Config.UString("wtf.mods.github.username"))
|
||||
str = str + "\n"
|
||||
str = str + " [red]My Pull Requests[white]\n"
|
||||
str = str + widget.displayMyPullRequests(repo, wtf.Config.UString("wtf.mods.github.username"))
|
||||
|
||||
widget.View.SetText(str)
|
||||
}
|
||||
|
||||
func (widget *Widget) displayMyPullRequests(repo *GithubRepo, username string) string {
|
||||
prs := repo.myPullRequests(username)
|
||||
|
||||
if len(prs) == 0 {
|
||||
return " [grey]none[white]\n"
|
||||
}
|
||||
|
||||
str := ""
|
||||
for _, pr := range prs {
|
||||
str = str + fmt.Sprintf(" %s[green]%4d[white] %s\n", mergeString(pr), *pr.Number, *pr.Title)
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (widget *Widget) displayMyReviewRequests(repo *GithubRepo, username string) string {
|
||||
prs := repo.myReviewRequests(username)
|
||||
|
||||
if len(prs) == 0 {
|
||||
return " [grey]none[white]\n"
|
||||
}
|
||||
|
||||
str := ""
|
||||
for _, pr := range prs {
|
||||
str = str + fmt.Sprintf(" [green]%4d[white] %s\n", *pr.Number, *pr.Title)
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (widget *Widget) displayStats(repo *GithubRepo) string {
|
||||
str := fmt.Sprintf(
|
||||
" PRs: %d Issues: %d Stars: %d\n",
|
||||
repo.PullRequestCount(),
|
||||
repo.IssueCount(),
|
||||
repo.StarCount(),
|
||||
)
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (widget *Widget) title(repo *GithubRepo) string {
|
||||
return fmt.Sprintf("[green]%s - %s[white]", repo.Owner, repo.Name)
|
||||
}
|
||||
|
||||
func showStatus() bool {
|
||||
return wtf.Config.UBool("wtf.mods.github.enableStatus", false)
|
||||
}
|
||||
|
||||
var mergeIcons = map[string]string{
|
||||
"dirty": "[red]![white] ",
|
||||
"clean": "[green]✔[white] ",
|
||||
"unstable": "[red]✖[white] ",
|
||||
"blocked": "[red]✖[white] ",
|
||||
}
|
||||
|
||||
func mergeString(pr *github.PullRequest) string {
|
||||
if !showStatus() {
|
||||
return ""
|
||||
}
|
||||
if str, ok := mergeIcons[pr.GetMergeableState()]; ok {
|
||||
return str
|
||||
}
|
||||
return "? "
|
||||
}
|
137
github/widget.go
137
github/widget.go
@ -1,137 +0,0 @@
|
||||
package github
|
||||
|
||||
import (
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
const HelpText = `
|
||||
Keyboard commands for GitHub:
|
||||
|
||||
/: Show/hide this help window
|
||||
h: Previous git repository
|
||||
l: Next git repository
|
||||
r: Refresh the data
|
||||
|
||||
arrow left: Previous git repository
|
||||
arrow right: Next git repository
|
||||
|
||||
return: Open the selected repository in a browser
|
||||
`
|
||||
|
||||
type Widget struct {
|
||||
wtf.HelpfulWidget
|
||||
wtf.TextWidget
|
||||
|
||||
GithubRepos []*GithubRepo
|
||||
Idx int
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
|
||||
widget := Widget{
|
||||
HelpfulWidget: wtf.NewHelpfulWidget(app, pages, HelpText),
|
||||
TextWidget: wtf.NewTextWidget(app, "GitHub", "github", true),
|
||||
|
||||
Idx: 0,
|
||||
}
|
||||
|
||||
widget.GithubRepos = widget.buildRepoCollection(wtf.Config.UMap("wtf.mods.github.repositories"))
|
||||
|
||||
widget.HelpfulWidget.SetView(widget.View)
|
||||
widget.View.SetInputCapture(widget.keyboardIntercept)
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
for _, repo := range widget.GithubRepos {
|
||||
repo.Refresh()
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) Next() {
|
||||
widget.Idx = widget.Idx + 1
|
||||
if widget.Idx == len(widget.GithubRepos) {
|
||||
widget.Idx = 0
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) Prev() {
|
||||
widget.Idx = widget.Idx - 1
|
||||
if widget.Idx < 0 {
|
||||
widget.Idx = len(widget.GithubRepos) - 1
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) buildRepoCollection(repoData map[string]interface{}) []*GithubRepo {
|
||||
githubRepos := []*GithubRepo{}
|
||||
|
||||
for name, owner := range repoData {
|
||||
repo := NewGithubRepo(name, owner.(string))
|
||||
githubRepos = append(githubRepos, repo)
|
||||
}
|
||||
|
||||
return githubRepos
|
||||
}
|
||||
|
||||
func (widget *Widget) currentGithubRepo() *GithubRepo {
|
||||
if len(widget.GithubRepos) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
if widget.Idx < 0 || widget.Idx >= len(widget.GithubRepos) {
|
||||
return nil
|
||||
}
|
||||
|
||||
return widget.GithubRepos[widget.Idx]
|
||||
}
|
||||
|
||||
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
||||
switch string(event.Rune()) {
|
||||
case "/":
|
||||
widget.ShowHelp()
|
||||
return nil
|
||||
case "h":
|
||||
widget.Prev()
|
||||
return nil
|
||||
case "l":
|
||||
widget.Next()
|
||||
return nil
|
||||
case "r":
|
||||
widget.Refresh()
|
||||
return nil
|
||||
}
|
||||
|
||||
switch event.Key() {
|
||||
case tcell.KeyEnter:
|
||||
widget.openRepo()
|
||||
return nil
|
||||
case tcell.KeyLeft:
|
||||
widget.Prev()
|
||||
return nil
|
||||
case tcell.KeyRight:
|
||||
widget.Next()
|
||||
return nil
|
||||
default:
|
||||
return event
|
||||
}
|
||||
}
|
||||
|
||||
func (widget *Widget) openRepo() {
|
||||
repo := widget.currentGithubRepo()
|
||||
|
||||
if repo != nil {
|
||||
repo.Open()
|
||||
}
|
||||
}
|
@ -1,75 +0,0 @@
|
||||
package gitlab
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
func (widget *Widget) display() {
|
||||
|
||||
project := widget.currentGitlabProject()
|
||||
if project == nil {
|
||||
widget.View.SetText(" Gitlab project data is unavailable ")
|
||||
return
|
||||
}
|
||||
|
||||
widget.View.SetTitle(fmt.Sprintf("%s- %s", widget.Name, widget.title(project)))
|
||||
|
||||
str := wtf.SigilStr(len(widget.GitlabProjects), widget.Idx, widget.View) + "\n"
|
||||
str = str + " [red]Stats[white]\n"
|
||||
str = str + widget.displayStats(project)
|
||||
str = str + "\n"
|
||||
str = str + " [red]Open Approval Requests[white]\n"
|
||||
str = str + widget.displayMyApprovalRequests(project, wtf.Config.UString("wtf.mods.gitlab.username"))
|
||||
str = str + "\n"
|
||||
str = str + " [red]My Merge Requests[white]\n"
|
||||
str = str + widget.displayMyMergeRequests(project, wtf.Config.UString("wtf.mods.gitlab.username"))
|
||||
|
||||
widget.View.SetText(str)
|
||||
}
|
||||
|
||||
func (widget *Widget) displayMyMergeRequests(project *GitlabProject, username string) string {
|
||||
mrs := project.myMergeRequests(username)
|
||||
|
||||
if len(mrs) == 0 {
|
||||
return " [grey]none[white]\n"
|
||||
}
|
||||
|
||||
str := ""
|
||||
for _, mr := range mrs {
|
||||
str = str + fmt.Sprintf(" [green]%4d[white] %s\n", mr.IID, mr.Title)
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (widget *Widget) displayMyApprovalRequests(project *GitlabProject, username string) string {
|
||||
mrs := project.myApprovalRequests(username)
|
||||
|
||||
if len(mrs) == 0 {
|
||||
return " [grey]none[white]\n"
|
||||
}
|
||||
|
||||
str := ""
|
||||
for _, mr := range mrs {
|
||||
str = str + fmt.Sprintf(" [green]%4d[white] %s\n", mr.IID, mr.Title)
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (widget *Widget) displayStats(project *GitlabProject) string {
|
||||
str := fmt.Sprintf(
|
||||
" MRs: %d Issues: %d Stars: %d\n",
|
||||
project.MergeRequestCount(),
|
||||
project.IssueCount(),
|
||||
project.StarCount(),
|
||||
)
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (widget *Widget) title(project *GitlabProject) string {
|
||||
return fmt.Sprintf("[green]%s [white]", project.Path)
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
package gitlab
|
||||
|
||||
import (
|
||||
glb "github.com/xanzy/go-gitlab"
|
||||
)
|
||||
|
||||
type GitlabProject struct {
|
||||
gitlab *glb.Client
|
||||
Path string
|
||||
|
||||
MergeRequests []*glb.MergeRequest
|
||||
RemoteProject *glb.Project
|
||||
}
|
||||
|
||||
func NewGitlabProject(name string, namespace string, gitlab *glb.Client) *GitlabProject {
|
||||
path := namespace + "/" + name
|
||||
project := GitlabProject{
|
||||
gitlab: gitlab,
|
||||
Path: path,
|
||||
}
|
||||
|
||||
return &project
|
||||
}
|
||||
|
||||
// Refresh reloads the gitlab data via the Gitlab API
|
||||
func (project *GitlabProject) Refresh() {
|
||||
project.MergeRequests, _ = project.loadMergeRequests()
|
||||
project.RemoteProject, _ = project.loadRemoteProject()
|
||||
}
|
||||
|
||||
/* -------------------- Counts -------------------- */
|
||||
|
||||
func (project *GitlabProject) IssueCount() int {
|
||||
if project.RemoteProject == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
return project.RemoteProject.OpenIssuesCount
|
||||
}
|
||||
|
||||
func (project *GitlabProject) MergeRequestCount() int {
|
||||
return len(project.MergeRequests)
|
||||
}
|
||||
|
||||
func (project *GitlabProject) StarCount() int {
|
||||
if project.RemoteProject == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
return project.RemoteProject.StarCount
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
// myMergeRequests returns a list of merge requests created by username on this project
|
||||
func (project *GitlabProject) myMergeRequests(username string) []*glb.MergeRequest {
|
||||
mrs := []*glb.MergeRequest{}
|
||||
|
||||
for _, mr := range project.MergeRequests {
|
||||
user := mr.Author
|
||||
|
||||
if user.Username == username {
|
||||
mrs = append(mrs, mr)
|
||||
}
|
||||
}
|
||||
|
||||
return mrs
|
||||
}
|
||||
|
||||
// myApprovalRequests returns a list of merge requests for which username has been
|
||||
// requested to approve
|
||||
func (project *GitlabProject) myApprovalRequests(username string) []*glb.MergeRequest {
|
||||
mrs := []*glb.MergeRequest{}
|
||||
|
||||
for _, mr := range project.MergeRequests {
|
||||
approvers, _, err := project.gitlab.MergeRequests.GetMergeRequestApprovals(project.Path, mr.IID)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
for _, approver := range approvers.Approvers {
|
||||
if approver.User.Username == username {
|
||||
mrs = append(mrs, mr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return mrs
|
||||
}
|
||||
|
||||
func (project *GitlabProject) loadMergeRequests() ([]*glb.MergeRequest, error) {
|
||||
state := "opened"
|
||||
opts := glb.ListProjectMergeRequestsOptions{
|
||||
State: &state,
|
||||
}
|
||||
|
||||
mrs, _, err := project.gitlab.MergeRequests.ListProjectMergeRequests(project.Path, &opts)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return mrs, nil
|
||||
}
|
||||
|
||||
func (project *GitlabProject) loadRemoteProject() (*glb.Project, error) {
|
||||
projectsitory, _, err := project.gitlab.Projects.GetProject(project.Path)
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return projectsitory, nil
|
||||
}
|
145
gitlab/widget.go
145
gitlab/widget.go
@ -1,145 +0,0 @@
|
||||
package gitlab
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
glb "github.com/xanzy/go-gitlab"
|
||||
)
|
||||
|
||||
const HelpText = `
|
||||
Keyboard commands for Gitlab:
|
||||
|
||||
/: Show/hide this help window
|
||||
h: Previous project
|
||||
l: Next project
|
||||
r: Refresh the data
|
||||
|
||||
arrow left: Previous project
|
||||
arrow right: Next project
|
||||
`
|
||||
|
||||
type Widget struct {
|
||||
wtf.HelpfulWidget
|
||||
wtf.TextWidget
|
||||
|
||||
gitlab *glb.Client
|
||||
|
||||
GitlabProjects []*GitlabProject
|
||||
Idx int
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
|
||||
baseURL := wtf.Config.UString("wtf.mods.gitlab.domain")
|
||||
gitlab := glb.NewClient(nil, apiKey())
|
||||
|
||||
if baseURL != "" {
|
||||
gitlab.SetBaseURL(baseURL)
|
||||
}
|
||||
|
||||
widget := Widget{
|
||||
HelpfulWidget: wtf.NewHelpfulWidget(app, pages, HelpText),
|
||||
TextWidget: wtf.NewTextWidget(app, "Gitlab", "gitlab", true),
|
||||
|
||||
gitlab: gitlab,
|
||||
|
||||
Idx: 0,
|
||||
}
|
||||
|
||||
widget.GitlabProjects = widget.buildProjectCollection(wtf.Config.UMap("wtf.mods.gitlab.projects"))
|
||||
|
||||
widget.HelpfulWidget.SetView(widget.View)
|
||||
widget.View.SetInputCapture(widget.keyboardIntercept)
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
for _, project := range widget.GitlabProjects {
|
||||
project.Refresh()
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) Next() {
|
||||
widget.Idx = widget.Idx + 1
|
||||
if widget.Idx == len(widget.GitlabProjects) {
|
||||
widget.Idx = 0
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) Prev() {
|
||||
widget.Idx = widget.Idx - 1
|
||||
if widget.Idx < 0 {
|
||||
widget.Idx = len(widget.GitlabProjects) - 1
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func apiKey() string {
|
||||
return wtf.Config.UString(
|
||||
"wtf.mods.gitlab.apiKey",
|
||||
os.Getenv("WTF_GITLAB_TOKEN"),
|
||||
)
|
||||
}
|
||||
|
||||
func (widget *Widget) buildProjectCollection(projectData map[string]interface{}) []*GitlabProject {
|
||||
gitlabProjects := []*GitlabProject{}
|
||||
|
||||
for name, namespace := range projectData {
|
||||
project := NewGitlabProject(name, namespace.(string), widget.gitlab)
|
||||
gitlabProjects = append(gitlabProjects, project)
|
||||
}
|
||||
|
||||
return gitlabProjects
|
||||
}
|
||||
|
||||
func (widget *Widget) currentGitlabProject() *GitlabProject {
|
||||
if len(widget.GitlabProjects) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
if widget.Idx < 0 || widget.Idx >= len(widget.GitlabProjects) {
|
||||
return nil
|
||||
}
|
||||
|
||||
return widget.GitlabProjects[widget.Idx]
|
||||
}
|
||||
|
||||
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
||||
switch string(event.Rune()) {
|
||||
case "/":
|
||||
widget.ShowHelp()
|
||||
return nil
|
||||
case "h":
|
||||
widget.Prev()
|
||||
return nil
|
||||
case "l":
|
||||
widget.Next()
|
||||
return nil
|
||||
case "r":
|
||||
widget.Refresh()
|
||||
return nil
|
||||
}
|
||||
|
||||
switch event.Key() {
|
||||
case tcell.KeyLeft:
|
||||
widget.Prev()
|
||||
return nil
|
||||
case tcell.KeyRight:
|
||||
widget.Next()
|
||||
return nil
|
||||
default:
|
||||
return event
|
||||
}
|
||||
}
|
@ -1,95 +0,0 @@
|
||||
package gitter
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"github.com/wtfutil/wtf/logger"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"os"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func GetMessages(roomId string, numberOfMessages int) ([]Message, error) {
|
||||
var messages []Message
|
||||
|
||||
resp, err := apiRequest("rooms/" + roomId + "/chatMessages?limit=" + strconv.Itoa(numberOfMessages))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
parseJson(&messages, resp.Body)
|
||||
|
||||
return messages, nil
|
||||
}
|
||||
|
||||
func GetRoom(roomUri string) (*Room, error) {
|
||||
var rooms Rooms
|
||||
|
||||
resp, err := apiRequest("rooms?q=" + roomUri)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
parseJson(&rooms, resp.Body)
|
||||
|
||||
for _, room := range rooms.Results {
|
||||
logger.Log(fmt.Sprintf("room: %s", room))
|
||||
if room.URI == roomUri {
|
||||
return &room, nil
|
||||
}
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
var (
|
||||
apiBaseURL = "https://api.gitter.im/v1/"
|
||||
)
|
||||
|
||||
func apiRequest(path string) (*http.Response, error) {
|
||||
req, err := http.NewRequest("GET", apiBaseURL+path, nil)
|
||||
bearer := fmt.Sprintf("Bearer %s", apiToken())
|
||||
req.Header.Add("Authorization", bearer)
|
||||
|
||||
httpClient := &http.Client{}
|
||||
resp, err := httpClient.Do(req)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if resp.StatusCode < 200 || resp.StatusCode > 299 {
|
||||
return nil, fmt.Errorf(resp.Status)
|
||||
}
|
||||
|
||||
return resp, nil
|
||||
}
|
||||
|
||||
func parseJson(obj interface{}, text io.Reader) {
|
||||
jsonStream, err := ioutil.ReadAll(text)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
decoder := json.NewDecoder(bytes.NewReader(jsonStream))
|
||||
|
||||
for {
|
||||
if err := decoder.Decode(obj); err == io.EOF {
|
||||
break
|
||||
} else if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func apiToken() string {
|
||||
return wtf.Config.UString(
|
||||
"wtf.mods.gitter.apiToken",
|
||||
os.Getenv("WTF_GITTER_API_TOKEN"),
|
||||
)
|
||||
}
|
181
gitter/widget.go
181
gitter/widget.go
@ -1,181 +0,0 @@
|
||||
package gitter
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
const HelpText = `
|
||||
Keyboard commands for Gitter:
|
||||
|
||||
/: Show/hide this help window
|
||||
j: Select the next message in the list
|
||||
k: Select the previous message in the list
|
||||
r: Refresh the data
|
||||
|
||||
arrow down: Select the next message in the list
|
||||
arrow up: Select the previous message in the list
|
||||
`
|
||||
|
||||
type Widget struct {
|
||||
wtf.HelpfulWidget
|
||||
wtf.TextWidget
|
||||
|
||||
messages []Message
|
||||
selected int
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
|
||||
widget := Widget{
|
||||
HelpfulWidget: wtf.NewHelpfulWidget(app, pages, HelpText),
|
||||
TextWidget: wtf.NewTextWidget(app, "Gitter", "gitter", true),
|
||||
}
|
||||
|
||||
widget.HelpfulWidget.SetView(widget.View)
|
||||
widget.unselect()
|
||||
|
||||
widget.View.SetScrollable(true)
|
||||
widget.View.SetRegions(true)
|
||||
widget.View.SetInputCapture(widget.keyboardIntercept)
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
if widget.Disabled() {
|
||||
return
|
||||
}
|
||||
|
||||
room, err := GetRoom(wtf.Config.UString("wtf.mods.gitter.roomUri", "wtfutil/Lobby"))
|
||||
if err != nil {
|
||||
widget.View.SetWrap(true)
|
||||
widget.View.SetTitle(widget.Name)
|
||||
widget.View.SetText(err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
if room == nil {
|
||||
return
|
||||
}
|
||||
|
||||
messages, err := GetMessages(room.ID, wtf.Config.UInt("wtf.mods.gitter.numberOfMessages", 10))
|
||||
|
||||
if err != nil {
|
||||
widget.View.SetWrap(true)
|
||||
widget.View.SetTitle(widget.Name)
|
||||
widget.View.SetText(err.Error())
|
||||
} else {
|
||||
widget.messages = messages
|
||||
}
|
||||
|
||||
widget.display()
|
||||
widget.View.ScrollToEnd()
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) display() {
|
||||
if widget.messages == nil {
|
||||
return
|
||||
}
|
||||
|
||||
widget.View.SetWrap(true)
|
||||
widget.View.Clear()
|
||||
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %s", widget.Name, wtf.Config.UString("wtf.mods.gitter.roomUri", "wtfutil/Lobby"))))
|
||||
widget.View.SetText(widget.contentFrom(widget.messages))
|
||||
widget.View.Highlight(strconv.Itoa(widget.selected)).ScrollToHighlight()
|
||||
}
|
||||
|
||||
func (widget *Widget) contentFrom(messages []Message) string {
|
||||
var str string
|
||||
for idx, message := range messages {
|
||||
str = str + fmt.Sprintf(
|
||||
`["%d"][""][%s] [blue]%s [lightslategray]%s: [%s]%s [aqua]%s`,
|
||||
idx,
|
||||
widget.rowColor(idx),
|
||||
message.From.DisplayName,
|
||||
message.From.Username,
|
||||
widget.rowColor(idx),
|
||||
message.Text,
|
||||
message.Sent.Format("Jan 02, 15:04 MST"),
|
||||
)
|
||||
|
||||
str = str + "\n"
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (widget *Widget) rowColor(idx int) string {
|
||||
if widget.View.HasFocus() && (idx == widget.selected) {
|
||||
return wtf.DefaultFocussedRowColor()
|
||||
}
|
||||
|
||||
return wtf.RowColor("gitter", idx)
|
||||
}
|
||||
|
||||
func (widget *Widget) next() {
|
||||
widget.selected++
|
||||
if widget.messages != nil && widget.selected >= len(widget.messages) {
|
||||
widget.selected = 0
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) prev() {
|
||||
widget.selected--
|
||||
if widget.selected < 0 && widget.messages != nil {
|
||||
widget.selected = len(widget.messages) - 1
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) openMessage() {
|
||||
sel := widget.selected
|
||||
if sel >= 0 && widget.messages != nil && sel < len(widget.messages) {
|
||||
message := &widget.messages[widget.selected]
|
||||
wtf.OpenFile(message.Text)
|
||||
}
|
||||
}
|
||||
|
||||
func (widget *Widget) unselect() {
|
||||
widget.selected = -1
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
||||
switch string(event.Rune()) {
|
||||
case "/":
|
||||
widget.ShowHelp()
|
||||
case "j":
|
||||
widget.next()
|
||||
return nil
|
||||
case "k":
|
||||
widget.prev()
|
||||
return nil
|
||||
case "r":
|
||||
widget.Refresh()
|
||||
return nil
|
||||
}
|
||||
|
||||
switch event.Key() {
|
||||
case tcell.KeyDown:
|
||||
widget.next()
|
||||
return nil
|
||||
case tcell.KeyEsc:
|
||||
widget.unselect()
|
||||
return event
|
||||
case tcell.KeyUp:
|
||||
widget.prev()
|
||||
return nil
|
||||
default:
|
||||
return event
|
||||
}
|
||||
}
|
86
go.mod
Normal file
86
go.mod
Normal file
@ -0,0 +1,86 @@
|
||||
module github.com/wtfutil/wtf
|
||||
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
bitbucket.org/mikehouston/asana-go v0.0.0-20201102222432-715318d0343a
|
||||
code.cloudfoundry.org/bytefmt v0.0.0-20190819182555-854d396b647c
|
||||
github.com/Azure/go-autorest v11.1.2+incompatible // indirect
|
||||
github.com/Microsoft/go-winio v0.4.14 // indirect
|
||||
github.com/PagerDuty/go-pagerduty v0.0.0-20191002190746-f60f4fc45222
|
||||
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect
|
||||
github.com/VictorAvelar/devto-api-go v1.0.0
|
||||
github.com/adlio/trello v1.8.0
|
||||
github.com/alecthomas/chroma v0.8.1
|
||||
github.com/andygrunwald/go-gerrit v0.0.0-20190825170856-5959a9bf9ff8
|
||||
github.com/briandowns/openweathermap v0.0.0-20180804155945-5f41b7c9d92d
|
||||
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
|
||||
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e
|
||||
github.com/creack/pty v1.1.11
|
||||
github.com/digitalocean/godo v1.52.0
|
||||
github.com/docker/distribution v2.7.1+incompatible // indirect
|
||||
github.com/docker/docker v1.13.1
|
||||
github.com/docker/docker-credential-helpers v0.6.3
|
||||
github.com/docker/go-connections v0.4.0 // indirect
|
||||
github.com/docker/go-units v0.4.0 // indirect
|
||||
github.com/dustin/go-humanize v1.0.0
|
||||
github.com/gdamore/tcell v1.4.0
|
||||
github.com/go-ole/go-ole v1.2.4 // indirect
|
||||
github.com/godbus/dbus v4.1.0+incompatible // indirect
|
||||
github.com/google/go-github/v32 v32.1.0
|
||||
github.com/gophercloud/gophercloud v0.5.0 // indirect
|
||||
github.com/hekmon/cunits v2.0.1+incompatible // indirect
|
||||
github.com/hekmon/transmissionrpc v0.0.0-20190525133028-1d589625bacd
|
||||
github.com/jedib0t/go-pretty/v6 v6.1.0
|
||||
github.com/jessevdk/go-flags v1.4.0
|
||||
github.com/lib/pq v1.2.0 // indirect
|
||||
github.com/logrusorgru/aurora v0.0.0-20190803045625-94edacc10f9b
|
||||
github.com/microsoft/azure-devops-go-api/azuredevops v0.0.0-20191014190507-26902c1d4325
|
||||
github.com/mmcdole/gofeed v1.1.0
|
||||
github.com/nicklaw5/helix v0.7.0
|
||||
github.com/olebedev/config v0.0.0-20190528211619-364964f3a8e4
|
||||
github.com/olekukonko/tablewriter v0.0.4
|
||||
github.com/onsi/ginkgo v1.12.0 // indirect
|
||||
github.com/onsi/gomega v1.9.0 // indirect
|
||||
github.com/ovh/cds v0.0.0-20201014170613-39429542624d
|
||||
github.com/pborman/uuid v1.2.0 // indirect
|
||||
github.com/piquette/finance-go v1.0.0
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/pkg/profile v1.5.0
|
||||
github.com/radovskyb/watcher v1.0.7
|
||||
github.com/rivo/tview v0.0.0-20200108161608-1316ea7a4b35
|
||||
github.com/shirou/gopsutil v2.20.9+incompatible
|
||||
github.com/shopspring/decimal v1.2.0 // indirect
|
||||
github.com/shurcooL/githubv4 v0.0.0-20200802174311-f27d2ca7f6d5
|
||||
github.com/shurcooL/graphql v0.0.0-20181231061246-d48a9a75455f // indirect
|
||||
github.com/spf13/cobra v0.0.5 // indirect
|
||||
github.com/spf13/pflag v1.0.5 // indirect
|
||||
github.com/spf13/viper v1.6.1 // indirect
|
||||
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect
|
||||
github.com/stretchr/testify v1.6.1
|
||||
github.com/wtfutil/spotigopher v0.0.0-20191127141047-7d8168fe103a
|
||||
github.com/wtfutil/todoist v0.0.2-0.20191216004217-0ec29ceda61a
|
||||
github.com/xanzy/go-gitlab v0.39.0
|
||||
github.com/zmb3/spotify v0.0.0-20191010212056-e12fb981aacb
|
||||
github.com/zorkian/go-datadog-api v2.30.0+incompatible
|
||||
golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43
|
||||
golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208
|
||||
golang.org/x/text v0.3.4
|
||||
google.golang.org/api v0.33.0
|
||||
gopkg.in/jarcoal/httpmock.v1 v1.0.0-20181110093347-3be5f16b70eb // indirect
|
||||
gopkg.in/yaml.v2 v2.3.0
|
||||
gotest.tools v2.2.0+incompatible
|
||||
jaytaylor.com/html2text v0.0.0-20200412013138-3577fbdbcff7
|
||||
k8s.io/apimachinery v0.0.0-20190223094358-dcb391cde5ca
|
||||
k8s.io/client-go v10.0.0+incompatible
|
||||
)
|
||||
|
||||
// These hacks are in place to work around this bug in coreos/etcd/proxy/grpcproxy > v1.30.0 that fails
|
||||
// with this error:
|
||||
//
|
||||
// google.golang.org/grpc/naming: module google.golang.org/grpc@latest found (v1.31.1), but does not contain package google.golang.org/grpc/naming
|
||||
//
|
||||
// See here for more details: https://github.com/etcd-io/etcd/issues/12124
|
||||
replace google.golang.org/grpc v1.30.0 => google.golang.org/grpc v1.29.1
|
||||
|
||||
replace google.golang.org/grpc v1.31.0 => google.golang.org/grpc v1.29.1
|
@ -1,47 +0,0 @@
|
||||
package gspreadsheets
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
sheets "google.golang.org/api/sheets/v4"
|
||||
)
|
||||
|
||||
type Widget struct {
|
||||
wtf.TextWidget
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: wtf.NewTextWidget(app, "Google Spreadsheets", "gspreadsheets", false),
|
||||
}
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
cells, _ := Fetch()
|
||||
|
||||
widget.View.SetText(widget.contentFrom(cells))
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) contentFrom(valueRanges []*sheets.ValueRange) string {
|
||||
if valueRanges == nil {
|
||||
return "error 1"
|
||||
}
|
||||
|
||||
valuesColor := wtf.Config.UString("wtf.mods.gspreadsheets.colors.values", "green")
|
||||
res := ""
|
||||
|
||||
cells := wtf.ToStrs(wtf.Config.UList("wtf.mods.gspreadsheets.cells.names"))
|
||||
for i := 0; i < len(valueRanges); i++ {
|
||||
res = res + fmt.Sprintf("%s\t[%s]%s\n", cells[i], valuesColor, valueRanges[i].Values[0][0])
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package hackernews
|
||||
|
||||
type Story struct {
|
||||
By string `json:"by"`
|
||||
Descendants int `json:"descendants"`
|
||||
ID int `json:"id"`
|
||||
Kids []int `json:"kids"`
|
||||
Score int `json:"score"`
|
||||
Time int `json:"time"`
|
||||
Title string `json:"title"`
|
||||
Type string `json:"type"`
|
||||
URL string `json:"url"`
|
||||
}
|
@ -1,203 +0,0 @@
|
||||
package hackernews
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/gdamore/tcell"
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
const HelpText = `
|
||||
Keyboard commands for Hacker News:
|
||||
|
||||
/: Show/hide this help window
|
||||
j: Select the next story in the list
|
||||
k: Select the previous story in the list
|
||||
r: Refresh the data
|
||||
|
||||
arrow down: Select the next story in the list
|
||||
arrow up: Select the previous story in the list
|
||||
|
||||
return: Open the selected story in a browser
|
||||
c: Open the comments of the article
|
||||
`
|
||||
|
||||
type Widget struct {
|
||||
wtf.HelpfulWidget
|
||||
wtf.TextWidget
|
||||
|
||||
stories []Story
|
||||
selected int
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application, pages *tview.Pages) *Widget {
|
||||
widget := Widget{
|
||||
HelpfulWidget: wtf.NewHelpfulWidget(app, pages, HelpText),
|
||||
TextWidget: wtf.NewTextWidget(app, "Hacker News", "hackernews", true),
|
||||
}
|
||||
|
||||
widget.HelpfulWidget.SetView(widget.View)
|
||||
widget.unselect()
|
||||
|
||||
widget.View.SetScrollable(true)
|
||||
widget.View.SetRegions(true)
|
||||
widget.View.SetInputCapture(widget.keyboardIntercept)
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
/* -------------------- Exported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
if widget.Disabled() {
|
||||
return
|
||||
}
|
||||
|
||||
storyIds, err := GetStories(wtf.Config.UString("wtf.mods.hackernews.storyType", "top"))
|
||||
if storyIds == nil {
|
||||
return
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
widget.View.SetWrap(true)
|
||||
widget.View.SetTitle(widget.Name)
|
||||
widget.View.SetText(err.Error())
|
||||
} else {
|
||||
var stories []Story
|
||||
numberOfStoriesToDisplay := wtf.Config.UInt("wtf.mods.hackernews.numberOfStories", 10)
|
||||
for idx := 0; idx < numberOfStoriesToDisplay; idx++ {
|
||||
story, e := GetStory(storyIds[idx])
|
||||
if e != nil {
|
||||
panic(e)
|
||||
} else {
|
||||
stories = append(stories, story)
|
||||
}
|
||||
}
|
||||
|
||||
widget.stories = stories
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func (widget *Widget) display() {
|
||||
if widget.stories == nil {
|
||||
return
|
||||
}
|
||||
|
||||
widget.View.SetWrap(false)
|
||||
|
||||
widget.View.Clear()
|
||||
widget.View.SetTitle(widget.ContextualTitle(fmt.Sprintf("%s - %sstories", widget.Name, wtf.Config.UString("wtf.mods.hackernews.storyType", "top"))))
|
||||
widget.View.SetText(widget.contentFrom(widget.stories))
|
||||
widget.View.Highlight(strconv.Itoa(widget.selected)).ScrollToHighlight()
|
||||
}
|
||||
|
||||
func (widget *Widget) contentFrom(stories []Story) string {
|
||||
var str string
|
||||
for idx, story := range stories {
|
||||
u, _ := url.Parse(story.URL)
|
||||
str = str + fmt.Sprintf(
|
||||
`["%d"][""][%s] [yellow]%d. [%s]%s [blue](%s)`,
|
||||
idx,
|
||||
widget.rowColor(idx),
|
||||
idx+1,
|
||||
widget.rowColor(idx),
|
||||
story.Title,
|
||||
strings.TrimPrefix(u.Host, "www."),
|
||||
)
|
||||
|
||||
str = str + "\n"
|
||||
}
|
||||
|
||||
return str
|
||||
}
|
||||
|
||||
func (widget *Widget) rowColor(idx int) string {
|
||||
if widget.View.HasFocus() && (idx == widget.selected) {
|
||||
return wtf.DefaultFocussedRowColor()
|
||||
}
|
||||
|
||||
return wtf.RowColor("hackernews", idx)
|
||||
}
|
||||
|
||||
func (widget *Widget) next() {
|
||||
widget.selected++
|
||||
if widget.stories != nil && widget.selected >= len(widget.stories) {
|
||||
widget.selected = 0
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) prev() {
|
||||
widget.selected--
|
||||
if widget.selected < 0 && widget.stories != nil {
|
||||
widget.selected = len(widget.stories) - 1
|
||||
}
|
||||
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) openStory() {
|
||||
sel := widget.selected
|
||||
if sel >= 0 && widget.stories != nil && sel < len(widget.stories) {
|
||||
story := &widget.stories[widget.selected]
|
||||
wtf.OpenFile(story.URL)
|
||||
}
|
||||
}
|
||||
|
||||
func (widget *Widget) openComments() {
|
||||
sel := widget.selected
|
||||
if sel >= 0 && widget.stories != nil && sel < len(widget.stories) {
|
||||
story := &widget.stories[widget.selected]
|
||||
wtf.OpenFile(fmt.Sprintf("https://news.ycombinator.com/item?id=%d", story.ID))
|
||||
}
|
||||
}
|
||||
|
||||
func (widget *Widget) unselect() {
|
||||
widget.selected = -1
|
||||
widget.display()
|
||||
}
|
||||
|
||||
func (widget *Widget) keyboardIntercept(event *tcell.EventKey) *tcell.EventKey {
|
||||
switch string(event.Rune()) {
|
||||
case "/":
|
||||
widget.ShowHelp()
|
||||
case "j":
|
||||
widget.next()
|
||||
return nil
|
||||
case "k":
|
||||
widget.prev()
|
||||
return nil
|
||||
case "r":
|
||||
widget.Refresh()
|
||||
return nil
|
||||
case "c":
|
||||
widget.openComments()
|
||||
return nil
|
||||
}
|
||||
|
||||
switch event.Key() {
|
||||
case tcell.KeyDown:
|
||||
widget.next()
|
||||
return nil
|
||||
case tcell.KeyEnter:
|
||||
widget.openStory()
|
||||
return nil
|
||||
case tcell.KeyEsc:
|
||||
widget.unselect()
|
||||
return event
|
||||
case tcell.KeyUp:
|
||||
widget.prev()
|
||||
return nil
|
||||
default:
|
||||
return event
|
||||
}
|
||||
}
|
49
help/help.go
49
help/help.go
@ -3,37 +3,38 @@ package help
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/wtfutil/wtf/git"
|
||||
"github.com/wtfutil/wtf/github"
|
||||
"github.com/wtfutil/wtf/textfile"
|
||||
"github.com/wtfutil/wtf/todo"
|
||||
"github.com/wtfutil/wtf/todoist"
|
||||
"github.com/wtfutil/wtf/weatherservices/weather"
|
||||
"github.com/olebedev/config"
|
||||
"github.com/wtfutil/wtf/app"
|
||||
"github.com/wtfutil/wtf/utils"
|
||||
)
|
||||
|
||||
func Display(moduleName string) {
|
||||
// Display displays the output of the --help argument
|
||||
func Display(moduleName string, cfg *config.Config) {
|
||||
if moduleName == "" {
|
||||
fmt.Println("\n --module takes a module name as an argument, i.e: '--module=github'")
|
||||
} else {
|
||||
fmt.Printf("%s\n", helpFor(moduleName))
|
||||
fmt.Printf("%s\n", helpFor(moduleName, cfg))
|
||||
}
|
||||
}
|
||||
|
||||
func helpFor(moduleName string) string {
|
||||
switch moduleName {
|
||||
case "git":
|
||||
return git.HelpText
|
||||
case "github":
|
||||
return github.HelpText
|
||||
case "textfile":
|
||||
return textfile.HelpText
|
||||
case "todo":
|
||||
return todo.HelpText
|
||||
case "todoist":
|
||||
return todoist.HelpText
|
||||
case "weather":
|
||||
return weather.HelpText
|
||||
default:
|
||||
return fmt.Sprintf("\n There is no help available for '%s'", moduleName)
|
||||
func helpFor(moduleName string, cfg *config.Config) string {
|
||||
err := cfg.Set("wtf.mods."+moduleName+".enabled", true)
|
||||
if err != nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
widget := app.MakeWidget(nil, nil, moduleName, cfg)
|
||||
|
||||
// Since we are forcing enabled config, if no module
|
||||
// exists, we will get the unknown one
|
||||
if widget.CommonSettings().Title == "Unknown" {
|
||||
return "Unable to find module " + moduleName
|
||||
}
|
||||
|
||||
result := ""
|
||||
result += utils.StripColorTags(widget.HelpText())
|
||||
result += "\n"
|
||||
result += "Configuration Attributes"
|
||||
result += widget.ConfigText()
|
||||
return result
|
||||
}
|
||||
|
BIN
images/logo_transparent.png
Normal file
BIN
images/logo_transparent.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 59 KiB |
@ -1,115 +0,0 @@
|
||||
package ipinfo
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"text/template"
|
||||
|
||||
"github.com/rivo/tview"
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
type Widget struct {
|
||||
wtf.TextWidget
|
||||
result string
|
||||
colors struct {
|
||||
name, value string
|
||||
}
|
||||
}
|
||||
|
||||
type ipinfo struct {
|
||||
Ip string `json:"ip"`
|
||||
Hostname string `json:"hostname"`
|
||||
City string `json:"city"`
|
||||
Region string `json:"region"`
|
||||
Country string `json:"country"`
|
||||
Coordinates string `json:"loc"`
|
||||
PostalCode string `json:"postal"`
|
||||
Organization string `json:"org"`
|
||||
}
|
||||
|
||||
func NewWidget(app *tview.Application) *Widget {
|
||||
widget := Widget{
|
||||
TextWidget: wtf.NewTextWidget(app, "IPInfo", "ipinfo", false),
|
||||
}
|
||||
|
||||
widget.View.SetWrap(false)
|
||||
|
||||
widget.config()
|
||||
|
||||
return &widget
|
||||
}
|
||||
|
||||
func (widget *Widget) Refresh() {
|
||||
widget.ipinfo()
|
||||
widget.View.Clear()
|
||||
|
||||
widget.View.SetText(widget.result)
|
||||
}
|
||||
|
||||
//this method reads the config and calls ipinfo for ip information
|
||||
func (widget *Widget) ipinfo() {
|
||||
client := &http.Client{}
|
||||
req, err := http.NewRequest("GET", "https://ipinfo.io/", nil)
|
||||
if err != nil {
|
||||
widget.result = err.Error()
|
||||
return
|
||||
}
|
||||
req.Header.Set("User-Agent", "curl")
|
||||
response, err := client.Do(req)
|
||||
if err != nil {
|
||||
widget.result = err.Error()
|
||||
return
|
||||
}
|
||||
defer response.Body.Close()
|
||||
|
||||
var info ipinfo
|
||||
err = json.NewDecoder(response.Body).Decode(&info)
|
||||
if err != nil {
|
||||
widget.result = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
widget.setResult(&info)
|
||||
}
|
||||
|
||||
// read module configs
|
||||
func (widget *Widget) config() {
|
||||
widget.colors.name = wtf.Config.UString("wtf.mods.ipinfo.colors.name", "white")
|
||||
widget.colors.value = wtf.Config.UString("wtf.mods.ipinfo.colors.value", "white")
|
||||
}
|
||||
|
||||
func (widget *Widget) setResult(info *ipinfo) {
|
||||
resultTemplate, _ := template.New("ipinfo_result").Parse(
|
||||
formatableText("IP", "Ip") +
|
||||
formatableText("Hostname", "Hostname") +
|
||||
formatableText("City", "City") +
|
||||
formatableText("Region", "Region") +
|
||||
formatableText("Country", "Country") +
|
||||
formatableText("Coords", "Coordinates") +
|
||||
formatableText("Org", "Organization"),
|
||||
)
|
||||
|
||||
resultBuffer := new(bytes.Buffer)
|
||||
|
||||
resultTemplate.Execute(resultBuffer, map[string]string{
|
||||
"nameColor": widget.colors.name,
|
||||
"valueColor": widget.colors.value,
|
||||
"Ip": info.Ip,
|
||||
"Hostname": info.Hostname,
|
||||
"City": info.City,
|
||||
"Region": info.Region,
|
||||
"Country": info.Country,
|
||||
"Coordinates": info.Coordinates,
|
||||
"PostalCode": info.PostalCode,
|
||||
"Organization": info.Organization,
|
||||
})
|
||||
|
||||
widget.result = resultBuffer.String()
|
||||
}
|
||||
|
||||
func formatableText(key, value string) string {
|
||||
return fmt.Sprintf(" [{{.nameColor}}]%8s: [{{.valueColor}}]{{.%s}}\n", key, value)
|
||||
}
|
@ -1,73 +0,0 @@
|
||||
package jenkins
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"crypto/tls"
|
||||
"encoding/json"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
|
||||
"github.com/wtfutil/wtf/wtf"
|
||||
)
|
||||
|
||||
func Create(jenkinsURL string, username string, apiKey string) (*View, error) {
|
||||
const apiSuffix = "api/json?pretty=true"
|
||||
parsedSuffix, err := url.Parse(apiSuffix)
|
||||
if err != nil {
|
||||
return &View{}, err
|
||||
}
|
||||
|
||||
parsedJenkinsURL, err := url.Parse(ensureLastSlash(jenkinsURL))
|
||||
if err != nil {
|
||||
return &View{}, err
|
||||
}
|
||||
jenkinsAPIURL := parsedJenkinsURL.ResolveReference(parsedSuffix)
|
||||
|
||||
req, _ := http.NewRequest("GET", jenkinsAPIURL.String(), nil)
|
||||
req.SetBasicAuth(username, apiKey)
|
||||
|
||||
verifyServerCertificate := wtf.Config.UBool("wtf.mods.jenkins.verifyServerCertificate", true)
|
||||
httpClient := &http.Client{Transport: &http.Transport{
|
||||
TLSClientConfig: &tls.Config{
|
||||
InsecureSkipVerify: !verifyServerCertificate,
|
||||
},
|
||||
Proxy: http.ProxyFromEnvironment,
|
||||
},
|
||||
}
|
||||
resp, err := httpClient.Do(req)
|
||||
|
||||
if err != nil {
|
||||
return &View{}, err
|
||||
}
|
||||
|
||||
view := &View{}
|
||||
parseJson(view, resp.Body)
|
||||
|
||||
return view, nil
|
||||
}
|
||||
|
||||
func ensureLastSlash(URL string) string {
|
||||
return strings.TrimRight(URL, "/") + "/"
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
func parseJson(obj interface{}, text io.Reader) {
|
||||
jsonStream, err := ioutil.ReadAll(text)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
decoder := json.NewDecoder(bytes.NewReader(jsonStream))
|
||||
|
||||
for {
|
||||
if err := decoder.Decode(obj); err == io.EOF {
|
||||
break
|
||||
} else if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user