Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b6ebe7c853 | ||
|
|
29484fb292 | ||
|
|
e0956d3ced | ||
|
|
fe83e15563 | ||
|
|
09b23fb83a | ||
|
|
0cf06a606d | ||
|
|
dfb0d71ed9 | ||
|
|
ab1262fa71 | ||
|
|
1a251c9455 | ||
|
|
7054a726bb | ||
|
|
d7e39288ea | ||
|
|
6c0176455b | ||
|
|
ad15eb11ed | ||
|
|
f7063cce48 | ||
|
|
7b9008d285 | ||
|
|
1170914f62 | ||
|
|
c1cb5353a2 | ||
|
|
c2844c8132 | ||
|
|
a55b623781 | ||
|
|
643dcba468 | ||
|
|
7bbecc9587 | ||
|
|
25c4444801 | ||
|
|
bf15c8053b | ||
|
|
c3b5991c4d | ||
|
|
79c66a441a | ||
|
|
54c5cd26ab | ||
|
|
6e5568551f | ||
|
|
6f37a7cb76 | ||
|
|
32a7902da1 | ||
|
|
52356b7542 | ||
|
|
a811f191f2 | ||
|
|
77b1f5ffe0 | ||
|
|
6d01d12d99 | ||
|
|
bf2d424888 | ||
|
|
07c4630d12 | ||
|
|
72dfa803c6 | ||
|
|
631085f78f | ||
|
|
84373a7617 | ||
|
|
983dd4d437 | ||
|
|
7e37569613 | ||
|
|
43e5c65472 | ||
|
|
d4e47f9764 | ||
|
|
8ddb51fc91 | ||
|
|
08922975f3 | ||
|
|
91733d314f | ||
|
|
a24d3f26ae | ||
|
|
3feb8deb8c | ||
|
|
aa53344304 | ||
|
|
849cea15c1 | ||
|
|
84a6b2bfe1 | ||
|
|
b9374a2d7f | ||
|
|
7d989fd07f | ||
|
|
770492a955 | ||
|
|
9c33571dc9 | ||
|
|
46a6c58d49 | ||
|
|
e74721c07a | ||
|
|
9ab2ba29b9 | ||
|
|
7ea6969e13 | ||
|
|
23803d1de4 | ||
|
|
aa9a2335ce | ||
|
|
1c91668194 | ||
|
|
b5b1e8a812 | ||
|
|
f64abb22b3 | ||
|
|
89273598ae | ||
|
|
90f1a44c2d | ||
|
|
a6cc6126d6 | ||
|
|
361162aac2 | ||
|
|
164b0a5496 | ||
|
|
5355870066 | ||
|
|
f9745515e1 | ||
|
|
cbb7fe16ff | ||
|
|
cf2ce1e88b | ||
|
|
b1596f30d9 | ||
|
|
e66497756a | ||
|
|
62f03e371f | ||
|
|
a441e48906 | ||
|
|
07c1d53a44 | ||
|
|
47cf12e9f3 | ||
|
|
ab59bd4421 | ||
|
|
2883f7f161 | ||
|
|
7f86453f29 | ||
|
|
33bda86918 | ||
|
|
084625fe7c | ||
|
|
25cf537931 | ||
|
|
e79c41abf9 | ||
|
|
4c4570e2e1 | ||
|
|
ffea45ce54 | ||
|
|
00f11bc581 | ||
|
|
b7e2796e60 | ||
|
|
0494fa5753 | ||
|
|
d6e1868569 | ||
|
|
f5d21618d1 | ||
|
|
28ecef207e | ||
|
|
fe7541c784 | ||
|
|
ac2e25f6d6 | ||
|
|
0dc452e445 | ||
|
|
97b6f25cfd | ||
|
|
fec2f9b83e | ||
|
|
b87e99187d | ||
|
|
bd3f7f8897 | ||
|
|
e43f4ddb50 | ||
|
|
d0f6bf3e06 | ||
|
|
ea58ccd9a3 | ||
|
|
86aa5548c6 | ||
|
|
2fc287768b | ||
|
|
5335750939 | ||
|
|
a628549ad3 | ||
|
|
f303f72055 | ||
|
|
27af9721e5 | ||
|
|
14b462ae98 | ||
|
|
72db742a56 | ||
|
|
6cfbf33d08 | ||
|
|
559e5d8f84 | ||
|
|
6f6dcdeef2 | ||
|
|
4a58c848b8 | ||
|
|
1637631ef7 | ||
|
|
5d6a27b751 | ||
|
|
55b08f6b5b | ||
|
|
c00fe8fda2 | ||
|
|
32fd4df542 | ||
|
|
0297a68536 | ||
|
|
689369432f | ||
|
|
68660035b6 | ||
|
|
281c4b698c | ||
|
|
2bfa72acd4 | ||
|
|
47eeb0eb00 | ||
|
|
8a0f6171ad | ||
|
|
85a6144de9 | ||
|
|
c005aa6692 | ||
|
|
1eefa99c97 | ||
|
|
c773c256c1 | ||
|
|
4b02482349 | ||
|
|
740287528a | ||
|
|
3b05e15e13 | ||
|
|
0904f9917d | ||
|
|
f50f7ab4f5 | ||
|
|
5257a2c863 | ||
|
|
5eb03c1e9e | ||
|
|
664a8fff79 | ||
|
|
9176730e5e | ||
|
|
3a90b394c0 | ||
|
|
473d72f516 | ||
|
|
a9ea150b92 | ||
|
|
8a08127b52 | ||
|
|
2913eb5fd8 | ||
|
|
bd420feedd | ||
|
|
9792e1e3ae | ||
|
|
641a4cdb00 | ||
|
|
cb795f857d | ||
|
|
eddc288d9e | ||
|
|
13aa5a4e25 | ||
|
|
ff85953c72 | ||
|
|
6ae9e00eb0 | ||
|
|
4bc2435412 | ||
|
|
2e94a71484 | ||
|
|
70f50c7fa4 | ||
|
|
5d08b5d1d8 | ||
|
|
d0bc1341dd | ||
|
|
1840c3d19d | ||
|
|
b7a8670ffd | ||
|
|
5040e1d547 | ||
|
|
38fff3aa87 | ||
|
|
0ebf26d0a3 | ||
|
|
b3bb9b20cd | ||
|
|
0b029d8338 | ||
|
|
96aead40dc | ||
|
|
cc876e3794 | ||
|
|
dc2b63ba81 | ||
|
|
127becc3df | ||
|
|
cdb1aaf6bc | ||
|
|
f81aa14b89 | ||
|
|
55291b6bfd | ||
|
|
3fc21fae75 | ||
|
|
259a4b91f5 | ||
|
|
5f08333f87 | ||
|
|
f669c3fb0d | ||
|
|
5825910303 | ||
|
|
eff9793b33 | ||
|
|
6913338dd9 | ||
|
|
de81d91a52 | ||
|
|
4fe6b6e568 | ||
|
|
3f60fa492b | ||
|
|
4ba0899531 | ||
|
|
9df942c7c4 | ||
|
|
4179a6b370 | ||
|
|
f2c6e99449 | ||
|
|
4531f44ed5 | ||
|
|
7f3baa3b1e | ||
|
|
89c871c83d | ||
|
|
6b516201ca | ||
|
|
417b33d9fe | ||
|
|
b38d6aed05 | ||
|
|
a3cf05202c | ||
|
|
ba45413ca7 | ||
|
|
4cd73f4fc5 | ||
|
|
f7c84b423c | ||
|
|
785a938cc6 | ||
|
|
acb9e09293 | ||
|
|
edd5933560 | ||
|
|
c4ec17c1ff | ||
|
|
211669db1c | ||
|
|
9041561576 | ||
|
|
a0bfa0fe93 | ||
|
|
9b793e867c | ||
|
|
f97441f6ca | ||
|
|
cf1d6e6a32 | ||
|
|
d7db470999 | ||
|
|
992ef83795 | ||
|
|
5860942967 | ||
|
|
e9adcddf7f | ||
|
|
8af4144a66 | ||
|
|
20c0833cbc | ||
|
|
1be8c23069 | ||
|
|
850ec59694 | ||
|
|
2474653a7f | ||
|
|
cd9aab7eef | ||
|
|
e1ac1fa983 | ||
|
|
93504d983c | ||
|
|
2efc3b841e | ||
|
|
44a009fd6f | ||
|
|
cacc329a61 | ||
|
|
8e37ad5da1 | ||
|
|
7b5ab1af64 | ||
|
|
fe287cf6f8 | ||
|
|
1af19bb417 | ||
|
|
954205d2a6 | ||
|
|
fad6ee2904 | ||
|
|
81b8507692 | ||
|
|
be5d4907ef | ||
|
|
37fa52c47a | ||
|
|
98a3566555 | ||
|
|
5cce83f0b7 | ||
|
|
a4046d3080 | ||
|
|
4ce6f7f13b | ||
|
|
eb7348dfee | ||
|
|
e23d3b88f9 | ||
|
|
19f774429f | ||
|
|
29acb4cacc | ||
|
|
013a5aace8 | ||
|
|
31fee9c596 | ||
|
|
9d3437bd37 | ||
|
|
ff440d36e2 | ||
|
|
74facf9373 | ||
|
|
f7a1f0b69f | ||
|
|
b667257ecd | ||
|
|
bf3461f9f1 | ||
|
|
56c516aa9a | ||
|
|
99decf0d66 | ||
|
|
85919a1df5 | ||
|
|
f8d8af8cc4 | ||
|
|
498463f5cb | ||
|
|
6698bbf68f | ||
|
|
d2ef14b438 | ||
|
|
91f6d52532 | ||
|
|
cd424779cb | ||
|
|
f757035d32 | ||
|
|
a1dde3ab51 | ||
|
|
be9c3acf39 | ||
|
|
1cff1b4c9c | ||
|
|
31f10576df | ||
|
|
c8dbd89411 | ||
|
|
85edae2cba | ||
|
|
2375cbe637 | ||
|
|
d215ea2b4e | ||
|
|
3d4acbe332 | ||
|
|
14f59c7b56 | ||
|
|
cce77c958c | ||
|
|
35c3660958 | ||
|
|
99360762d9 | ||
|
|
6e9005a6b6 | ||
|
|
0fde02eca4 | ||
|
|
de8c31ed51 | ||
|
|
6b2485363e | ||
|
|
59fa74925a | ||
|
|
a84b5be104 | ||
|
|
8b96f71bc0 | ||
|
|
66cfed71e9 | ||
|
|
2e6c9e80aa | ||
|
|
3278118487 | ||
|
|
a11f81c84a | ||
|
|
76aeda4991 | ||
|
|
5512b1f8d7 | ||
|
|
c3762b3119 | ||
|
|
1f08c9b6db | ||
|
|
221ecad5c8 | ||
|
|
04c8d7a888 | ||
|
|
5a86da1090 | ||
|
|
789c7a5e75 | ||
|
|
f0ecc04648 | ||
|
|
cd1d72b267 | ||
|
|
2a51385f43 | ||
|
|
6afa83a7a1 | ||
|
|
fd891e39ff | ||
|
|
f4a2af750c | ||
|
|
f2403a13e5 | ||
|
|
35494e975d | ||
|
|
0de01942a3 | ||
|
|
850d449290 | ||
|
|
2e7ed0106a | ||
|
|
d091d2de28 | ||
|
|
e8b0277d76 | ||
|
|
b807eb2d6d | ||
|
|
3f8f1e598a | ||
|
|
74c2ce2054 | ||
|
|
3cf798120a | ||
|
|
5687da064c | ||
|
|
bf8ff63585 | ||
|
|
223064ce46 | ||
|
|
bf6010f21f | ||
|
|
3b79f83c50 | ||
|
|
17389ac17b | ||
|
|
973002c6cb | ||
|
|
58911009c4 | ||
|
|
f8458520f5 | ||
|
|
886c3d9449 | ||
|
|
535af4aa1d | ||
|
|
dc269846d1 | ||
|
|
cfaeaba39c | ||
|
|
7046bb9f15 | ||
|
|
f9537f4b10 | ||
|
|
38c5745ccb | ||
|
|
ebe82576cc | ||
|
|
64283ff273 | ||
|
|
d42c703e6e | ||
|
|
e46e8fa17a | ||
|
|
12d6de51da | ||
|
|
424dc0a13d | ||
|
|
d9fef47e78 | ||
|
|
222b9997a1 | ||
|
|
fea8e890a4 | ||
|
|
3124c08927 | ||
|
|
46ea1343d7 | ||
|
|
8a7a436ee9 | ||
|
|
2697bd7a42 | ||
|
|
ade3a772e4 | ||
|
|
ffe352e61b | ||
|
|
280baee3a0 | ||
|
|
edf83dbacd | ||
|
|
a2d4fc08a5 | ||
|
|
00caee03ac | ||
|
|
8b8b7b5c50 | ||
|
|
a09daa21ab | ||
|
|
804b7654b2 | ||
|
|
88a8e51810 | ||
|
|
8241d07190 | ||
|
|
9e6d5c9d5d | ||
|
|
bdeb765f75 | ||
|
|
93b09509e2 | ||
|
|
84b61e01f4 | ||
|
|
38256815ef | ||
|
|
c111054fd6 | ||
|
|
25684e3c4a | ||
|
|
82dd94d51b | ||
|
|
1536ed6da3 | ||
|
|
9f9d0fc788 | ||
|
|
a23daa7c81 | ||
|
|
3382949530 | ||
|
|
6f05dd4ece | ||
|
|
841bce69a5 | ||
|
|
82d308c9ac | ||
|
|
fe7437388a | ||
|
|
5ef7b2c68a | ||
|
|
28a1c8bb4f | ||
|
|
f812b18bc6 | ||
|
|
3dc683ea99 | ||
|
|
f67c15a9a4 | ||
|
|
ba27cdfd9a | ||
|
|
a74309d650 | ||
|
|
220979bf68 | ||
|
|
4826200cec | ||
|
|
49cd9d3283 | ||
|
|
9187529ff6 | ||
|
|
07c4b17260 | ||
|
|
d905a91470 | ||
|
|
5cb2564335 | ||
|
|
4e729c50a8 | ||
|
|
62ff12b1c2 | ||
|
|
e59cc370c0 | ||
|
|
572ea6f2a7 | ||
|
|
871321e32d | ||
|
|
46a9e68bb9 | ||
|
|
d4af37ae8a | ||
|
|
48d6fb50c5 | ||
|
|
1f97ee333d | ||
|
|
b124de4f04 | ||
|
|
308ac450e7 | ||
|
|
d80a27a64a | ||
|
|
0eaf5fdeab | ||
|
|
c558fa4b28 | ||
|
|
a4630df622 | ||
|
|
201d54e06a | ||
|
|
d6a3f46892 | ||
|
|
ecb99dbd9a | ||
|
|
c12447dca2 | ||
|
|
ad724d6e2f | ||
|
|
ce170ecba8 | ||
|
|
be0acfeceb | ||
|
|
077d4cd0d4 | ||
|
|
149161694d | ||
|
|
5e7ea35239 | ||
|
|
4768a7eb5a | ||
|
|
84fb97f82a | ||
|
|
684941b48a | ||
|
|
c30673fac0 | ||
|
|
9f5781eff4 | ||
|
|
f2ed1ebc74 | ||
|
|
0b17f1e891 | ||
|
|
e7e731800b | ||
|
|
89f3edcb27 | ||
|
|
68e3527eec | ||
|
|
1a1083f781 | ||
|
|
c44e90302d | ||
|
|
5b5163c812 | ||
|
|
f1417063cb | ||
|
|
83f488d1d2 | ||
|
|
d311fb18e0 | ||
|
|
ab5d19bf12 | ||
|
|
75796dafbc | ||
|
|
79cc0b1da9 | ||
|
|
1ef25a4177 | ||
|
|
316c830eaa | ||
|
|
2670d16407 | ||
|
|
54f98a5ad1 | ||
|
|
1238edf1b9 | ||
|
|
5f2a95d154 | ||
|
|
b4e5fd0299 | ||
|
|
9c2f50a620 | ||
|
|
8cd51103d9 | ||
|
|
b94424411a | ||
|
|
fabf331197 | ||
|
|
3e9b4ccf3d | ||
|
|
a4b44a8b0f | ||
|
|
9a57362602 | ||
|
|
cca3000eb2 | ||
|
|
8fce191c55 | ||
|
|
bed0f8d1c8 | ||
|
|
f55d7e29f7 | ||
|
|
c63fdb2e1a | ||
|
|
33dbfd2b3b | ||
|
|
b7a45b79bf | ||
|
|
1b41ab8567 | ||
|
|
d857779d67 | ||
|
|
4166ef1556 | ||
|
|
6a695c851a | ||
|
|
84b41e70a6 | ||
|
|
fe6a865c13 | ||
|
|
e82eced346 | ||
|
|
959b8637db | ||
|
|
e5f893d2ba | ||
|
|
e94c248f23 | ||
|
|
7483a24efa | ||
|
|
1480dcf6e0 | ||
|
|
ca62d15aac | ||
|
|
b5ce6281d8 | ||
|
|
cb9e5b401f | ||
|
|
3bd7004733 | ||
|
|
4110287349 | ||
|
|
a5e18300ea | ||
|
|
ee63eea02f | ||
|
|
caa63017cf | ||
|
|
837b5a65ea | ||
|
|
0aa5be6709 | ||
|
|
7f4dcaa5f1 | ||
|
|
7bdda2e2a6 | ||
|
|
7d49f20571 | ||
|
|
95ddb184a0 | ||
|
|
eec43e31c2 | ||
|
|
ee4eb72014 | ||
|
|
a58e02940d | ||
|
|
d41feaec6d | ||
|
|
de29cdb7e5 | ||
|
|
18e4025c47 | ||
|
|
79f0b06150 | ||
|
|
189d3bbbdf | ||
|
|
60f14e1f99 | ||
|
|
d0ad6c6223 | ||
|
|
6c1eaad083 | ||
|
|
27ced65a4d | ||
|
|
1e0f549fb6 | ||
|
|
9fed67306e | ||
|
|
0267250af4 | ||
|
|
b12e5a6e00 | ||
|
|
60a40d55b6 | ||
|
|
8500584c02 | ||
|
|
5246ca85f0 | ||
|
|
900d7c36d2 | ||
|
|
dbc012fa4c | ||
|
|
f21653510f | ||
|
|
065b87d694 | ||
|
|
7986ba7072 | ||
|
|
8793495edd | ||
|
|
16161fdb0a | ||
|
|
a3dd2c6b34 | ||
|
|
c0c6dd7c7b | ||
|
|
fd319fc82f | ||
|
|
0d90bb9e8f | ||
|
|
3db176e77f | ||
|
|
6c18931153 | ||
|
|
688188777f | ||
|
|
83c411b308 | ||
|
|
2acf4764c2 | ||
|
|
021748e81a | ||
|
|
1d689d0b87 | ||
|
|
c20c9946f8 | ||
|
|
8294eae6d9 | ||
|
|
79814905fa | ||
|
|
4dea9f08ef | ||
|
|
9494db9568 | ||
|
|
4bafd14bef | ||
|
|
706210a483 | ||
|
|
69644593f7 | ||
|
|
c5051ddb30 | ||
|
|
e7d037d3d4 | ||
|
|
3478aa1305 | ||
|
|
8033692873 | ||
|
|
257deabbbe | ||
|
|
78f26de1d8 | ||
|
|
b96f7657e6 | ||
|
|
de81591b26 | ||
|
|
90130dcd7d | ||
|
|
4392ca7352 | ||
|
|
23b6bd1101 | ||
|
|
d62b9f00de | ||
|
|
f291fa898e | ||
|
|
1688d8f22a | ||
|
|
3c31d98c50 | ||
|
|
446e1b7ece | ||
|
|
bc785141e5 | ||
|
|
1e5d6786da | ||
|
|
d3cf2a8e35 | ||
|
|
aafbd62c2d | ||
|
|
29726b15d1 | ||
|
|
a653628acb | ||
|
|
6b44909f21 | ||
|
|
eb37b72dc1 | ||
|
|
9ab1a56935 | ||
|
|
8427383b31 | ||
|
|
7c4582a0fe | ||
|
|
86255c7bbe | ||
|
|
a788fc255d | ||
|
|
7599a09b0d | ||
|
|
b5be8f3eae | ||
|
|
6d6671c2a1 | ||
|
|
cae6730ea8 | ||
|
|
fbfb34df58 | ||
|
|
1f93b2355a | ||
|
|
60f45ffaf6 | ||
|
|
aba033ae63 | ||
|
|
986312b6ae | ||
|
|
af60fd6428 | ||
|
|
559c9b4e52 | ||
|
|
21c8095b8a | ||
|
|
8377b59217 | ||
|
|
d06e0c5e94 | ||
|
|
db0cf4082d | ||
|
|
0747a4d850 | ||
|
|
3b19d4b6fb | ||
|
|
8a3a4ff653 | ||
|
|
d652524cef | ||
|
|
3c1aaa24f5 | ||
|
|
26151b3c42 | ||
|
|
9a7712ed11 | ||
|
|
098e5f2516 | ||
|
|
687e6ad900 | ||
|
|
22ce8e4c24 | ||
|
|
24204efab6 | ||
|
|
9611172b88 | ||
|
|
a808c58091 | ||
|
|
d19ce0a67e | ||
|
|
3672f7bad7 | ||
|
|
855cdad612 | ||
|
|
b857fd1e24 | ||
|
|
9dce1e5291 | ||
|
|
126d370b34 | ||
|
|
37210a76fa | ||
|
|
e92e69b35b | ||
|
|
b218cbab92 | ||
|
|
6746e8777a | ||
|
|
81b295726f | ||
|
|
b7d749ec90 | ||
|
|
87102407c7 | ||
|
|
8668e5d66b | ||
|
|
0b9158f727 | ||
|
|
d98b793705 | ||
|
|
0d96f1b8ca | ||
|
|
290de2f15c | ||
|
|
d30b3a398f | ||
|
|
fc56327e79 | ||
|
|
03918703d9 | ||
|
|
8feb5b2ff9 | ||
|
|
cf16ce6e64 | ||
|
|
fb6248c624 | ||
|
|
10827e56aa | ||
|
|
107926dd7e | ||
|
|
c0495d22c9 | ||
|
|
030f9ac6d3 | ||
|
|
786e2f860f | ||
|
|
a6fc1e715a | ||
|
|
917dd262f9 | ||
|
|
d85d3f346e | ||
|
|
4b0ad7dc1f | ||
|
|
dd78fd3ed3 | ||
|
|
cac1e4b0bd | ||
|
|
b8294f2cb7 | ||
|
|
40c21acf38 | ||
|
|
250842e561 | ||
|
|
1cbc322904 | ||
|
|
30cfc57b03 | ||
|
|
5a9ef80f4c | ||
|
|
dee7f31e55 | ||
|
|
9a688ab1bd | ||
|
|
cb43f46b83 | ||
|
|
cfb9c93e65 | ||
|
|
e781e9c3e8 | ||
|
|
b51d5fecd1 | ||
|
|
64b57186da | ||
|
|
a5a3b9f8ee | ||
|
|
9e5d1e9ad6 | ||
|
|
6ea2caa770 | ||
|
|
0b92c63734 | ||
|
|
ef8903902c | ||
|
|
9f289a0e9c | ||
|
|
80f2ab86c1 | ||
|
|
ec4e2c7193 | ||
|
|
cdce9a6feb | ||
|
|
c1fa23d745 | ||
|
|
5f7c7ecfd8 | ||
|
|
b80826dd0c | ||
|
|
d320b1c7a3 | ||
|
|
7657544d74 | ||
|
|
44b5ce144c | ||
|
|
65eb45c56a | ||
|
|
0dd43d7bcc | ||
|
|
4cf2a673c8 | ||
|
|
e83e2a4467 | ||
|
|
497cf925ab | ||
|
|
1d09914f8c | ||
|
|
497af61712 | ||
|
|
e91fcd6387 | ||
|
|
b3bc1e75aa | ||
|
|
6132f481ce | ||
|
|
966c473507 | ||
|
|
f415010337 | ||
|
|
cbf1fe71a5 | ||
|
|
e72aab3448 | ||
|
|
98c7fc8197 | ||
|
|
105078f4b1 | ||
|
|
e57adfac08 | ||
|
|
bdb68ae28b | ||
|
|
b7fab60023 | ||
|
|
98a83e89d0 | ||
|
|
fadbe7bffe | ||
|
|
c4a807c090 | ||
|
|
513a7bf4b1 | ||
|
|
69247460a1 | ||
|
|
bd7ed94b4a | ||
|
|
8357f344af | ||
|
|
045d4b9856 | ||
|
|
ed3a775ad2 | ||
|
|
52b08b9959 | ||
|
|
16c8eb2689 | ||
|
|
89544ba9fb | ||
|
|
c7ef487f2b | ||
|
|
711aae9c85 | ||
|
|
b09c0d6819 | ||
|
|
6fed292ef1 | ||
|
|
3dc181e3fb | ||
|
|
c235b12201 | ||
|
|
5cd93e4e0f | ||
|
|
641f27af3c | ||
|
|
72eec66208 | ||
|
|
2fb60bd40f | ||
|
|
f79d217ffa | ||
|
|
ab016b5ccd | ||
|
|
a11c3895ef | ||
|
|
82754a5213 | ||
|
|
5ca20f741a | ||
|
|
4d82f2a4c6 | ||
|
|
0de671a1de | ||
|
|
1306c6f7be | ||
|
|
2a19480084 | ||
|
|
5df72729d1 | ||
|
|
4bf2896413 | ||
|
|
09c2800181 | ||
|
|
3111846ddc | ||
|
|
33d28e6226 | ||
|
|
8ea4adce56 | ||
|
|
5a33ecf63b | ||
|
|
abbbd926bc | ||
|
|
ad6230074a | ||
|
|
58fa6004bb | ||
|
|
1d55e488ae | ||
|
|
ffb2a0ed73 | ||
|
|
ac967499f3 | ||
|
|
e49d0b0c22 | ||
|
|
a846fd8f83 | ||
|
|
c9186edd34 | ||
|
|
e7e04271fd | ||
|
|
894178918b | ||
|
|
05cd917693 | ||
|
|
ffde393c66 | ||
|
|
252b9b7e41 | ||
|
|
b0247597f9 | ||
|
|
fb8fcb0685 | ||
|
|
cae900b1fb | ||
|
|
65937a9244 | ||
|
|
06637280e5 | ||
|
|
c57c2b5a2b | ||
|
|
462f90979d | ||
|
|
3b6be8b4b9 | ||
|
|
87cd0a88fb | ||
|
|
6165e5b0f0 | ||
|
|
d47ea73dfc | ||
|
|
f62addc5e8 | ||
|
|
8b939d89a5 | ||
|
|
b973b5fab2 | ||
|
|
c1bddcd594 | ||
|
|
b1e2121682 | ||
|
|
b3d094db02 | ||
|
|
bc015da547 | ||
|
|
a9ad2aa2fa | ||
|
|
232d5ce54f | ||
|
|
8f508067e6 | ||
|
|
dbd7f719f6 | ||
|
|
63135a4b2b | ||
|
|
003b80689e | ||
|
|
df66dd9abf | ||
|
|
b20c15f56d | ||
|
|
1b05e782bf | ||
|
|
d628f11388 | ||
|
|
6c891a3e29 | ||
|
|
7f6d2c9582 | ||
|
|
1746820d69 |
No files matched your search
+11
-7
@@ -8,19 +8,23 @@ end_of_line = lf
|
||||
charset = utf-8
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
indent_style = space
|
||||
max_line_length = 90
|
||||
|
||||
[**.py]
|
||||
indent_style = tab
|
||||
indent_size = 4
|
||||
|
||||
[src/octoprint/vendor/sockjs/**.py]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
[**.yaml]
|
||||
indent_size = 2
|
||||
|
||||
[src/octoprint/static/js/app/**.js]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[.travis.yml]
|
||||
indent_style = space
|
||||
[src/octoprint/static/js/login/**.js]
|
||||
indent_size = 4
|
||||
|
||||
[src/octoprint/static/js/recovery/**.js]
|
||||
indent_size = 4
|
||||
|
||||
[src/octoprint/static/less/octoprint.less]
|
||||
indent_size = 2
|
||||
@@ -0,0 +1,40 @@
|
||||
overrides:
|
||||
- files:
|
||||
- "src/octoprint/static/js/app/**"
|
||||
env:
|
||||
browser: true
|
||||
jquery: true
|
||||
parserOptions:
|
||||
ecmaVersion: 5
|
||||
rules:
|
||||
es5/no-arrow-functions: error
|
||||
es5/no-binary-and-octal-literals: error
|
||||
es5/no-block-scoping: error
|
||||
es5/no-classes: error
|
||||
es5/no-computed-properties: error
|
||||
es5/no-default-parameters: error
|
||||
es5/no-destructuring: error
|
||||
es5/no-exponentiation-operator: error
|
||||
es5/no-for-of: error
|
||||
es5/no-generators: error
|
||||
es5/no-modules: error
|
||||
es5/no-object-super: error
|
||||
es5/no-rest-parameters: error
|
||||
es5/no-shorthand-properties: error
|
||||
es5/no-spread: error
|
||||
es5/no-template-literals: error
|
||||
es5/no-typeof-symbol: error
|
||||
es5/no-unicode-code-point-escape: error
|
||||
es5/no-unicode-regex: error
|
||||
- files:
|
||||
- "tests/cypress/**"
|
||||
env:
|
||||
node: true
|
||||
es6: true
|
||||
cypress/globals: true
|
||||
extends:
|
||||
- "plugin:cypress/recommended"
|
||||
|
||||
plugins:
|
||||
- eslint-plugin-es5
|
||||
- cypress
|
||||
@@ -0,0 +1,16 @@
|
||||
# refs to ignore during git blame, use with --ignore-revs-file
|
||||
|
||||
# Switch to black formatting
|
||||
1f93b2355a2816918e11a55e61b42010d15a6720
|
||||
5f2a95d154650366078b0d387e5b01427c4340c0
|
||||
|
||||
# Switch to prettier formatting
|
||||
6b44909f21ee39237b7504cd31ffa6cf28275c33
|
||||
|
||||
# EOF/trailing whitespace check
|
||||
#cae6730ea87da18bd6ebfeaf3e1e9cd354390939
|
||||
|
||||
# dict_to_literal, set_to_literal, not_in, flake8 fixes
|
||||
#af60fd642832736966104ae71d852d745397c749
|
||||
#986312b6ae7eeadcaf620cc99d53b23794be83b6
|
||||
#b5be8f3eaec18ae2a88110a3a16c552931d493dd
|
||||
@@ -0,0 +1,3 @@
|
||||
# someone from the docker-maintainers team will be requested for review
|
||||
# whenever the trigger_docker workflow is changed in a Pull Request
|
||||
.github/workflows/trigger_docker.yml @OctoPrint/docker-maintainers
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help improve OctoPrint
|
||||
|
||||
name: 🐛 Report a bug
|
||||
about: Create a bug report to help improve OctoPrint
|
||||
---
|
||||
|
||||
<!--
|
||||
@@ -17,7 +16,7 @@ or request features within OctoPrint (not OctoPi, not any OctoPrint
|
||||
plugins and not unofficial OctoPrint versions).
|
||||
|
||||
Do not seek support here ("I need help with ...", "I have a
|
||||
question ..."), that belongs on the community forum at
|
||||
question ..."), that belongs on the community forum at
|
||||
community.octoprint.org, NOT here.
|
||||
|
||||
Mark requests with a "[Request]" prefix in the title please. For bug
|
||||
@@ -37,7 +36,7 @@ Thank you!
|
||||
|
||||
#### What were you doing?
|
||||
|
||||
<!--
|
||||
<!--
|
||||
Please be as specific as possible here. The maintainers will need to
|
||||
reproduce your issue in order to fix it and that is not possible if they
|
||||
don't know what you did to get it to happen in the first place.
|
||||
@@ -61,7 +60,7 @@ to also include a link to a file with which to reproduce the problem.
|
||||
|
||||
#### Did the same happen when running OctoPrint in safe mode?
|
||||
|
||||
<!--
|
||||
<!--
|
||||
Test if you can reproduce your problem in safe mode. You can find information
|
||||
on how to enable safe mode in the Contribution Guidelines.
|
||||
|
||||
@@ -100,7 +99,8 @@ If applicable, always include if unsure.
|
||||
#### Link to octoprint.log
|
||||
|
||||
<!--
|
||||
On gist.github.com or pastebin.com. ALWAYS INCLUDE and never truncate.
|
||||
Directly uploaded here or on gist.github.com or pastebin.com.
|
||||
ALWAYS INCLUDE and never truncate.
|
||||
|
||||
The Contribution Guidelines tell you where to find that.
|
||||
-->
|
||||
@@ -108,8 +108,9 @@ The Contribution Guidelines tell you where to find that.
|
||||
#### Link to contents of terminal tab or serial.log
|
||||
|
||||
<!--
|
||||
On gist.github.com or pastebin.com. If applicable, always include if unsure or
|
||||
reporting communication issues. Never truncate.
|
||||
Directly uploaded here or on gist.github.com or pastebin.com.
|
||||
If applicable, always include if unsure or reporting communication issues.
|
||||
Never truncate.
|
||||
|
||||
serial.log is usually not written due to performance reasons and must be
|
||||
enabled explicitly. Provide at the very least the FULL contents of your
|
||||
@@ -120,8 +121,8 @@ a serial.log (which the Contribution Guidelines tell you where to find).
|
||||
#### Link to contents of Javascript console in the browser
|
||||
|
||||
<!--
|
||||
On gist.github.com or pastebin.com or alternatively a screenshot. If applicable -
|
||||
always include if unsure or reporting UI issues.
|
||||
Directly uploaded here or on gist.github.com or pastebin.com.
|
||||
If applicable - always include if unsure or reporting UI issues.
|
||||
|
||||
The Contribution Guidelines tell you where to find that.
|
||||
-->
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
contact_links:
|
||||
- name: Have questions or need support?
|
||||
- name: 🤔 Have questions or need support?
|
||||
url: https://community.octoprint.org
|
||||
about: Please get in touch on the OctoPrint Community Forum!
|
||||
about: Please get in touch on the OctoPrint Community Forums!
|
||||
- name: 💸 Want to donate?
|
||||
url: https://support.octoprint.org
|
||||
about: Please take a look at the various options to support OctoPrint's development financially!
|
||||
@@ -1,22 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: '[Request]'
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
Please make sure to add [Request] to your issue's title. Thank you!
|
||||
-->
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -0,0 +1,34 @@
|
||||
name: ✨ Request a feature
|
||||
description: Request a new feature to implement in OctoPrint
|
||||
title: "[Request]"
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: >
|
||||
**Thank you for wanting to request a feature in OctoPrint!**
|
||||
|
||||
|
||||
Before you go ahead with your request, please first consider if it wouldn't be
|
||||
better suited for a plugin. As a general rule of thumb, any feature that is only
|
||||
of interest to a small sub group should be moved into a plugin. Only such features
|
||||
that are of interest to a majority of OctoPrint's users will be implemented as
|
||||
part of the core itself.
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Is your feature request related to a problem? Please describe.
|
||||
description: A clear and concise description of what the problem is. Eg, "I'm always frustrated when [...]".
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the solution you'd like
|
||||
description: A clear and concise description of what you want to happen. Explain why it needs to be included in OctoPrint's core and can't become a plugin.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe alternatives you've considered
|
||||
description: A clear and concise description of any alternative solutions or features you've considered.
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add any other context or screenshots about the feature request here.
|
||||
@@ -16,15 +16,15 @@ checklist:
|
||||
made sure your changes don't interfere with current development by
|
||||
talking it through with the maintainers, e.g. through a
|
||||
Brainstorming ticket
|
||||
* [ ] Your PR targets OctoPrint's devel branch if it's a completely
|
||||
* [ ] Your PR targets OctoPrint's devel branch if it's a completely
|
||||
new feature, or maintenance if it's a bug fix or improvement of
|
||||
existing functionality for the current stable version (no PRs
|
||||
existing functionality for the current stable version (no PRs
|
||||
against master or anything else please)
|
||||
* [ ] Your PR was opened from a custom branch on your repository
|
||||
(no PRs from your version of master, maintenance or devel please),
|
||||
e.g. dev/my_new_feature or fix/my_bugfix
|
||||
* [ ] Your PR only contains relevant changes: no unrelated files,
|
||||
no dead code, ideally only one commit - rebase and squash your PR
|
||||
no dead code, ideally only one commit - rebase and squash your PR
|
||||
if necessary!
|
||||
* [ ] Your changes follow the existing coding style
|
||||
* [ ] If your changes include style sheets: You have modified the
|
||||
@@ -37,7 +37,7 @@ checklist:
|
||||
* [ ] You have added yourself to the AUTHORS.md file :)
|
||||
|
||||
<!--
|
||||
Describe your PR further using the template provided below. The more
|
||||
Describe your PR further using the template provided below. The more
|
||||
details the better!
|
||||
-->
|
||||
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
accessControl:
|
||||
salt: zXmvzI3uWuTLkSPOEfA2ZLwn3f3sGUNS
|
||||
salt: zXmvzI3uWuTLkSPOEfA2ZLwn3f3sGUNS
|
||||
plugins:
|
||||
virtual_printer:
|
||||
enabled: true
|
||||
tracking:
|
||||
enabled: false
|
||||
virtual_printer:
|
||||
enabled: true
|
||||
tracking:
|
||||
enabled: false
|
||||
server:
|
||||
firstRun: false
|
||||
onlineCheck:
|
||||
enabled: false
|
||||
pluginBlacklist:
|
||||
enabled: false
|
||||
secretKey: rrdHjvmeGMPSdYWg2NGdiM7mpz9pjekk
|
||||
seenWizards:
|
||||
backup: null
|
||||
corewizard: 3
|
||||
tracking: null
|
||||
firstRun: false
|
||||
onlineCheck:
|
||||
enabled: false
|
||||
pluginBlacklist:
|
||||
enabled: false
|
||||
secretKey: rrdHjvmeGMPSdYWg2NGdiM7mpz9pjekk
|
||||
seenWizards:
|
||||
backup: null
|
||||
corewizard: 3
|
||||
tracking: null
|
||||
@@ -1,22 +1,22 @@
|
||||
admin:
|
||||
active: true
|
||||
apikey: null
|
||||
groups:
|
||||
active: true
|
||||
apikey: null
|
||||
groups:
|
||||
- admins
|
||||
- users
|
||||
password: 3033587f3b040680c77ce4fb7e8d61422878ef49a2a784227689f3b44ce66ada7f6161f8b2b037267f0d37b783a5600276eb88e1d224d24915f64e187a49a89f
|
||||
permissions: []
|
||||
roles:
|
||||
password: 3033587f3b040680c77ce4fb7e8d61422878ef49a2a784227689f3b44ce66ada7f6161f8b2b037267f0d37b783a5600276eb88e1d224d24915f64e187a49a89f
|
||||
permissions: []
|
||||
roles:
|
||||
- user
|
||||
- admin
|
||||
settings: {}
|
||||
settings: {}
|
||||
user:
|
||||
active: true
|
||||
apikey: null
|
||||
groups:
|
||||
active: true
|
||||
apikey: null
|
||||
groups:
|
||||
- users
|
||||
password: 3033587f3b040680c77ce4fb7e8d61422878ef49a2a784227689f3b44ce66ada7f6161f8b2b037267f0d37b783a5600276eb88e1d224d24915f64e187a49a89f
|
||||
permissions: []
|
||||
roles:
|
||||
password: 3033587f3b040680c77ce4fb7e8d61422878ef49a2a784227689f3b44ce66ada7f6161f8b2b037267f0d37b783a5600276eb88e1d224d24915f64e187a49a89f
|
||||
permissions: []
|
||||
roles:
|
||||
- user
|
||||
settings: {}
|
||||
settings: {}
|
||||
@@ -0,0 +1,62 @@
|
||||
approve_label: approved
|
||||
problem_label: incomplete
|
||||
ignored_labels:
|
||||
- approved
|
||||
- bug
|
||||
- request
|
||||
- improvement
|
||||
- brainstorming
|
||||
- task
|
||||
- rc feedback
|
||||
- awaiting information
|
||||
- not octoprint
|
||||
- done
|
||||
ignored_authors:
|
||||
- "@OctoPrint"
|
||||
- "sentry-io"
|
||||
- "FormerLurker"
|
||||
- "bzed"
|
||||
|
||||
validation_comment: >
|
||||
Hi @@@AUTHOR@@,
|
||||
|
||||
|
||||
it looks like there is some **information missing** from your bug report that will
|
||||
be needed in order to solve the problem. Read the [Contribution Guidelines](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md)
|
||||
which will provide you with a template to *fully fill out* here so that your bug report
|
||||
is ready to be investigated (I promise I'll go away then too!).
|
||||
|
||||
|
||||
If you did not intend to report a bug but wanted to **request a feature or brain
|
||||
storm** about some kind of development, please take special note of the title format
|
||||
to use as described in the [Contribution Guidelines](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md).
|
||||
|
||||
|
||||
**Please do not abuse the bug tracker as a support forum** - that can be found at
|
||||
[community.octoprint.org](https://community.octoprint.org). Go there for any kind
|
||||
of issues with network connectivity, webcam functionality, printer detection or
|
||||
any other kind of such support requests or general questions.
|
||||
|
||||
|
||||
Also **make sure you are at the right place** - this is the bug tracker of the official
|
||||
version of OctoPrint, not the Raspberry Pi image OctoPi nor any unbundled third
|
||||
party OctoPrint plugins or unofficial versions. Make sure too that you have **read
|
||||
through the [Frequently Asked Questions](http://faq.octoprint.org)** and searched
|
||||
the [**existing tickets**](https://github.com/OctoPrint/OctoPrint/issues)
|
||||
for your problem - try multiple search terms please.
|
||||
|
||||
|
||||
I'm marking this one now as needing some more information. Please understand that
|
||||
if you do not provide that information within the next two weeks
|
||||
I'll close this ticket so it doesn't clutter the bug tracker. This is nothing
|
||||
personal, it's needed to keep this project manageable. Please just be considerate
|
||||
and help the maintainers solve this problem
|
||||
quickly by following the guidelines linked above. Remember, the less time the devs
|
||||
have to spend running after information on tickets, the more time they have to actually
|
||||
solve problems and add awesome new features. Thank you!
|
||||
|
||||
|
||||
*I'm just a bot 🤖, not a human being, so don't expect any replies
|
||||
from me :) Your ticket is read by humans too, I'm just not one of them.*
|
||||
|
||||
keyphrase: I have read the FAQ
|
||||
@@ -0,0 +1,25 @@
|
||||
docs:
|
||||
- "docs/*"
|
||||
- "docs/**/*"
|
||||
- "README.md"
|
||||
|
||||
meta:
|
||||
- "CODE_OF_CONDUCT.md"
|
||||
- "CONTRIBUTING.md"
|
||||
- "SECURITY.md"
|
||||
- ".github/CODEOWNERS"
|
||||
- ".github/FUNDING.yml"
|
||||
- ".github/ISSUE_TEMPLATE/*"
|
||||
- ".github/PULL_REQUEST_TEMPLATE.md"
|
||||
|
||||
ci/cd:
|
||||
- ".github/fixtures/**/*"
|
||||
- ".github/workflows/*"
|
||||
- ".github/labeler.yml"
|
||||
|
||||
docker:
|
||||
- ".github/workflows/trigger_docker.yml"
|
||||
|
||||
tests:
|
||||
- "tests/*"
|
||||
- "tests/**/*"
|
||||
@@ -0,0 +1,14 @@
|
||||
approve_label: "approved"
|
||||
problem_label: "needs some work"
|
||||
|
||||
allowed_targets: ["maintenance", "devel", "staging/maintenance", "staging/devel"]
|
||||
forbidden_sources:
|
||||
["master", "maintenance", "devel", "staging/maintenance", "staging/devel"]
|
||||
|
||||
labels:
|
||||
docs:
|
||||
additional_allowed_targets: ["master"]
|
||||
meta:
|
||||
additional_allowed_targets: ["master"]
|
||||
ci/cd:
|
||||
additional_allowed_targets: ["master"]
|
||||
+24
-21
@@ -1,8 +1,10 @@
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
release:
|
||||
types: [published, prereleased]
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -28,11 +30,27 @@ jobs:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
pre-commit:
|
||||
name: 🧹 Pre-commit
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: 🏗 Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: 🏗 Set up dev dependencies
|
||||
run: |
|
||||
pip install -e .[develop]
|
||||
- name: 🚀 Run pre-commit
|
||||
run: |
|
||||
pre-commit run --all-files --show-diff-on-failure
|
||||
|
||||
test-unit:
|
||||
name: 🧪 Unit tests
|
||||
strategy:
|
||||
matrix:
|
||||
python: ["2.7", "3.7", "3.8"]
|
||||
python: ["2.7", "3.7", "3.8", "3.9"]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@@ -47,28 +65,12 @@ jobs:
|
||||
run: |
|
||||
pytest
|
||||
|
||||
test-flake8:
|
||||
name: 🧪 Flake8
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: 🏗 Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: 🏗 Set up test dependencies
|
||||
run: |
|
||||
pip install -e .[develop]
|
||||
- name: 🚀 Run test suite
|
||||
run: |
|
||||
flake8 src/ tests setup.py
|
||||
|
||||
test-install:
|
||||
name: 🧪 Installation tests
|
||||
needs: build
|
||||
strategy:
|
||||
matrix:
|
||||
python: ["2.7", "3.7", "3.8"]
|
||||
python: ["2.7", "3.7", "3.8", "3.9"]
|
||||
installable: ["wheel", "sdist"]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -121,8 +123,8 @@ jobs:
|
||||
with:
|
||||
working-directory: tests/cypress
|
||||
browser: chrome
|
||||
start: 'octoprint -b ${{ github.workspace }}/e2econfig serve --host 127.0.0.1 --port 5000'
|
||||
wait-on: 'http://127.0.0.1:5000/online.txt'
|
||||
start: "octoprint -b ${{ github.workspace }}/e2econfig serve --host 127.0.0.1 --port 5000"
|
||||
wait-on: "http://127.0.0.1:5000/online.txt"
|
||||
|
||||
- name: ⬆ Upload screenshots
|
||||
uses: actions/upload-artifact@v1
|
||||
@@ -141,6 +143,7 @@ jobs:
|
||||
name: 📦 Publish on TestPyPI
|
||||
if: github.event_name == 'release'
|
||||
needs:
|
||||
- pre-commit
|
||||
- test-unit
|
||||
- test-install
|
||||
- test-e2e
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
name: "Cleanup issues & PRs"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
lock:
|
||||
name: 🔒 Lock issues & PRs closed over a year
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@v2
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
issue-lock-comment: ""
|
||||
pr-lock-comment: ""
|
||||
|
||||
cleanup:
|
||||
name: 🧹 Close issues marked as incomplete & older than 14 days
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: date
|
||||
run: |
|
||||
echo "::set-output name=CUTOFF::`date --date='14 days ago' +'%Y-%m-%d'`"
|
||||
- uses: OctoPrint/actions/close-by-query@main
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
query: "is:issue is:open label:incomplete created:<${{ steps.date.outputs.CUTOFF }}"
|
||||
comment: >
|
||||
Since apparently some of the required information is still missing, this will be
|
||||
closed now, sorry. Feel free to request a reopen of this or create a new issue
|
||||
once you can provide **all**
|
||||
[required information](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md#how-to-file-a-bug-report).
|
||||
|
||||
|
||||
This is nothing personal. Thank you for your collaboration.
|
||||
@@ -0,0 +1,69 @@
|
||||
name: "Issue Automation"
|
||||
on:
|
||||
issues:
|
||||
types: [opened, edited, closed, reopened]
|
||||
|
||||
jobs:
|
||||
issue-automation:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v2
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
let labels = [];
|
||||
let setLabels = false;
|
||||
context.payload.issue.labels.forEach(label => { labels.push(label.name) });
|
||||
|
||||
switch (context.payload.action) {
|
||||
|
||||
case 'opened':
|
||||
case 'edited': {
|
||||
if (context.payload.issue.title.match(/\[request\]|feature request/i)) {
|
||||
labels.push('request');
|
||||
labels = labels.filter(label => label !== 'triage');
|
||||
setLabels = true;
|
||||
}
|
||||
if (context.payload.issue.title.match(/\[rc feedback\]/i)) {
|
||||
labels.push('rc feedback');
|
||||
labels = labels.filter(label => label !== 'triage');
|
||||
setLabels = true;
|
||||
}
|
||||
|
||||
if (labels.length === 0) {
|
||||
labels.push('triage');
|
||||
setLabels = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 'closed': {
|
||||
if (labels.includes('bug') || labels.includes('request') || labels.includes('improvement')) {
|
||||
labels.push('done');
|
||||
setLabels = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case 'reopened': {
|
||||
if (labels.includes('done')) {
|
||||
labels = labels.filter(label => label !== 'done');
|
||||
setLabels = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (setLabels) {
|
||||
github.issues.setLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: labels
|
||||
})
|
||||
}
|
||||
|
||||
- uses: OctoPrint/actions/issue-validation@main
|
||||
if: github.event_name == 'issues' && (github.event.action == 'opened' || github.event.action == 'edited')
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,33 +0,0 @@
|
||||
name: "Issue Labeler"
|
||||
on:
|
||||
issues:
|
||||
types: [opened, edited]
|
||||
|
||||
jobs:
|
||||
apply-label:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v2
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
let labels = [];
|
||||
|
||||
if (context.payload.issue.title.match(/\[request\]|feature request/i)) {
|
||||
labels.push('type:request');
|
||||
}
|
||||
if (context.payload.issue.title.match(/\[brainstorming\]/i)) {
|
||||
labels.push('type:brainstorming');
|
||||
}
|
||||
if (context.payload.issue.title.match(/\[rc feedback\]/i)) {
|
||||
labels.push('type:rc feedback');
|
||||
}
|
||||
|
||||
if (labels.length > 0) {
|
||||
github.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: labels
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
name: "Linkify systeminfo bundles"
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created, edited]
|
||||
|
||||
jobs:
|
||||
linkifyBundles:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v2
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
let comment = context.payload.comment.body;
|
||||
|
||||
const botMarker = "<!-- linkify_bundles -->";
|
||||
const botWasHere = comment.indexOf(botMarker);
|
||||
if (botWasHere !== -1) {
|
||||
comment = comment.substring(0, botWasHere);
|
||||
};
|
||||
|
||||
const bundleRegex = /\[(octoprint-systeminfo-\d{14}\.zip)\]\(([^)]+)\)/g;
|
||||
|
||||
const bundles = [];
|
||||
const seen = [];
|
||||
const matches = comment.matchAll(bundleRegex);
|
||||
for (const match of matches) {
|
||||
if (!seen.includes(match[1])) {
|
||||
bundles.push({filename: match[1], link: match[2], match: match[0]});
|
||||
seen.push(match[1]);
|
||||
}
|
||||
};
|
||||
|
||||
if (bundles.length > 0) {
|
||||
let text = comment + botMarker + "\n\n---\n\n\nBundles:\n\n";
|
||||
bundles.forEach((bundle) => {
|
||||
text += " * [" + bundle.filename + "](https://bundleviewer.octoprint.org/?url=" + encodeURIComponent(bundle.link) + ")\n"
|
||||
});
|
||||
text += "\n*edited by @github-actions to add bundle viewer links*\n";
|
||||
|
||||
github.issues.updateComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
comment_id: context.payload.comment.id,
|
||||
body: text
|
||||
});
|
||||
} else if (botWasHere !== -1) {
|
||||
github.issues.updateComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
comment_id: context.payload.comment.id,
|
||||
body: comment
|
||||
});
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
name: 'Lock outdated issues & PRs'
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 0 * * *'
|
||||
|
||||
jobs:
|
||||
lock:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🔒 Lock issues & PRs closed over a year
|
||||
uses: dessant/lock-threads@v2
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
issue-lock-comment: ''
|
||||
pr-lock-comment: ''
|
||||
@@ -0,0 +1,33 @@
|
||||
name: "Nightly merge"
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 0 * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
nightly-merge:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: ⬇ Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 🔀 Merge master into maintenance
|
||||
uses: robotology/gh-action-nightly-merge@v1.3.2
|
||||
with:
|
||||
stable_branch: "master"
|
||||
development_branch: "maintenance"
|
||||
allow_ff: false
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
#- name: 🔀 Merge maintenance into devel
|
||||
# uses: robotology/gh-action-nightly-merge@v1.3.2
|
||||
# with:
|
||||
# stable_branch: "maintenance"
|
||||
# development_branch: "devel"
|
||||
# allow_ff: false
|
||||
# env:
|
||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -0,0 +1,16 @@
|
||||
name: "Pull Request Automation"
|
||||
on:
|
||||
pull_request_target:
|
||||
types: ["opened", "synchronize", "reopened", "edited", "labeled", "unlabeled"]
|
||||
|
||||
jobs:
|
||||
pr-automation:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/labeler@v3
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
- uses: OctoPrint/actions/pr-validation@main
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -6,7 +6,7 @@ on:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 */12 * * *'
|
||||
- cron: "0 */12 * * *"
|
||||
|
||||
jobs:
|
||||
install-branch:
|
||||
@@ -14,7 +14,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
os: ["ubuntu-latest"]
|
||||
python: ["2.7", "3.7", "3.8"]
|
||||
python: ["2.7", "3.7", "3.8", "3.9"]
|
||||
branch: ["master"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
@@ -35,21 +35,21 @@ jobs:
|
||||
DISCORD_WEBHOOK: ${{ secrets.discord_webhook }}
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: '☑️ Test install on Python ${{ matrix.python }} under `${{ matrix.os }}` for `OctoPrint/OctoPrint:${{ matrix.branch }}` was successful'
|
||||
args: "☑️ Test install on Python ${{ matrix.python }} under `${{ matrix.os }}` for `OctoPrint/OctoPrint:${{ matrix.branch }}` was successful"
|
||||
- name: 📧 Discord failure notification
|
||||
if: failure()
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.discord_webhook }}
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: '🚫 Test install on Python ${{ matrix.python }} under `${{ matrix.os }}` for `OctoPrint/OctoPrint:${{ matrix.branch }}` failed'
|
||||
args: "🚫 Test install on Python ${{ matrix.python }} under `${{ matrix.os }}` for `OctoPrint/OctoPrint:${{ matrix.branch }}` failed"
|
||||
|
||||
install-latest:
|
||||
name: Install latest release
|
||||
strategy:
|
||||
matrix:
|
||||
os: ["ubuntu-latest"]
|
||||
python: ["2.7", "3.7", "3.8"]
|
||||
python: ["2.7", "3.7", "3.8", "3.9"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: 👀 Determine latest release
|
||||
@@ -69,11 +69,11 @@ jobs:
|
||||
DISCORD_WEBHOOK: ${{ secrets.discord_webhook }}
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: '☑️ Test install on Python ${{ matrix.python }} under `${{ matrix.os }}` for `OctoPrint/OctoPrint:${{ steps.latest.outputs.release }}` was successful'
|
||||
args: "☑️ Test install on Python ${{ matrix.python }} under `${{ matrix.os }}` for `OctoPrint/OctoPrint:${{ steps.latest.outputs.release }}` was successful"
|
||||
- name: 📧 Discord failure notification
|
||||
if: failure()
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.discord_webhook }}
|
||||
uses: Ilshidur/action-discord@master
|
||||
with:
|
||||
args: '🚫 Test install on Python ${{ matrix.python }} under `${{ matrix.os }}` for `OctoPrint/OctoPrint:${{ steps.latest.outputs.release }}` failed'
|
||||
args: "🚫 Test install on Python ${{ matrix.python }} under `${{ matrix.os }}` for `OctoPrint/OctoPrint:${{ steps.latest.outputs.release }}` failed"
|
||||
@@ -4,15 +4,44 @@ on:
|
||||
types:
|
||||
- released
|
||||
- prereleased
|
||||
push:
|
||||
branches:
|
||||
- maintenance
|
||||
- devel
|
||||
|
||||
jobs:
|
||||
trigger:
|
||||
dispatch_releases:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'OctoPrint/OctoPrint' && github.event_name != 'push'
|
||||
steps:
|
||||
- name: 🚀 Repository Dispatch
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||
repository: OctoPrint/docker
|
||||
event-type: octoprint-release
|
||||
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}", "event-name": "${{ github.event_name }}", "event-type": "${{ github.event.action }}"}'
|
||||
repository: ${{ github.repository_owner }}/octoprint-docker
|
||||
event-type: ${{ github.event.action }}
|
||||
client-payload: '{"tag_name": "${{ github.event.release.tag_name }}"}'
|
||||
|
||||
dispatch_canary:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'OctoPrint/OctoPrint' && github.event_name == 'push' && github.ref == 'refs/heads/maintenance'
|
||||
steps:
|
||||
- name: 🚀 Repository Dispatch
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||
repository: ${{ github.repository_owner }}/octoprint-docker
|
||||
event-type: "canary"
|
||||
client-payload: '{"tag_name": "maintenance"}'
|
||||
|
||||
dispatch_bleeding:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'OctoPrint/OctoPrint' && github.event_name == 'push' && github.ref == 'refs/heads/devel'
|
||||
steps:
|
||||
- name: 🚀 Repository Dispatch
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||
repository: ${{ github.repository_owner }}/octoprint-docker
|
||||
event-type: "bleeding"
|
||||
client-payload: '{"tag_name": "devel"}'
|
||||
@@ -9,6 +9,7 @@ on:
|
||||
jobs:
|
||||
trigger:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository == 'OctoPrint/OctoPrint'
|
||||
steps:
|
||||
- name: 🚀 Repository Dispatch
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
|
||||
@@ -2,6 +2,7 @@ src/octoprint/templates/_data/AUTHORS.md
|
||||
src/octoprint/templates/_data/CHANGELOG.md
|
||||
src/octoprint/templates/_data/SUPPORTERS.md
|
||||
src/octoprint/templates/_data/THIRDPARTYLICENSES.md
|
||||
src/octoprint/plugins/pi_support/.local_debug
|
||||
docs/_build
|
||||
|
||||
devtools
|
||||
@@ -35,6 +36,7 @@ pypy
|
||||
.eggs
|
||||
.mypy_cache
|
||||
.pytest_cache
|
||||
.python-version
|
||||
.tox
|
||||
|
||||
venv*
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
exclude: ^(src/octoprint/vendor/|src/octoprint/static/js/lib|src/octoprint/static/vendor|tests/static/js/lib|tests/util/_files|docs/|scripts/|translations/|.*\.css|.*\.svg)
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v2.3.0
|
||||
hooks:
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
- id: check-case-conflict
|
||||
- id: check-json
|
||||
- id: check-yaml
|
||||
- id: check-toml
|
||||
- id: check-merge-conflict
|
||||
- id: fix-encoding-pragma
|
||||
- repo: https://github.com/asottile/pyupgrade
|
||||
rev: v2.10.0
|
||||
hooks:
|
||||
- id: pyupgrade
|
||||
- repo: https://github.com/OctoPrint/codemods
|
||||
rev: devel
|
||||
hooks:
|
||||
- id: codemod_not_in
|
||||
args: ["--ignore", "src/octoprint/vendor"]
|
||||
- repo: https://github.com/pre-commit/mirrors-isort
|
||||
rev: v5.5.4
|
||||
hooks:
|
||||
- id: isort
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 20.8b1
|
||||
hooks:
|
||||
- id: black
|
||||
args: ["--config", "black.toml"]
|
||||
- repo: https://gitlab.com/pycqa/flake8
|
||||
rev: 3.8.1
|
||||
hooks:
|
||||
- id: flake8
|
||||
additional_dependencies:
|
||||
- flake8-bugbear
|
||||
- repo: https://github.com/pre-commit/mirrors-prettier
|
||||
rev: v2.1.2
|
||||
hooks:
|
||||
- id: prettier
|
||||
- repo: https://github.com/pre-commit/mirrors-eslint
|
||||
rev: v7.19.0
|
||||
hooks:
|
||||
- id: eslint
|
||||
additional_dependencies:
|
||||
- eslint@7.19.0
|
||||
- eslint-plugin-es5@v1.3.0
|
||||
- eslint-plugin-cypress@2.11.2
|
||||
files: \.js$
|
||||
exclude: ^(src/octoprint/vendor/|tests/static/js/lib|tests/util/_files|docs/|scripts/|translations/)
|
||||
@@ -0,0 +1,15 @@
|
||||
src/octoprint/static/js/lib
|
||||
src/octoprint/static/vendor
|
||||
src/octoprint/static/less/bootstrap
|
||||
src/octoprint/static/less/font-awesome.less
|
||||
*.md
|
||||
*.css
|
||||
**/package.json
|
||||
**/package-lock.json
|
||||
**/*.min.js
|
||||
docs
|
||||
build
|
||||
dist
|
||||
venv
|
||||
venv2
|
||||
venv3
|
||||
@@ -0,0 +1,11 @@
|
||||
printWidth: 90
|
||||
tabWidth: 4
|
||||
semi: true
|
||||
trailingComma: "none"
|
||||
singleQuote: false
|
||||
quoteProps: consistent
|
||||
bracketSpacing: false
|
||||
overrides:
|
||||
- files: ["*.yaml", "*.yml", "*.json", "*.less"]
|
||||
options:
|
||||
tabWidth: 2
|
||||
@@ -5,4 +5,3 @@ host = https://www.transifex.com
|
||||
file_filter = translations/<lang>/LC_MESSAGES/messages.po
|
||||
source_file = translations/messages.pot
|
||||
source_lang = en
|
||||
|
||||
+11
-9
@@ -18,19 +18,21 @@ prerelease
|
||||
HEAD
|
||||
\(detached.*
|
||||
|
||||
# maintenance is currently the branch for preparation of maintenance release 1.4.3
|
||||
# maintenance is currently the branch for preparation of maintenance release 1.6.0
|
||||
# so are any fix/... and improve/... branches
|
||||
maintenance 1.4.3 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
fix/.* 1.4.3 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
improve/.* 1.4.3 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
maintenance 1.6.0 b7a45b79bf86339f0b28177ac1eaebb56d00ea37 pep440-dev
|
||||
fix/.* 1.6.0 b7a45b79bf86339f0b28177ac1eaebb56d00ea37 pep440-dev
|
||||
improve/.* 1.6.0 b7a45b79bf86339f0b28177ac1eaebb56d00ea37 pep440-dev
|
||||
|
||||
# staging/hotfix is the branch for preparation of the 1.4.2 hotfix release
|
||||
staging/hotfix 1.4.2 3ab84ed7e4c3aaaf71fe0f184b465f25d689f929 pep440-dev
|
||||
# staging/bugfix is the branch for preparation of the 1.5.3 hotfix release
|
||||
# so are any bug/... branches
|
||||
staging/bugfix 1.5.3 e46e8fa17a1553cd0c228a4fa4cfd93e2a9bce7b pep440-dev
|
||||
bug/.* 1.5.3 e46e8fa17a1553cd0c228a4fa4cfd93e2a9bce7b pep440-dev
|
||||
|
||||
# staging/maintenance is currently the branch for preparation of 1.4.1rc5
|
||||
# staging/maintenance is currently the branch for preparation of 1.6.0rc4
|
||||
# so is regressionfix/...
|
||||
staging/maintenance 1.4.1rc5 458ab91f915307857941f839a1b743430b8786a4 pep440-dev
|
||||
regressionfix/.* 1.4.1rc5 458ab91f915307857941f839a1b743430b8786a4 pep440-dev
|
||||
staging/maintenance 1.6.0rc4 7054a726bb3dc363a98ec6944b24e07879bb389b pep440-dev
|
||||
regressionfix/.* 1.6.0rc4 7054a726bb3dc363a98ec6944b24e07879bb389b pep440-dev
|
||||
|
||||
# staging/devel is currently inactive (but has the 1.4.1rc4 namespace)
|
||||
staging/devel 1.4.1rc4 650d54d1885409fa1d411eb54b9e8c7ff428910f pep440-dev
|
||||
|
||||
+19
@@ -121,7 +121,26 @@ date of first contribution):
|
||||
* [Josh Friend](https://github.com/joshfriend)
|
||||
* [Lachlan Cresswell](https://github.com/lachyc)
|
||||
* [Khoi Pham](https://github.com/osubuu)
|
||||
* [Timofei Korostelev](https://github.com/chudsaviet)
|
||||
* [Federico Nembrini](https://github.com/FedericoNembrini)
|
||||
* [Uri Shaked](https://github.com/urish)
|
||||
* [Brian Vanderbusch](https://github.com/LongLiveCHIEF)
|
||||
* [Charlie Powell](https://github.com/cp2004)
|
||||
* [Ollis Git](https://github.com/OllisGit)
|
||||
* [Sophist](https://github.com/Sophist-UK)
|
||||
* [Manuel McLure](https://github.com/ManuelMcLure)
|
||||
* ["j7126"](https://github.com/j7126)
|
||||
* ["coliss86"](https://github.com/coliss86)
|
||||
* ["MichaIng"](https://github.com/MichaIng)
|
||||
* ["jasonbcox"](https://github.com/jasonbcox)
|
||||
* ["shadycuz"](https://github.com/shadycuz)
|
||||
* [David Rifkind](https://github.com/drifkind)
|
||||
* [Nils Hofmann](https://github.com/Master92)
|
||||
* [Miroslav Šedivý](https://github.com/eumiro)
|
||||
* [Costas Basdekis](https://github.com/costas-basdekis)
|
||||
* [Joe Martella](https://github.com/martellaj)
|
||||
* [Scott Lahteine](https://github.com/thinkyhead)
|
||||
* [Karthikeyan Singaravelan](https://github.com/tirkarthi)
|
||||
|
||||
OctoPrint started off as a fork of [Cura](https://github.com/daid/Cura) by
|
||||
[Daid Braam](https://github.com/daid). Parts of its communication layer and
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
OctoPrint's Code of Conduct can be found at [octoprint.org/conduct/](https://octoprint.org/conduct/).
|
||||
+67
-261
@@ -31,7 +31,7 @@ nothing but ticket management.
|
||||
|
||||
- **[Read the FAQ](https://faq.octoprint.org)**
|
||||
- If you want to report a **bug**, [read "How to file a bug report" below](#how-to-file-a-bug-report)
|
||||
and *[use the provided template](#what-should-i-include-in-a-ticket)*.
|
||||
and *[use the provided form](https://github.com/OctoPrint/OctoPrint/issues/new?template=bug_report.yml)*.
|
||||
You do not need to do anything else with your ticket.
|
||||
- If you want to post a **feature request** or a **documentation request**, add `[Request]`
|
||||
to your issue's title (e.g. `[Request] Awesome new feature`). A question on how to run/change/setup
|
||||
@@ -39,7 +39,7 @@ nothing but ticket management.
|
||||
[community forum at community.octoprint.org](https://community.octoprint.org) for
|
||||
such support issues.
|
||||
- If you are a **developer** that wants to brainstorm a pull request or possible
|
||||
changes to the plugin system, please get in touch on the
|
||||
changes to the plugin system, please get in touch on the
|
||||
[community forum at community.octoprint.org](https://community.octoprint.org/c/development).
|
||||
- If you need **support**, have a **question** or some **other reason** that
|
||||
doesn't fit any of the above categories, the issue tracker is not the right place.
|
||||
@@ -48,19 +48,10 @@ nothing but ticket management.
|
||||
No matter what kind of ticket you create, never mix two or more "ticket reasons"
|
||||
into one ticket: One ticket per bug, request, brainstorming thread please.
|
||||
|
||||
> 👉 **Note**
|
||||
>
|
||||
> A bot is in place that monitors new tickets, automatically
|
||||
> categorizes them and checks new bug reports for usage of the provided template.
|
||||
> That bot will only bother you if you open a ticket that appears to be a bug (no
|
||||
> `[Request]` in the title) without the complete template, and it
|
||||
> will do that only to ensure that all information needed to solve the issue is
|
||||
> available for the maintainers to directly start tackling that problem.
|
||||
|
||||
## How to file a bug report
|
||||
|
||||
If you encounter an issue with OctoPrint, you are welcome to
|
||||
[submit a bug report](https://github.com/foosel/OctoPrint/issues/new).
|
||||
[submit a bug report](https://github.com/OctoPrint/OctoPrint/issues/new?template=bug_report.yml).
|
||||
|
||||
Before you do that for the first time though please take a moment to read the
|
||||
following section *completely* and also follow the instructions in the
|
||||
@@ -71,12 +62,12 @@ following section *completely* and also follow the instructions in the
|
||||
1. **Make sure you are at the right location**. This is the bug tracker
|
||||
of the official version of OctoPrint, which is the 3D print server and
|
||||
corresponding web interface itself.
|
||||
|
||||
|
||||
**OctoPrint doesn't manage your network connection or your webcam nor
|
||||
can it fix your printer not getting detected as a serial interface** -
|
||||
if you have any kinds of problems with that, get in touch on the
|
||||
can it fix your printer not getting detected as a serial interface** -
|
||||
if you have any kinds of problems with that, get in touch on the
|
||||
[community forum](https://community.octoprint.org).
|
||||
|
||||
|
||||
**This is not the bug tracker of OctoPi**, which is the preconfigured
|
||||
Raspberry Pi image including OctoPrint among other things - that one can be found
|
||||
[here](https://github.com/guysoft/OctoPi). If you have any kind of specific
|
||||
@@ -118,160 +109,28 @@ following section *completely* and also follow the instructions in the
|
||||
it is the same as your's, it actually behaves the same as your's. E.g. if someone gives steps
|
||||
to reproduce his bug that looks like your's, reproduce the bug like that if possible,
|
||||
and only add a "me too" if you actually can reproduce the same
|
||||
issue. Also **provide all information** as [described below](#what-should-i-include-in-a-bug-report)
|
||||
issue. Also **provide all information like logs, versions, different reproduction steps**
|
||||
and whatever was additionally requested over the course of the ticket
|
||||
even if you "only" add to an existing ticket. The more information available regarding a bug, the higher
|
||||
the chances of reproducing and solving it. But "me too" on an actually unrelated ticket
|
||||
makes it more difficult due to on top of having to figure out the original problem
|
||||
there's now also a [red herring](https://en.wikipedia.org/wiki/Red_herring) interfering - so please be
|
||||
very diligent here!
|
||||
|
||||
If in doubt about any of the above - get in touch on the [community forum](https://community.octoprint.org)
|
||||
instead of opening a ticket here. If you are actually running into a bug, we'll figure it out together
|
||||
|
||||
If in doubt about any of the above - get in touch on the [community forums](https://community.octoprint.org)
|
||||
instead of opening a ticket here. If you are actually running into a bug, we'll figure it out together
|
||||
there.
|
||||
|
||||
|
||||
### What should I include in a bug report?
|
||||
|
||||
First of all make sure your use **a descriptive title**. "It doesn't work"
|
||||
and similar unspecific complaints are NOT descriptive titles.
|
||||
|
||||
**Always use the following template, even if only adding a "me too" to an
|
||||
existing ticket**:
|
||||
Always fill out the [reporting form](https://github.com/OctoPrint/OctoPrint/issues/new?template=bug_report.yml) **completely** and include as much
|
||||
information as possible.
|
||||
|
||||
```
|
||||
<!--
|
||||
READ THE FOLLOWING FIRST:
|
||||
|
||||
If not already done, please read the the Contribution Guidelines that
|
||||
are linked to the right under "Helpful resources" > "Contributing".
|
||||
|
||||
Also read the FAQ: https://faq.octoprint.org
|
||||
|
||||
This is a bug and feature tracker, please only use it to report bugs
|
||||
or request features within OctoPrint (not OctoPi, not any OctoPrint
|
||||
plugins and not unofficial OctoPrint versions).
|
||||
|
||||
Do not seek support here ("I need help with ...", "I have a
|
||||
question ..."), that belongs on the community forum at
|
||||
community.octoprint.org, NOT here.
|
||||
|
||||
Mark requests with a "[Request]" prefix in the title please. For bug
|
||||
reports fully fill out the bug reporting template (if you don't know
|
||||
where to find some information - it's all described in the Contribution
|
||||
Guidelines linked up there in the big yellow box).
|
||||
|
||||
When reporting a bug do NOT delete ANY lines from the template.
|
||||
|
||||
Make sure any bug you want to report is still present with the CURRENT
|
||||
OctoPrint version and that it does not vanish when you start OctoPrint
|
||||
in safe mode - how to do that is also explained in the Contribution
|
||||
Guidelines linked up there in the big yellow box.
|
||||
|
||||
Thank you!
|
||||
-->
|
||||
|
||||
#### What were you doing?
|
||||
|
||||
<!--
|
||||
Please be as specific as possible here. The maintainers will need to
|
||||
reproduce your issue in order to fix it and that is not possible if they
|
||||
don't know what you did to get it to happen in the first place.
|
||||
|
||||
Ideally provide exact steps to follow in order to reproduce your problem:
|
||||
-->
|
||||
|
||||
1. ...
|
||||
2. ...
|
||||
3. ...
|
||||
|
||||
<!--
|
||||
If you encountered a problem with specific files of any sorts, make sure
|
||||
to also include a link to a file with which to reproduce the problem.
|
||||
-->
|
||||
|
||||
#### What did you expect to happen?
|
||||
|
||||
#### What happened instead?
|
||||
|
||||
#### Did the same happen when running OctoPrint in safe mode?
|
||||
|
||||
<!--
|
||||
Test if you can reproduce your problem in safe mode. You can find information
|
||||
on how to enable safe mode in the Contribution Guidelines.
|
||||
|
||||
If you can't reproduce in safe mode, this is a bug with one of your
|
||||
installed third party plugins. Don't open a ticket here!
|
||||
|
||||
If you can't test this in safe mode, state why.
|
||||
-->
|
||||
|
||||
#### Version of OctoPrint
|
||||
|
||||
<!--
|
||||
Can be found in the lower left corner of the web interface. ALWAYS INCLUDE.
|
||||
-->
|
||||
|
||||
#### Operating System running OctoPrint
|
||||
|
||||
<!--
|
||||
OctoPi, Linux, Windows, MacOS, something else? With version please.
|
||||
OctoPi's version can be found in /etc/octopi_version or in the lower left
|
||||
corner of the web interface.
|
||||
-->
|
||||
|
||||
#### Printer model & used firmware incl. version
|
||||
|
||||
<!--
|
||||
If applicable, always include if unsure.
|
||||
-->
|
||||
|
||||
#### Browser and version of browser, operating system running browser
|
||||
|
||||
<!--
|
||||
If applicable, always include if unsure.
|
||||
-->
|
||||
|
||||
#### Link to octoprint.log
|
||||
|
||||
<!--
|
||||
On gist.github.com or pastebin.com. ALWAYS INCLUDE and never truncate.
|
||||
|
||||
The Contribution Guidelines tell you where to find that.
|
||||
-->
|
||||
|
||||
#### Link to contents of terminal tab or serial.log
|
||||
|
||||
<!--
|
||||
On gist.github.com or pastebin.com. If applicable, always include if unsure or
|
||||
reporting communication issues. Never truncate.
|
||||
|
||||
serial.log is usually not written due to performance reasons and must be
|
||||
enabled explicitly. Provide at the very least the FULL contents of your
|
||||
terminal tab at the time of the bug occurrence, even if you do not have
|
||||
a serial.log (which the Contribution Guidelines tell you where to find).
|
||||
-->
|
||||
|
||||
#### Link to contents of Javascript console in the browser
|
||||
|
||||
<!--
|
||||
On gist.github.com or pastebin.com or alternatively a screenshot. If applicable -
|
||||
always include if unsure or reporting UI issues.
|
||||
|
||||
The Contribution Guidelines tell you where to find that.
|
||||
-->
|
||||
|
||||
#### Screenshot(s)/video(s) showing the problem:
|
||||
|
||||
<!--
|
||||
If applicable. Always include if unsure or reporting UI issues.
|
||||
-->
|
||||
|
||||
I have read the FAQ.
|
||||
```
|
||||
|
||||
Copy-paste this template **completely** (or use the version that gets pre-filled
|
||||
into the "new issue" form). Do not skip any lines or the bot *will* complain! Provide
|
||||
all requested information or your ticket will be closed.
|
||||
Provide the same kind and amount of information also when you are just adding on to an
|
||||
existing ticket!
|
||||
|
||||
### Where can I find which version and branch I'm on?
|
||||
|
||||
@@ -287,9 +146,10 @@ See [How to open the Javascript Console in different browsers](https://webmaster
|
||||
|
||||
## Setting up a development environment
|
||||
|
||||
See [the corresponding chapter in the documentation](http://docs.octoprint.org/en/master/development/index.html#setting-up-a-development-environment).
|
||||
This also includes information on how to run the test suite and how to build
|
||||
the documentation.
|
||||
See [the corresponding chapter in the documentation](https://docs.octoprint.org/en/master/development/environment.html).
|
||||
This also includes information on how to run the test suite and how to build
|
||||
the documentation, the bundled virtual printer plugin and OctoPrint's versioning
|
||||
and branching strategy.
|
||||
|
||||
## Pull requests
|
||||
|
||||
@@ -297,11 +157,12 @@ the documentation.
|
||||
consider if it wouldn't be better suited for a plugin.** As a general rule
|
||||
of thumb, any feature that is only of interest to a small sub group should
|
||||
be moved into a plugin. If the current plugin system doesn't allow you to
|
||||
implement your feature as a plugin, create a "Brainstorming" ticket to get
|
||||
implement your feature as a plugin, please get in touch on the
|
||||
[forums](https://community.octoprint.org/c/development) to get
|
||||
the discussion going on how best to solve *this* in OctoPrint's plugin
|
||||
system - maybe that's the actual PR you have been waiting for to contribute :)
|
||||
2. If you plan to make **any large or otherwise disruptive changes to the
|
||||
code or appearance, please get in touch on the
|
||||
code or appearance, please get in touch on the
|
||||
[forums](https://community.octoprint.org/c/development)** first so
|
||||
that we can determine if it's a good time for your specific pull
|
||||
request. It might be that we're currently in the process of making
|
||||
@@ -310,19 +171,20 @@ the documentation.
|
||||
just cause unnecessary work and frustration for everyone or
|
||||
possibly get the PR rejected.
|
||||
3. Create your pull request **from a custom branch** on your end (e.g.
|
||||
`dev/myNewFeature`)[1].
|
||||
`improve/myNewFeature`)[1].
|
||||
4. Create your pull request **only against the `maintenance` or `devel` branch**:
|
||||
* if it's a bug fix for a bug in the current stable version, an improvement of existing functionality or a
|
||||
*small* new feature (e.g. a new hook, a new config flag, ...): `maintenance` branch
|
||||
* otherwise: `devel` branch
|
||||
* if it's a bug fix for a bug in the current stable version, an improvement of existing functionality or a
|
||||
*small* backwards compatible new feature (e.g. a new hook, a new config flag, ...): `maintenance` branch
|
||||
* if it's a bigger backwards compatible new feature: please [get in touch](https://community.octoprint.org/c/development) first to avoid
|
||||
wasting work that doesn't match the current direction of the project or implement as a plugin.
|
||||
* if it's any breaking backwards incompatible change: `devel` branch. In case of big changes, [get in touch](https://community.octoprint.org/c/development) first.
|
||||
5. Create **one pull request per feature/bug fix**.
|
||||
6. Make sure there are **only relevant changes** included in your PR. No
|
||||
changes to unrelated files, no additional files that don't belong (e.g.
|
||||
commits of your full virtual environment). Make sure your PR consists
|
||||
**ideally of only one commit** (use git's rebase and squash functionality).
|
||||
7. Make sure you **follow the current coding style**. This means:
|
||||
* Tabs instead of spaces in the Python files[2]
|
||||
* Spaces instead of tabs in the JavaScript sources
|
||||
* Spaces for indenting and alignment, indentation width 4.
|
||||
* English language (code, variables, comments, ...)
|
||||
* Comments where necessary: Tell *why* the code does something like it does
|
||||
it, structure your code
|
||||
@@ -333,29 +195,41 @@ the documentation.
|
||||
from experiments).
|
||||
8. Ensure your changes **pass the existing unit tests**. PRs that break
|
||||
those cannot be accepted. You can run the unit tests locally (after
|
||||
[initial development environment setup with "develop" dependencies](http://docs.octoprint.org/en/master/development/index.html#setting-up-a-development-environment))
|
||||
[initial development environment setup with "develop" dependencies](https://docs.octoprint.org/en/master/development/environment.html))
|
||||
by running
|
||||
|
||||
|
||||
```
|
||||
nosetests --with-doctest
|
||||
pytest
|
||||
```
|
||||
|
||||
in the OctoPrint checkout folder. A [travis build](https://travis-ci.org/foosel/OctoPrint)
|
||||
is also setup so that if the tests should fail, your PR will be marked
|
||||
|
||||
in the OctoPrint checkout folder. An [automatic build workflow](https://github.com/OctoPrint/OctoPrint/actions?query=workflow%3ABuild)
|
||||
is also setup so that if the tests should fail, your PR will be marked
|
||||
accordingly.
|
||||
9. **Test your changes thoroughly**. That also means testing with usage
|
||||
scenarios you don't normally use, e.g. if you only use access control, test
|
||||
without and vice versa. If you only test with your printer, test with the
|
||||
virtual printer and vice versa. State in your pull request how you tested
|
||||
your changes. Ideally **add unit tests** - OctoPrint severely lacks in that
|
||||
department, but we are trying to change that, so any new code already covered
|
||||
with a test suite helps a lot!
|
||||
10. In your pull request's description, **state what your pull request does**,
|
||||
9. Run the **pre-commit check suite** against your changes. You can run that (after
|
||||
[initial development environment setup with "develop" dependencies](https://docs.octoprint.org/en/master/development/environment.html))
|
||||
by running
|
||||
|
||||
```
|
||||
pre-commit run --hook-stage manual --all-files
|
||||
```
|
||||
|
||||
in the OctoPrint checkout folder. If you install the pre-commit hooks via
|
||||
`pre-commit install` (which you really should!) this will even be taken care of for you prior to committing.
|
||||
|
||||
An [automatic build workflow](https://github.com/OctoPrint/OctoPrint/actions?query=workflow%3ABuild)
|
||||
is in place that will run these checks - if they fail your PR will be marked accordingly.
|
||||
10. **Test your changes thoroughly**. That also means testing with usage
|
||||
scenarios you don't normally use. If you only test with your printer, test with the
|
||||
virtual printer and vice versa. State in your pull request how you tested
|
||||
your changes. Ideally **add unit tests** - OctoPrint severely lacks in that
|
||||
department, but we are trying to change that, so any new code already covered
|
||||
with a test suite helps a lot!
|
||||
11. In your pull request's description, **state what your pull request does**,
|
||||
as in, what feature does it implement, what bug does it fix. The more
|
||||
thoroughly you explain your intent behind the PR here, the higher the
|
||||
chances it will get merged fast. There is a template provided below
|
||||
that can help you here.
|
||||
11. Don't forget to **add yourself to the [AUTHORS](./AUTHORS.md)
|
||||
12. Don't forget to **add yourself to the [AUTHORS](./AUTHORS.md)
|
||||
file** :)
|
||||
|
||||
Template to use for Pull Request descriptions:
|
||||
@@ -374,81 +248,13 @@ Template to use for Pull Request descriptions:
|
||||
#### Further notes
|
||||
```
|
||||
|
||||
## How is OctoPrint versioned?
|
||||
|
||||
See [the corresponding chapter in the documentation](https://docs.octoprint.org/en/master/development/versioning.html).
|
||||
|
||||
## What do the branches mean?
|
||||
|
||||
There are three main branches in OctoPrint:
|
||||
|
||||
* `master`: The master branch always contains the current stable release. It
|
||||
is *only* updated on new releases. Will have a version number following
|
||||
the scheme `<x>.<y>.<z>` (e.g. `1.2.9`) or - if it's absolutely necessary to
|
||||
add a commit after release to this branch - `<x>.<y>.<z>.post<commits since x.y.z>`
|
||||
(e.g. `1.2.9.post1`).
|
||||
* `maintenance`: Improvements and fixes of the current release that make up
|
||||
the next release go here. More or less continuously updated. You can consider
|
||||
this a preview of the next release version. It should be very stable at all
|
||||
times. Anything you spot in here helps tremendously with getting a rock solid
|
||||
next stable release, so if you want to help out development, running the
|
||||
`maintenance` branch and reporting back anything you find is a very good way
|
||||
to do that. Will usually have a version number following the scheme
|
||||
`<x>.<y>.<z+1>.dev<commits since increase of z>` for an OctoPrint version of `<x>.<y>.<z>`
|
||||
(e.g. `1.2.10.dev12`).
|
||||
* `devel`: Ongoing development of new features that will go into the next bigger
|
||||
release (MINOR version number increases) will happen on this branch. Usually
|
||||
kept stable, sometimes stuff can break though or lose backwards compatibility
|
||||
temporarily. Can be considered the "bleeding edge". All PRs should target
|
||||
*this* branch. Important improvements and fixes from PRs here are backported to
|
||||
`maintenance` as needed. Will usually have a version number following the
|
||||
scheme `<x>.<y+1>.0.dev<commits since increase of y>` for a current OctoPrint version
|
||||
of `<x>.<y>.<z>` (e.g. `1.3.0.dev123`).
|
||||
* `rc/maintenance`: This branch is reserved for future releases that have graduated from
|
||||
the `maintenance` branch and are now being pushed on the "Maintenance"
|
||||
pre release channel for further testing. Version number follows the scheme
|
||||
`<x>.<y>.<z>rc<n>` (e.g. `1.2.9rc1`).
|
||||
* `staging/maintenance`: Any preparation for potential follow-up RCs takes place here.
|
||||
Version number follows the scheme `<x>.<y>.<z>rc<n+1>.dev<commits since increase of n>` (e.g.
|
||||
`1.2.9rc1.dev3`) for a current Maintenance RC of `<x>.<y>.<z>rc<n>`.
|
||||
* `rc/devel`: This branch is reserved for future releases that have graduated from
|
||||
the `devel` branch and are now being pushed on the "Devel" pre release channel
|
||||
for further testing. Version number follows the scheme `<x>.<y+1>.0rc<n>` (e.g. `1.3.0rc1`)
|
||||
for a current stable OctoPrint version of `<x>.<y>.<z>`.
|
||||
* `staging/devel`: Any preparation for potential follow-up Devel RCs takes place
|
||||
here. Version number follows the scheme `<x>.<y>.0rc<n+1>.dev<commits since increase of n>` (e.g.
|
||||
`1.3.0rc1.dev12`) for a current Devel RC of `<x>.<y>.0rc<n>`.
|
||||
|
||||
Additionally, from time to time you might see other branches pop up in the repository.
|
||||
Those usually have one of the following prefixes:
|
||||
|
||||
* `fix/...`: Fixes under development that are to be merged into the `maintenance`
|
||||
and `devel` branches.
|
||||
* `improve/...`: Improvements under development that are to be merged into the
|
||||
`maintenance` and `devel` branches.
|
||||
* `dev/...` or `feature/...`: New functionality under development that is to be merged
|
||||
into the `devel` branch.
|
||||
|
||||
There is also the `gh-pages` branch, which holds OctoPrint's web page, and a few
|
||||
older development branches that are slowly being migrated or deleted.
|
||||
|
||||
## How OctoPrint is versioned
|
||||
|
||||
OctoPrint follows the [semantic versioning scheme](http://semver.org/) of **MAJOR.MINOR.PATCH**.
|
||||
|
||||
The **PATCH** version number is the one increasing most often due to OctoPrint's maintenance releases.
|
||||
Releases that only change the patch number indicate that they contain bug fixes and small improvements
|
||||
of existing functionality. Example: 1.2.8 to 1.2.9.
|
||||
|
||||
The **MINOR** version number increases with releases that add a lot of new functionality and
|
||||
large features. Example: 1.2.x to 1.3.0.
|
||||
|
||||
Finally, the **MAJOR** version number increases if there are breaking API changes that concern any of the
|
||||
documented interfaces (REST API, plugin interfaces, ...). So far this hasn't happened. Example: 1.x.y to 2.0.0.
|
||||
|
||||
OctoPrint's version numbers are automatically generated using [versioneer](https://github.com/warner/python-versioneer)
|
||||
and depend on the selected git branch, nearest git tag and commits. The generated version number
|
||||
should always be [PEP440](https://www.python.org/dev/peps/pep-0440/) compatible. Unless a git tag
|
||||
is used for version number determination, the version number will also contain the git hash within
|
||||
the local version identifier to allow for an exact determination of the active code base
|
||||
(e.g. `1.2.9.dev68+g46c7a9c`). Additionally, instances with active uncommitted changes will contain
|
||||
`.dirty` in the local version identifier.
|
||||
See [the corresponding chapter in the documentation](https://docs.octoprint.org/en/master/development/branches.html).
|
||||
|
||||
## History
|
||||
|
||||
@@ -477,14 +283,14 @@ the local version identifier to allow for an exact determination of the active c
|
||||
* 2018-03-29: "Where to find version numbers" is now located on the FAQ
|
||||
* 2018-10-18: Allow PRs against `maintenance` branch for improvements and small
|
||||
new features, suggest getting in touch on the forum for larger changes
|
||||
* 2020-08-10: Update versioning scheme and PR instructions
|
||||
* 2020-09-23: Move branch & versioning into development docs
|
||||
* 2020-10-07: Introduce `pre-commit`
|
||||
* 2021-02-04: Issue forms! \o/
|
||||
* 2020-03-04: Correct issue forms link
|
||||
|
||||
## Footnotes
|
||||
* [1] - If you are wondering why, the problem is that anything that you add
|
||||
to your PR's branch will also become part of your PR, so if you create a
|
||||
PR from your version of `devel` chances are high you'll add changes to the
|
||||
PR that do not belong to the PR.
|
||||
* [2] - Yes, we know that this goes against PEP-8. OctoPrint started out as
|
||||
a fork of Cura and hence stuck to the coding style found therein. Changing
|
||||
it now would make the history and especially `git blame` completely
|
||||
unusable, so for now we'll have to deal with it (this decision might be
|
||||
revisited in the future).
|
||||
@@ -1,13 +1,20 @@
|
||||
# OctoPrint
|
||||
<p align="center"><img src="https://octoprint.org/assets/img/logo.png" alt="OctoPrint's logo" /></p>
|
||||
|
||||
<h1 align="center">OctoPrint</h1>
|
||||
|
||||

|
||||

|
||||

|
||||
[](https://community.octoprint.org)
|
||||
[](https://discord.octoprint.org)
|
||||
[](https://twitter.com/OctoPrint3d)
|
||||
|
||||
<p align="center">
|
||||
<img src="https://img.shields.io/github/v/release/OctoPrint/OctoPrint?logo=github&logoColor=white" alt="GitHub release"/>
|
||||
<img src="https://img.shields.io/pypi/v/OctoPrint?logo=python&logoColor=white" alt="PyPI"/>
|
||||
<img src="https://img.shields.io/github/workflow/status/OctoPrint/OctoPrint/Build" alt="Build status"/>
|
||||
<a href="https://community.octoprint.org"><img src="https://img.shields.io/discourse/users?logo=discourse&logoColor=white&server=https%3A%2F%2Fcommunity.octoprint.org" alt="Community Forum"/></a>
|
||||
<a href="https://discord.octoprint.org"><img src="https://img.shields.io/discord/704958479194128507?label=discord&logo=discord&logoColor=white" alt="Discord"/></a>
|
||||
<a href="https://twitter.com/OctoPrint3d"><img src="https://img.shields.io/twitter/follow/OctoPrint3d.svg?style=social&label=Follow" alt="Twitter Follow"/></a>
|
||||
<a href="https://octoprint.org/conduct/"><img src="https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg" alt="Contributor Covenant"/></a>
|
||||
<a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg" alt="Code style: black"/></a>
|
||||
<a href="https://github.com/prettier/prettier"><img src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square" alt="Code style: prettier"/></a>
|
||||
<a href="https://pycqa.github.io/isort/"><img src="https://img.shields.io/badge/%20imports-isort-%231674b1" alt="Imports: isort"/></a>
|
||||
<a href="https://github.com/pre-commit/pre-commit"><img src="https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white" alt="pre-commit"/></a>
|
||||
</p>
|
||||
|
||||
OctoPrint provides a snappy web interface for controlling consumer 3D printers. It is Free Software
|
||||
and released under the [GNU Affero General Public License V3](http://www.gnu.org/licenses/agpl.html).
|
||||
@@ -27,7 +34,7 @@ The official plugin repository can be reached at [plugins.octoprint.org](https:/
|
||||
**OctoPrint's development wouldn't be possible without the [financial support by its community](https://octoprint.org/support-octoprint/?utm_source=github&utm_medium=readme).
|
||||
If you enjoy OctoPrint, please consider becoming a regular supporter!**
|
||||
|
||||

|
||||

|
||||
|
||||
You are currently looking at the source code repository of OctoPrint. If you already installed it
|
||||
(e.g. by using the Raspberry Pi targeted distribution [OctoPi](https://github.com/guysoft/OctoPi)) and only
|
||||
@@ -56,7 +63,7 @@ For information about how to go about submitting bug reports or pull requests, p
|
||||
Installation instructions for installing from source for different operating
|
||||
systems can be found [on the forum](https://community.octoprint.org/tags/c/support/guides/15/setup).
|
||||
|
||||
If you want to run OctoPrint on a Raspberry Pi, you might want to take a look at [OctoPi](https://github.com/guysoft/OctoPi)
|
||||
If you want to run OctoPrint on a Raspberry Pi, you really should take a look at [OctoPi](https://github.com/guysoft/OctoPi)
|
||||
which is a custom SD card image that includes OctoPrint plus dependencies.
|
||||
|
||||
The generic steps that should basically be done regardless of operating system
|
||||
@@ -69,13 +76,6 @@ you already have Python 2.7, 3.6 or 3.7, pip and virtualenv and their dependenci
|
||||
parameter, e.g. `virtualenv --python=python3 venv`.
|
||||
2. Install OctoPrint *into that virtual environment*: `./venv/bin/pip install OctoPrint`
|
||||
|
||||
Or alternatively, for an install from source:
|
||||
|
||||
1. Checkout OctoPrint: `git clone https://github.com/OctoPrint/OctoPrint.git`
|
||||
2. Change into the OctoPrint folder: `cd OctoPrint`
|
||||
3. Create a user-owned virtual environment therein: `virtualenv venv`
|
||||
4. Install OctoPrint *into that virtual environment*: `./venv/bin/pip install .`
|
||||
|
||||
You may then start the OctoPrint server via `/path/to/OctoPrint/venv/bin/octoprint`, see [Usage](#usage)
|
||||
for details.
|
||||
|
||||
|
||||
+1
-1
@@ -6,6 +6,6 @@ Always update to the latest version of OctoPrint to keep up with security patche
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Email to security@octoprint.org.
|
||||
Email to security@octoprint.org.
|
||||
|
||||
For the sake of the userbase of OctoPrint please always disclose responsibly and with a 90+ day window.
|
||||
+25
-9
@@ -6,35 +6,42 @@ thanks to everyone who contributed!
|
||||
|
||||
## Patrons & Sponsors
|
||||
|
||||
* Andrew Moorby
|
||||
* 3D-TECH
|
||||
* 3DPrinterOS
|
||||
* Arnljot Arntsen
|
||||
* Ash King
|
||||
* Ashley Merrick
|
||||
* BigTreeTech
|
||||
* Boris Hussein
|
||||
* Brad Jackson
|
||||
* BRANDON ROBERTSON
|
||||
* BuildBee
|
||||
* Christian Petropolis
|
||||
* Christian Wolf
|
||||
* Christoph Sigrist
|
||||
* Creality3D
|
||||
* D Brian Kimmel
|
||||
* Dana Voigt
|
||||
* DeltaMaker 3D Printers
|
||||
* Dennis Breining
|
||||
* Dennis Christilaw
|
||||
* Diana C Rodriguez
|
||||
* Douglas Floyd
|
||||
* Eric Betts
|
||||
* Ernesto Martinez
|
||||
* Franziska Kunsmann
|
||||
* GadgetAngel
|
||||
* George Robles
|
||||
* Greg Holloway
|
||||
* Hog Duske
|
||||
* Hugh Blemings
|
||||
* jean-claude migneault
|
||||
* Hopewell Medical Acupuncture Center
|
||||
* Jeremy Cole
|
||||
* Joe Pasqua
|
||||
* John Robinson
|
||||
* Joshua Wills
|
||||
* Julian Melo
|
||||
* Justin Kaufman
|
||||
* Kaile Riser
|
||||
* Kale Stedman
|
||||
* Kazuhiro Ogura
|
||||
* Kelly C McNiece
|
||||
* Kenneth Jiang
|
||||
* Kurt Wubbels
|
||||
* Kyle Menigoz
|
||||
@@ -45,21 +52,30 @@ thanks to everyone who contributed!
|
||||
* Michael Aumock
|
||||
* Miles Flavel
|
||||
* Mosaic Manufacturing
|
||||
* Nat Friedman
|
||||
* Neil R. Goldberg
|
||||
* Patrick McGinnis
|
||||
* Norman Jaffe
|
||||
* Ory Weaver
|
||||
* Patrick Glyré
|
||||
* Pete Barnwell
|
||||
* Prof Yuh Wen Chen
|
||||
* Raise3D
|
||||
* Randy C. Will
|
||||
* Ranjib Dey
|
||||
* Richard McGuire
|
||||
* Richard Michaud
|
||||
* Richard Stocks
|
||||
* Rigid3D
|
||||
* Robert Gusek
|
||||
* Ronald Griehsler
|
||||
* Sacha Telgenhof
|
||||
* Sebastien Andrivet
|
||||
* Stefan Krister
|
||||
* Steve Thompson
|
||||
* Stewart Danos
|
||||
* Sven Mueller
|
||||
* TH3D
|
||||
* The Spaghetti Detective
|
||||
* Ulderico Cirello
|
||||
* Ulrich Kempken
|
||||
|
||||
and 1943 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
|
||||
and 2341 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [GitHub Sponsors](https://github.com/users/foosel/sponsorship)!
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
* [AVLTree](https://gist.github.com/viking/2424106) (modified): GPL, LGPL (dual licensed)
|
||||
* [Babel JavaScript Support](https://github.com/mitsuhiko/babel/blob/master/contrib/babel.js): BSD
|
||||
* [@babel/polyfill](https://babeljs.io/docs/en/babel-polyfill/): MIT
|
||||
* [Bootstrap](http://getbootstrap.com/): Apache License 2.0
|
||||
* [Bootstrap Modal](http://jschr.github.io/bootstrap-modal/): Apache License 2.0
|
||||
* [Bootstrap Slider Knockout Binding](https://github.com/cosminstefanxp/bootstrap-slider-knockout-binding): MIT
|
||||
@@ -12,6 +13,7 @@
|
||||
* [css-element-queries](https://github.com/marcj/css-element-queries): MIT
|
||||
* [Detect Mobile Browser](http://detectmobilebrowsers.com/): Public Domain
|
||||
* [Flot](http://www.flotcharts.org/): MIT
|
||||
* [HLS.js](https://github.com/video-dev/hls.js): Apache License 2.0
|
||||
* [JavaScript MD5](https://github.com/blueimp/JavaScript-MD5): MIT
|
||||
* [JQuery](http://jquery.com/): MIT
|
||||
* [JQuery Bootstrap Wizard](http://github.com/VinceG/twitter-bootstrap-wizard): MIT, GPL (dual licensed)
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
[tool.black]
|
||||
line-length = 90
|
||||
include = '''
|
||||
|
||||
(
|
||||
(
|
||||
src
|
||||
| tests
|
||||
| .github
|
||||
).*\.pyi?$
|
||||
)|(
|
||||
setup\.py
|
||||
)
|
||||
'''
|
||||
exclude = '''
|
||||
|
||||
(
|
||||
src/octoprint/vendor # we want to still be able to apply patches from upstream w/o
|
||||
# match issues
|
||||
)
|
||||
'''
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=383)}([function(t,e,n){"use strict";n.r(e);var r=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}};var a=i(r),o=a.right,s=a.left,c=o,u=function(t,e){null==e&&(e=l);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return a};function l(t,e){return[t,e]}var h=function(t,e,n){var r,i,a,o,s=t.length,c=e.length,u=new Array(s*c);for(null==n&&(n=l),r=a=0;r<s;++r)for(o=t[r],i=0;i<c;++i,++a)u[a]=n(o,e[i]);return u},f=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o<i;)isNaN(n=d(t[o]))||(c+=(r=n-s)*(n-(s+=r/++a)));else for(;++o<i;)isNaN(n=d(e(t[o],o,t)))||(c+=(r=n-s)*(n-(s+=r/++a)));if(a>1)return c/(a-1)},y=function(t,e){var n=p(t,e);return n?Math.sqrt(n):n},g=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},v=Array.prototype,m=v.slice,b=v.map,x=function(t){return function(){return t}},_=function(t){return t},k=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a},w=Math.sqrt(50),E=Math.sqrt(10),T=Math.sqrt(2),C=function(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=S(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a};function S(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=w?10:a>=E?5:a>=T?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=w?10:a>=E?5:a>=T?2:1)}function A(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=w?i*=10:a>=E?i*=5:a>=T&&(i*=2),e<t?-i:i}var M=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},O=function(){var t=_,e=g,n=M;function r(r){var i,a,o=r.length,s=new Array(o);for(i=0;i<o;++i)s[i]=t(r[i],i,r);var u=e(s),l=u[0],h=u[1],f=n(s,l,h);Array.isArray(f)||(f=A(l,h,f),f=k(Math.ceil(l/f)*f,h,f));for(var d=f.length;f[0]<=l;)f.shift(),--d;for(;f[d-1]>h;)f.pop(),--d;var p,y=new Array(d+1);for(i=0;i<=d;++i)(p=y[i]=[]).x0=i>0?f[i-1]:l,p.x1=i<d?f[i]:h;for(i=0;i<o;++i)l<=(a=s[i])&&a<=h&&y[c(f,a,0,d)].push(r[i]);return y}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:x(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:x([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?x(m.call(t)):x(t),r):n},r},D=function(t,e,n){if(null==n&&(n=d),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}},N=function(t,e,n){return t=b.call(t,d).sort(r),Math.ceil((n-e)/(2*(D(t,.75)-D(t,.25))*Math.pow(t.length,-1/3)))},B=function(t,e,n){return Math.ceil((n-e)/(3.5*y(t)*Math.pow(t.length,-1/3)))},L=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r},P=function(t,e)Line truncated
|
||||
@@ -145,6 +145,31 @@ Temperature offset
|
||||
- Number
|
||||
- Temperature offset for the printer's heated bed.
|
||||
|
||||
.. _sec-api-datamodel-printer-resends:
|
||||
|
||||
Resend stats
|
||||
------------
|
||||
|
||||
.. list-table::
|
||||
:widths: 15 5 10 30
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Multiplicity
|
||||
- Type
|
||||
- Description
|
||||
* - ``count``
|
||||
- 1
|
||||
- int
|
||||
- Number of resend requests received since connecting.
|
||||
* - ``transmitted``
|
||||
- 1
|
||||
- int
|
||||
- Number of transmitted lines since connecting.
|
||||
* - ``ratio``
|
||||
- 1
|
||||
- int
|
||||
- Percentage of resend requests vs transmitted lines. Value between 0 and 100.
|
||||
|
||||
.. _sec-api-datamodel-jobs:
|
||||
|
||||
|
||||
+13
-5
@@ -14,7 +14,8 @@ Retrieve all files
|
||||
.. http:get:: /api/files
|
||||
|
||||
Retrieve information regarding all files currently available and regarding the disk space still available
|
||||
locally in the system.
|
||||
locally in the system. The results are cached for performance reasons. If you
|
||||
want to override the cache, supply the query parameter ``force`` and set it to ``true``.
|
||||
|
||||
By default only returns the files and folders in the root directory. If the query parameter ``recursive``
|
||||
is provided and set to ``true``, returns all files and folders.
|
||||
@@ -234,6 +235,7 @@ Retrieve all files
|
||||
"free": "3.2GB"
|
||||
}
|
||||
|
||||
:param force: If set to ``true``, forces a refresh, overriding the cache.
|
||||
:param recursive: If set to ``true``, return all files and folders recursively. Otherwise only return items on same level.
|
||||
:statuscode 200: No error
|
||||
|
||||
@@ -245,7 +247,8 @@ Retrieve files from specific location
|
||||
.. http:get:: /api/files/(string:location)
|
||||
|
||||
Retrieve information regarding the files currently available on the selected `location` and -- if targeting
|
||||
the ``local`` location -- regarding the disk space still available locally in the system.
|
||||
the ``local`` location -- regarding the disk space still available locally in the system. The results are cached for performance reasons. If you
|
||||
want to override the cache, supply the query parameter ``force`` and set it to ``true``.
|
||||
|
||||
By default only returns the files and folders in the root directory. If the query parameter ``recursive``
|
||||
is provided and set to ``true``, returns all files and folders.
|
||||
@@ -305,6 +308,7 @@ Retrieve files from specific location
|
||||
:param location: The origin location from which to retrieve the files. Currently only ``local`` and ``sdcard`` are
|
||||
supported, with ``local`` referring to files stored in OctoPrint's ``uploads`` folder and ``sdcard``
|
||||
referring to files stored on the printer's SD card (if available).
|
||||
:param force: If set to ``true``, forces a refresh, overriding the cache.
|
||||
:param recursive: If set to ``true``, return all files and folders recursively. Otherwise only return items on same level.
|
||||
:statuscode 200: No error
|
||||
:statuscode 404: If `location` is neither ``local`` nor ``sdcard``
|
||||
@@ -319,7 +323,8 @@ Upload file or create folder
|
||||
Upload a file to the selected ``location`` or create a new empty folder on it.
|
||||
|
||||
Other than most of the other requests on OctoPrint's API which are expected as JSON, this request is expected as
|
||||
``Content-Type: multipart/form-data`` due to the included file upload.
|
||||
``Content-Type: multipart/form-data`` due to the included file upload. A ``Content-Length`` header specifying
|
||||
the full length of the request body is required as well.
|
||||
|
||||
To upload a file, the request body must at least contain the ``file`` form field with the
|
||||
contents and file name of the file to upload.
|
||||
@@ -341,6 +346,7 @@ Upload file or create folder
|
||||
Host: example.com
|
||||
X-Api-Key: abcdef...
|
||||
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryDeC2E3iWbTv1PwMC
|
||||
Content-Length: 430
|
||||
|
||||
------WebKitFormBoundaryDeC2E3iWbTv1PwMC
|
||||
Content-Disposition: form-data; name="file"; filename="whistle_v2.gcode"
|
||||
@@ -350,7 +356,7 @@ Upload file or create folder
|
||||
T0
|
||||
G21
|
||||
G90
|
||||
...
|
||||
|
||||
------WebKitFormBoundaryDeC2E3iWbTv1PwMC
|
||||
Content-Disposition: form-data; name="select"
|
||||
|
||||
@@ -400,6 +406,7 @@ Upload file or create folder
|
||||
Host: example.com
|
||||
X-Api-Key: abcdef...
|
||||
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryDeC2E3iWbTv1PwMC
|
||||
Content-Length: 263
|
||||
|
||||
------WebKitFormBoundaryDeC2E3iWbTv1PwMC
|
||||
Content-Disposition: form-data; name="file"; filename*=utf-8''20mm-%C3%BCml%C3%A4ut-b%C3%B6x.gcode
|
||||
@@ -409,7 +416,7 @@ Upload file or create folder
|
||||
T0
|
||||
G21
|
||||
G90
|
||||
...
|
||||
|
||||
------WebKitFormBoundaryDeC2E3iWbTv1PwMC--
|
||||
|
||||
.. sourcecode:: http
|
||||
@@ -440,6 +447,7 @@ Upload file or create folder
|
||||
Host: example.com
|
||||
X-Api-Key: abcdef...
|
||||
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryDeC2E3iWbTv1PwMD
|
||||
Content-Length: 246
|
||||
|
||||
------WebKitFormBoundaryDeC2E3iWbTv1PwMD
|
||||
Content-Disposition: form-data; name="foldername"
|
||||
|
||||
@@ -18,7 +18,7 @@ authorization workflow implemented by the bundled :ref:`Application Keys Plugin
|
||||
Clients are advised to implement the :ref:`Application Keys Plugin workflow <sec-bundledplugins-appkeys-workflow>` first and
|
||||
fallback on directing the user to manually supply the the user specific API key. The global key should rarely be used.
|
||||
|
||||
The API key must be supplied in the custom HTTP header ``X-Api-Key``, e.g.
|
||||
The API key must either be supplied in the custom HTTP header ``X-Api-Key``, e.g.
|
||||
|
||||
.. sourcecode:: http
|
||||
|
||||
@@ -26,6 +26,14 @@ The API key must be supplied in the custom HTTP header ``X-Api-Key``, e.g.
|
||||
Host: example.com
|
||||
X-Api-Key: abcdef...
|
||||
|
||||
or as a ``Bearer`` token in the ``Authorization`` header, e.g.
|
||||
|
||||
.. sourcecode:: http
|
||||
|
||||
GET /api/files HTTP/1.1
|
||||
Host: example.com
|
||||
Authorization: Bearer abcdef...
|
||||
|
||||
For testing purposes it is also possible to supply the API key via a query parameter ``apikey``, e.g.
|
||||
|
||||
.. sourcecode:: http
|
||||
|
||||
@@ -9,6 +9,7 @@ REST API
|
||||
|
||||
general.rst
|
||||
version.rst
|
||||
server.rst
|
||||
connection.rst
|
||||
files.rst
|
||||
job.rst
|
||||
|
||||
+11
-4
@@ -205,8 +205,10 @@ Retrieve information about the current job
|
||||
},
|
||||
"estimatedPrintTime": 8811,
|
||||
"filament": {
|
||||
"length": 810,
|
||||
"volume": 5.36
|
||||
"tool0": {
|
||||
"length": 810,
|
||||
"volume": 5.36
|
||||
}
|
||||
}
|
||||
},
|
||||
"progress": {
|
||||
@@ -249,5 +251,10 @@ Job information response
|
||||
* - ``state``
|
||||
- 1
|
||||
- String
|
||||
- A textual representation of the current state of the job, i.e. "Operational", "Printing", "Pausing", "Paused",
|
||||
"Cancelling", "Error" or "Offline".
|
||||
- A textual representation of the current state of the job or connection, e.g. "Operational", "Printing", "Pausing", "Paused",
|
||||
"Cancelling", "Error", "Offline", "Offline after error", "Opening serial connection", ... -- please note
|
||||
that this list is not exhaustive!
|
||||
* - ``error``
|
||||
- 0..1
|
||||
- String
|
||||
- Any error message for the job or connection, only set if there has been an error.
|
||||
@@ -68,6 +68,23 @@ OctoPrint's SockJS socket also accepts two commands from the client to the serve
|
||||
"auth": "someuser:LGZ0trf8By"
|
||||
}
|
||||
|
||||
An example for an auth roundtrip with only an API key using the :ref:`JS Client Library <sec-jsclientlib-base>`
|
||||
can be found :ref:`here <sec-jsclient-socket-authsample>`.
|
||||
|
||||
.. mermaid::
|
||||
|
||||
sequenceDiagram
|
||||
participant Client
|
||||
participant API
|
||||
participant Websocket
|
||||
|
||||
Client->>API: GET /api/login?passive=true&apikey=...
|
||||
API->>Client: { name: ..., session: ..., ... }
|
||||
|
||||
note over Client: auth = name ":" session
|
||||
|
||||
Client->>Websocket: { "auth": auth }
|
||||
|
||||
* ``throttle``: Usually, OctoPrint will push the general state update
|
||||
in the ``current`` message twice per second. For some clients that might still
|
||||
be too fast, so they can signal a different factor to OctoPrint utilizing the
|
||||
@@ -177,6 +194,15 @@ Data model
|
||||
- 0..*
|
||||
- List of String
|
||||
- Lines for the serial communication log (special messages)
|
||||
* - ``resends``
|
||||
- 1
|
||||
- :ref:`Resend stats <sec-api-datamodel-printer-resends>`
|
||||
- Current resend statistics for the connection
|
||||
* - ``plugins``
|
||||
- 0..1
|
||||
- Map of plugin identifiers to additional data
|
||||
- Additional data injected by plugins via the :ref:`octoprint.printer.additional_state_data hook <sec-plugins-hooks-plugin-printer-additional_state_data>`,
|
||||
indexed by plugin identifier. Structure of additional data is determined by the plugin.
|
||||
|
||||
.. _sec-api-push-datamodel-event:
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
.. _sec-api-server:
|
||||
|
||||
******************
|
||||
Server information
|
||||
******************
|
||||
|
||||
.. http:get:: /api/server
|
||||
|
||||
.. versionadded:: 1.5.0
|
||||
|
||||
Retrieve information regarding server status. Returns a JSON object with two keys, ``version`` containing
|
||||
the server version and ``safemode`` containing one of ``settings``, ``incomplete_startup`` or ``flag``
|
||||
to indicate the reason the server is running in safe mode, or the boolean value of ``false`` if it's not
|
||||
running in safe mode.
|
||||
|
||||
**Example Request**
|
||||
|
||||
.. sourcecode:: http
|
||||
|
||||
GET /api/server HTTP/1.1
|
||||
Host: example.com
|
||||
X-Api-Key: abcdef...
|
||||
|
||||
**Example Response**
|
||||
|
||||
.. sourcecode:: http
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"server": "1.5.0",
|
||||
"safemode": "incomplete_startup"
|
||||
}
|
||||
|
||||
:statuscode 200: No error
|
||||
+2
-112
@@ -354,84 +354,22 @@ Data model
|
||||
==========
|
||||
|
||||
The data model on the settings API mostly reflects the contents of
|
||||
:ref:`config.yaml <sec-configuration-config_yaml>`. The settings tree
|
||||
returned by the API contains the following fields, which are directly
|
||||
mapped from the same fields in ``config.yaml`` unless otherwise noted:
|
||||
:ref:`config.yaml <sec-configuration-config_yaml>`, which are directly
|
||||
mapped, with the following exceptions:
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
|
||||
* - Field
|
||||
- Notes
|
||||
* - ``api.enabled``
|
||||
-
|
||||
* - ``api.key``
|
||||
- Only maps to ``api.key`` in ``config.yaml`` if request is sent with admin rights, set to ``n/a`` otherwise.
|
||||
Starting with OctoPrint 1.3.3 setting this field via :ref:`the API <sec-api-settings-save>` is not possible,
|
||||
only :ref:`regenerating it <sec-api-settings-generateapikey>` is supported. Setting a custom value is only
|
||||
possible through `config.yaml`.
|
||||
* - ``api.allowCrossOrigin``
|
||||
-
|
||||
* - ``appearance.name``
|
||||
-
|
||||
* - ``appearance.color``
|
||||
-
|
||||
* - ``appearance.colorTransparent``
|
||||
-
|
||||
* - ``appearance.defaultLanguage``
|
||||
-
|
||||
* - ``appearance.showFahrenheitAlso``
|
||||
-
|
||||
* - ``feature.gcodeViewer``
|
||||
- Maps to ``gcodeViewer.enabled`` in ``config.yaml``
|
||||
* - ``feature.sizeThreshold``
|
||||
- Maps to ``gcodeViewer.sizeThreshold`` in ``config.yaml``
|
||||
* - ``feature.mobileSizeThreshold``
|
||||
- Maps to ``gcodeViewer.mobileSizeThreshold`` in ``config.yaml``
|
||||
* - ``feature.temperatureGraph``
|
||||
-
|
||||
* - ``feature.waitForStart``
|
||||
-
|
||||
* - ``feature.alwaysSendChecksum``
|
||||
-
|
||||
* - ``feature.neverSendChecksum``
|
||||
-
|
||||
* - ``feature.sdSupport``
|
||||
-
|
||||
* - ``feature.sdRelativePath``
|
||||
-
|
||||
* - ``feature.sdAlwaysAvailable``
|
||||
-
|
||||
* - ``feature.swallowOkAfterResend``
|
||||
-
|
||||
* - ``feature.repetierTargetTemp``
|
||||
-
|
||||
* - ``feature.externalHeatupDetection``
|
||||
-
|
||||
* - ``feature.keyboardControl``
|
||||
-
|
||||
* - ``feature.pollWatched``
|
||||
-
|
||||
* - ``feature.ignoreIdenticalResends``
|
||||
-
|
||||
* - ``feature.modelSizeDetection``
|
||||
-
|
||||
* - ``feature.firmwareDetection``
|
||||
-
|
||||
* - ``feature.printCancelConfirmation``
|
||||
-
|
||||
* - ``feature.blockWhileDwelling``
|
||||
-
|
||||
* - ``folder.uploads``
|
||||
-
|
||||
* - ``folder.timelapse``
|
||||
-
|
||||
* - ``folder.timelapseTmp``
|
||||
- Maps to ``folder.timelapse_tmp`` in ``config.yaml``
|
||||
* - ``folder.logs``
|
||||
-
|
||||
* - ``folder.watched``
|
||||
-
|
||||
* - ``plugins``
|
||||
- Plugin settings as available from ``config.yaml`` and :class:`~octoprint.plugin.SettingsPlugin` implementations
|
||||
* - ``printer.defaultExtrusionLength``
|
||||
@@ -446,8 +384,6 @@ mapped from the same fields in ``config.yaml`` unless otherwise noted:
|
||||
- Available serial ports
|
||||
* - ``serial.baudrateOptions``
|
||||
- Available serial baudrates
|
||||
* - ``serial.autoconnect``
|
||||
-
|
||||
* - ``serial.timeoutConnection``
|
||||
- Maps to ``serial.timeout.connection`` in ``config.yaml``
|
||||
* - ``serial.timeoutDetection``
|
||||
@@ -460,50 +396,18 @@ mapped from the same fields in ``config.yaml`` unless otherwise noted:
|
||||
- Maps to ``serial.timeout.temperatureTargetSet`` in ``config.yaml``
|
||||
* - ``serial.timeoutSdStatus``
|
||||
- Maps to ``serial.timeout.sdStatus`` in ``config.yaml``
|
||||
* - ``serial.log``
|
||||
-
|
||||
* - ``serial.additionalPorts``
|
||||
-
|
||||
* - ``serial.additionalBaudrates``
|
||||
-
|
||||
* - ``serial.longRunningCommands``
|
||||
-
|
||||
* - ``serial.checksumRequiringCommands``
|
||||
-
|
||||
* - ``serial.helloCommand``
|
||||
-
|
||||
* - ``serial.ignoreErrorsFromFirmware``
|
||||
-
|
||||
* - ``serial.disconnectOnErrors``
|
||||
-
|
||||
* - ``serial.triggerOkForM29``
|
||||
-
|
||||
* - ``serial.supportResendsWIthoutOk``
|
||||
-
|
||||
* - ``serial.maxTimeoutsIdle``
|
||||
- Maps to ``serial.maxCommunicationTimeouts.idle`` in ``config.yaml``
|
||||
* - ``serial.maxTimeoutsPrinting``
|
||||
- Maps to ``serial.maxCommunicationTimeouts.printing`` in ``config.yaml``
|
||||
* - ``serial.maxTimeoutsLong``
|
||||
- Maps to ``serial.maxCommunicationTimeouts.long`` in ``config.yaml``
|
||||
* - ``server.commands.systemShutdownCommand``
|
||||
-
|
||||
* - ``server.commands.systemRestartCommand``
|
||||
-
|
||||
* - ``server.commands.serverRestartCommand``
|
||||
-
|
||||
* - ``server.diskspace.warning``
|
||||
-
|
||||
* - ``server.diskspace.critical``
|
||||
-
|
||||
* - ``system.actions``
|
||||
- Whole subtree taken from ``config.yaml``
|
||||
* - ``system.events``
|
||||
- Whole subtree taken from ``config.yaml``
|
||||
* - ``temperature.profiles``
|
||||
- Whole subtree taken from ``config.yaml``
|
||||
* - ``temperature.cutoff``
|
||||
-
|
||||
* - ``terminalFilters``
|
||||
- Whole subtree taken from ``config.yaml``
|
||||
* - ``webcam.streamUrl``
|
||||
@@ -512,17 +416,3 @@ mapped from the same fields in ``config.yaml`` unless otherwise noted:
|
||||
- Maps to ``webcam.snapshot`` in ``config.yaml``
|
||||
* - ``webcam.ffmpegPath``
|
||||
- Maps to ``webcam.ffmpeg`` in ``config.yaml``
|
||||
* - ``webcam.bitrate``
|
||||
-
|
||||
* - ``webcam.ffmpegThreads``
|
||||
-
|
||||
* - ``webcam.ffmpegVideoCodec``
|
||||
-
|
||||
* - ``webcam.watermark``
|
||||
-
|
||||
* - ``webcam.flipH``
|
||||
-
|
||||
* - ``webcam.flipV``
|
||||
-
|
||||
* - ``webcam.rotate90``
|
||||
-
|
||||
+90
-2
@@ -6,8 +6,8 @@ Util
|
||||
|
||||
.. _sec-api-util-test:
|
||||
|
||||
Test paths or URLs
|
||||
==================
|
||||
Various tests
|
||||
=============
|
||||
|
||||
.. http:post:: /api/util/test
|
||||
|
||||
@@ -107,6 +107,15 @@ Test paths or URLs
|
||||
The ``resolution`` command returns :http:statuscode:`200` with a :ref:`Resolution test result <sec-api-util-datamodel-resolutiontestresult>`
|
||||
when the test could be performed. The status code of the response does NOT reflect the test result!
|
||||
|
||||
address
|
||||
Tests whether a provided address (or, if none is provided, the client's remote address) is
|
||||
a LAN address and if so returns the subnet specifier in CIDR format.
|
||||
|
||||
* ``address``: the address to test. If not set, the client's remote address will be used
|
||||
|
||||
The ``address`` command return :http:statuscode:`200` with a :ref:`Address test result <sec-api-util-datamodel-addresstestresult>`
|
||||
when the test could be performed. The status code of the response does NOT reflect the test result!
|
||||
|
||||
Requires the ``ADMIN`` permission.
|
||||
|
||||
**Example 1**
|
||||
@@ -320,6 +329,58 @@ Test paths or URLs
|
||||
"result": true
|
||||
}
|
||||
|
||||
**Example 8**
|
||||
|
||||
Test whether the client's address is a LAN address.
|
||||
|
||||
.. sourcecode:: http
|
||||
|
||||
POST /api/util/test HTTP/1.1
|
||||
Host: example.com
|
||||
X-Api-Key: abcdef...
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"command": "address"
|
||||
}
|
||||
|
||||
.. sourcecode:: http
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"address": "192.168.1.3",
|
||||
"is_lan_address": true,
|
||||
"subnet": "192.168.0.0/16"
|
||||
}
|
||||
|
||||
**Example 9**
|
||||
|
||||
Test whether ``8.8.8.8`` is a LAN address.
|
||||
|
||||
.. sourcecode:: http
|
||||
|
||||
POST /api/util/test HTTP/1.1
|
||||
Host: example.com
|
||||
X-Api-Key: abcdef...
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"command": "address",
|
||||
"address": "8.8.8.8"
|
||||
}
|
||||
|
||||
.. sourcecode:: http
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"address": "8.8.8.8",
|
||||
"is_lan_address": false
|
||||
}
|
||||
|
||||
:json command: The command to execute, currently either ``path`` or ``url``
|
||||
:json path: ``path`` command only: the path to test
|
||||
:json check_type: ``path`` command only: the type of path to test for, either ``file`` or ``dir``
|
||||
@@ -337,6 +398,7 @@ Test paths or URLs
|
||||
:json port: ``server`` command only: the port to test
|
||||
:json protocol: ``server`` command only: the protocol to test
|
||||
:json name: ``resolution`` command only: the host name to test
|
||||
:json address: ``address`` command only: the address to test
|
||||
:statuscode 200: No error occurred
|
||||
|
||||
.. _sec-api-util-datamodel:
|
||||
@@ -466,3 +528,29 @@ Resolution test result
|
||||
- 1
|
||||
- bool
|
||||
- ``true`` if the check passed.
|
||||
|
||||
.. _sec-api-util-datamodel-addresstestresult:
|
||||
|
||||
Address test result
|
||||
-------------------
|
||||
|
||||
.. list-table::
|
||||
:widths: 15 5 10 30
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Multiplicity
|
||||
- Type
|
||||
- Description
|
||||
* - ``address``
|
||||
- 1
|
||||
- string
|
||||
- The address that was tested.
|
||||
* - ``is_lan_address``
|
||||
- 1
|
||||
- bool
|
||||
- ``true`` if the address is a LAN address, false otherwise.
|
||||
* - ``subnet``
|
||||
- 0..1
|
||||
- string
|
||||
- The detected subnet, if address is a LAN address.
|
||||
@@ -6,7 +6,7 @@ Version information
|
||||
|
||||
.. http:get:: /api/version
|
||||
|
||||
Retrieve information regarding server and API version. Returns a JSON object with two keys, ``api`` containing
|
||||
Retrieve information regarding server and API version. Returns a JSON object with three keys, ``api`` containing
|
||||
the API version, ``server`` containing the server version, ``text`` containing the server version including
|
||||
the prefix ``OctoPrint `` (to determine that this is indeed a genuine OctoPrint instance).
|
||||
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
Action Command Notification support
|
||||
===================================
|
||||
|
||||
The OctoPrint Action Command Notification Support Plugin comes bundled with OctoPrint (starting with 1.4.1).
|
||||
.. versionadded:: 1.4.1
|
||||
|
||||
The OctoPrint Action Command Notification Support Plugin comes bundled with OctoPrint.
|
||||
|
||||
It allows firmware to trigger notifications users with the ``PLUGIN_ACTION_COMMAND_NOTIFICATION_SHOW`` permission
|
||||
using :ref:`action commands <sec-features-action_commands>` about relevant events. These notifications will be shown
|
||||
in the sidebar and if configured also as popup messages. The notifications in the sidebar panel can also be cleared
|
||||
by users with the ``PLUGIN_ACTION_COMMAND_NOTIFICATION_CLEAR` permission.
|
||||
by users with the ``PLUGIN_ACTION_COMMAND_NOTIFICATION_CLEAR`` permission.
|
||||
|
||||
.. _fig-bundledplugins-action_command_notification-example:
|
||||
.. figure:: ../images/bundledplugins-action_command_notification-example.png
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
Action Command Prompt support
|
||||
=============================
|
||||
|
||||
The OctoPrint Action Command Prompt Support Plugin comes bundled with OctoPrint (starting with 1.3.9).
|
||||
.. versionadded:: 1.3.9
|
||||
|
||||
The OctoPrint Action Command Prompt Support Plugin comes bundled with OctoPrint.
|
||||
|
||||
It allows firmware to trigger dialog prompts for logged in users using :ref:`action commands <sec-features-action_commands>`, e.g. to wait
|
||||
for user acknowledgement or allow the user to choose between options, and also to close the dialog again
|
||||
@@ -72,8 +74,7 @@ To display the :ref:`above dialog <fig-bundledplugins-action_command_prompt-exam
|
||||
//action:prompt_choice Filament swapped
|
||||
//action:prompt_show
|
||||
|
||||
If the user clicks the button, assuming a ``selection_command`` of ``M876 S{choice}`` is configured, OctoPrint
|
||||
will send back ``M876 S0`` (0-based index).
|
||||
If the user clicks the button, OctoPrint will send back ``M876 S0`` (0-based index).
|
||||
|
||||
A more complicated example with three options would be the following:
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
Announcement Plugin
|
||||
===================
|
||||
|
||||
The OctoPrint Announcement Plugin comes bundled with OctoPrint (starting with 1.2.11).
|
||||
.. versionadded:: 1.2.11
|
||||
|
||||
The OctoPrint Announcement Plugin comes bundled with OctoPrint.
|
||||
|
||||
It displays announcements fetched from OctoPrint's websites, such as important updates, release announcements, new
|
||||
plugins and similar. Through some manual configuration via ``config.yaml`` it also allows adding additional channels
|
||||
|
||||
@@ -3,7 +3,9 @@
|
||||
Application Keys Plugin
|
||||
=======================
|
||||
|
||||
The OctoPrint Application Keys Plugin comes bundled with OctoPrint (starting with version 1.3.10).
|
||||
.. versionadded:: 1.3.10
|
||||
|
||||
The OctoPrint Application Keys Plugin comes bundled with OctoPrint.
|
||||
|
||||
It implements a workflow for third party apps or clients to obtain an application specific API key from OctoPrint to interact with it
|
||||
on a user's behalf, via confirmation of the user through OctoPrint's web interface. Existing keys can be managed
|
||||
@@ -320,7 +322,7 @@ Key response
|
||||
- Multiplicity
|
||||
- Type
|
||||
- Description
|
||||
* - ``apikey``
|
||||
* - ``api_key``
|
||||
- 1
|
||||
- str
|
||||
- the API key generated for the application
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
Backup Plugin
|
||||
=============
|
||||
|
||||
.. versionadded:: 1.3.10
|
||||
|
||||
The OctoPrint Backup Plugin comes bundled with OctoPrint (starting with 1.3.10).
|
||||
|
||||
It allows the creation and restoration of backups of OctoPrint's settings, data and installed plugins [#]_.
|
||||
It allows the creation and restoration [#1]_ of backups of OctoPrint's settings, data and installed plugins [#2]_.
|
||||
|
||||
This allows easy migration
|
||||
to newly setup instances as well as making regular backups to prevent data loss.
|
||||
@@ -21,6 +23,19 @@ As long as plugins adhere to the standard of storing their data and settings in
|
||||
data will be part of the backup. Note that the backups made by the Backup Plugin will *not* be part of any backups -
|
||||
you'll need to persist the resulting zip files yourself!
|
||||
|
||||
.. _sec-bundledplugins-backup-configuration:
|
||||
|
||||
Configuring the plugin
|
||||
----------------------
|
||||
|
||||
The plugin supports the following configuration keys:
|
||||
|
||||
* ``restore_unsupported``: If the system you are installing OctoPrint on doesn't support restoring backups or you
|
||||
want to disable that feature for other reasons, set this to `true`. Alternatively you can also set the
|
||||
environment variable `OCTOPRINT_BACKUP_RESTORE_UNSUPPORTED` to `true`. OctoPrint will then disable the restore
|
||||
functionality. Under normal circumstances you should not have to touch this setting (OctoPrint will do its
|
||||
best to autodetect whether it's able to perform restores), thus it is not exposed in the Settings dialog.
|
||||
|
||||
.. _sec-bundledplugins-backup-cli:
|
||||
|
||||
Command line usage
|
||||
@@ -57,6 +72,135 @@ It adds two new commands, ``backup:backup`` and ``backup:restore``.
|
||||
|
||||
The ``backup:backup`` command can be useful in combination with a cronjob to create backups in regular intervals.
|
||||
|
||||
.. _sec-bundledplugins-backup-events:
|
||||
|
||||
Events
|
||||
------
|
||||
|
||||
*Events will not be triggered by CLI operations.*
|
||||
|
||||
plugin_backup_backup_created
|
||||
A new backup was created. On the push socket only available with a valid login session with ``Backup Access``
|
||||
permission.
|
||||
|
||||
Payload:
|
||||
|
||||
* ``name``: the name of the backup
|
||||
* ``path``: the path to the backup
|
||||
* ``excludes``: the list of parts excluded from the backup
|
||||
|
||||
.. versionadded:: 1.5.0
|
||||
|
||||
.. _sec-bundledplugins-backup-hooks:
|
||||
|
||||
Hooks
|
||||
-----
|
||||
|
||||
.. _sec-bundledplugins-backup-hooks-excludes:
|
||||
|
||||
octoprint.plugin.backup.additional_excludes
|
||||
+++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
.. py:function:: additional_excludes_hook(excludes, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.5.0
|
||||
|
||||
Use this to provide additional paths on your plugin's data folder to exclude from the backup. Your handler also
|
||||
get a list of currently excluded sub paths in the base folder, so you can react to them. E.g. exclude things
|
||||
in your data folder that relate to uploaded GCODE files if `uploads` is excluded, or exclude things that relate
|
||||
to timelapses if `timelapse` is excluded.
|
||||
|
||||
Expects a list of additional paths relative to your plugin's data folder. If you return a single `.`, your whole
|
||||
plugin's data folder will be excluded from the backup.
|
||||
|
||||
**Example 1**
|
||||
|
||||
The following example plugin will create two files ``foo.txt`` and ``bar.txt`` in its data folder, but flag
|
||||
``foo.txt`` as not to be backed up.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
import octoprint.plugin
|
||||
|
||||
import os
|
||||
import io
|
||||
|
||||
class BackupExcludeTestPlugin(octoprint.plugin.OctoPrintPlugin):
|
||||
def initialize(self):
|
||||
with io.open(os.path.join(self.get_plugin_data_folder(), "foo.txt"), "w", encoding="utf-8") as f:
|
||||
f.write("Hello\n")
|
||||
with io.open(os.path.join(self.get_plugin_data_folder(), "bar.txt"), "w", encoding="utf-8") as f:
|
||||
f.write("Hello\n")
|
||||
|
||||
def additional_excludes_hook(self, excludes, *args, **kwargs):
|
||||
return ["foo.txt"]
|
||||
|
||||
__plugin_implementation__ = BackupExcludeTestPlugin()
|
||||
__plugin_hooks__ = {
|
||||
"octoprint.plugin.backup.additional_excludes": __plugin_implementation__.additional_excludes_hook
|
||||
}
|
||||
|
||||
**Example 2**
|
||||
|
||||
In this example the plugin will create a file ``foo.txt`` in its data folder and flag its whole data folder as excluded from the
|
||||
backup if uploaded GCODE files are also excluded:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
import octoprint.plugin
|
||||
|
||||
import os
|
||||
import io
|
||||
|
||||
class BackupExcludeTestPlugin(octoprint.plugin.OctoPrintPlugin):
|
||||
def initialize(self):
|
||||
with io.open(os.path.join(self.get_plugin_data_folder(), "foo.txt"), "w", encoding="utf-8") as f:
|
||||
f.write("Hello\n")
|
||||
|
||||
def additional_excludes_hook(self, excludes, *args, **kwargs):
|
||||
if "uploads" in excludes:
|
||||
return ["."]
|
||||
return []
|
||||
|
||||
__plugin_implementation__ = BackupExcludeTestPlugin()
|
||||
__plugin_hooks__ = {
|
||||
"octoprint.plugin.backup.additional_excludes": __plugin_implementation__.additional_excludes_hook
|
||||
}
|
||||
|
||||
:param excludes list: A list of paths already flagged as excluded in the backup
|
||||
:return: A list of paths to exclude, relative to your plugin's data folder
|
||||
:rtype: list
|
||||
|
||||
Helpers
|
||||
-------
|
||||
|
||||
.. _sec-bundledplugins-backup-helpers:
|
||||
|
||||
The Backup plugin exports two helpers that can be used by other plugins or internal methods
|
||||
from within OctoPrint, without going via the API.
|
||||
|
||||
.. _sec-bundledplugins-backup-helpers-create_backup:
|
||||
|
||||
create_backup
|
||||
+++++++++++++
|
||||
|
||||
.. autofunction:: octoprint.plugins.backup.BackupPlugin.create_backup_helper
|
||||
|
||||
|
||||
.. _sec-bundledplugins-backup-helpers-delete_backup:
|
||||
|
||||
delete_backup
|
||||
+++++++++++++
|
||||
|
||||
.. autofunction:: octoprint.plugins.backup.BackupPlugin.delete_backup_helper
|
||||
|
||||
|
||||
.. _sec-bundledplugins-backup-sourcecode:
|
||||
|
||||
Source code
|
||||
@@ -65,6 +209,8 @@ Source code
|
||||
The source of the Backup plugin is bundled with OctoPrint and can be found in
|
||||
its source repository under ``src/octoprint/plugins/backup``.
|
||||
|
||||
.. [#] Note that only those plugins that are available on `OctoPrint's official plugin repository <https://plugins.octoprint.org>`_
|
||||
can be automatically restored. If you have plugins installed that are not available on there you'll get their
|
||||
names and - if available - homepage URL displayed after restore in order to be able to manually reinstall them.
|
||||
.. [#1] Note that restore is currently unavailable on OctoPrint servers running on Windows. Additionally they may be
|
||||
disabled through a config flag or an environment variable as documented :ref:`here <sec-bundledplugins-backup-configuration>`.
|
||||
.. [#2] Note that only those plugins that are available on `OctoPrint's official plugin repository <https://plugins.octoprint.org>`_
|
||||
can be automatically restored. If you have plugins installed that are not available on there you'll get their
|
||||
names and - if available - homepage URL displayed after restore in order to be able to manually reinstall them.
|
||||
@@ -3,11 +3,12 @@
|
||||
Discovery Plugin
|
||||
================
|
||||
|
||||
The OctoPrint Discovery Plugin comes bundled with OctoPrint (starting with 1.2.0).
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
It allows discovery of the OctoPrint instances via SSDP/UPNP. If
|
||||
`pybonjour <https://pypi.python.org/pypi/pybonjour>`_ is installed OctoPrint
|
||||
will additionally support discovery via ZeroConf, also known as Bonjour or Avahi.
|
||||
The OctoPrint Discovery Plugin comes bundled with OctoPrint.
|
||||
|
||||
It allows discovery of the OctoPrint instances via SSDP/UPNP and ZeroConf
|
||||
(also known as Bonjour or Avahi).
|
||||
|
||||
The SSDP/UPNP support allows OctoPrint to announce itself to machines on the same
|
||||
network running Microsoft Windows. You will be able to just double click on the
|
||||
@@ -28,45 +29,6 @@ line) to scan for available instances.
|
||||
|
||||
Various discovered OctoPrint instances in Windows Explorer
|
||||
|
||||
.. _sec-bundledplugins-discovery-firststeps:
|
||||
|
||||
First Steps
|
||||
-----------
|
||||
|
||||
.. _sec-bundledplugins-discovery-firststeps-pybonjour:
|
||||
|
||||
Installing pybonjour
|
||||
++++++++++++++++++++
|
||||
|
||||
.. note::
|
||||
|
||||
OctoPi versions 0.12.0 and later already come with pybonjour installed and ready to go,
|
||||
you don't need to perform these steps there.
|
||||
|
||||
.. note::
|
||||
|
||||
Currently there are no releases for pybonjour available on the Python Package Index PyPI. The latest pybonjour
|
||||
release is still available in the `Google Code Archive <https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/pybonjour/pybonjour-1.1.1.tar.gz>`_.
|
||||
Since that URL is hilariously long though, a shortened version is provided with https://goo.gl/SxQZ06 and
|
||||
used in the installation instructions below.
|
||||
|
||||
In order for the Zeroconf discovery to work, the
|
||||
`pybonjour package <https://pypi.python.org/pypi/pybonjour>`_ needs to be available
|
||||
to the Python installation running OctoPrint.
|
||||
|
||||
It can be installed via ``pip``. Let's assume you installed OctoPrint manually
|
||||
into some folder ``~/OctoPrint``. You executed ``python setup.py install`` within a
|
||||
virtualenv in the same folder called ``venv``. In order to install ``pybonjour``
|
||||
so it will be available to OctoPrint you'll need to do the following::
|
||||
|
||||
venv/bin/pip install https://goo.gl/SxQZ06
|
||||
|
||||
**Linux users:** You'll need to install an additional dependency for this to work, the
|
||||
libdnssd compatibility layer for libavahi. On Debian/Ubuntu that can be achieved with::
|
||||
|
||||
sudo apt-get install libavahi-compat-libdnssd-dev
|
||||
|
||||
|
||||
.. _sec-bundledplugins-discovery-configuration:
|
||||
|
||||
Configuring the plugin
|
||||
@@ -74,6 +36,10 @@ Configuring the plugin
|
||||
|
||||
The plugin supports the following configuration keys:
|
||||
|
||||
* ``addresses``: List of IP addresses for which to enable discovery, if unset all
|
||||
addresses available on the host will be used
|
||||
* ``interfaces``: List of network interfaces for which to enable discovery, if unset
|
||||
all interfaces on the host will be used
|
||||
* ``publicPort``: Public port number OctoPrint is reachable under,
|
||||
optional, if not set the port OctoPrint itself was started under will be used
|
||||
* ``pathPrefix``: Path prefix OctoPrint is running under, optional, if not
|
||||
@@ -128,6 +94,8 @@ The following snippet is a valid configuration example for the discovery plugin
|
||||
|
||||
plugins:
|
||||
discovery:
|
||||
interfaces:
|
||||
- eth0
|
||||
publicPort: 443
|
||||
useSsl: true
|
||||
zeroConf:
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
Error Tracking Plugin
|
||||
=====================
|
||||
|
||||
.. versionadded:: 1.3.11
|
||||
|
||||
The Error Tracking plugin will cause any logged exceptions in the server and the browser interface to be sent to
|
||||
OctoPrint's `Sentry instance <https://sentry.io/>`_.
|
||||
|
||||
|
||||
@@ -3,5 +3,7 @@
|
||||
File Check
|
||||
==========
|
||||
|
||||
.. versionadded:: 1.4.1
|
||||
|
||||
The file check plugin - while considered bundled with OctoPrint - is a separate project on its own release
|
||||
cycle and documented on `its Github repository <https://github.com/OctoPrint/OctoPrint-FileCheck>`_.
|
||||
@@ -3,5 +3,9 @@
|
||||
Firmware Check
|
||||
==============
|
||||
|
||||
.. versionadded:: 1.3.7
|
||||
|
||||
The firmware check plugin - while considered bundled with OctoPrint - is a separate project on its own release
|
||||
cycle and documented on `its Github repository <https://github.com/OctoPrint/OctoPrint-FirmwareCheck>`_.
|
||||
|
||||
It was formerly called "Printer Safety Check" and directly bundled with OctoPrint.
|
||||
@@ -3,6 +3,8 @@
|
||||
GCode Viewer Plugin
|
||||
===================
|
||||
|
||||
.. versionchanged:: 1.4.1
|
||||
|
||||
The GCode Viewer plugin provides a GCode viewer based on `Alex Ustyantsev's work <https://github.com/hudbrog/gCodeViewer>`_.
|
||||
|
||||
.. _fig-bundledplugins-gcodeviewer-example:
|
||||
@@ -25,6 +27,7 @@ The plugin supports the following configuration keys:
|
||||
* ``mobileSizeThreshold``: Whether to also enable tracking on unreleased OctoPrint versions (anything not stable releases
|
||||
or release candidates). Defaults to ``false``.
|
||||
* ``sizeThreshold``: Unique instance identifier, auto generated on first activation
|
||||
* ``skipUntilThis``: If this string is provided the GCode Viewer will search for this string, and if found, skip all gcode up until this string. This can be used to skip prime nozzle gcode in the preview
|
||||
|
||||
.. _sec-bundledplugins-gcodeviewer-sourcecode:
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ Bundled Plugins
|
||||
firmware_check.rst
|
||||
gcodeviewer.rst
|
||||
logging.rst
|
||||
loginui.rst
|
||||
pluginmanager.rst
|
||||
printer_safety_check.rst
|
||||
softwareupdate.rst
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
Logging
|
||||
=======
|
||||
|
||||
The OctoPrint Logging plugin comes bundled with OctoPrint starting with version 1.3.7.
|
||||
.. versionadded:: 1.3.7
|
||||
|
||||
It implements the log management functionality that was formerly part of the core application and adds features to
|
||||
The OctoPrint Logging plugin implements the log management functionality that was formerly part of the core application and adds features to
|
||||
configure logging levels for sub modules through the included settings dialog.
|
||||
|
||||
.. _fig-bundledplugins-logging-settings:
|
||||
|
||||
@@ -3,64 +3,4 @@
|
||||
Login UI
|
||||
========
|
||||
|
||||
The Login UI plugin has been bundled since OctoPrint 1.4.0 and replaces the ForceLogin plugin bundled with prior
|
||||
versions since 1.3.10.
|
||||
|
||||
If anonymous read-only access is disabled in the :ref:`Access Control settings <sec-features-access_control>`
|
||||
it provides a stand alone login dialog that gets displayed instead of OctoPrint's regular UI.
|
||||
|
||||
.. _fig-bundledplugins-loginui:
|
||||
.. figure:: ../images/bundledplugins-loginui-dialog.png
|
||||
:align: center
|
||||
:alt: Login dialog
|
||||
|
||||
OctoPrint's login dialog.
|
||||
|
||||
The plugin allows theming of the dialog through :ref:`a plugin hook <sec-bundledplugins-loginui-hooks-theming>`.
|
||||
|
||||
.. warning::
|
||||
|
||||
Since the plugin is absolutely required for the case of anonymous read-only access because in this case the
|
||||
UI itself could not even fully initialize due to a lack of permissions required to do so, it is hidden in the plugin
|
||||
manager and cannot be disabled through that.
|
||||
|
||||
.. _sec-bundledplugins-loginui-hooks:
|
||||
|
||||
Hooks
|
||||
-----
|
||||
|
||||
.. _sec-bundledplugins-loginui-hooks-theming:
|
||||
|
||||
octoprint.plugin.loginui.theming
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. py:function:: loginui_theming_hook(*args, **kwargs)
|
||||
|
||||
Support theming of the login dialog, just in case the core UI is themed as well. Use to return a list of additional
|
||||
CSS file URLs to inject into the login dialog HTML.
|
||||
|
||||
Example usage by a plugin:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def loginui_theming():
|
||||
from flask import url_for
|
||||
return [url_for("plugin.myplugin.static", filename="css/loginui_theme.css")]
|
||||
|
||||
__plugin_hooks__ = {
|
||||
"octoprint.plugin.loginui.theming": loginui_theming
|
||||
}
|
||||
|
||||
Only a list of ready-made URLs to CSS files is supported, neither LESS nor JS. Best use
|
||||
url_for like in the example above to be prepared for any configured prefix URLs.
|
||||
|
||||
:return: A list of additional CSS URLs to inject into the login dialog.
|
||||
:rtype: A list of strings.
|
||||
|
||||
.. _sec-bundledplugins-loginui-sourcecode:
|
||||
|
||||
Source Code
|
||||
-----------
|
||||
|
||||
The source of the Anonymous Usage Tracking plugin is bundled with OctoPrint and can be
|
||||
found in its source repository under ``src/octoprint/plugins/loginui``.
|
||||
The Login UI plugin's functionality has been merged into OctoPrint's core as of OctoPrint 1.4.2.
|
||||
@@ -3,8 +3,9 @@
|
||||
Plugin Manager
|
||||
==============
|
||||
|
||||
The OctoPrint Plugin Manager comes bundled with OctoPrint starting with
|
||||
version 1.2.0.
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
The OctoPrint Plugin Manager comes bundled with OctoPrint.
|
||||
|
||||
It allows management of installed plugins (listing, enabling, disabling
|
||||
and uninstalling) and installing new plugins from the official
|
||||
|
||||
@@ -3,10 +3,14 @@
|
||||
Software Update Plugin
|
||||
======================
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
The Software Update Plugin allows receiving notifications about new releases
|
||||
of OctoPrint or installed plugins which registered with it and -- if properly
|
||||
configured -- also applying the found updates.
|
||||
|
||||
It comes bundled with OctoPrint.
|
||||
|
||||
.. _sec-bundledplugins-softwareupdate-firststeps:
|
||||
|
||||
First Steps
|
||||
@@ -24,7 +28,7 @@ Settings Dialog, navigate to the Software Update section therein and once you ar
|
||||
wrench icon in the upper right corner.
|
||||
|
||||
.. _fig-bundledplugins-softwareupdate-plugin-configuration:
|
||||
.. figure:: ../images/bundledplugins-softwareupdate-plugin-configuration.png
|
||||
.. figure:: ../images/bundledplugins-softwareupdate-configuration.png
|
||||
:align: center
|
||||
:alt: Software Update plugin configuration dialog
|
||||
|
||||
@@ -34,21 +38,25 @@ There you can adjust the following settings:
|
||||
|
||||
* **OctoPrint version tracking**: Whether you want to track OctoPrint *releases* or every *commit*. Usually you want to
|
||||
select "Release" here which is also the default, unless you are a developer.
|
||||
* **OctoPrint Release Channel** (if tracking releases): The release channel of OctoPrint to track for updates. If you only want stable versions,
|
||||
select "Stable" here which is also the default. "Maintenance RCs" will also allow you to update to maintenance release
|
||||
candidates, "Devel RCs" will also allow you to update to development release candidates. If in doubt, leave it at
|
||||
"Stable". `Read more about Release Channels here <https://community.octoprint.org/t/how-to-use-the-release-channels-to-help-test-release-candidates/402>`_.
|
||||
* **OctoPrint checkout folder** (if tracking git commits): This must be the path to OctoPrint's git checkout folder
|
||||
* **Tracked branch** (if tracking is set to "Github Commit"): The branch that will be tracked if you set version tracking to "Github Commit".
|
||||
* **OctoPrint ``pip`` target** (if tracking is set to "Release" or "Github Commit"): The argument that will be provided to ``pip`` when updating OctoPrint.
|
||||
Usually you don't want to change this from its default value of ``https://github.com/OctoPrint/OctoPrint/archive/{target_version}.zip``.
|
||||
* **OctoPrint checkout folder** (if tracking is set to "Local checkout"): This must be the path to OctoPrint's git checkout folder
|
||||
(``/home/pi/OctoPrint`` for OctoPi or `manual installs following the Raspberry Pi setup guide <https://community.octoprint.org/t/setting-up-octoprint-on-a-raspberry-pi-running-raspbian/2337/>`_).
|
||||
Note that since OctoPrint 1.3.6 you will no longer need to set this to be able to update to releases, only if you
|
||||
want to be able to update against some bleeding edge git branch.
|
||||
* **Enable ``pip`` update checks**: Whether to have OctoPrint automatically check for updates of
|
||||
the ``pip`` tool that is used for updating most components.
|
||||
* **Version cache TTL**: The "time to live" of the cache OctoPrint will use to temporarily persist the version information
|
||||
for the various components registered with the plugin, so that they don't have to be queried from the internet every time
|
||||
you load the page. Defaults to 24h, you usually shouldn't need to change that value.
|
||||
* **Show notifications to users**: Whether to display update notifications (without "Update now" button) to users that cannot
|
||||
apply updates.
|
||||
* **Minimum free disk space**: The minimum amount of free disk space needed in order to allow software updates to be run.
|
||||
|
||||
More settings are available by :ref:`editing the corresponding section in config.yaml <sec-bundledplugins-softwareupdate-configuration>`.
|
||||
|
||||
That restart commands for OctoPrint and the whole server can be configured under Settings > Server.
|
||||
Restart commands for OctoPrint and the whole server can be configured under Settings > Server.
|
||||
|
||||
.. _sec-bundledplugins-softwareupdate-cli:
|
||||
|
||||
@@ -119,9 +127,6 @@ Configuring the Plugin
|
||||
|
||||
plugins:
|
||||
softwareupdate:
|
||||
# the time-to-live of the version cache, in minutes
|
||||
cache_ttl: 60
|
||||
|
||||
# configured version check and update methods
|
||||
checks:
|
||||
# "octoprint" is reserved for OctoPrint
|
||||
@@ -141,6 +146,41 @@ Configuring the Plugin
|
||||
# used - should normally NOT be necessary and hence set
|
||||
pip_command: /path/to/pip
|
||||
|
||||
# the time-to-live of the version cache, in minutes, defaults to 24h
|
||||
cache_ttl: 1440
|
||||
|
||||
# whether to show update notifications to users that cannot apply updates
|
||||
notify_users: true
|
||||
|
||||
# whether to ignore the system throttled state reported by the pisupport plugin and
|
||||
# allow updating even when the system is not running stable - really not recommended
|
||||
ignore_throttled: false
|
||||
|
||||
# minimum free storage in MB for updates to be enabled
|
||||
minimum_free_storage: 150
|
||||
|
||||
# URL from which to fetch check overlays
|
||||
check_overlay_url: https://plugins.octoprint.org/update_check_overlay.json
|
||||
|
||||
# time to live of the overlay cache, defaults to 6h
|
||||
check_overlay_ttl: 360
|
||||
|
||||
# global credentials to provide to version checks
|
||||
credentials:
|
||||
|
||||
# GitHub API token to use for the github_release and github_commit version checks.
|
||||
# Helpful if you regularly run into rate limit issues with the GitHub API using
|
||||
# the default anonymous access. Use a personal access token:
|
||||
# https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token
|
||||
# Unset by default
|
||||
github:
|
||||
|
||||
# Bitbucket user name and password, used by the bitbucket_commit version check if
|
||||
# provided, but only if the check doesn't specify credentials on its own.
|
||||
# Unset by default
|
||||
bitbucket_user:
|
||||
bitbucket_password:
|
||||
|
||||
.. _sec-bundledplugins-softwareupdate-configuration-versionchecks:
|
||||
|
||||
Version checks
|
||||
@@ -156,10 +196,28 @@ types are currently recognized:
|
||||
* ``repo``: (mandatory) Github repository to check
|
||||
* ``prerelease``: ``True`` or ``False``, default ``False``, set to
|
||||
``True`` to also include releases on Github marked as prerelease.
|
||||
* ``release_branch``: Branch name to check against ``target_comittish``
|
||||
field in Github release data - release will only be included if the
|
||||
values match. Defaults to being unset, in which case no match will
|
||||
be performed.
|
||||
* ``prerelease_branches``: Prerelease channel definitions, optional. List of:
|
||||
* ``branch``: Branch associated with the channel, acts as ID
|
||||
* ``name``: Human readable name of the release channel
|
||||
* ``commitish``: List of values to check against ``target_commitish``
|
||||
field in Github release data - release will only be included if the
|
||||
values match. Defaults to being unset, in which case the ``branch``
|
||||
will be matched.
|
||||
.. versionadded:: 1.2.16
|
||||
* ``stable_branch``: Stable channel definition, optional. Structure:
|
||||
* ``branch``: Branch associated with the channel, acts as ID
|
||||
* ``name``: Human readable name of the release channel
|
||||
* ``commitish``: List of values to check against ``target_commitish``
|
||||
field in Github release data - release will only be included if the
|
||||
values match. Defaults to being unset, in which case the ``branch``
|
||||
will be matched.
|
||||
.. versionadded:: 1.2.16
|
||||
* ``prerelease_channel``: Release channel to limit updates to. If set only
|
||||
those releases will be included if their ``target_commitish`` matches
|
||||
the ones associated with the release channel identified by this, either
|
||||
included in ``prerelease_channels`` or the ``stable_channel``. Only
|
||||
taken into account if ``prerelease`` is ``true``.
|
||||
.. versionadded:: 1.2.16
|
||||
* ``release_compare``: Method to use to compare between current version
|
||||
information and release versions on Github. One of ``python`` (version
|
||||
comparison using ``pkg_resources.parse_version``, newer version detected
|
||||
@@ -193,6 +251,8 @@ types are currently recognized:
|
||||
``api_user`` to be set. **Important**: Never use your actual Bitbucket login password. Generate
|
||||
a new app password. App passwords are user specific on Bitbucket.
|
||||
|
||||
.. versionadded:: 1.3.5
|
||||
|
||||
* ``git_commit``: Checks a local git repository for new commits on its
|
||||
configured remote. Additional config parameters:
|
||||
|
||||
@@ -204,6 +264,8 @@ types are currently recognized:
|
||||
|
||||
* ``package``: (mandatory) Name of the package which to check.
|
||||
|
||||
.. versionadded:: 1.4.0
|
||||
|
||||
* ``httpheader``: Checks an HTTP header on a defined URL for changes. This can be used for easy checks
|
||||
against things like ``ETag`` or ``Last-Modified`` headers. Additional
|
||||
config parameters:
|
||||
@@ -215,12 +277,16 @@ types are currently recognized:
|
||||
* ``header_prefix``: Prefix to use for the obtained value in the version display. If not provided ``header_name``
|
||||
will be used. If set to an empty string, no prefix will be added.
|
||||
|
||||
.. versionadded:: 1.4.1
|
||||
|
||||
* ``jsondata``: Checks the provided JSON endpoint for changes. The JSON endpoint must return an object with the
|
||||
property ``version``, which should contain the latest version, e.g. ``{"version":"1.2.3"}``. Additional
|
||||
config parameters:
|
||||
|
||||
* ``jsondata``: (mandatory) URL from which to fetch the JSON data
|
||||
|
||||
.. versionadded:: 1.4.1
|
||||
|
||||
* ``command_line``: Uses a provided script to determine whether an update
|
||||
is available. Additional config parameters:
|
||||
|
||||
@@ -243,12 +309,16 @@ types are currently recognized:
|
||||
|
||||
* ``current_version``: Version to report for both local and remote version.
|
||||
|
||||
.. versionadded:: 1.3.7
|
||||
|
||||
* ``never_current``: Always reports that an update is necessary. Useful for debugging
|
||||
software update mechanisms during development. Additional config parameters:
|
||||
|
||||
* ``local_version``: Current local version. Defaults to ``1.0.0``.
|
||||
* ``remote_version``: Remote version to offer update to. Defaults to ``1.0.1``.
|
||||
|
||||
.. versionadded:: 1.3.7
|
||||
|
||||
.. _sec-bundledplugins-softwareupdate-configuration-updatemethods:
|
||||
|
||||
Update methods
|
||||
@@ -294,6 +364,8 @@ supported:
|
||||
a countdown in the meantime. Useful for debugging software update mechanisms
|
||||
during development.
|
||||
|
||||
.. versionadded:: 1.3.7
|
||||
|
||||
.. note::
|
||||
|
||||
To allow default configurations for multiple update methods, if more than one of
|
||||
@@ -357,7 +429,71 @@ tracked:
|
||||
repo: OctoPrint-SomePlugin
|
||||
pip: 'https://github.com/someUser/OctoPrint-SomePlugin/archive/{target}.zip'
|
||||
|
||||
The same, but tracking all commits pushed to branch ``devel`` (thus allowing
|
||||
The same, but declaring three release channels "Stable", "Maintenance RCs" (tagged on ``rc/maintenance`` or ``master``,
|
||||
id ``rc/maintenance``) and "Devel RCs" (tagged on ``rc/maintenance``, ``rc/devel`` or ``master``, id ``rc/devel``),
|
||||
but with "Stable" active:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
plugins:
|
||||
softwareupdate:
|
||||
checks:
|
||||
some_plugin:
|
||||
type: github_release
|
||||
user: someUser
|
||||
repo: OctoPrint-SomePlugin
|
||||
stable_branch:
|
||||
name: Stable
|
||||
branch: master
|
||||
commitish:
|
||||
- master
|
||||
prerelease_branches:
|
||||
- name: Maintenance RCs
|
||||
branch: rc/maintenance
|
||||
commitish:
|
||||
- rc/maintenance
|
||||
- master
|
||||
- name: Devel RCs
|
||||
branch: rc/devel
|
||||
commitish:
|
||||
- rc/devel
|
||||
- rc/maintenance
|
||||
- master
|
||||
pip: 'https://github.com/someUser/OctoPrint-SomePlugin/archive/{target}.zip'
|
||||
|
||||
And now with "Maintenance RCs" active (note the ``prerelease`` and ``prerelease_channel`` settings):
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
plugins:
|
||||
softwareupdate:
|
||||
checks:
|
||||
some_plugin:
|
||||
type: github_release
|
||||
user: someUser
|
||||
repo: OctoPrint-SomePlugin
|
||||
stable_branch:
|
||||
name: Stable
|
||||
branch: master
|
||||
commitish:
|
||||
- master
|
||||
prerelease_branches:
|
||||
- name: Maintenance RCs
|
||||
branch: rc/maintenance
|
||||
commitish:
|
||||
- rc/maintenance
|
||||
- master
|
||||
- name: Devel RCs
|
||||
branch: rc/devel
|
||||
commitish:
|
||||
- rc/devel
|
||||
- rc/maintenance
|
||||
- master
|
||||
prerelease: True
|
||||
prerelease_channel: rc/maintenance
|
||||
pip: 'https://github.com/someUser/OctoPrint-SomePlugin/archive/{target}.zip'
|
||||
|
||||
The same plugin again, but tracking all commits pushed to branch ``devel`` (thus allowing
|
||||
"bleeding edge" updates):
|
||||
|
||||
.. code-block:: yaml
|
||||
@@ -403,6 +539,28 @@ commit identifier. E.g. ``https://gist.githubusercontent.com/<user>/<gistid>/raw
|
||||
``https://gist.githubusercontent.com/<user>/<gistid>/raw/<commit>/my_plugin.py``. Note that these URLs will
|
||||
be cached by Github for a bit, so an update will not be immediately picked up.
|
||||
|
||||
.. _sec-bundledplugins-softwareupdate-configuration-credentials:
|
||||
|
||||
Global credentials
|
||||
++++++++++++++++++
|
||||
|
||||
.. versionadded:: 1.5.0
|
||||
|
||||
Starting with OctoPrint 1.5.0, the Software Update Plugin supports supplyting a GitHub
|
||||
API token to use for the ``github_release`` and ``github_commit`` version check types,
|
||||
to work around possible rate limit problems if a lot of checks are to be made from a single
|
||||
external IP. You may create a `personal access token <https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token>`_
|
||||
and configure that as ``plugins.softwareupdate.credentials.github`` via
|
||||
:ref:`config.yaml <sec-configuration-config_yaml>` in order to get a higher rate limit than with purely anonymous access.
|
||||
|
||||
Additionally, the username and password to use with the ``bitbucket_commit`` version check
|
||||
type may also be configured via ``plugins.softwareupdate.credentials.bitbucket_user`` and
|
||||
``plugins.softwareupdate.credentials.bitbucket_password`` respectively.
|
||||
|
||||
None of these configuration options are currently exposed on the UI and can only be used
|
||||
via :ref:`config.yaml <sec-configuration-config_yaml>` or the
|
||||
:ref:`config command line interface <sec-configuration-cli>`.
|
||||
|
||||
.. _sec-bundledplugins-softwareupdate-events:
|
||||
|
||||
Events
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
Anonymous Usage Tracking Plugin
|
||||
===============================
|
||||
|
||||
.. versionadded:: 1.3.10
|
||||
|
||||
The Anonymous Usage Tracking plugin provides valuable insights into how many instances running what versions of
|
||||
OctoPrint are out there, whether they are successfully completing print jobs and various other metrics.
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
Virtual Printer
|
||||
===============
|
||||
|
||||
.. versionchanged:: 1.4.1
|
||||
|
||||
The Virtual Printer plugin provides a virtual printer to connect to during development. It is able to simulate various
|
||||
firmware quirks, communication issues and can be heavily configured through ``config.yaml``. See
|
||||
:ref:`the development documentation on details and usage <sec-development-virtual-printer>`.
|
||||
|
||||
+92
-69
@@ -18,8 +18,8 @@ import sys, os
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
sys.path.insert(0, os.path.abspath('../src/'))
|
||||
sys.path.append(os.path.abspath('sphinxext'))
|
||||
sys.path.insert(0, os.path.abspath("../src/"))
|
||||
sys.path.append(os.path.abspath("sphinxext"))
|
||||
|
||||
import octoprint._version
|
||||
from datetime import date
|
||||
@@ -30,32 +30,46 @@ year_current = date.today().year
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
needs_sphinx = '1.3'
|
||||
needs_sphinx = "1.3"
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be extensions
|
||||
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
|
||||
extensions = ['codeblockext', 'onlineinclude', 'sphinx.ext.todo', 'sphinx.ext.autodoc', 'sphinxcontrib.httpdomain',
|
||||
'sphinx.ext.napoleon', 'sphinxcontrib.mermaid', 'sphinx.ext.intersphinx']
|
||||
extensions = [
|
||||
"codeblockext",
|
||||
"onlineinclude",
|
||||
"sphinx.ext.todo",
|
||||
"sphinx.ext.autodoc",
|
||||
"sphinxcontrib.httpdomain",
|
||||
"sphinx.ext.napoleon",
|
||||
"sphinxcontrib.mermaid",
|
||||
"sphinx.ext.intersphinx",
|
||||
]
|
||||
todo_include_todos = True
|
||||
intersphinx_mapping = {'python': ('https://docs.python.org/3', None),
|
||||
'python2': ('https://docs.python.org/2', None),
|
||||
'pyserial': ('https://pythonhosted.org/pyserial', None)}
|
||||
intersphinx_mapping = {
|
||||
"python": ("https://docs.python.org/3", None),
|
||||
"python2": ("https://docs.python.org/2", None),
|
||||
"pyserial": ("https://pythonhosted.org/pyserial", None),
|
||||
}
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
templates_path = ["_templates"]
|
||||
|
||||
# The suffix of source filenames.
|
||||
source_suffix = '.rst'
|
||||
source_suffix = ".rst"
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
# source_encoding = 'utf-8-sig'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
master_doc = "index"
|
||||
|
||||
# General information about the project.
|
||||
project = 'OctoPrint'
|
||||
copyright = '%d-%d, Gina Häußge' % (year_since, year_current) if year_current > year_since else '%d, Gina Häußge' % year_since
|
||||
project = "OctoPrint"
|
||||
copyright = (
|
||||
"%d-%d, Gina Häußge" % (year_since, year_current)
|
||||
if year_current > year_since
|
||||
else "%d, Gina Häußge" % year_since
|
||||
)
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
@@ -68,133 +82,139 @@ release = version
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#language = None
|
||||
# language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
# today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
exclude_patterns = ['_build']
|
||||
exclude_patterns = ["_build"]
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all documents.
|
||||
#default_role = None
|
||||
# default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
# add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
# add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
# show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
pygments_style = "sphinx"
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
# modindex_common_prefix = []
|
||||
|
||||
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||
#keep_warnings = False
|
||||
# keep_warnings = False
|
||||
|
||||
numfig = True
|
||||
|
||||
mermaid_version = ""
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
import sphinx_rtd_theme
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
|
||||
html_theme = "sphinx_rtd_theme"
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of built-in themes.
|
||||
#html_theme = "sphinx_rtd_theme"
|
||||
# html_theme = "sphinx_rtd_theme"
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
# html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
# html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
# html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
# html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
# html_favicon = None
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the built-in static files,
|
||||
# so a file named "default.css" will overwrite the built-in "default.css".
|
||||
html_static_path = ['_static']
|
||||
html_static_path = ["_static"]
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_css_file("theme_overrides.css")
|
||||
app.add_js_file("mermaid.min.js")
|
||||
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
# html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
# html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
# html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
# html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
# html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
# html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
# html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
# html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
# html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
# html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
# html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
# html_file_suffix = None
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'OctoPrintDoc'
|
||||
htmlhelp_basename = "OctoPrintDoc"
|
||||
|
||||
|
||||
# -- Options for LaTeX output --------------------------------------------------
|
||||
|
||||
#latex_elements = {
|
||||
# latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
|
||||
@@ -203,47 +223,44 @@ htmlhelp_basename = 'OctoPrintDoc'
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
#}
|
||||
# }
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title, author, documentclass [howto/manual]).
|
||||
#latex_documents = [
|
||||
# latex_documents = [
|
||||
# ('index', 'OctoPrint.tex', 'OctoPrint Documentation',
|
||||
# 'Gina Häußge', 'manual'),
|
||||
#]
|
||||
# ]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
# latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then top-level headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
# latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
# latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
# latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
# latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
# latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output --------------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
('index', 'octoprint', 'OctoPrint Documentation',
|
||||
['Gina Häußge'], 1)
|
||||
]
|
||||
man_pages = [("index", "octoprint", "OctoPrint Documentation", ["Gina Häußge"], 1)]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#man_show_urls = False
|
||||
# man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output ------------------------------------------------
|
||||
@@ -252,19 +269,25 @@ man_pages = [
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
('index', 'OctoPrint', 'OctoPrint Documentation',
|
||||
'Gina Häußge', 'OctoPrint', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
(
|
||||
"index",
|
||||
"OctoPrint",
|
||||
"OctoPrint Documentation",
|
||||
"Gina Häußge",
|
||||
"OctoPrint",
|
||||
"One line description of project.",
|
||||
"Miscellaneous",
|
||||
),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#texinfo_appendices = []
|
||||
# texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#texinfo_domain_indices = True
|
||||
# texinfo_domain_indices = True
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#texinfo_show_urls = 'footnote'
|
||||
# texinfo_show_urls = 'footnote'
|
||||
|
||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
#texinfo_no_detailmenu = False
|
||||
# texinfo_no_detailmenu = False
|
||||
@@ -0,0 +1,110 @@
|
||||
.. _sec-configuration-cli:
|
||||
|
||||
CLI
|
||||
===
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
|
||||
OctoPrint provides a basic command line interface for manipulation of :ref:`config.yaml <sec-configuration-config_yaml>`:
|
||||
|
||||
.. code-block::
|
||||
|
||||
$ octoprint config --help
|
||||
Usage: octoprint config [OPTIONS] COMMAND [ARGS]...
|
||||
|
||||
Basic config manipulation.
|
||||
|
||||
Options:
|
||||
--help Show this message and exit.
|
||||
|
||||
Commands:
|
||||
append_value Appends value to list behind config path.
|
||||
effective Retrieves the full effective config.
|
||||
get Retrieves value from config path.
|
||||
insert_value Inserts value at index of list behind config key.
|
||||
remove Removes a config path.
|
||||
remove_value Removes value from list at config path.
|
||||
set Sets a config path to the provided value.
|
||||
|
||||
.. code-block::
|
||||
|
||||
$ octoprint config append_value --help
|
||||
Usage: octoprint config append_value [OPTIONS] PATH VALUE
|
||||
|
||||
Appends value to list behind config path.
|
||||
|
||||
Options:
|
||||
--json
|
||||
--help Show this message and exit.
|
||||
|
||||
.. code-block::
|
||||
|
||||
$ octoprint config effective --help
|
||||
Usage: octoprint config effective [OPTIONS]
|
||||
|
||||
Retrieves the full effective config.
|
||||
|
||||
Options:
|
||||
--json Output value formatted as JSON
|
||||
--yaml Output value formatted as YAML
|
||||
--raw Output value as raw string representation
|
||||
--help Show this message and exit.
|
||||
|
||||
.. code-block::
|
||||
|
||||
$ octoprint config get --help
|
||||
Usage: octoprint config get [OPTIONS] PATH
|
||||
|
||||
Retrieves value from config path.
|
||||
|
||||
Options:
|
||||
--json Output value formatted as JSON
|
||||
--yaml Output value formatted as YAML
|
||||
--raw Output value as raw string representation
|
||||
--help Show this message and exit.
|
||||
|
||||
.. code-block::
|
||||
|
||||
$ octoprint config insert_value --help
|
||||
Usage: octoprint config insert_value [OPTIONS] PATH INDEX VALUE
|
||||
|
||||
Inserts value at index of list behind config key.
|
||||
|
||||
Options:
|
||||
--json
|
||||
--help Show this message and exit.
|
||||
|
||||
.. code-block::
|
||||
|
||||
$ octoprint config remove --help
|
||||
Usage: octoprint config remove [OPTIONS] PATH
|
||||
|
||||
Removes a config path.
|
||||
|
||||
Options:
|
||||
--help Show this message and exit.
|
||||
|
||||
.. code-block::
|
||||
|
||||
$ octoprint config remove_value --help
|
||||
Usage: octoprint config remove_value [OPTIONS] PATH VALUE
|
||||
|
||||
Removes value from list at config path.
|
||||
|
||||
Options:
|
||||
--json
|
||||
--help Show this message and exit.
|
||||
|
||||
.. code-block::
|
||||
|
||||
$ octoprint config set --help
|
||||
Usage: octoprint config set [OPTIONS] PATH VALUE
|
||||
|
||||
Sets a config path to the provided value.
|
||||
|
||||
Options:
|
||||
--bool Interpret value as bool
|
||||
--float Interpret value as float
|
||||
--int Interpret value as int
|
||||
--json Parse value from json
|
||||
--help Show this message and exit.
|
||||
@@ -10,6 +10,7 @@ you can just create it - it will only get created by OctoPrint once you save set
|
||||
settings.
|
||||
|
||||
Note that many of these settings are available from the "Settings" menu in OctoPrint itself.
|
||||
They can also be configured via :ref:`config command line interface <sec-configuration-cli>`.
|
||||
|
||||
.. contents::
|
||||
|
||||
@@ -23,16 +24,13 @@ Use the following settings to enable access control:
|
||||
.. code-block:: yaml
|
||||
|
||||
accessControl:
|
||||
# whether to enable access control or not. Defaults to true
|
||||
enabled: true
|
||||
|
||||
# The user manager implementation to use for accessing user information. Currently only a filebased
|
||||
# user manager is implemented which stores configured accounts in a YAML file (Default: users.yaml
|
||||
# in the default configuration folder, see below)
|
||||
userManager: octoprint.access.users.FilebasedUserManager
|
||||
|
||||
# The YAML user file to use. If left out defaults to users.yaml in the default configuration folder.
|
||||
userFile: /path/to/users.yaml
|
||||
userfile: /path/to/users.yaml
|
||||
|
||||
# If set to true, will automatically log on clients originating from any of the networks defined in
|
||||
# "localNetworks" as the user defined in "autologinAs". Defaults to false.
|
||||
@@ -74,6 +72,10 @@ Use the following settings to enable access control:
|
||||
# If a remote user is not found, add them. Use this only if all users from the remote system can use OctoPrint.
|
||||
addRemoteUsers: false
|
||||
|
||||
# Secret salt used for password hashing, DO NOT TOUCH. If changed you will no longer be able to log in with your
|
||||
# existing accounts.
|
||||
salt: someSecretSalt
|
||||
|
||||
.. _sec-configuration-config_yaml-api:
|
||||
|
||||
API
|
||||
@@ -123,6 +125,10 @@ appearance or to modify the order and presence of the various UI components:
|
||||
# acrylic for its frame ;)
|
||||
colorTransparent: false
|
||||
|
||||
# Show the internal filename in the files sidebar, if necessary
|
||||
# UI change only
|
||||
showInternalFilename: true
|
||||
|
||||
# Configures the order and availability of the UI components
|
||||
components:
|
||||
|
||||
@@ -146,10 +152,14 @@ appearance or to modify the order and presence of the various UI components:
|
||||
navbar:
|
||||
- settings
|
||||
- systemmenu
|
||||
- plugin_announcements
|
||||
- plugin_logging
|
||||
- plugin_pi_support
|
||||
- login
|
||||
|
||||
# order of sidebar items
|
||||
sidebar:
|
||||
- plugin_firmware_check
|
||||
- connection
|
||||
- state
|
||||
- files
|
||||
@@ -158,7 +168,7 @@ appearance or to modify the order and presence of the various UI components:
|
||||
tab:
|
||||
- temperature
|
||||
- control
|
||||
- gcodeviewer
|
||||
- plugin_gcodeviewer
|
||||
- terminal
|
||||
- timelapse
|
||||
|
||||
@@ -175,17 +185,40 @@ appearance or to modify the order and presence of the various UI components:
|
||||
- features
|
||||
- webcam
|
||||
- accesscontrol
|
||||
- plugin_gcodeviewer
|
||||
- api
|
||||
- plugin_appkeys
|
||||
- section_octoprint
|
||||
- folders
|
||||
- appearance
|
||||
- logs
|
||||
- plugin_logging
|
||||
- plugin_pluginmanager
|
||||
- plugin_softwareupdate
|
||||
- plugin_announcements
|
||||
- plugin_backup
|
||||
- plugin_tracking
|
||||
- plugin_errortracking
|
||||
|
||||
# order of user settings
|
||||
usersettings:
|
||||
- access
|
||||
- interface
|
||||
|
||||
# order of wizards
|
||||
wizard:
|
||||
- plugin_backup
|
||||
- plugin_corewizard_acl
|
||||
|
||||
# order of about dialog entries
|
||||
about:
|
||||
- about
|
||||
- plugin_pi_support
|
||||
- supporters
|
||||
- authors
|
||||
- license
|
||||
- thirdparty
|
||||
- plugin_pluginmanager
|
||||
|
||||
# order of generic templates
|
||||
generic: []
|
||||
|
||||
@@ -222,7 +255,7 @@ appearance or to modify the order and presence of the various UI components:
|
||||
tab:
|
||||
- plugin_helloworld
|
||||
|
||||
OctoPrint will then display the tabs in the order ``plugin_helloworld``, ``temperature``, ``control``, ``gcodeviewer``,
|
||||
OctoPrint will then display the tabs in the order ``plugin_helloworld``, ``temperature``, ``control``, ``plugin_gcodeviewer``,
|
||||
``terminal``, ``timelapse`` plus any other plugins.
|
||||
|
||||
|
||||
@@ -774,6 +807,9 @@ Use the following settings to configure the serial connection to the printer:
|
||||
# the response skips on the ok)
|
||||
triggerOkForM29: true
|
||||
|
||||
# Percentage of resend requests among all sent lines that should be considered critical
|
||||
resendRatioThreshold: 10
|
||||
|
||||
capabilities:
|
||||
|
||||
# Whether to enable temperature autoreport in the firmware if its support is detected
|
||||
@@ -913,6 +949,12 @@ Use the following settings to configure the server:
|
||||
# Command to shut down the system OctoPrint is running on, defaults to being unset
|
||||
systemShutdownCommand: sudo shutdown -h now
|
||||
|
||||
# pip command associated with OctoPrint, used for installing plugins and updates,
|
||||
# if unset (default) the command will be autodetected based on the current python
|
||||
# executable - unless you have a really special setup this is the right way to do
|
||||
# it and there should be no need to ever even touch this setting
|
||||
localPipCommand: None
|
||||
|
||||
# Configuration of the regular online connectivity check
|
||||
onlineCheck:
|
||||
# whether the online check is enabled, defaults to false due to valid privacy concerns
|
||||
@@ -1090,11 +1132,13 @@ Use `Javascript regular expressions <https://developer.mozilla.org/en/docs/Web/J
|
||||
# A list of filters to display in the terminal tab. Defaults to the filters shown below
|
||||
terminalFilters:
|
||||
- name: Suppress temperature messages
|
||||
regex: '(Send: (N\d+\s+)?M105)|(Recv:\s+(ok\s+)?.*(B|T\d*):\d+)'
|
||||
regex: '(Send: (N\d+\s+)?M105)|(Recv:\s+(ok\s+([PBN]\d+\s+)*)?([BCLPR]|T\d*):-?\d+)'
|
||||
- name: Suppress SD status messages
|
||||
regex: '(Send: (N\d+\s+)?M27)|(Recv: SD printing byte)'
|
||||
regex: '(Send: (N\d+\s+)?M27)|(Recv: SD printing byte)|(Recv: Not SD printing)'
|
||||
- name: Suppress wait responses
|
||||
regex: 'Recv: wait'
|
||||
- name: Suppress processing responses
|
||||
regex: 'Recv: (echo:\s*)?busy:\s*processing'
|
||||
|
||||
.. _sec-configuration-config_yaml-webcam:
|
||||
|
||||
|
||||
@@ -10,3 +10,4 @@ Configuration
|
||||
yaml.rst
|
||||
config_yaml.rst
|
||||
logging_yaml.rst
|
||||
cli.rst
|
||||
@@ -0,0 +1,75 @@
|
||||
.. _sec-development-branches:
|
||||
|
||||
OctoPrint's branching model
|
||||
===========================
|
||||
|
||||
There are three main branches in OctoPrint:
|
||||
|
||||
``master``
|
||||
The master branch always contains the current stable release plus any changes
|
||||
since made to *documentation*, *CI related tests* or *Github meta files*. OctoPrint's actual
|
||||
code will only be modified on new releases. Will have a version number following
|
||||
the scheme ``<x>.<y>.<z>`` (e.g. ``1.5.1``).
|
||||
``maintenance``
|
||||
Improvements and fixes of the current release that make up
|
||||
the next release go here. More or less continuously updated. You can consider
|
||||
this a preview of the next release version. It should be very stable at all
|
||||
times. Anything you spot in here helps tremendously with getting a rock solid
|
||||
next stable release, so if you want to help out development, running the
|
||||
``maintenance`` branch and reporting back anything you find is a very good way
|
||||
to do that. Will usually have a version number following the scheme
|
||||
``<x>.<y+1>.<0>.dev<commits since increase of y>`` for an OctoPrint version of ``<x>.<y>.<z>``
|
||||
(e.g. ``1.5.0.dev114``).
|
||||
``devel``
|
||||
Ongoing development of what will go into the next big
|
||||
release (MAJOR version number increases) will happen on this branch. Usually
|
||||
kept stable, sometimes stuff can break though. Backwards incompatible changes will
|
||||
be encountered here. Can be considered the "bleeding edge". Will usually have a version
|
||||
number following the scheme ``<x+1>.<0>.0.dev<commits since increase of y>`` for a current
|
||||
OctoPrint version of ``<x>.<y>.<z>`` (e.g. ``2.0.0.dev123``).
|
||||
|
||||
There are couple more RC and staging branches that see regular use:
|
||||
|
||||
``staging/bugfix``
|
||||
Any preparation for potential bugfix releases takes place here.
|
||||
Version number follows the scheme ``<x>.<y>.<z+1>`` (e.g. ``1.5.1``) for a current release
|
||||
of ``<x>.<y>.<z>``.
|
||||
``rc/maintenance``
|
||||
This branch is reserved for future releases that have graduated from
|
||||
the ``maintenance`` branch and are now being pushed on the "Maintenance"
|
||||
pre release channel for further testing. Version number follows the scheme
|
||||
``<x>.<y>.<z>rc<n>`` (e.g. ``1.5.0rc1``).
|
||||
``staging/maintenance``
|
||||
Any preparation for potential follow-up RCs takes place here.
|
||||
Version number follows the scheme ``<x>.<y>.<z>rc<n+1>.dev<commits since increase of n>`` (e.g.
|
||||
``1.5.0rc2.dev3``) for a current Maintenance RC of ``<x>.<y>.<z>``.
|
||||
``rc/devel``
|
||||
This branch is reserved for future releases that have graduated from
|
||||
the ``devel`` branch and are now being pushed on the "Devel" pre release channel
|
||||
for further testing. Version number follows the scheme ``<x+1>.0.0rc<n>`` (e.g. ``2.0.0rc1``)
|
||||
for a current stable OctoPrint version of ``<x>.<y>.<z>``.
|
||||
``staging/devel``
|
||||
Any preparation for potential follow-up Devel RCs takes place
|
||||
here. Version number follows the scheme ``<x>.0.0rc<n+1>.dev<commits since increase of n>`` (e.g.
|
||||
``2.0.0rc2.dev12``) for a current Devel RC of ``<x>.0.0rc<n>``.
|
||||
|
||||
Additionally, from time to time you might see other branches pop up in the repository.
|
||||
Those usually have one of the following prefixes:
|
||||
|
||||
``bug/...``
|
||||
Fixes under development that are to be merged into the ``staging/bugfix``
|
||||
and later the ``master`` branch.
|
||||
``fix/...``
|
||||
Fixes under development that are to be merged into the ``maintenance``
|
||||
and ``devel`` branches.
|
||||
``improve/...``
|
||||
Improvements under development that are to be merged into the
|
||||
``maintenance`` and ``devel`` branches.
|
||||
``dev/...`` or ``feature/...``
|
||||
New functionality under development that is to be merged
|
||||
into the ``devel`` branch.
|
||||
|
||||
There are also a few older development branches that are slowly being migrated or deleted.
|
||||
|
||||
All these branches and branch patterns are set up to automatically get a correct :ref:`version number <sec-development-versions>`
|
||||
generated through versioneer and thus should also be adhered to during development.
|
||||
@@ -1,20 +1,21 @@
|
||||
.. _sec-development-environment:
|
||||
|
||||
************************************
|
||||
Setting up a Development environment
|
||||
====================================
|
||||
************************************
|
||||
|
||||
.. _sec-development-environment-source:
|
||||
|
||||
Obtaining, building and running the source
|
||||
------------------------------------------
|
||||
==========================================
|
||||
|
||||
This describes the general steps in obtaining, building and running. OS specific instructions can be found
|
||||
This describes the **general, platform agnostic** steps in obtaining, building and running. OS specific instructions can be found
|
||||
below.
|
||||
|
||||
* Prerequisites:
|
||||
|
||||
* `Python 2.7 <https://python.org>`_ including ``pip``, ``setuptools`` and ``virtualenv``
|
||||
* `Python 3.7 <https://python.org>`_ including ``pip``, ``setuptools`` and ``virtualenv``
|
||||
* `Python 2.7 <https://python.org>`_ including ``pip``, ``setuptools`` and ``virtualenv``
|
||||
* `Git <https://git-scm.com>`_
|
||||
|
||||
* Checkout the OctoPrint sources from their Git repository:
|
||||
@@ -26,8 +27,8 @@ below.
|
||||
installing and running OctoPrint and its dependencies. Creating virtual environments avoids potential versioning
|
||||
issues for the dependencies with system wide installed instances:
|
||||
|
||||
* PY2: ``virtualenv --python=python2 venv2``
|
||||
* PY3: ``virtualenv --python=python3 venv3``
|
||||
* PY2: ``virtualenv --python=python2 venv2``
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -35,10 +36,11 @@ below.
|
||||
binaries cannot be found on your ``PATH`` like this you'll need to specify the full paths to them here,
|
||||
e.g. ``virtualenv --python=/path/to/python2/bin/python venv2``
|
||||
|
||||
* Activate one of the virtual environments:
|
||||
* Activate one of the virtual environments (the Python 3 venv should be considered the
|
||||
primary one at this point):
|
||||
|
||||
* PY2: ``source venv2/bin/activate`` (Linux, macOS) or ``source venv2/Scripts/activate`` (Git Bash under Windows, see below)
|
||||
* PY3: ``source venv3/bin/activate`` (Linux, macOS) or ``source venv3/Scripts/activate`` (Git Bash under Windows, see below)
|
||||
* PY2: ``source venv2/bin/activate`` (Linux, macOS) or ``source venv2/Scripts/activate`` (Git Bash under Windows, see below)
|
||||
|
||||
* Update ``pip`` in the virtual environment:
|
||||
|
||||
@@ -49,10 +51,20 @@ below.
|
||||
|
||||
* ``pip install -e '.[develop,plugins]'``
|
||||
|
||||
* Set up the pre-commit hooks that make sure any changes you do adhere to the styling rules:
|
||||
|
||||
* ``pre-commit install``
|
||||
|
||||
* Tell ``git`` where to find the file with revisions to exclude for ``git blame``:
|
||||
|
||||
* ``git config blame.ignoreRevsFile .git-blame-ignore-revs``
|
||||
|
||||
When the virtual environment is activated you can then:
|
||||
|
||||
* run the OctoPrint server via ``octoprint serve``
|
||||
* run the test suite from the checked out source folder via ``pytest``
|
||||
* trigger the pre-commit check suite manually from the checked out source folder via
|
||||
``pre-commit run --hook-stage manual --all-files``
|
||||
|
||||
To switch the activated virtual environment, simply activate the new environment as described above.
|
||||
|
||||
@@ -62,16 +74,18 @@ If you also want to be able to build the documentation that resides in the ``doc
|
||||
the *Python 3* environment and install the docs dependencies as well:
|
||||
|
||||
* ``source venv3/bin/activate`` (Linux, macOS) or ``source venv3/Scripts/activate`` (Git Bash under Windows, see below)
|
||||
* ``pip install -e .[develop,plugins,docs]``
|
||||
* ``pip install -e '.[develop,plugins,docs]'``
|
||||
|
||||
You can then build the documentation:
|
||||
Go to the directory `docs` and you can then build the documentation:
|
||||
|
||||
* ``sphinx-build -b html . _build``
|
||||
|
||||
The documentation will be available in the newly created ``_build`` directory. You can simply browse it locally by opening ``index.html``
|
||||
|
||||
.. _sec-development-environment-source-linux:
|
||||
|
||||
Linux
|
||||
.....
|
||||
-----
|
||||
|
||||
This assumes you'll host your OctoPrint development checkout at ``~/devel/OctoPrint``. If you want to use a different
|
||||
location, please substitute accordingly.
|
||||
@@ -102,17 +116,19 @@ Then:
|
||||
virtualenv --python=python3 venv3
|
||||
source ./venv2/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install -e .[develop,plugins]
|
||||
pip install -e '.[develop,plugins]'
|
||||
source ./venv3/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install -e .[develop,plugins,docs]
|
||||
pip install -e '.[develop,plugins,docs]'
|
||||
pre-commit install
|
||||
git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
|
||||
You can then start OctoPrint via ``octoprint`` after activating one of the two virtual environments.
|
||||
|
||||
.. _sec-development-environment-windows:
|
||||
|
||||
Windows
|
||||
.......
|
||||
-------
|
||||
|
||||
This assumes you'll host your OctoPrint development checkout at ``C:\Devel\OctoPrint``. If you want to use a different
|
||||
location, please substitute accordingly.
|
||||
@@ -121,17 +137,18 @@ First download & install:
|
||||
|
||||
* `Git for Windows <https://git-for-windows.github.io/>`_
|
||||
* `Latest *stable* Python 2.7 and Python 3.8 releases from python.org <https://www.python.org/downloads/windows/>`_
|
||||
(at the time of writing those are ``2.7.18`` and ``3.8.4``)
|
||||
(at the time of writing those are ``2.7.18`` and ``3.8.7``)
|
||||
|
||||
* make sure to have the installer add Python to the ``PATH`` and have it install ``pip`` too
|
||||
* it's recommended to install Python 2.7 into ``C:\Python27`` and Python 3 into ``C:\Python38`` - if you select
|
||||
different install locations please substitute accordingly
|
||||
* it's also recommended to have both versions get installed for all users
|
||||
|
||||
* `Microsoft Visual C++ Compiler for Python 2.7 <http://www.microsoft.com/en-us/download/details.aspx?id=44266>`_
|
||||
* `Build Tools For Visual Studio 2019 <https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2019>`_
|
||||
|
||||
* install "C++ build tools" and ensure the latest versions of "MSVCv142 - VS 2019 C++ x64/x86 build tools" and
|
||||
"Windows 10 SDK" are checked.
|
||||
"Windows 10 SDK" are checked under individual components.
|
||||
|
||||
Open the Git Bash you just installed and in that:
|
||||
|
||||
@@ -144,16 +161,43 @@ Open the Git Bash you just installed and in that:
|
||||
virtualenv --python=C:\Python27\python.exe venv2
|
||||
virtualenv --python=C:\Python38\python.exe venv3
|
||||
source ./venv2/Scripts/activate
|
||||
pip install --upgrade pip
|
||||
pip install -e .[develop,plugins]
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e '.[develop,plugins]'
|
||||
source ./venv3/Scripts/activate
|
||||
pip install --upgrade pip
|
||||
pip install -e .[develop,plugins,docs]
|
||||
python -m pip install -e '.[develop,plugins,docs]'
|
||||
pre-commit install
|
||||
git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
|
||||
.. _sec-development-environment-windows-optional:
|
||||
|
||||
Optional but recommended tools
|
||||
..............................
|
||||
|
||||
These are some tools that are recommended but not required to have on hand:
|
||||
|
||||
* `Visual Studio Code <https://code.visualstudio.com/download>`_
|
||||
* `Windows Terminal <https://github.com/microsoft/terminal>`_
|
||||
|
||||
Add the following profile to ``profiles.list`` in the settings, that will allow you to
|
||||
easily start Git Bash from the terminal:
|
||||
|
||||
.. code-block:: js
|
||||
|
||||
{
|
||||
"guid": "{3df4550c-eebd-496c-a189-e55f2f8b01ce}",
|
||||
"hidden": false,
|
||||
"name": "Git Bash",
|
||||
"commandline": "C:\\Program Files\\Git\\bin\\bash.exe --login -i",
|
||||
"startingDirectory": "C:\\Devel",
|
||||
"tabTitle": "Git Bash",
|
||||
"suppressApplicationTitle": true
|
||||
},
|
||||
|
||||
.. _sec-development-environment-mac:
|
||||
|
||||
Mac OS X
|
||||
........
|
||||
--------
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -197,12 +241,14 @@ You'll need a user account with administrator privileges.
|
||||
virtualenv venv
|
||||
source venv/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install -e .[develop,plugins]
|
||||
pip install -e '.[develop,plugins]'
|
||||
pre-commit install
|
||||
git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
|
||||
.. _sec-development-environment-ides:
|
||||
|
||||
IDE Setup
|
||||
---------
|
||||
=========
|
||||
|
||||
.. todo::
|
||||
|
||||
@@ -213,7 +259,7 @@ IDE Setup
|
||||
.. _sec-development-environment-ides-pycharm:
|
||||
|
||||
PyCharm
|
||||
.......
|
||||
-------
|
||||
|
||||
- "File" > "Open ...", select OctoPrint checkout folder (e.g. ``~/devel/OctoPrint`` or ``C:\Devel\OctoPrint``)
|
||||
- Register virtual environments:
|
||||
@@ -245,7 +291,7 @@ PyCharm
|
||||
|
||||
* Name: Update OctoPrint dependencies
|
||||
* Program: ``$ModuleSdkPath$``
|
||||
* Parameters: ``-m pip install -e .[develop,plugins]``
|
||||
* Parameters: ``-m pip install -e '.[develop,plugins]'``
|
||||
* Working directory: ``$ProjectFileDir$``
|
||||
|
||||
Note that sadly that seems to cause some hiccups on current PyCharm versions due to ``$PyInterpreterDirectory$``
|
||||
@@ -274,7 +320,19 @@ PyCharm
|
||||
the documentation, see above on how to set this up.
|
||||
|
||||
Note that this requires you to also have installed the additional ``docs`` dependencies into the Python 3 venv as
|
||||
described above via ``pip install -e .[develop,plugins,docs]``.
|
||||
described above via ``pip install -e '.[develop,plugins,docs]'``.
|
||||
|
||||
- Settings > Tools > File Watchers (you might have to enable this, it's a bundled plugin), add new:
|
||||
|
||||
* Name: pre-commit
|
||||
* File type: Python
|
||||
* Scope: Module 'OctoPrint'
|
||||
* Program: ``<OctoPrint venv3 folder>/bin/pre-commit`` (Linux) or ``<OctoPrint venv3 folder>/Scripts/pre-commit`` (Windows)
|
||||
* Arguments: ``run --hook-stage manual --files $FilePath$``
|
||||
* Output paths to refresh: ``$FilePath$``
|
||||
* Working directory: ``$ProjectFileDir$``
|
||||
* disable "Auto-save edited files to trigger the watched"
|
||||
* enable "Trigger the watched on external changes"
|
||||
|
||||
To switch between Python 2 and 3, all you need to do now is change the Project Default Interpreter and restart
|
||||
OctoPrint. On current PyCharm versions you can do that right from a small selection field in the footer of the IDE.
|
||||
|
||||
@@ -7,6 +7,11 @@ Development
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
|
||||
versioning.rst
|
||||
branches.rst
|
||||
environment.rst
|
||||
virtual_printer.rst
|
||||
profiling.rst
|
||||
request-profiling.rst
|
||||
|
||||
If you are interested in contributing code to OctoPrint, first of all: Thank you! Please make sure to read the
|
||||
`Contribution Guidelines <https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md>`_!
|
||||
@@ -0,0 +1,31 @@
|
||||
.. _sec-development-versions:
|
||||
|
||||
OctoPrint's versioning strategy
|
||||
===============================
|
||||
|
||||
OctoPrint's version numbers follow `PEP440 <https://www.python.org/dev/peps/pep-0440/>`_, with a version format of
|
||||
**MAJOR.MINOR.PATCH** following the contract of `semantic versioning <http://semver.org/>`_.
|
||||
|
||||
The **PATCH** version number will increase in case of hotfix releases [#f1]_.
|
||||
Releases that only change the patch number indicate that they only contain bug fixes, and usually
|
||||
only hotfixes at that. Example: ``1.5.0`` to ``1.5.1``.
|
||||
|
||||
The **MINOR** version number increases with releases that add new functionality while maintaining
|
||||
backwards compatibility on the documented APIs (both internal and external). Example: ``1.4.x`` to ``1.5.0``.
|
||||
|
||||
Finally, the **MAJOR** version number increases if there are breaking API changes that concern any of the
|
||||
documented interfaces (REST API, plugin interfaces, ...). Example: ``1.x.y`` to ``2.0.0``.
|
||||
|
||||
OctoPrint's version numbers are automatically generated using a customized version of
|
||||
`versioneer <https://github.com/warner/python-versioneer>`_ and depend on the selected git branch, nearest
|
||||
git tag and commits. Unless a git tag is used for version number determination, the version number will
|
||||
also contain the git hash within the local version identifier to allow for an exact determination of the
|
||||
active code base (e.g. ``1.2.9.dev68+g46c7a9c``). Additionally, instances with active uncommitted changes
|
||||
will contain ``.dirty`` in the local version identifier.
|
||||
|
||||
.. rubric:: Footnotes
|
||||
|
||||
.. [#f1] Up until 1.4.2, the PATCH version segment was the one increasing most often
|
||||
due to OctoPrint's maintenance releases but with 1.5.0 this will *fully* adhere
|
||||
to the concepts in semantic versioning mandating only bug fixes in patch releases.
|
||||
Maintenance releases will henceforth increase the MINOR segment.
|
||||
@@ -110,11 +110,19 @@ There many configuration options via ``config.yaml`` for the virtual printer tha
|
||||
# < ok T0:34.3/0.0 T1:23.5/0.0 B:43.2/0.0
|
||||
smoothieTemperatureReporting: false
|
||||
|
||||
# Whether M20 responses will include filesize or not
|
||||
#
|
||||
# True: <filename> <filesize in bytes>
|
||||
# False: <filename>
|
||||
extendedSdFileList: false
|
||||
# Settings related to the SD file list output
|
||||
sdFiles:
|
||||
# Whether M20 responses will include filesize or not
|
||||
#
|
||||
# True: <filename> <filesize in bytes>
|
||||
# False: <filename>
|
||||
size: true
|
||||
|
||||
# Whether M20 responses will include longname or not (only if size = true as well)
|
||||
#
|
||||
# True: <filename> <filesize in bytes> <longname>
|
||||
# False: <filename> <filesize in bytes>
|
||||
longname: false
|
||||
|
||||
# Forced pause for retrieving from the outgoing buffer
|
||||
throttle: 0.01
|
||||
@@ -192,6 +200,31 @@ There many configuration options via ``config.yaml`` for the virtual printer tha
|
||||
|
||||
# Simulated ambient temperature in °C
|
||||
ambientTemperature: 21.3
|
||||
|
||||
# Response to M105 when there is a target
|
||||
# Placeholders:
|
||||
# - heater: The heater id (eg. T0, T1, B)
|
||||
# - actual: The actual temperature of the heater
|
||||
# - target: The target temperature of heater
|
||||
m105TargetFormatString: {heater}:{actual:.2f}/ {target:.2f}
|
||||
|
||||
# Response to M105 when there is no target
|
||||
# Placeholders:
|
||||
# - heater: The heater id (eg. T0, T1, B)
|
||||
# - actual: The actual temperature of the heater
|
||||
m105NoTargetFormatString: {heater}:{actual:.2f}
|
||||
|
||||
# Enable virtual EEPROM
|
||||
# If enabled, a file `eeprom.json` will be created in the plugin data folder
|
||||
# to enable settings persistence across connections. Enables M500/1/2/4 commmands
|
||||
# And a selection of other settings commands. Responses modeled on Marlin 2.0
|
||||
enable_eeprom: true
|
||||
|
||||
# Support M503
|
||||
support_m503: true
|
||||
|
||||
# Resend ratio to simulate noise on the line
|
||||
resend_ratio: 0
|
||||
|
||||
.. _sec-development-virtual-printer-log:
|
||||
|
||||
|
||||
@@ -109,6 +109,9 @@ ClientOpened
|
||||
|
||||
**Note:** Name changed in version 1.1.0
|
||||
|
||||
.. versionchanged:: 1.1.0
|
||||
.. versionchanged:: 1.4.0
|
||||
|
||||
ClientAuthed
|
||||
A client has authenticated a user session on the push socket.
|
||||
|
||||
@@ -118,6 +121,8 @@ ClientAuthed
|
||||
valid login session.
|
||||
* ``username``: the name of the user who authed. On the push socket only available with a valid login session.
|
||||
|
||||
.. versionadded:: 1.4.0
|
||||
|
||||
ClientClosed
|
||||
A client has disconnected from the push socket.
|
||||
|
||||
@@ -133,12 +138,16 @@ UserLoggedIn
|
||||
|
||||
* ``username``: the name of the user who logged in
|
||||
|
||||
.. versionadded:: 1.4.0
|
||||
|
||||
UserLoggedOut
|
||||
A user logged out. On the push socket only available with a valid login session with admin rights.
|
||||
|
||||
Payload:
|
||||
* ``username``: the name of the user who logged out
|
||||
|
||||
.. versionadded:: 1.4.0
|
||||
|
||||
ConnectivityChanged
|
||||
The server's internet connectivity changed
|
||||
|
||||
@@ -147,6 +156,8 @@ ConnectivityChanged
|
||||
* ``old``: Old connectivity value (true for online, false for offline)
|
||||
* ``new``: New connectivity value (true for online, false for offline)
|
||||
|
||||
.. versionadded:: 1.3.5
|
||||
|
||||
.. _sec-events-available_events-printer_commmunication:
|
||||
|
||||
Printer communication
|
||||
@@ -155,6 +166,8 @@ Printer communication
|
||||
Connecting
|
||||
The server is attempting to connect to the printer.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
|
||||
Connected
|
||||
The server has connected to the printer.
|
||||
|
||||
@@ -168,6 +181,8 @@ Disconnecting
|
||||
event might not always be sent when the server and printer get disconnected
|
||||
from each other. Do not depend on this for critical life cycle management.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
|
||||
Disconnected
|
||||
The server has disconnected from the printer
|
||||
|
||||
@@ -191,6 +206,8 @@ PrinterStateChanged
|
||||
:func:`~octoprint.printer.PrinterInterface.get_state_id` for possible values.
|
||||
* ``state_string``: Text representation of the new state.
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
|
||||
.. _sec-events-available_events-file_handling:
|
||||
|
||||
File handling
|
||||
@@ -211,6 +228,8 @@ Upload
|
||||
|
||||
* ``file``: the file's path within its storage location. To be removed in 1.4.0.
|
||||
|
||||
.. versionchanged:: 1.4.0
|
||||
|
||||
FileAdded
|
||||
A file has been added to a storage.
|
||||
|
||||
@@ -226,6 +245,8 @@ FileAdded
|
||||
A copied file triggers this for its new path. A moved file first triggers ``FileRemoved`` for its original
|
||||
path and then ``FileAdded`` for the new one.
|
||||
|
||||
.. versionadded:: 1.3.3
|
||||
|
||||
FileRemoved
|
||||
A file has been removed from a storage.
|
||||
|
||||
@@ -240,6 +261,8 @@ FileRemoved
|
||||
|
||||
A moved file first triggers ``FileRemoved`` for its original path and then ``FileAdded`` for the new one.
|
||||
|
||||
.. versionadded:: 1.3.3
|
||||
|
||||
FolderAdded
|
||||
A folder has been added to a storage.
|
||||
|
||||
@@ -253,6 +276,8 @@ FolderAdded
|
||||
A copied folder triggers this for its new path. A moved folder first triggers ``FolderRemoved`` for its original
|
||||
path and then ``FolderAdded`` for the new one.
|
||||
|
||||
.. versionadded:: 1.3.3
|
||||
|
||||
FolderRemoved
|
||||
A folder has been removed from a storage.
|
||||
|
||||
@@ -265,6 +290,8 @@ FolderRemoved
|
||||
|
||||
A moved folder first triggers ``FolderRemoved`` for its original path and then ``FolderAdded`` for the new one.
|
||||
|
||||
.. versionadded:: 1.3.3
|
||||
|
||||
UpdatedFiles
|
||||
A file list was modified.
|
||||
|
||||
@@ -279,6 +306,7 @@ UpdatedFiles
|
||||
reasons of backwards compatibility and will also be sent on modification of ``printables``. It will however
|
||||
be removed with 1.4.0.
|
||||
|
||||
.. versionchanged:: 1.4.0
|
||||
|
||||
MetadataAnalysisStarted
|
||||
The metadata analysis of a file has started.
|
||||
@@ -293,6 +321,8 @@ MetadataAnalysisStarted
|
||||
|
||||
* ``file``: the file's path within its storage location. To be removed in 1.4.0.
|
||||
|
||||
.. versionchanged:: 1.4.0
|
||||
|
||||
MetadataAnalysisFinished
|
||||
The metadata analysis of a file has finished.
|
||||
|
||||
@@ -307,6 +337,8 @@ MetadataAnalysisFinished
|
||||
|
||||
* ``file``: the file's path within its storage location. To be removed in 1.4.0.
|
||||
|
||||
.. versionchanged:: 1.4.0
|
||||
|
||||
FileSelected
|
||||
A file has been selected for printing.
|
||||
|
||||
@@ -321,6 +353,8 @@ FileSelected
|
||||
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``). To be removed in 1.4.0.
|
||||
* ``filename``: the file's name. To be removed in 1.4.0.
|
||||
|
||||
.. versionchanged:: 1.4.0
|
||||
|
||||
FileDeselected
|
||||
No file is selected any more for printing.
|
||||
|
||||
@@ -334,6 +368,8 @@ TransferStarted
|
||||
|
||||
**Note:** Name changed in version 1.1.0
|
||||
|
||||
.. versionchanged:: 1.1.0
|
||||
|
||||
TransferDone
|
||||
A file transfer to the printer's SD has finished.
|
||||
|
||||
@@ -365,6 +401,8 @@ PrintStarted
|
||||
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``). To be removed in 1.4.0.
|
||||
* ``filename``: the file's name. To be removed in 1.4.0.
|
||||
|
||||
.. versionchanged:: 1.4.0
|
||||
|
||||
PrintFailed
|
||||
A print failed.
|
||||
|
||||
@@ -383,6 +421,8 @@ PrintFailed
|
||||
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``). To be removed in 1.4.0.
|
||||
* ``filename``: the file's name. To be removed in 1.4.0.
|
||||
|
||||
.. versionchanged:: 1.4.0
|
||||
|
||||
PrintDone
|
||||
A print completed successfully.
|
||||
|
||||
@@ -400,6 +440,8 @@ PrintDone
|
||||
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``). To be removed in 1.4.0.
|
||||
* ``filename``: the file's name. To be removed in 1.4.0.
|
||||
|
||||
.. versionchanged:: 1.4.0
|
||||
|
||||
PrintCancelling
|
||||
The print is about to be cancelled.
|
||||
|
||||
@@ -413,6 +455,8 @@ PrintCancelling
|
||||
* ``user``: the user who cancelled the print job (if available)
|
||||
* ``firmwareError``: the firmware error that caused cancelling the print job, if any
|
||||
|
||||
.. versionadded:: 1.3.7
|
||||
|
||||
PrintCancelled
|
||||
The print has been cancelled.
|
||||
|
||||
@@ -443,6 +487,8 @@ PrintCancelled
|
||||
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``). To be removed in 1.4.0.
|
||||
* ``filename``: the file's name. To be removed in 1.4.0.
|
||||
|
||||
.. versionchanged:: 1.4.0
|
||||
|
||||
PrintPaused
|
||||
The print has been paused.
|
||||
|
||||
@@ -472,6 +518,8 @@ PrintPaused
|
||||
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``). To be removed in 1.4.0.
|
||||
* ``filename``: the file's name. To be removed in 1.4.0.
|
||||
|
||||
.. versionchanged:: 1.4.0
|
||||
|
||||
PrintResumed
|
||||
The print has been resumed.
|
||||
|
||||
@@ -489,6 +537,36 @@ PrintResumed
|
||||
* ``file``: the file's full path on disk (``local``) or within its storage (``sdcard``). To be removed in 1.4.0.
|
||||
* ``filename``: the file's name. To be removed in 1.4.0.
|
||||
|
||||
.. versionchanged:: 1.4.0
|
||||
|
||||
GcodeScript${ScriptName}Running
|
||||
A custom :ref:`GCODE script <sec-features-gcode_scripts>` has started running.
|
||||
|
||||
Payload:
|
||||
|
||||
* ``name``: the file's name
|
||||
* ``path``: the file's path within its storage location
|
||||
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
|
||||
* ``size``: the file's size in bytes (if available)
|
||||
* ``owner``: the user who started the print job (if available)
|
||||
* ``time``: the time needed for the print, in seconds (float)
|
||||
|
||||
.. versionadded:: 1.6.0
|
||||
|
||||
GcodeScript${ScriptName}Finished
|
||||
A custom :ref:`GCODE script <sec-features-gcode_scripts>` has finished running.
|
||||
|
||||
Payload:
|
||||
|
||||
* ``name``: the file's name
|
||||
* ``path``: the file's path within its storage location
|
||||
* ``origin``: the origin storage location of the file, either ``local`` or ``sdcard``
|
||||
* ``size``: the file's size in bytes (if available)
|
||||
* ``owner``: the user who started the print job (if available)
|
||||
* ``time``: the time needed for the print, in seconds (float)
|
||||
|
||||
.. versionadded:: 1.6.0
|
||||
|
||||
.. _sec-events-available_events-gcode_processing:
|
||||
|
||||
GCODE processing
|
||||
@@ -543,6 +621,8 @@ PositionUpdate
|
||||
* ``t``: last tool selected *through OctoPrint*
|
||||
* ``f``: last feedrate for move commands ``G0``, ``G1`` or ``G28`` sent *through OctoPrint*
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
|
||||
ToolChange
|
||||
A tool change command was sent to the printer. The payload contains the former current tool index and the
|
||||
new current tool index.
|
||||
@@ -552,6 +632,34 @@ ToolChange
|
||||
* ``old``: old tool index
|
||||
* ``new``: new tool index
|
||||
|
||||
.. versionadded:: 1.3.5
|
||||
|
||||
CommandSuppressed
|
||||
A command was suppressed by OctoPrint due to according configuration and will not be
|
||||
sent to the printer.
|
||||
|
||||
Payload:
|
||||
|
||||
* ``command``: the command that was suppressed
|
||||
* ``message``: a message containing an explanation of the command suppression
|
||||
* ``severity``: a severity level, either ``warn`` or ``info`` - ``warn`` indicates
|
||||
that the command was suppressed probably due to a misconfiguration either inside
|
||||
OctoPrint or the firmware and that it should be investigated by the user
|
||||
|
||||
.. versionadded:: 1.5.0
|
||||
|
||||
InvalidToolReported
|
||||
The firmware reported a tool as invalid upon trying to select it. It has thus been marked
|
||||
as invalid and further attempts to select said tool will result in the tool command
|
||||
to get suppressed (and ``SuppressedCommand`` to be generated).
|
||||
|
||||
Payload:
|
||||
|
||||
* ``tool``: the tool number that was reported as invalid by the firmware
|
||||
* ``fallback``: the tool number that OctoPrint will revert to
|
||||
|
||||
.. versionadded:: 1.5.0
|
||||
|
||||
.. _sec-events-available_events-timelapses:
|
||||
|
||||
Timelapses
|
||||
@@ -577,6 +685,8 @@ CaptureFailed
|
||||
* ``file``: the name of the image file that should have been saved
|
||||
* ``error``: the error that was caught
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
|
||||
MovieRendering
|
||||
The timelapse movie has started rendering.
|
||||
|
||||
@@ -669,6 +779,8 @@ SlicingProfileAdded
|
||||
* ``slicer``: the slicer for which the profile was added
|
||||
* ``profile``: the profile that was added
|
||||
|
||||
.. versionadded:: 1.2.12
|
||||
|
||||
SlicingProfileModified
|
||||
A slicing profile was modified.
|
||||
|
||||
@@ -677,6 +789,8 @@ SlicingProfileModified
|
||||
* ``slicer``: the slicer for which the profile was modified
|
||||
* ``profile``: the profile that was modified
|
||||
|
||||
.. versionadded:: 1.2.12
|
||||
|
||||
SlicingProfileDeleted
|
||||
A slicing profile was deleted.
|
||||
|
||||
@@ -685,6 +799,8 @@ SlicingProfileDeleted
|
||||
* ``slicer``: the slicer for which the profile was deleted
|
||||
* ``profile``: the profile that was deleted
|
||||
|
||||
.. versionadded:: 1.2.12
|
||||
|
||||
.. _sec-events-available_events-settings:
|
||||
|
||||
Settings
|
||||
@@ -696,6 +812,8 @@ SettingsUpdated
|
||||
This event may also be triggered if calling code of :py:class:`octoprint.settings.Settings.save` or
|
||||
:py:class:`octoprint.plugin.PluginSettings.save` sets the ``trigger_event`` parameter to ``True``.
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
.. _sec-events-available_events-printer_profile:
|
||||
|
||||
Printer Profile
|
||||
@@ -707,3 +825,6 @@ PrinterProfileModified
|
||||
Payload:
|
||||
|
||||
* ``identifier``: the identifier of the modified printer profile
|
||||
|
||||
.. versionadded:: 1.3.12
|
||||
|
||||
+195
-52
@@ -3,6 +3,8 @@
|
||||
Access Control
|
||||
==============
|
||||
|
||||
.. versionchanged:: 1.5.0
|
||||
|
||||
OctoPrint's bundled access control feature allows granular permission control
|
||||
over which users or user groups are allowed to access which parts of OctoPrint.
|
||||
|
||||
@@ -15,8 +17,17 @@ users out of the box.
|
||||
thus also cannot limit access to it. If an anonymous user correctly guesses the
|
||||
webcam URL, they will thus be able to see it.
|
||||
|
||||
If read-only access for anonymous users is enabled, anonymous users will have
|
||||
read-only access to the following parts of the UI:
|
||||
Upon first start a configuration wizard is provided which allows configuration
|
||||
of the first administrator account to be used for OctoPrint. After initial setup,
|
||||
you can then create more users and groups under Settings > Access Control for
|
||||
customisation of the granular permission system.
|
||||
|
||||
The predefined "Guests" group can be used to configure default permissions of anonymous
|
||||
users, that is those who have not logged in. By default, no permissions are granted to
|
||||
these users.
|
||||
|
||||
A predefined "Read-only Access" group with no users is configured which by default grants
|
||||
read-only access to the following parts of the UI to any users assigned to this group:
|
||||
|
||||
* printer state
|
||||
* available gcode files and stats (upload is disabled)
|
||||
@@ -28,29 +39,196 @@ read-only access to the following parts of the UI:
|
||||
* any components provided through plugins which are enabled for anonymous
|
||||
users
|
||||
|
||||
Logged in users without admin flag will be allowed to access everything besides the
|
||||
Settings and System Commands, which are admin-only.
|
||||
Another predefined "Operator" group is the default group for newly created users and
|
||||
by default gives access to all aspects of OctoPrint that involve regular printer
|
||||
operation. It matches the old "user" role from OctoPrint prior to 1.4.0.
|
||||
|
||||
If Access Control is disabled, everything is directly accessible. **That also
|
||||
includes all administrative functionality as well as full control over the
|
||||
printer**, and without the need for an :ref:`API key <sec-api-general-authorization>`!
|
||||
|
||||
Upon first start a configuration wizard is provided which allows configuration
|
||||
of the first administrator account or alternatively disabling Access Control
|
||||
(which is **NOT** recommended for systems that are directly accessible via the
|
||||
internet or other untrusted networks!).
|
||||
Finally, the predefined "Admins" group gives full admin access to the platform. You should
|
||||
be careful of who you put into that. It matches the old "admin" role from OctoPrint prior
|
||||
to 1.4.0.
|
||||
|
||||
.. hint::
|
||||
|
||||
If you plan to have your OctoPrint instance accessible over the internet,
|
||||
**always enable Access Control** and ideally **don't make it accessible to
|
||||
**please use additional security measures** and ideally **don't make it accessible to
|
||||
everyone over the internet but instead use a VPN** or at the very least
|
||||
HTTP basic authentication on a layer above OctoPrint.
|
||||
HTTP basic authentication on a layer above OctoPrint. Unless you are using a VPN
|
||||
**please do not** enable any permissions for the Guest group or the auto-login feature
|
||||
described below.
|
||||
|
||||
A physical device that includes heaters and stepper motors really should not be
|
||||
publicly reachable by everyone with an internet connection, even with access
|
||||
control enabled.
|
||||
|
||||
.. _sec-features-access_control-autologin:
|
||||
|
||||
Autologin
|
||||
---------
|
||||
|
||||
While access control cannot be disabled as of OctoPrint 1.5+, the Autologin feature can
|
||||
be used to bypass authentication for hosts on the network(s) that you trust.
|
||||
|
||||
Starting with OctoPrint 1.5.0, OctoPrint makes enabled access control mandatory. This
|
||||
might be an inconvience for some who run OctoPrint in an isolated setup where a login is
|
||||
not required to ensure security, at a benefit for a huge number of users out there who
|
||||
continue to underestimate or simply ignore the risk of keeping their OctoPrint instance
|
||||
unsecured and then happily exposing it on the public internet.
|
||||
|
||||
That being said, even as far back as OctoPrint 1.0.0 (released in 2013) there has existed
|
||||
a way to have OctoPrint automatically log you in, if you connect from a trusted local
|
||||
network address. This functionality has not been exposed on the UI, and for now also won't
|
||||
be (to make it a bit harder to once again create an insecure setup for those who simply
|
||||
won't listen to common sense), but it's easy to set up with a bit of configuration
|
||||
editing.
|
||||
|
||||
When set up properly, it will make sure to automatically log you in as a configured user
|
||||
whenever you connect from a device on your local network. To get back pretty much the same
|
||||
behaviour as with disabled access control, you'll only need to create a single (admin)
|
||||
account and then set up autologin for it.
|
||||
|
||||
|
||||
.. warning::
|
||||
|
||||
**Do not do this if you cannot trust EVERYONE on your local network.** And that really
|
||||
means mean everyone. If you ignore this and then someone takes over your OctoPrint
|
||||
instance, installs malware on it and makes your printer print an endless stream of
|
||||
benchies, that's on you.
|
||||
|
||||
.. _sec-features-access_control-autologin-gather_config_info:
|
||||
|
||||
Gather configuration information
|
||||
................................
|
||||
|
||||
You can configure Autologin via a plugin (the easy way), or manually (the hard way), but
|
||||
in either case you will need to specify which user should be automatically logged in, and
|
||||
which hosts are permitted access this way.
|
||||
|
||||
**Improperly setting this subnet option can lead to the compromise of your system, or even
|
||||
your entire network. Proceed with extreme caution.**
|
||||
|
||||
The subnet to use is usually the IP address range of your LAN, which sounds scary but
|
||||
actually isn't. Just `figure out your PC's IP address and subnet mask <https://lifehacker.com/how-to-find-your-local-and-external-ip-address-5833108>`_
|
||||
and then combine both with a / in between.
|
||||
|
||||
On OctoPi (or another Linux distribution) you can use the follwing command:
|
||||
|
||||
.. code-block::
|
||||
|
||||
ip route | grep -P 'eth0|wlan0' | awk '{print $1}'
|
||||
|
||||
Or, for IPv6, use this:
|
||||
|
||||
.. code-block::
|
||||
|
||||
ip -6 route | grep -P 'eth0|wlan0' | awk '{print $1}'
|
||||
|
||||
This will be what you set as the subnet in the plugin, or where it says
|
||||
``<yourAddressRange>`` below on the manual configuration instructions.
|
||||
|
||||
Example: Your PC has an IP address of ``192.168.23.42`` and a subnet mask of
|
||||
``255.255.255.0``. Your address range is ``192.168.23.42/255.255.255.0``.
|
||||
|
||||
.. _sec-features-access_control-autologin-plugin:
|
||||
|
||||
The easy way: Using the OctoPrint-AutoLoginConfig plugin
|
||||
........................................................
|
||||
|
||||
The easist way to configure AutoLogin is to install the
|
||||
`OctoPrint-AutoLoginConfig plugin <https://plugins.octoprint.org/plugins/autologin_config/>`_
|
||||
via the plugin manager.
|
||||
|
||||
Open its settings and follow the instructions on the screen.
|
||||
|
||||
.. _sec-features-access_control-autologin-manual:
|
||||
|
||||
The hard way: Manual editing of config.yaml
|
||||
...........................................
|
||||
|
||||
Preparation
|
||||
***********
|
||||
|
||||
First of all, read :ref:`the YAML primer <sec-configuration-yaml>`. You
|
||||
will have to edit OctoPrint's main configuration file, and thus should make sure
|
||||
you understand at least roughly how things work and that you should keep your
|
||||
hands off the Tab key. If you don't, you might break your config file, and
|
||||
while the steps include making a backup, this still can be easily avoided by
|
||||
learning about the DOs and DONTs first.
|
||||
|
||||
Then, take a look at :ref:`the docs on config.yaml <sec-configuration-config_yaml>`
|
||||
on where to find that central configuration file of OctoPrint.
|
||||
|
||||
Configuration
|
||||
*************
|
||||
|
||||
Ready? Let's do some editing then. I'll outline what to do and where first, and then
|
||||
further down there's also a dedicated list of steps for OctoPi specifically.
|
||||
|
||||
1. Shutdown OctoPrint
|
||||
2. Make a backup of your config.yaml
|
||||
3. Open it in a text editor (e.g. nano). Right at the very top it'll say something like
|
||||
this:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
accessControl:
|
||||
salt: aabbccddee1234523452345
|
||||
|
||||
Edit this, adding lines so it looks like this (making absolutely sure not to touch the
|
||||
salt line):
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
accessControl:
|
||||
salt: aabbccddee1234523452345
|
||||
autologinLocal: true
|
||||
autologinAs: "<yourUsername>"
|
||||
localNetworks:
|
||||
- "127.0.0.0/8"
|
||||
- "<yourAddressRange>"
|
||||
|
||||
4. Restart OctoPrint, check that everything works.
|
||||
|
||||
This will automatically log you in as the user you specified whenver you connect to
|
||||
OctoPrint from an address in the address range (e.g. a device on your local network).
|
||||
|
||||
OctoPi specific steps
|
||||
*********************
|
||||
|
||||
If you are running OctoPi you will have to SSH into your Raspberry Pi. Then issue
|
||||
the following commands:
|
||||
|
||||
1. ``sudo service octoprint stop``
|
||||
2. ``cp ~/.octoprint/config.yaml ~/.octoprint/config.yaml.back``
|
||||
3. ``nano ~/.octoprint/config.yaml, make the edits as described above``
|
||||
4. ``sudo service octoprint start``
|
||||
|
||||
If something went wrong, you can restore the config backup with
|
||||
|
||||
.. code-block::
|
||||
|
||||
cp ~/.octoprint/config.yaml.back ~/.octoprint/config.yaml
|
||||
|
||||
|
||||
If you are using a VPN and your setup ABSOLUTELY REQUIRES disabling internal OctoPrint access controls
|
||||
......................................................................................................
|
||||
|
||||
.. warning::
|
||||
|
||||
You probably shouldn't do this, EVER. There are usually other options. Don't even
|
||||
THINK about it, unless you have a VPN layer for security. Only consider proceeding
|
||||
with this configuration after exhausting ALL other possibilities, and even then, you
|
||||
should think long and hard about whether this is a good idea. You almost certainly
|
||||
don't need or want to do this.
|
||||
|
||||
While access controls can no longer be disabled in OctoPrint 1.5+, this can be
|
||||
approximated by an Autologin configuration that automatically logs in all users, that is
|
||||
by using subnets that match all possible IP addresses. By specifying the ``0.0.0.0/0``
|
||||
subnet (for IPv4) and ``::/0`` for IPv6 in the AutoLogin configuration, you can achieve
|
||||
this. This configuration is permitted, but highly, highly discouraged.
|
||||
|
||||
Please don't do this. You will almost certainly regret it. You alone are responsible for
|
||||
your actions.
|
||||
|
||||
.. _sec-features-access_control-hooks:
|
||||
|
||||
Available Extension Hooks
|
||||
@@ -69,42 +247,7 @@ See :ref:`here <sec-plugins-hook-permissions>`.
|
||||
|
||||
.. _sec-features-access_control-hooks-loginui:
|
||||
|
||||
octoprint.plugin.loginui.theming
|
||||
................................
|
||||
octoprint.theming.login
|
||||
.......................
|
||||
|
||||
See :ref:`here <sec-bundledplugins-loginui-hooks-theming>`.
|
||||
|
||||
.. _sec-features-access_control-rerunning_wizard:
|
||||
|
||||
Rerunning the wizard
|
||||
--------------------
|
||||
|
||||
In case Access Control was disabled in the configuration wizard, it is
|
||||
possible to re-run it by editing ``config.yaml`` [#f1]_ and setting ``firstRun``
|
||||
in the ``server`` section and ``enabled`` in the ``accessControl`` section to
|
||||
``true``:
|
||||
|
||||
.. code-block-ext:: yaml
|
||||
|
||||
accessControl:
|
||||
enabled: true
|
||||
# ...
|
||||
server:
|
||||
firstRun: true
|
||||
|
||||
Then restart the server and connect to the web interface - the wizard should
|
||||
be shown again.
|
||||
|
||||
.. note::
|
||||
|
||||
If user accounts were created prior to disabling Access Control and those
|
||||
user accounts are not to be used any more, remove ``.octoprint/users.yaml``.
|
||||
If you don't remove this file, the above changes won't lead to the
|
||||
configuration being shown again, instead Access Control will just be
|
||||
enabled using the already existing login data. This is to prevent you from
|
||||
resetting access control by accident.
|
||||
|
||||
.. rubric:: Footnotes
|
||||
|
||||
.. [#f1] For Linux that will be ``~/.octoprint/config.yaml``, for Windows it will be ``%APPDATA%/OctoPrint/config.yaml`` and for
|
||||
Mac ``~/Library/Application Support/OctoPrint/config.yaml``
|
||||
See :ref:`here <sec-plugins-hook-theming-dialog>`.
|
||||
@@ -21,8 +21,14 @@ Action commands are a feature defined for the GCODE based RepRap communication p
|
||||
|
||||
OctoPrint out of the box supports handling of the above mentioned commands:
|
||||
|
||||
start
|
||||
When this command is received from the printer, a job is currently selected and *not* active, OctoPrint
|
||||
will start it just like if the "Start"/"Restart" button had been clicked.
|
||||
|
||||
.. versionadded:: 1.5.0
|
||||
|
||||
cancel
|
||||
When this command is received from the printer, OctoPrint will cancel a current print job like if the
|
||||
When this command is received from the printer, OctoPrint will cancel a current print job just like if the
|
||||
"Cancel" button had been clicked.
|
||||
|
||||
pause
|
||||
@@ -48,6 +54,27 @@ resumed
|
||||
disconnect
|
||||
When this command is received from the printer, OctoPrint will immediately disconnect from it.
|
||||
|
||||
sd_inserted
|
||||
When this command is received from the printer, OctoPrint will assume an SD card is present in the printer,
|
||||
set the corresponding internal state flags and send a file list request. This command is only recognized
|
||||
if SD support is enabled in OctoPrint.
|
||||
|
||||
.. versionadded:: 1.6.0
|
||||
|
||||
sd_ejected
|
||||
When this command is received from the printer, OctoPrint will assume the SD card has been removed from
|
||||
the printer and clear the corresponding internal state flags. This command is only recognized
|
||||
if SD support is enabled in OctoPrint.
|
||||
|
||||
.. versionadded:: 1.6.0
|
||||
|
||||
sd_updated
|
||||
When this command is received from the printer, OctoPrint will assume something on the SD card in the
|
||||
printer has changed and trigger a file list request. This command is only recognized
|
||||
if SD support is enabled in OctoPrint.
|
||||
|
||||
.. versionadded:: 1.6.0
|
||||
|
||||
If the bundled :ref:`Action Command Prompt Support Plugin <sec-bundledplugins-action_command_prompt>` is enabled (which
|
||||
should be the case by default), OctoPrint will also interactive dialog creation through its :ref:`supported commands <sec-bundledplugins-action_command_prompt-action_commands>`.
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
@ Commands
|
||||
==========
|
||||
|
||||
.. versionadded:: 1.3.7
|
||||
|
||||
@ commands (also known as host commands elsewhere) are special commands you may include in GCODE files streamed
|
||||
through OctoPrint to your printer or send as part of GCODE scripts, through the Terminal Tab, the API or plugins.
|
||||
Contrary to other commands they will never be sent to the printer but instead trigger functions inside OctoPrint.
|
||||
|
||||
@@ -172,9 +172,10 @@ Controls
|
||||
turn the button red.
|
||||
* - ``enabled``
|
||||
- (Optional) A JavaScript snippet returning either ``true`` or ``false`` determining whether the control
|
||||
should be enabled or not. This allow to override the default logic for this (disabled if printer is offline
|
||||
or currently printing). The JavaScript snippet is ``eval``'d and processed in a context where the control
|
||||
it is part of is provided as local variable ``data`` and the ``ControlViewModel`` is available as ``self``.
|
||||
should be enabled or not. This allows to override the default logic for the enable state
|
||||
of the control (disabled if printer is offline). The JavaScript snippet is ``eval``'d and processed
|
||||
in a context where the control it is part of is provided as local variable ``data`` and the
|
||||
``ControlViewModel`` is available as ``self``.
|
||||
* - ``input``
|
||||
- (Optional) A list of definitions of input parameters for a ``command`` or ``commands``, to be rendered as
|
||||
additional input fields. ``command``/``commands`` may contain placeholders to be replaced by the values obtained
|
||||
@@ -213,17 +214,28 @@ Controls
|
||||
- (Optional) A :ref:`regular expression <re-syntax>` to
|
||||
match against lines received from the printer to retrieve information from it (e.g. specific output). Together
|
||||
with ``template`` this allows rendition of received data from the printer within the UI.
|
||||
|
||||
**Please also read the note below**.
|
||||
* - ``template``
|
||||
- (Optional) A template to use for rendering the match of ``regex``. May contain placeholders in
|
||||
:ref:`Python Format String Syntax <formatstrings>` for either named
|
||||
groups within the regex (e.g. ``Temperature: {temperature}`` for a regex ``T:\s*(?P<temperature>\d+(\.\d*)``)
|
||||
or positional groups within the regex (e.g. ``Position: X={0}, Y={1}, Z={2}, E={3}`` for a regex
|
||||
``X:([0-9.]+) Y:([0-9.]+) Z:([0-9.]+) E:([0-9.]+)``).
|
||||
|
||||
**Please also read the note below**.
|
||||
* - ``confirm``
|
||||
- (Optional) A text to display to the user to confirm his button press. Can be used with sensitive custom controls
|
||||
like changing EEPROM values in order to prevent accidental clicks. The text will be displayed in a confirmation
|
||||
dialog like in :numref:`fig-configuration-customcontrols-confirm`.
|
||||
|
||||
.. note::
|
||||
|
||||
``regex`` and ``template`` are only supported for controls that are defined through
|
||||
``config.yaml``. These control properties aren't supported for controls added only in
|
||||
the frontend by the :ref:`getAdditionalControls <sec-plugins-viewmodels-callbacks>`
|
||||
view model callback.
|
||||
|
||||
.. _fig-configuration-customcontrols-confirm:
|
||||
.. figure:: ../images/features-custom_controls-confirm.png
|
||||
:align: center
|
||||
|
||||
@@ -43,6 +43,15 @@ The following GCODE scripts are sent by OctoPrint automatically:
|
||||
|
||||
Plugins may extend these scripts through :ref:`a hook <sec-plugins-hook-comm-protocol-scripts>`.
|
||||
|
||||
.. _sec-features-gcode_scripts-events:
|
||||
|
||||
Events
|
||||
------
|
||||
|
||||
Every GCODE script that is executed will emit two events. The event name will start with 'GcodeScript' followed by the capitalized name
|
||||
of the script. When ``afterPrintDone`` has started the event will be ``GcodeScriptAfterPrintDoneRunning`` and once it has completed the last event
|
||||
will be ``GcodeScriptAfterPrintDoneFinished``. You can find more details in the :ref:`Events <sec-events-available_events-printing>` documentation.
|
||||
|
||||
.. _sec-features-gcode_scripts-snippets:
|
||||
|
||||
Snippets
|
||||
@@ -184,7 +193,7 @@ More nifty pause and resume
|
||||
...........................
|
||||
|
||||
If you do not have a multi-extruder setup, aren't printing from SD and have "Log position on pause" enabled under
|
||||
Settings > Serial > Advanced options, the following ``afterPrintPaused`` and
|
||||
Settings > Serial Connection > Behaviour > Pausing, the following ``afterPrintPaused`` and
|
||||
``beforePrintResumed`` scripts might be interesting for you. With something like them in place, OctoPrint will move your print head
|
||||
out of the way to a safe rest position (here ``G1 X0 Y0``, you might want to adjust that) on pause and move it back
|
||||
to the persisted pause position on resume, making sure to also reset the extruder and feedrate.
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
Plugins
|
||||
*******
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
Starting with OctoPrint 1.2.0, there's now a plugin system in place which allows to individually
|
||||
extend OctoPrint's functionality.
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
Safe mode
|
||||
*********
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
.. versionchanged:: 1.3.13
|
||||
|
||||
With the advent of support for plugins in OctoPrint, it quickly became apparent that some of the bugs
|
||||
reported on OctoPrint's bug tracker were actually bugs with installed third party plugins or language
|
||||
packs instead of OctoPrint itself.
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 80 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB |
@@ -14,13 +14,13 @@
|
||||
|
||||
The client library instance's options. The following keys are currently supported:
|
||||
|
||||
``apikey``
|
||||
The API Key to use for requests against the OctoPrint API. Should usually be
|
||||
the anonymous UI API Key provided on the socket.
|
||||
|
||||
``baseurl``
|
||||
The base URL of the OctoPrint API
|
||||
|
||||
``apikey``
|
||||
The API Key to use for requests against the OctoPrint API. If left unset, you'll
|
||||
need to authenticate your session through a login.
|
||||
|
||||
``locale``
|
||||
The locale to set in ``X-Locale`` headers on API requests. Useful for API
|
||||
endpoints that might return localized content.
|
||||
|
||||
@@ -29,6 +29,25 @@
|
||||
Tries to perform a passive login into OctoPrint, using existing session data
|
||||
stored in the browser's cookies.
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
OctoPrint.browser.passiveLogin()
|
||||
.done(function(response) {
|
||||
// do something with the response
|
||||
})
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
var client = new OctoPrintClient({
|
||||
baseurl: "https://example.com/",
|
||||
apikey: "..."
|
||||
});
|
||||
client.browser.passiveLogin()
|
||||
.done(function(response) {
|
||||
// do something with the response, e.g. authenticate with the socket
|
||||
// via response.name and response.session
|
||||
})
|
||||
|
||||
:param object opts: Additional request options
|
||||
:returns Promise: A `jQuery Promise <http://api.jquery.com/Types/#Promise>`_ for the request's response
|
||||
|
||||
|
||||
@@ -40,6 +40,12 @@ because the library depends on those to be available (as ``$`` and ``_``). You c
|
||||
<script src="{{ url_for("static", filename="js/lib/jquery/jquery.min.js") }}"></script>
|
||||
<script src="{{ url_for("static", filename="js/lib/lodash.min.js") }}"></script>
|
||||
|
||||
Moreover, if you need to use the socket module, you'll need to include sockJS. You can embed it like this:
|
||||
|
||||
.. code-block:: html+jinja
|
||||
|
||||
<script src="{{ url_for("static", filename="js/lib/sockjs.min.js") }}"></script>
|
||||
|
||||
Note that all components depend on the ``base`` component to be present, so if you are only including a select
|
||||
number of components, make sure to at the very least include that one to be able to utilize the client.
|
||||
|
||||
|
||||
@@ -64,12 +64,24 @@
|
||||
|
||||
Sends a message of type ``type`` with the provided ``payload`` to the server.
|
||||
|
||||
Note that at the time of writing, OctoPrint only supports the ``throttle`` message. See
|
||||
Note that at the time of writing, OctoPrint only supports the ``throttle`` and ``auth`` messages. See
|
||||
also the :ref:`Push API documentation <sec-api-push>`.
|
||||
|
||||
:param string type: Type of message to send
|
||||
:param object payload: Payload to send
|
||||
|
||||
.. js:function:: OctoPrintClient.socket.sendAuth(userId, session)
|
||||
|
||||
Sends an ``auth`` message with the provided ``userId`` and ``session`` to the server.
|
||||
|
||||
``session`` is expected to be the ``session`` value retrieved
|
||||
from any valid :ref:`OctoPrint.browser.login(userId,...) <sec-jsclientlib-browser>` response.
|
||||
|
||||
See also the :ref:`Push API documentation <sec-api-push>`.
|
||||
|
||||
:param string userId: An existing OctoPrint username
|
||||
:param string session: A valid session id for the provided username
|
||||
|
||||
.. js:function:: OctoPrintClient.socket.onRateTooLow(measured, minimum)
|
||||
|
||||
Called by the socket client when the measured message round trip times have been lower than
|
||||
@@ -102,6 +114,35 @@
|
||||
|
||||
Instructs the server to decrease the message rate by 500ms.
|
||||
|
||||
.. _sec-jsclient-socket-authsample:
|
||||
|
||||
Sample to setup an authed socket
|
||||
================================
|
||||
|
||||
If you have a username and a password:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
OctoPrint.socket.connect();
|
||||
OctoPrint.browser.login("myusername", "mypassword", true)
|
||||
.done(function(response) {
|
||||
OctoPrint.socket.sendAuth("myusername", response.session);
|
||||
});
|
||||
|
||||
If you have an API key:
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
var client = new OctoPrintClient({
|
||||
baseurl: "http://example.com/",
|
||||
apikey: "abcdef"
|
||||
});
|
||||
client.socket.connect();
|
||||
client.browser.passiveLogin()
|
||||
.done(function(response) {
|
||||
client.socket.sendAuth(response.name, response.session);
|
||||
});
|
||||
|
||||
.. _sec-jsclient-socket-throttling:
|
||||
|
||||
Communication Throttling
|
||||
|
||||
@@ -60,3 +60,22 @@ that in the `Plugin Repository's help pages <http://plugins.octoprint.org/help/r
|
||||
If you used the `OctoPrint Plugin Cookiecutter Template <https://github.com/OctoPrint/cookiecutter-octoprint-plugin>`_
|
||||
when creating your plugin, you can find a prepared registration entry ``.md`` file in the ``extras`` folder of your
|
||||
plugin.
|
||||
|
||||
Version management after the official plugin repository release
|
||||
---------------------------------------------------------------
|
||||
|
||||
Once your plugin is available in the official plugin repository, you probably want to create and distribute new versions.
|
||||
For "beta" users you can use the manual file distribution method, or a more elegant release channels (see below).
|
||||
After you finalized a new plugin version, don't forget to actually update the version in the ``setup.py``,
|
||||
and `submit a new release on github <https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/managing-releases-in-a-repository#creating-a-release>`_.
|
||||
|
||||
After you published the new release, you can verify it on your installed octoprint,
|
||||
with force checking the updates under the advanced options (in the software updates menu in the settings).
|
||||
The new versions will appear to the plugin users in the next 24 hours (it depends on their cache refreshes).
|
||||
|
||||
The `Software Update Plugin <https://docs.octoprint.org/en/master/bundledplugins/softwareupdate.html#>`_ has options to define multiple release channels,
|
||||
and you can let the users decide if they want to test your pre-releases or not.
|
||||
This can be achieved with defining ``stable_branch`` and ``prerelease_branches`` in the ``get_update_information`` function,
|
||||
and creating github releases to the newly configured branches too.
|
||||
For more information you can check the `Software Update Plugin documentation <https://docs.octoprint.org/en/master/bundledplugins/softwareupdate.html#version-checks>`_
|
||||
or read a more step-by-step writeup `here <https://github.com/cp2004/OctoPrint-Knowledge/blob/main/release-channels.md>`_.
|
||||
+171
-7
@@ -207,6 +207,8 @@ octoprint.access.permissions
|
||||
|
||||
.. py:function:: additional_permissions_hook(*args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.4.0
|
||||
|
||||
Return a list of additional permissions to register in the system on behalf of the plugin. Use this
|
||||
to add granular permissions to your plugin which can be configured for users and user groups in the general
|
||||
access control settings of OctoPrint.
|
||||
@@ -261,6 +263,8 @@ octoprint.access.users.factory
|
||||
|
||||
.. py:function:: user_manager_factory_hook(components, settings, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.4.0
|
||||
|
||||
Return a :class:`~octoprint.access.users.UserManager` instance to use as global user manager object. This will
|
||||
be called only once during initial server startup.
|
||||
|
||||
@@ -295,6 +299,8 @@ octoprint.accesscontrol.keyvalidator
|
||||
|
||||
.. py:function:: acl_keyvalidator_hook(apikey, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.6
|
||||
|
||||
Via this hook plugins may validate their own customized API keys to be used to access OctoPrint's API.
|
||||
|
||||
``apikey`` will be the API key as read from the request headers.
|
||||
@@ -326,6 +332,8 @@ octoprint.cli.commands
|
||||
|
||||
.. py:function:: cli_commands_hook(cli_group, pass_octoprint_ctx, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
|
||||
By providing a handler for this hook plugins may register commands on OctoPrint's command line interface (CLI).
|
||||
|
||||
Handlers are expected to return a list of callables annotated as `Click commands <http://click.pocoo.org/5/>`_ to register with the
|
||||
@@ -449,6 +457,8 @@ octoprint.comm.protocol.firmware.info
|
||||
|
||||
.. py:function:: firmware_info_hook(comm_instance, firmware_name, firmware_data, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.9
|
||||
|
||||
Be notified of firmware information received from the printer following an ``M115``.
|
||||
|
||||
Hook handlers may use this to react/adjust behaviour based on reported firmware data. OctoPrint parses the received
|
||||
@@ -482,6 +492,8 @@ octoprint.comm.protocol.firmware.capabilities
|
||||
|
||||
.. py:function:: firmware_capability_hook(comm_instance, capability, enabled, already_defined, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.9
|
||||
|
||||
Be notified of capability report entries received from the printer.
|
||||
|
||||
Hook handlers may use this to react to custom firmware capabilities. OctoPrint parses the received capability
|
||||
@@ -507,7 +519,9 @@ octoprint.comm.protocol.firmware.capabilities
|
||||
octoprint.comm.protocol.action
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. py:function:: protocol_action_hook(comm_instance, line, action, *args, **kwargs)
|
||||
.. py:function:: protocol_action_hook(comm_instance, line, action, name='', params='', *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
React to a :ref:`action command <sec-features-action_commands>` received from the printer.
|
||||
|
||||
@@ -534,8 +548,12 @@ octoprint.comm.protocol.action
|
||||
|
||||
:param object comm_instance: The :class:`~octoprint.util.comm.MachineCom` instance which triggered the hook.
|
||||
:param str line: The complete line as received from the printer, format ``// action:<command>``
|
||||
:param str action: The parsed out action command, so for a ``line`` like ``// action:some_command`` this will be
|
||||
:param str action: The parsed out action command incl. parameters, so for a ``line`` like ``// action:some_command key value`` this will be
|
||||
``some_command key value``
|
||||
:param str name: The action command name, for a ``line`` like ``// action:some_command key value`` this will be
|
||||
``some_command``
|
||||
:param str params: The action command's parameter, for a ``line`` like ``// action:some_command key value`` this will
|
||||
be ``key value``
|
||||
|
||||
.. _sec-plugins-hook-comm-protocol-atcommand-phase:
|
||||
|
||||
@@ -549,6 +567,8 @@ This describes actually two hooks:
|
||||
|
||||
.. py:function:: protocol_atcommandphase_hook(comm_instance, phase, command, parameters, tags=None, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.7
|
||||
|
||||
Trigger on :ref:`@ commands <sec-features-atcommands>` as they progress through the ``queuing`` and ``sending``
|
||||
phases of the comm layer. See :ref:`the gcode phase hook <sec-plugins-hook-comm-protocol-gcode-phase>` for a
|
||||
detailed description of each of these phases.
|
||||
@@ -588,7 +608,7 @@ This describes actually two hooks:
|
||||
octoprint.comm.protocol.gcode.<phase>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This describes actually four hooks:
|
||||
This actually describes four hooks:
|
||||
|
||||
* ``octoprint.comm.protocol.gcode.queuing``
|
||||
* ``octoprint.comm.protocol.gcode.queued``
|
||||
@@ -597,6 +617,8 @@ This describes actually four hooks:
|
||||
|
||||
.. py:function:: protocol_gcodephase_hook(comm_instance, phase, cmd, cmd_type, gcode, subcode=None, tags=None, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
Pre- and postprocess commands as they progress through the various phases of being sent to the printer. The phases
|
||||
are the following:
|
||||
|
||||
@@ -750,6 +772,8 @@ octoprint.comm.protocol.gcode.received
|
||||
|
||||
.. py:function:: gcode_received_hook(comm_instance, line, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
|
||||
Get the returned lines sent by the printer. Handlers should return the received line or in any case, the modified
|
||||
version of it. If the handler returns None, processing will be aborted and the communication layer will get an
|
||||
empty string as the received line. Note that Python functions will also automatically return ``None`` if an empty
|
||||
@@ -783,6 +807,8 @@ octoprint.comm.protocol.gcode.error
|
||||
|
||||
.. py:function:: gcode_error_hook(comm_instance, error_message, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.7
|
||||
|
||||
Get the messages of any errors messages sent by the printer, with the leading ``Error:`` or ``!!`` already
|
||||
stripped. Handlers should return True if they handled that error internally and it should not be processed by
|
||||
the system further. Normal processing of these kinds of errors - depending on the configuration of error
|
||||
@@ -820,6 +846,9 @@ octoprint.comm.protocol.scripts
|
||||
|
||||
.. py:function:: protocol_scripts_hook(comm_instance, script_type, script_name, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
.. versionchanged:: 1.3.7
|
||||
|
||||
Return a prefix to prepend, postfix to append, and optionally a dictionary of variables to provide to the script ``script_name`` of type ``type``. Handlers should
|
||||
make sure to only proceed with returning additional scripts if the ``script_type`` and ``script_name`` match
|
||||
handled scripts. If not, None should be returned directly.
|
||||
@@ -864,6 +893,8 @@ octoprint.comm.protocol.temperatures.received
|
||||
|
||||
.. py:function:: protocol_temperatures_received_hook(comm_instance, parsed_temperatures, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.6
|
||||
|
||||
Get the parsed temperatures returned by the printer, allowing handlers to modify them prior to handing them off
|
||||
to the system. Handlers are expected to either return ``parsed_temperatures`` as-is or a modified copy thereof.
|
||||
|
||||
@@ -897,6 +928,8 @@ octoprint.comm.transport.serial.additional_port_names
|
||||
|
||||
.. py:function:: additional_port_names_hook(candidates, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.4.1
|
||||
|
||||
Return additional port names (not glob patterns!) to use as a serial connection to the printer. Expected to be
|
||||
``list`` of ``string``s.
|
||||
|
||||
@@ -916,6 +949,8 @@ octoprint.comm.transport.serial.factory
|
||||
|
||||
.. py:function:: serial_factory_hook(comm_instance, port, baudrate, read_timeout, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
Return a serial object to use as serial connection to the printer. If a handler cannot create a serial object
|
||||
for the specified ``port`` (and ``baudrate``), it should just return ``None``.
|
||||
|
||||
@@ -992,6 +1027,8 @@ octoprint.events.register_custom_events
|
||||
|
||||
.. py:function:: register_custom_events_hook(*args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.11
|
||||
|
||||
Return a list of custom :ref:`events <sec-events>` to register in the system for your plugin.
|
||||
|
||||
Should return a list of strings which represent the custom events. Their name on the `octoprint.events.Events` object
|
||||
@@ -1020,6 +1057,8 @@ octoprint.filemanager.analysis.factory
|
||||
|
||||
.. py:function:: analysis_queue_factory_hook(*args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.9
|
||||
|
||||
Return additional (or replacement) analysis queue factories used for analysing uploaded files.
|
||||
|
||||
Should return a dictionary to merge with the existing dictionary of factories, mapping from extension tree leaf
|
||||
@@ -1058,6 +1097,8 @@ octoprint.filemanager.extension_tree
|
||||
|
||||
.. py:function:: file_extension_hook(*args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
Return additional entries for the tree of accepted file extensions for uploading/handling by the file manager.
|
||||
|
||||
Should return a dictionary to merge with the existing extension tree, adding additional extension groups to
|
||||
@@ -1094,6 +1135,8 @@ octoprint.filemanager.preprocessor
|
||||
|
||||
.. py:function:: file_preprocessor_hook(path, file_object, links=None, printer_profile=None, allow_overwrite=False, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
Replace the ``file_object`` used for saving added files to storage by calling :func:`~octoprint.filemanager.util.AbstractFileWrapper.save`.
|
||||
|
||||
``path`` will be the future path of the file on the storage. The file's name is accessible via
|
||||
@@ -1121,18 +1164,22 @@ octoprint.filemanager.preprocessor
|
||||
:return: The `file_object` as passed in or None, or a replaced version to use instead for further processing.
|
||||
:rtype: AbstractFileWrapper or None
|
||||
|
||||
.. _sec-plugins-hook-plugin-loginui-theming:
|
||||
.. _sec-plugins-hook-plugin-backup-excludes:
|
||||
|
||||
octoprint.plugin.loginui.theming
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
octoprint.plugin.backup.additional_excludes
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
See :ref:`here <sec-bundledplugins-loginui-hooks-theming>`.
|
||||
.. versionadded:: 1.5.0
|
||||
|
||||
See :ref:`here <sec-bundledplugins-backup-hooks-excludes>`.
|
||||
|
||||
.. _sec-plugins-hook-plugin-pluginmanager-reconnect:
|
||||
|
||||
octoprint.plugin.pluginmanager.reconnect_hooks
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 1.4.0
|
||||
|
||||
See :ref:`here <sec-bundledplugins-pluginmanager-hooks-reconnect_hooks>`.
|
||||
|
||||
.. _sec-plugins-hook-plugin-softwareupdate-check_config:
|
||||
@@ -1140,8 +1187,39 @@ See :ref:`here <sec-bundledplugins-pluginmanager-hooks-reconnect_hooks>`.
|
||||
octoprint.plugin.softwareupdate.check_config
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
See :ref:`here <sec-bundledplugins-softwareupdate-hooks-check_config>`.
|
||||
|
||||
.. _sec-plugins-hooks-plugin-printer-additional_state_data
|
||||
|
||||
octoprint.printer.additional_state_data
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. py:function:: additional_state_data_hook(initial=False, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.5.0
|
||||
|
||||
Use this to inject additional data into the data structure returned from the printer backend to the frontend
|
||||
on the push socket or other registered :ref:`~octoprint.printer.PrinterCallback`s. Anything you return here
|
||||
will be located beneath ``plugins.<your plugin id>`` in the resulting initial and current data push structure.
|
||||
|
||||
The ``initial`` parameter will be ``True`` if this the additional update sent to the callback. Your handler should
|
||||
return a ``dict``, or ``None`` if nothing should be included.
|
||||
|
||||
.. warning::
|
||||
|
||||
Make sure to not perform any computationally expensive or otherwise long running actions within these handlers as
|
||||
you could stall the whole state monitor and thus updates being pushed to the frontend.
|
||||
|
||||
This includes I/O of any kind.
|
||||
|
||||
Cache your data!
|
||||
|
||||
:param boolean initial: True if this is the initial update, False otherwise
|
||||
:return: Additional data to include
|
||||
:rtype: dict
|
||||
|
||||
.. _sec-plugins-hook-printer-factory:
|
||||
|
||||
octoprint.printer.factory
|
||||
@@ -1149,6 +1227,8 @@ octoprint.printer.factory
|
||||
|
||||
.. py:function:: printer_factory_hook(components, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.0
|
||||
|
||||
Return a :class:`~octoprint.printer.PrinterInstance` instance to use as global printer object. This will
|
||||
be called only once during initial server startup.
|
||||
|
||||
@@ -1173,6 +1253,26 @@ octoprint.printer.factory
|
||||
:return: The ``printer`` instance to use globally.
|
||||
:rtype: PrinterInterface subclass or None
|
||||
|
||||
.. _sec-plugins-hook-printer-handle_connect:
|
||||
|
||||
octoprint.printer.handle_connect
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. py:function:: handle_connect(*args, **kwargs):
|
||||
|
||||
.. versionadded:: 1.6.0
|
||||
|
||||
Allows plugins to perform actions upon connecting to a printer. By returning ``True``,
|
||||
plugins may also prevent further processing of the connect command. This hook is of
|
||||
special interest if your plugin needs a connect from going through under certain
|
||||
circumstances or if you need to do something before a connection to the printer is
|
||||
established (e.g. switching on power to the printer).
|
||||
|
||||
:param kwargs: All connection parameters supplied to the ``connect`` call. Currently
|
||||
this also includes ``port``, ``baudrate`` and ``profile``.
|
||||
:return: ``True`` if OctoPrint should not proceed with the connect
|
||||
:rtype: boolean or None
|
||||
|
||||
.. _sec-plugins-hook-printer-estimation-factory:
|
||||
|
||||
octoprint.printer.estimation.factory
|
||||
@@ -1180,6 +1280,8 @@ octoprint.printer.estimation.factory
|
||||
|
||||
.. py:function:: print_time_estimator_factory(*args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.9
|
||||
|
||||
Return a :class:`~octoprint.printer.estimation.PrintTimeEstimator` subclass (or factory) to use for print time
|
||||
estimation. This will be called on each start of a print or streaming job with a single parameter ``job_type``
|
||||
denoting the type of job that was just started: ``local`` meaning a print of a local file through the serial connection,
|
||||
@@ -1226,6 +1328,8 @@ octoprint.printer.sdcardupload
|
||||
|
||||
.. py:function:: sd_card_upload_hook(printer, filename, path, start_callback, success_callback, failure_callback, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.11
|
||||
|
||||
Via this hook plugins can change the way files are being uploaded to the sd card of the printer.
|
||||
|
||||
Implementations **must** call the provided ``start_callback`` on start of the file transfer and either the ``success_callback``
|
||||
@@ -1311,6 +1415,8 @@ octoprint.server.api.after_request
|
||||
|
||||
.. py:function:: after_request_handlers_hook(*args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.10
|
||||
|
||||
Allows adding additional after-request-handlers to API endpoints defined by OctoPrint itself and installed plugins.
|
||||
|
||||
Your plugin might need this to further restrict access to API methods.
|
||||
@@ -1326,6 +1432,8 @@ octoprint.server.api.before_request
|
||||
|
||||
.. py:function:: after_request_handlers_hook(*args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.10
|
||||
|
||||
Allows adding additional before-request-handlers to API endpoints defined by OctoPrint itself and installed plugins.
|
||||
|
||||
Your plugin might need this to further restrict access to API methods.
|
||||
@@ -1341,6 +1449,8 @@ octoprint.server.http.access_validator
|
||||
|
||||
.. py:function:: access_validator_hook(request, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.10
|
||||
|
||||
Allows adding additional access validators to the default tornado routers.
|
||||
|
||||
Your plugin might need to this to restrict acccess to downloads and webcam snapshots further.
|
||||
@@ -1356,6 +1466,8 @@ octoprint.server.http.bodysize
|
||||
|
||||
.. py:function:: server_bodysize_hook(current_max_body_sizes, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
Allows extending the list of custom maximum body sizes on the web server per path and HTTP method with custom entries
|
||||
from plugins.
|
||||
|
||||
@@ -1398,6 +1510,8 @@ octoprint.server.http.routes
|
||||
|
||||
.. py:function:: server_route_hook(server_routes, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
Allows extending the list of routes registered on the web server.
|
||||
|
||||
This is interesting for plugins which want to provide their own download URLs which will then be delivered statically
|
||||
@@ -1465,6 +1579,8 @@ octoprint.server.sockjs.authed
|
||||
|
||||
.. py:function:: socket_authed_hook(socket, user, *args, **kwargs):
|
||||
|
||||
.. versionadded:: 1.3.10
|
||||
|
||||
Allows plugins to be notified that a user got authenticated or deauthenticated on the socket (e.g. due to logout).
|
||||
|
||||
:param object socket: the socket object which is about to be registered
|
||||
@@ -1477,6 +1593,8 @@ octoprint.server.sockjs.register
|
||||
|
||||
.. py:function:: socket_registration_hook(socket, user, *args, **kwargs):
|
||||
|
||||
.. versionadded:: 1.3.10
|
||||
|
||||
Allows plugins to prevent a new :ref:`push socket client <sec-api-push>` to be registered to the system.
|
||||
|
||||
Handlers should return either ``True`` or ``False``. ``True`` signals to proceed with normal registration. ``False``
|
||||
@@ -1496,6 +1614,8 @@ octoprint.server.sockjs.emit
|
||||
|
||||
.. py:function:: socket_emit_hook(socket, user, message, payload, *args, **kwargs):
|
||||
|
||||
.. versionadded:: 1.3.10
|
||||
|
||||
Allows plugins to prevent any messages to be emitted on an existing :ref:`push connection <sec-api-push>`.
|
||||
|
||||
Handlers should return either ``True`` to allow the message to be emitted, or ``False`` to prevent it.
|
||||
@@ -1516,6 +1636,8 @@ octoprint.timelapse.extensions
|
||||
|
||||
.. py:function:: timelapse_extension_hook(*args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.3.10
|
||||
|
||||
Allows extending the set of supported file extensions for timelapse files. Handlers must return a list of
|
||||
additional file extensions.
|
||||
|
||||
@@ -1542,6 +1664,8 @@ octoprint.ui.web.templatetypes
|
||||
|
||||
.. py:function:: templatetype_hook(template_sorting, template_rules, *args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.2.0
|
||||
|
||||
Allows extending the set of supported template types in the web interface. This is interesting for plugins which want
|
||||
to offer other plugins to hook into their own offered UIs. Handlers must return a list of additional template
|
||||
specifications in form of 3-tuples.
|
||||
@@ -1648,6 +1772,42 @@ octoprint.ui.web.templatetypes
|
||||
:return: a list of 3-tuples (template type, rule, sorting spec)
|
||||
:rtype: list
|
||||
|
||||
.. _sec-plugins-hook-theming-dialog:
|
||||
|
||||
octoprint.theming.<dialog>
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
This actually describes two hooks:
|
||||
|
||||
* ``octoprint.theming.login``
|
||||
* ``octoprint.theming.recovery``
|
||||
|
||||
.. py:function:: ui_theming_hook(*args, **kwargs)
|
||||
|
||||
.. versionadded:: 1.5.0
|
||||
|
||||
Support theming of the login or recovery dialog, just in case the core UI is themed as well. Use to return a list of additional
|
||||
CSS file URLs to inject into the dialog HTML.
|
||||
|
||||
Example usage by a plugin:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def loginui_theming():
|
||||
from flask import url_for
|
||||
return [url_for("plugin.myplugin.static", filename="css/loginui_theme.css")]
|
||||
|
||||
__plugin_hooks__ = {
|
||||
"octoprint.theming.login": loginui_theming
|
||||
}
|
||||
|
||||
Only a list of ready-made URLs to CSS files is supported, neither LESS nor JS. Best use
|
||||
``url_for`` like in the example above to be prepared for any configured prefix URLs.
|
||||
|
||||
:return: A list of additional CSS URLs to inject into the login or recovery dialog.
|
||||
:rtype: A list of strings.
|
||||
|
||||
|
||||
.. _sec-plugins-hook-timelapse-capture-pre:
|
||||
|
||||
octoprint.timelapse.capture.pre
|
||||
@@ -1655,6 +1815,8 @@ octoprint.timelapse.capture.pre
|
||||
|
||||
.. py:function:: capture_pre_hook(filename)
|
||||
|
||||
.. versionadded:: 1.4.0
|
||||
|
||||
Perform specific actions prior to capturing a timelapse frame.
|
||||
|
||||
``filename`` will be the future path of the frame to be saved.
|
||||
@@ -1670,6 +1832,8 @@ octoprint.timelapse.capture.post
|
||||
|
||||
.. py:function:: capture_post_hook(filename, success)
|
||||
|
||||
.. versionadded:: 1.4.0
|
||||
|
||||
Perform specific actions after capturing a timelapse frame.
|
||||
|
||||
``filename`` will be the path of the frame that should have been saved.
|
||||
|
||||
@@ -238,6 +238,11 @@ getAdditionalControls()
|
||||
Your view model may return additional custom control definitions for inclusion on the "Control" tab of OctoPrint's
|
||||
interface. See :ref:`the custom control feature<sec-features-custom_controls>`.
|
||||
|
||||
.. note::
|
||||
|
||||
Controls injected from a view model do not support feedback controls (as defined by
|
||||
``regex`` and ``template``).
|
||||
|
||||
onSettingsShown()
|
||||
Called when the settings dialog is shown.
|
||||
|
||||
@@ -254,6 +259,10 @@ onUserSettingsShown()
|
||||
onUserSettingsHidden()
|
||||
Called when the user settings dialog is hidden.
|
||||
|
||||
onUserSettingsBeforeSave()
|
||||
Called just before the user settings view model is sent to the server. This is useful, for example, if your plugin
|
||||
needs to compute persisted settings from a custom view model.
|
||||
|
||||
onWizardDetails(response)
|
||||
Called with the response from the wizard detail API call initiated before opening the wizard dialog. Will contain
|
||||
the data from all :class:`~octoprint.plugin.WizardPlugin` implementations returned by their :meth:`~octoprint.plugin.WizardPlugin.get_wizard_details`
|
||||
|
||||
+213
-193
@@ -2,15 +2,13 @@
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__author__ = "Gina Häußge <osd@foosel.net>"
|
||||
__license__ = 'The MIT License <http://opensource.org/licenses/MIT>'
|
||||
__license__ = "The MIT License <http://opensource.org/licenses/MIT>"
|
||||
__copyright__ = "Copyright (C) 2015 Gina Häußge - Released under terms of the MIT License"
|
||||
|
||||
from sphinx.directives.code import CodeBlock
|
||||
|
||||
import sphinx.highlighting
|
||||
from sphinx.highlighting import PygmentsBridge
|
||||
from sphinx.ext import doctest
|
||||
from sphinx.util.texescape import tex_hl_escape_map_new
|
||||
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import directives
|
||||
@@ -23,241 +21,263 @@ from pygments.lexers.python import PythonConsoleLexer
|
||||
from pygments.util import ClassNotFound
|
||||
|
||||
if False:
|
||||
# For type annotation
|
||||
from typing import Any, Dict, List, Tuple # NOQA
|
||||
# For type annotation
|
||||
from typing import Any, Dict, List, Tuple # NOQA
|
||||
|
||||
|
||||
def _merge_dict(a, b):
|
||||
"""
|
||||
Little helper to merge two dicts a and b on the fly.
|
||||
"""
|
||||
result = dict(a)
|
||||
result.update(b)
|
||||
return result
|
||||
"""
|
||||
Little helper to merge two dicts a and b on the fly.
|
||||
"""
|
||||
result = dict(a)
|
||||
result.update(b)
|
||||
return result
|
||||
|
||||
|
||||
class literal_block_ext(nodes.General, nodes.FixedTextElement):
|
||||
"""
|
||||
Custom node which is basically the same as a :class:`literal_block`, just with whitespace support and introduced
|
||||
in order to be able to have a custom visitor.
|
||||
"""
|
||||
"""
|
||||
Custom node which is basically the same as a :class:`literal_block`, just with whitespace support and introduced
|
||||
in order to be able to have a custom visitor.
|
||||
"""
|
||||
|
||||
@classmethod
|
||||
def from_literal_block(cls, block):
|
||||
"""
|
||||
Factory method constructing an instance exactly copying all attributes over from ``block`` and settings a
|
||||
custom ``tagname``.
|
||||
"""
|
||||
new = literal_block_ext()
|
||||
for a in (
|
||||
"attributes",
|
||||
"basic_attributes",
|
||||
"child_text_separator",
|
||||
"children",
|
||||
"document",
|
||||
"known_attributes",
|
||||
"line",
|
||||
"list_attributes",
|
||||
"local_attributes",
|
||||
"parent",
|
||||
"rawsource",
|
||||
"source",
|
||||
):
|
||||
setattr(new, a, getattr(block, a))
|
||||
new.tagname = "literal_block_ext"
|
||||
return new
|
||||
|
||||
@classmethod
|
||||
def from_literal_block(cls, block):
|
||||
"""
|
||||
Factory method constructing an instance exactly copying all attributes over from ``block`` and settings a
|
||||
custom ``tagname``.
|
||||
"""
|
||||
new = literal_block_ext()
|
||||
for a in ("attributes", "basic_attributes", "child_text_separator", "children", "document", "known_attributes",
|
||||
"line", "list_attributes", "local_attributes", "parent", "rawsource", "source"):
|
||||
setattr(new, a, getattr(block, a))
|
||||
new.tagname = "literal_block_ext"
|
||||
return new
|
||||
|
||||
class CodeBlockExt(CodeBlock):
|
||||
"""
|
||||
This is basically an extension of a regular :class:`CodeBlock` directive which just supports an additional option
|
||||
``whitespace`` which if present will enable (together with everything else in here) to render whitespace in
|
||||
code blocks.
|
||||
"""
|
||||
"""
|
||||
This is basically an extension of a regular :class:`CodeBlock` directive which just supports an additional option
|
||||
``whitespace`` which if present will enable (together with everything else in here) to render whitespace in
|
||||
code blocks.
|
||||
"""
|
||||
|
||||
option_spec = _merge_dict(CodeBlock.option_spec, dict(whitespace=directives.flag))
|
||||
option_spec = _merge_dict(CodeBlock.option_spec, {"whitespace": directives.flag})
|
||||
|
||||
def run(self):
|
||||
# type: () -> List[nodes.Node]
|
||||
# get result from parent implementation
|
||||
code_block = CodeBlock.run(self)
|
||||
def run(self):
|
||||
# type: () -> List[nodes.Node]
|
||||
# get result from parent implementation
|
||||
code_block = CodeBlock.run(self)
|
||||
|
||||
def find_and_wrap_literal_block(node):
|
||||
"""
|
||||
Recursive method to turn all literal blocks located within a node into :class:`literal_block_ext`.
|
||||
"""
|
||||
def find_and_wrap_literal_block(node):
|
||||
"""
|
||||
Recursive method to turn all literal blocks located within a node into :class:`literal_block_ext`.
|
||||
"""
|
||||
|
||||
if isinstance(node, nodes.container):
|
||||
# container node => handle all children
|
||||
children = []
|
||||
for child in node.children:
|
||||
children.append(find_and_wrap_literal_block(child))
|
||||
node.children = children
|
||||
return node
|
||||
if isinstance(node, nodes.container):
|
||||
# container node => handle all children
|
||||
children = []
|
||||
for child in node.children:
|
||||
children.append(find_and_wrap_literal_block(child))
|
||||
node.children = children
|
||||
return node
|
||||
|
||||
elif isinstance(node, nodes.literal_block):
|
||||
# literal block => replace it
|
||||
return self._wrap_literal_block(node)
|
||||
elif isinstance(node, nodes.literal_block):
|
||||
# literal block => replace it
|
||||
return self._wrap_literal_block(node)
|
||||
|
||||
else:
|
||||
# no idea what that is => leave it alone
|
||||
return node
|
||||
else:
|
||||
# no idea what that is => leave it alone
|
||||
return node
|
||||
|
||||
# replace all created literal_blocks with literal_block_ext instances
|
||||
return list(map(find_and_wrap_literal_block, code_block))
|
||||
# replace all created literal_blocks with literal_block_ext instances
|
||||
return list(map(find_and_wrap_literal_block, code_block))
|
||||
|
||||
def _wrap_literal_block(self, node):
|
||||
literal = literal_block_ext.from_literal_block(node)
|
||||
literal["whitespace"] = "whitespace" in self.options
|
||||
return literal
|
||||
|
||||
def _wrap_literal_block(self, node):
|
||||
literal = literal_block_ext.from_literal_block(node)
|
||||
literal["whitespace"] = "whitespace" in self.options
|
||||
return literal
|
||||
|
||||
class PygmentsBridgeExt(object):
|
||||
"""
|
||||
Wrapper for :class:`PygmentsBridge`, delegates everything to the wrapped ``bridge`` but :method:`highlight_block`,
|
||||
which calls the parent implementation for lexer selection, then
|
||||
"""
|
||||
"""
|
||||
Wrapper for :class:`PygmentsBridge`, delegates everything to the wrapped ``bridge`` but :method:`highlight_block`,
|
||||
which calls the parent implementation for lexer selection, then
|
||||
"""
|
||||
|
||||
def __init__(self, bridge, whitespace):
|
||||
self._bridge = bridge
|
||||
self._whitespace = whitespace
|
||||
def __init__(self, bridge, whitespace):
|
||||
self._bridge = bridge
|
||||
self._whitespace = whitespace
|
||||
|
||||
def __getattr__(self, item):
|
||||
return getattr(self._bridge, item)
|
||||
def __getattr__(self, item):
|
||||
return getattr(self._bridge, item)
|
||||
|
||||
def highlight_block(self, source, lang, opts=None, warn=None, force=False, **kwargs):
|
||||
if not self._whitespace:
|
||||
return self._bridge.highlight_block(source, lang, opts=opts, warn=warn, force=force, **kwargs)
|
||||
def highlight_block(self, source, lang, opts=None, warn=None, force=False, **kwargs):
|
||||
if not self._whitespace:
|
||||
return self._bridge.highlight_block(
|
||||
source, lang, opts=opts, warn=warn, force=force, **kwargs
|
||||
)
|
||||
|
||||
# We are still here => we need to basically do everything the parent implementation does (and does so in a very
|
||||
# inextensible way...), but inject the whitespace filter into the used lexer just before the highlighting run
|
||||
# and remove it afterwards so the lexer can be safely reused.
|
||||
#
|
||||
# For this we define a context manager that will allow us to wrap a lexer and modify its filters on the fly to
|
||||
# include the whitespace filter.
|
||||
# We are still here => we need to basically do everything the parent implementation does (and does so in a very
|
||||
# inextensible way...), but inject the whitespace filter into the used lexer just before the highlighting run
|
||||
# and remove it afterwards so the lexer can be safely reused.
|
||||
#
|
||||
# For this we define a context manager that will allow us to wrap a lexer and modify its filters on the fly to
|
||||
# include the whitespace filter.
|
||||
|
||||
class whitespace(object):
|
||||
def __init__(self, lexer):
|
||||
self._lexer = lexer
|
||||
self._orig_filters = lexer.filters
|
||||
self._orig_tabsize = lexer.tabsize
|
||||
class whitespace(object):
|
||||
def __init__(self, lexer):
|
||||
self._lexer = lexer
|
||||
self._orig_filters = lexer.filters
|
||||
self._orig_tabsize = lexer.tabsize
|
||||
|
||||
def __enter__(self):
|
||||
new_filters = list(self._orig_filters)
|
||||
new_filters.append(VisibleWhitespaceFilter(spaces=True, tabs=True, tabsize=self._lexer.tabsize))
|
||||
self._lexer.filters = new_filters
|
||||
self._lexer.tabsize = 0
|
||||
return self._lexer
|
||||
def __enter__(self):
|
||||
new_filters = list(self._orig_filters)
|
||||
new_filters.append(
|
||||
VisibleWhitespaceFilter(
|
||||
spaces=True, tabs=True, tabsize=self._lexer.tabsize
|
||||
)
|
||||
)
|
||||
self._lexer.filters = new_filters
|
||||
self._lexer.tabsize = 0
|
||||
return self._lexer
|
||||
|
||||
def __exit__(self, type, value, traceback):
|
||||
self._lexer.filters = self._orig_filters
|
||||
self._lexer.tabsize = self._orig_tabsize
|
||||
def __exit__(self, type, value, traceback):
|
||||
self._lexer.filters = self._orig_filters
|
||||
self._lexer.tabsize = self._orig_tabsize
|
||||
|
||||
# Then a ton of copy-pasted code follows. Sadly, we need to do this since we have no way to inject ourselves
|
||||
# into the highlighting call otherwise - lexer selection and actual call are tightly coupled in the original
|
||||
# "highlight_block" method, with no means for external code to inject different functionality.
|
||||
#
|
||||
# Unless otherwise marked ("MODIFIED"), any code in this method after this line is copied verbatim from the
|
||||
# implementation of sphinx.highlighting.PygmentsBridge, released under the Simplified BSD License, the copyright
|
||||
# lies with the respective authors.
|
||||
# Then a ton of copy-pasted code follows. Sadly, we need to do this since we have no way to inject ourselves
|
||||
# into the highlighting call otherwise - lexer selection and actual call are tightly coupled in the original
|
||||
# "highlight_block" method, with no means for external code to inject different functionality.
|
||||
#
|
||||
# Unless otherwise marked ("MODIFIED"), any code in this method after this line is copied verbatim from the
|
||||
# implementation of sphinx.highlighting.PygmentsBridge, released under the Simplified BSD License, the copyright
|
||||
# lies with the respective authors.
|
||||
|
||||
if not isinstance(source, text_type):
|
||||
source = source.decode()
|
||||
if not isinstance(source, text_type):
|
||||
source = source.decode()
|
||||
|
||||
# find out which lexer to use
|
||||
if lang in ('py', 'python'):
|
||||
if source.startswith('>>>'):
|
||||
# interactive session
|
||||
lexer = sphinx.highlighting.lexers['pycon']
|
||||
elif not force:
|
||||
# maybe Python -- try parsing it
|
||||
if self.try_parse(source):
|
||||
lexer = sphinx.highlighting.lexers['python']
|
||||
else:
|
||||
lexer = sphinx.highlighting.lexers['none']
|
||||
else:
|
||||
lexer = sphinx.highlighting.lexers['python']
|
||||
elif lang in ('python3', 'py3') and source.startswith('>>>'):
|
||||
# for py3, recognize interactive sessions, but do not try parsing...
|
||||
lexer = sphinx.highlighting.lexers['pycon3']
|
||||
elif lang == 'guess':
|
||||
# try:
|
||||
lexer = sphinx.highlighting.guess_lexer(source)
|
||||
# except Exception:
|
||||
# lexer = sphinx.highlighting.lexers['none']
|
||||
else:
|
||||
if lang in sphinx.highlighting.lexers:
|
||||
lexer = sphinx.highlighting.lexers[lang]
|
||||
else:
|
||||
try:
|
||||
lexer = sphinx.highlighting.lexers[lang] = sphinx.highlighting.get_lexer_by_name(lang, **opts or {})
|
||||
except ClassNotFound:
|
||||
if warn:
|
||||
warn('Pygments lexer name %r is not known' % lang)
|
||||
lexer = sphinx.highlighting.lexers['none']
|
||||
else:
|
||||
raise
|
||||
else:
|
||||
lexer.add_filter('raiseonerror')
|
||||
# find out which lexer to use
|
||||
if lang in ("py", "python"):
|
||||
if source.startswith(">>>"):
|
||||
# interactive session
|
||||
lexer = sphinx.highlighting.lexers["pycon"]
|
||||
elif not force:
|
||||
# maybe Python -- try parsing it
|
||||
if self.try_parse(source):
|
||||
lexer = sphinx.highlighting.lexers["python"]
|
||||
else:
|
||||
lexer = sphinx.highlighting.lexers["none"]
|
||||
else:
|
||||
lexer = sphinx.highlighting.lexers["python"]
|
||||
elif lang in ("python3", "py3") and source.startswith(">>>"):
|
||||
# for py3, recognize interactive sessions, but do not try parsing...
|
||||
lexer = sphinx.highlighting.lexers["pycon3"]
|
||||
elif lang == "guess":
|
||||
# try:
|
||||
lexer = sphinx.highlighting.guess_lexer(source)
|
||||
# except Exception:
|
||||
# lexer = sphinx.highlighting.lexers['none']
|
||||
else:
|
||||
if lang in sphinx.highlighting.lexers:
|
||||
lexer = sphinx.highlighting.lexers[lang]
|
||||
else:
|
||||
try:
|
||||
lexer = sphinx.highlighting.lexers[
|
||||
lang
|
||||
] = sphinx.highlighting.get_lexer_by_name(lang, **opts or {})
|
||||
except ClassNotFound:
|
||||
if warn:
|
||||
warn("Pygments lexer name %r is not known" % lang)
|
||||
lexer = sphinx.highlighting.lexers["none"]
|
||||
else:
|
||||
raise
|
||||
else:
|
||||
lexer.add_filter("raiseonerror")
|
||||
|
||||
if not isinstance(source, text_type):
|
||||
source = source.decode()
|
||||
if not isinstance(source, text_type):
|
||||
source = source.decode()
|
||||
|
||||
# trim doctest options if wanted
|
||||
if isinstance(lexer, PythonConsoleLexer) and self._bridge.trim_doctest_flags:
|
||||
source = doctest.blankline_re.sub('', source)
|
||||
source = doctest.doctestopt_re.sub('', source)
|
||||
# trim doctest options if wanted
|
||||
if isinstance(lexer, PythonConsoleLexer) and self._bridge.trim_doctest_flags:
|
||||
source = doctest.blankline_re.sub("", source)
|
||||
source = doctest.doctestopt_re.sub("", source)
|
||||
|
||||
# highlight via Pygments
|
||||
formatter = self._bridge.get_formatter(**kwargs)
|
||||
try:
|
||||
# MODIFIED: replaced by whitespace wrapped call
|
||||
with whitespace(lexer) as l:
|
||||
hlsource = highlight(source, l, formatter)
|
||||
# /MODIFIED
|
||||
except ErrorToken:
|
||||
# this is most probably not the selected language,
|
||||
# so let it pass unhighlighted
|
||||
# highlight via Pygments
|
||||
formatter = self._bridge.get_formatter(**kwargs)
|
||||
try:
|
||||
# MODIFIED: replaced by whitespace wrapped call
|
||||
with whitespace(lexer) as l:
|
||||
hlsource = highlight(source, l, formatter)
|
||||
# /MODIFIED
|
||||
except ErrorToken:
|
||||
# this is most probably not the selected language,
|
||||
# so let it pass unhighlighted
|
||||
|
||||
# MODIFIED: replaced by whitespace wrapped call
|
||||
with whitespace(sphinx.highlighting.lexers["none"]) as l:
|
||||
hlsource = highlight(source, l, formatter)
|
||||
# /MODIFIED
|
||||
if self._bridge.dest == 'html':
|
||||
return hlsource
|
||||
else:
|
||||
if not isinstance(hlsource, text_type): # Py2 / Pygments < 1.6
|
||||
hlsource = hlsource.decode()
|
||||
return hlsource.translate(tex_hl_escape_map_new)
|
||||
# MODIFIED: replaced by whitespace wrapped call
|
||||
with whitespace(sphinx.highlighting.lexers["none"]) as l:
|
||||
hlsource = highlight(source, l, formatter)
|
||||
# /MODIFIED
|
||||
return hlsource
|
||||
|
||||
|
||||
class whitespace_highlighter(object):
|
||||
"""
|
||||
Context manager for adapting the used highlighter on a translator for a given node's whitespace properties.
|
||||
"""
|
||||
def __init__(self, translator, node):
|
||||
self.translator = translator
|
||||
self.node = node
|
||||
"""
|
||||
Context manager for adapting the used highlighter on a translator for a given node's whitespace properties.
|
||||
"""
|
||||
|
||||
self._orig_highlighter = self.translator.highlighter
|
||||
def __init__(self, translator, node):
|
||||
self.translator = translator
|
||||
self.node = node
|
||||
|
||||
def __enter__(self):
|
||||
whitespace = self.node["whitespace"] if "whitespace" in self.node else False
|
||||
if whitespace:
|
||||
self.translator.highlighter = PygmentsBridgeExt(self._orig_highlighter, whitespace)
|
||||
return self.translator
|
||||
self._orig_highlighter = self.translator.highlighter
|
||||
|
||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||
self.translator.highlighter = self._orig_highlighter
|
||||
def __enter__(self):
|
||||
whitespace = self.node["whitespace"] if "whitespace" in self.node else False
|
||||
if whitespace:
|
||||
self.translator.highlighter = PygmentsBridgeExt(
|
||||
self._orig_highlighter, whitespace
|
||||
)
|
||||
return self.translator
|
||||
|
||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||
self.translator.highlighter = self._orig_highlighter
|
||||
|
||||
|
||||
def visit_literal_block_ext(translator, node):
|
||||
"""
|
||||
When our custom code block is visited, we temporarily exchange the highlighter used in the translator, call the
|
||||
visitor for regular literal blocks, then switch back again.
|
||||
"""
|
||||
with whitespace_highlighter(translator, node):
|
||||
translator.visit_literal_block(node)
|
||||
"""
|
||||
When our custom code block is visited, we temporarily exchange the highlighter used in the translator, call the
|
||||
visitor for regular literal blocks, then switch back again.
|
||||
"""
|
||||
with whitespace_highlighter(translator, node):
|
||||
translator.visit_literal_block(node)
|
||||
|
||||
|
||||
def depart_literal_block_ext(translator, node):
|
||||
"""
|
||||
Just call the depart function for regular literal blocks.
|
||||
"""
|
||||
with whitespace_highlighter(translator, node):
|
||||
translator.depart_literal_block(node)
|
||||
"""
|
||||
Just call the depart function for regular literal blocks.
|
||||
"""
|
||||
with whitespace_highlighter(translator, node):
|
||||
translator.depart_literal_block(node)
|
||||
|
||||
|
||||
def setup(app):
|
||||
# custom directive
|
||||
app.add_directive("code-block-ext", CodeBlockExt)
|
||||
# custom directive
|
||||
app.add_directive("code-block-ext", CodeBlockExt)
|
||||
|
||||
# custom node type
|
||||
handler = (visit_literal_block_ext, depart_literal_block_ext)
|
||||
app.add_node(literal_block_ext, html=handler, latex=handler, text=handler)
|
||||
# custom node type
|
||||
handler = (visit_literal_block_ext, depart_literal_block_ext)
|
||||
app.add_node(literal_block_ext, html=handler, latex=handler, text=handler)
|
||||
|
||||
return dict(version="0.1")
|
||||
return {"version": "0.1"}
|
||||
@@ -2,7 +2,7 @@
|
||||
from __future__ import absolute_import, division, print_function, unicode_literals
|
||||
|
||||
__author__ = "Gina Häußge <osd@foosel.net>"
|
||||
__license__ = 'The MIT License <http://opensource.org/licenses/MIT>'
|
||||
__license__ = "The MIT License <http://opensource.org/licenses/MIT>"
|
||||
__copyright__ = "Copyright (C) 2015 Gina Häußge - Released under terms of the MIT License"
|
||||
|
||||
|
||||
@@ -10,103 +10,118 @@ import codecs
|
||||
import requests
|
||||
from contextlib import closing
|
||||
|
||||
from sphinx.directives.code import LiteralIncludeReader, LiteralInclude, dedent_lines, \
|
||||
nodes, parselinenos, logger, container_wrapper
|
||||
from sphinx.directives.code import (
|
||||
LiteralIncludeReader,
|
||||
LiteralInclude,
|
||||
dedent_lines,
|
||||
nodes,
|
||||
parselinenos,
|
||||
logger,
|
||||
container_wrapper,
|
||||
)
|
||||
from sphinx.util.nodes import set_source_info
|
||||
|
||||
if False:
|
||||
# For type annotation
|
||||
from typing import Any, List # NOQA
|
||||
# For type annotation
|
||||
from typing import Any, List # NOQA
|
||||
|
||||
cache = {}
|
||||
|
||||
cache = dict()
|
||||
|
||||
class OnlineIncludeReader(LiteralIncludeReader):
|
||||
def read_file(self, filename, location=None):
|
||||
# type: (unicode, Any) -> List[unicode]
|
||||
|
||||
def read_file(self, filename, location=None):
|
||||
# type: (unicode, Any) -> List[unicode]
|
||||
global cache
|
||||
try:
|
||||
if filename in cache:
|
||||
lines = cache[filename]
|
||||
else:
|
||||
with closing(requests.get(filename, stream=True)) as r:
|
||||
r.encoding = self.encoding
|
||||
lines = r.text.splitlines(True)
|
||||
cache[filename] = lines
|
||||
|
||||
global cache
|
||||
try:
|
||||
if filename in cache:
|
||||
lines = cache[filename]
|
||||
else:
|
||||
with closing(requests.get(filename, stream=True)) as r:
|
||||
r.encoding = self.encoding
|
||||
lines = r.text.splitlines(True)
|
||||
cache[filename] = lines
|
||||
if "tab-width" in self.options:
|
||||
lines = [line.expandtabs(self.options["tab-width"]) for line in lines]
|
||||
|
||||
if 'tab-width' in self.options:
|
||||
lines = [line.expandtabs(self.options['tab-width']) for line in lines]
|
||||
|
||||
return lines
|
||||
except (IOError, OSError):
|
||||
raise IOError('Include file %r not found or reading it failed' % filename)
|
||||
except UnicodeError:
|
||||
raise UnicodeError('Encoding %r used for reading included file %r seems to '
|
||||
'be wrong, try giving an :encoding: option' % (self.encoding, filename))
|
||||
return lines
|
||||
except (IOError, OSError):
|
||||
raise IOError("Include file %r not found or reading it failed" % filename)
|
||||
except UnicodeError:
|
||||
raise UnicodeError(
|
||||
"Encoding %r used for reading included file %r seems to "
|
||||
"be wrong, try giving an :encoding: option" % (self.encoding, filename)
|
||||
)
|
||||
|
||||
|
||||
class OnlineIncludeDirective(LiteralInclude):
|
||||
def run(self):
|
||||
# type: () -> List[nodes.Node]
|
||||
document = self.state.document
|
||||
if not document.settings.file_insertion_enabled:
|
||||
return [
|
||||
document.reporter.warning("File insertion disabled", line=self.lineno)
|
||||
]
|
||||
# convert options['diff'] to absolute path
|
||||
if "diff" in self.options:
|
||||
_, path = self.env.relfn2path(self.options["diff"])
|
||||
self.options["diff"] = path
|
||||
|
||||
def run(self):
|
||||
# type: () -> List[nodes.Node]
|
||||
document = self.state.document
|
||||
if not document.settings.file_insertion_enabled:
|
||||
return [document.reporter.warning('File insertion disabled',
|
||||
line=self.lineno)]
|
||||
# convert options['diff'] to absolute path
|
||||
if 'diff' in self.options:
|
||||
_, path = self.env.relfn2path(self.options['diff'])
|
||||
self.options['diff'] = path
|
||||
try:
|
||||
location = self.state_machine.get_source_and_line(self.lineno)
|
||||
url = self.arguments[0]
|
||||
|
||||
try:
|
||||
location = self.state_machine.get_source_and_line(self.lineno)
|
||||
url = self.arguments[0]
|
||||
reader = OnlineIncludeReader(url, self.options, self.config)
|
||||
text, lines = reader.read(location=location)
|
||||
|
||||
reader = OnlineIncludeReader(url, self.options, self.config)
|
||||
text, lines = reader.read(location=location)
|
||||
retnode = nodes.literal_block(text, text, source=url)
|
||||
set_source_info(self, retnode)
|
||||
if self.options.get("diff"): # if diff is set, set udiff
|
||||
retnode["language"] = "udiff"
|
||||
elif "language" in self.options:
|
||||
retnode["language"] = self.options["language"]
|
||||
retnode["linenos"] = (
|
||||
"linenos" in self.options
|
||||
or "lineno-start" in self.options
|
||||
or "lineno-match" in self.options
|
||||
)
|
||||
retnode["classes"] += self.options.get("class", [])
|
||||
extra_args = retnode["highlight_args"] = {}
|
||||
if "emphasize-lines" in self.options:
|
||||
hl_lines = parselinenos(self.options["emphasize-lines"], lines)
|
||||
if any(i >= lines for i in hl_lines):
|
||||
logger.warning(
|
||||
"line number spec is out of range(1-%d): %r"
|
||||
% (lines, self.options["emphasize-lines"]),
|
||||
location=location,
|
||||
)
|
||||
extra_args["hl_lines"] = [x + 1 for x in hl_lines if x < lines]
|
||||
extra_args["linenostart"] = reader.lineno_start
|
||||
|
||||
retnode = nodes.literal_block(text, text, source=url)
|
||||
set_source_info(self, retnode)
|
||||
if self.options.get('diff'): # if diff is set, set udiff
|
||||
retnode['language'] = 'udiff'
|
||||
elif 'language' in self.options:
|
||||
retnode['language'] = self.options['language']
|
||||
retnode['linenos'] = ('linenos' in self.options or
|
||||
'lineno-start' in self.options or
|
||||
'lineno-match' in self.options)
|
||||
retnode['classes'] += self.options.get('class', [])
|
||||
extra_args = retnode['highlight_args'] = {}
|
||||
if 'emphasize-lines' in self.options:
|
||||
hl_lines = parselinenos(self.options['emphasize-lines'], lines)
|
||||
if any(i >= lines for i in hl_lines):
|
||||
logger.warning('line number spec is out of range(1-%d): %r' %
|
||||
(lines, self.options['emphasize-lines']),
|
||||
location=location)
|
||||
extra_args['hl_lines'] = [x + 1 for x in hl_lines if x < lines]
|
||||
extra_args['linenostart'] = reader.lineno_start
|
||||
if "caption" in self.options:
|
||||
caption = self.options["caption"] or self.arguments[0]
|
||||
retnode = container_wrapper(self, retnode, caption)
|
||||
|
||||
if 'caption' in self.options:
|
||||
caption = self.options['caption'] or self.arguments[0]
|
||||
retnode = container_wrapper(self, retnode, caption)
|
||||
# retnode will be note_implicit_target that is linked from caption and numref.
|
||||
# when options['name'] is provided, it should be primary ID.
|
||||
self.add_name(retnode)
|
||||
|
||||
# retnode will be note_implicit_target that is linked from caption and numref.
|
||||
# when options['name'] is provided, it should be primary ID.
|
||||
self.add_name(retnode)
|
||||
|
||||
return [retnode]
|
||||
except Exception as exc:
|
||||
return [document.reporter.warning(str(exc), line=self.lineno)]
|
||||
return [retnode]
|
||||
except Exception as exc:
|
||||
return [document.reporter.warning(str(exc), line=self.lineno)]
|
||||
|
||||
|
||||
def visit_onlineinclude(translator, node):
|
||||
translator.visit_literal_block(node)
|
||||
translator.visit_literal_block(node)
|
||||
|
||||
|
||||
def depart_onlineinclude(translator, node):
|
||||
translator.depart_literal_block(node)
|
||||
translator.depart_literal_block(node)
|
||||
|
||||
|
||||
def setup(app):
|
||||
app.add_directive("onlineinclude", OnlineIncludeDirective)
|
||||
app.add_directive("onlineinclude", OnlineIncludeDirective)
|
||||
|
||||
handler = (visit_onlineinclude, depart_onlineinclude)
|
||||
app.add_node(OnlineIncludeDirective, html=handler, latex=handler, text=handler)
|
||||
handler = (visit_onlineinclude, depart_onlineinclude)
|
||||
app.add_node(OnlineIncludeDirective, html=handler, latex=handler, text=handler)
|
||||
@@ -10,17 +10,20 @@ basedir = os.path.dirname(os.path.realpath(__file__))
|
||||
old = os.path.join(basedir, "octoprint")
|
||||
if os.path.exists(old):
|
||||
# rename left-overs from old file structure
|
||||
print("""
|
||||
print(
|
||||
"""
|
||||
Found left-overs from old file structure, renaming to
|
||||
"octoprint.backup". Please remove this manually (I don't
|
||||
dare to do so myself since you might have changes in there
|
||||
I don't know anything about).
|
||||
""")
|
||||
"""
|
||||
)
|
||||
os.rename(old, os.path.join(basedir, "octoprint.backup"))
|
||||
|
||||
sys.path.insert(0, os.path.join(basedir, "src"))
|
||||
|
||||
import octoprint
|
||||
import octoprint # noqa: E402
|
||||
|
||||
if len(sys.argv) == 1:
|
||||
sys.argv.append("serve")
|
||||
octoprint.main()
|
||||
@@ -6,7 +6,7 @@ Wants=network-online.target
|
||||
[Service]
|
||||
Environment="LC_ALL=C.UTF-8"
|
||||
Environment="LANG=C.UTF-8"
|
||||
Type=simple
|
||||
Type=exec
|
||||
User=pi
|
||||
ExecStart=/home/pi/OctoPrint/venv/bin/octoprint
|
||||
|
||||
|
||||
@@ -14,11 +14,22 @@ parentdir_prefix =
|
||||
lookupfile = .versioneer-lookup
|
||||
|
||||
[flake8]
|
||||
ignore =
|
||||
D
|
||||
E
|
||||
W
|
||||
F401
|
||||
F523
|
||||
max-line-length = 90
|
||||
extend-ignore = E203, E231, E265, E266, E402, E501, E731
|
||||
select = B,C,E,F,W,T4,B9
|
||||
exclude =
|
||||
src/octoprint/vendor
|
||||
|
||||
[isort]
|
||||
multi_line_output = 3
|
||||
include_trailing_comma = True
|
||||
force_grid_wrap = 0
|
||||
use_parentheses = True
|
||||
ensure_newline_before_comments = True
|
||||
line_length = 90
|
||||
skip =
|
||||
src/octoprint/vendor
|
||||
known_first_party =
|
||||
octoprint
|
||||
octoprint_setuptools
|
||||
octoprint_client
|
||||
@@ -1,294 +1,312 @@
|
||||
#!/usr/bin/env python2
|
||||
# coding=utf-8
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from distutils.command.build_py import build_py as _build_py
|
||||
import os
|
||||
import versioneer
|
||||
|
||||
import sys
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), "src"))
|
||||
import octoprint_setuptools
|
||||
import setuptools
|
||||
from distutils.command.build_py import build_py as _build_py
|
||||
|
||||
#-----------------------------------------------------------------------------------------------------------------------
|
||||
import versioneer # noqa: F401
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), "src"))
|
||||
import setuptools # noqa: F401,E402
|
||||
|
||||
import octoprint_setuptools # noqa: F401,E402
|
||||
|
||||
# ----------------------------------------------------------------------------------------
|
||||
|
||||
# Supported python versions
|
||||
# we test against 2.7, 3.6 and 3.7, so that's what we'll mark as supported
|
||||
PYTHON_REQUIRES = ">=2.7.9, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*, <4"
|
||||
|
||||
# Requirements for setup.py
|
||||
SETUP_REQUIRES = [
|
||||
"markdown>=3.1,<3.2" # newer versions require Python 3
|
||||
]
|
||||
SETUP_REQUIRES = ["markdown>=3.1,<3.2"] # newer versions require Python 3
|
||||
|
||||
# Requirements for our application
|
||||
INSTALL_REQUIRES = [
|
||||
# additional OctoPrint plugins that are maintained on a different release cycle
|
||||
"OctoPrint-FirmwareCheck>=2020.06.22",
|
||||
"OctoPrint-FileCheck>=2020.07.06",
|
||||
|
||||
# the following dependencies are non trivial to update since later versions introduce backwards incompatible
|
||||
# changes that might affect plugins, or due to other observed problems
|
||||
|
||||
"markupsafe>=1.1,<2.0", # Jinja dependency, newer versions require Python 3
|
||||
"tornado==5.1.1", # newer versions require Python 3
|
||||
"markdown>=3.1,<3.2", # newer versions require Python 3
|
||||
"rsa==4.0", # newer versions require Python 3
|
||||
"regex!=2018.11.6", # avoid broken 2018.11.6. See #2874
|
||||
|
||||
# anything below this should be checked on releases for new versions
|
||||
|
||||
"flask>=1.1.2,<2",
|
||||
"Jinja2>=2.11.2,<3",
|
||||
"Flask-Login>=0.5,<0.6", # flask-login doesn't use semver & breaks stuff on minor version increases
|
||||
"Flask-Babel>=1.0,<2",
|
||||
"Flask-Assets>=2.0,<3",
|
||||
"werkzeug>=1.0.1,<2",
|
||||
"itsdangerous>=1.1.0,<2",
|
||||
"cachelib>=0.1,<1",
|
||||
"PyYAML>=5.3.1,<6",
|
||||
"pyserial>=3.4,<4",
|
||||
"netaddr>=0.7.19,<1",
|
||||
"watchdog>=0.10.2,<1",
|
||||
"sarge==0.1.5post0",
|
||||
"netifaces>=0.10.9,<1",
|
||||
"pylru>=1.2,<2",
|
||||
"pkginfo>=1.5.0.1,<2",
|
||||
"requests>=2.23.0,<3",
|
||||
"semantic_version>=2.8.5,<3",
|
||||
"psutil>=5.7,<6",
|
||||
"Click>=7.1.2,<8",
|
||||
"feedparser>=5.2.1,<6",
|
||||
"future>=0.18.2,<1",
|
||||
"websocket-client>=0.57,<1",
|
||||
"wrapt>=1.12.1,<2",
|
||||
"emoji>=0.5.4,<1",
|
||||
"frozendict>=1.2,<2",
|
||||
"sentry-sdk>=0.15.1,<1",
|
||||
"filetype>=1.0.7,<2",
|
||||
|
||||
# vendor bundle dependencies
|
||||
"unidecode>=0.04.14,<0.05", # dependency of awesome-slugify
|
||||
"blinker>=1.4,<2" # dependency of flask_principal
|
||||
# additional OctoPrint plugins that are maintained on a different release cycle
|
||||
"OctoPrint-FileCheck>=2021.2.23",
|
||||
"OctoPrint-FirmwareCheck>=2021.2.4",
|
||||
"OctoPrint-PiSupport>=2021.3.26",
|
||||
# the following dependencies are non trivial to update since later versions
|
||||
# introduce backwards incompatible changes that might affect plugins, or due to
|
||||
# other observed problems
|
||||
"markupsafe>=1.1,<2.0", # Jinja dependency, newer versions require Python 3
|
||||
"tornado==5.1.1", # newer versions require Python 3
|
||||
"markdown>=3.1,<3.2", # newer versions require Python 3
|
||||
"regex!=2018.11.6", # avoid broken 2018.11.6. See #2874
|
||||
# anything below this should be checked on releases for new versions
|
||||
"flask>=1.1.2,<2",
|
||||
"Jinja2>=2.11.2,<3",
|
||||
"Flask-Login>=0.5,<0.6", # flask-login doesn't use semver & breaks stuff on minor version increases
|
||||
"Flask-Babel>=1.0,<2",
|
||||
"Flask-Assets>=2.0,<3",
|
||||
"werkzeug>=1.0.1,<2",
|
||||
"itsdangerous>=1.1.0,<2",
|
||||
"cachelib>=0.1,<1",
|
||||
"PyYAML>=5.3.1,<6",
|
||||
"pyserial>=3.4,<4",
|
||||
"netaddr>=0.7.19,<1",
|
||||
"watchdog==0.10.4", # watchdog dropped Py>3.6 on 0.10.5 point release...
|
||||
"sarge==0.1.5post0",
|
||||
"netifaces>=0.10.9,<1",
|
||||
"pylru>=1.2,<2",
|
||||
"pkginfo>=1.5.0.1,<2",
|
||||
"requests>=2.23.0,<3",
|
||||
"semantic_version>=2.8.5,<3",
|
||||
"psutil>=5.7,<6",
|
||||
"Click>=7.1.2,<8",
|
||||
"future>=0.18.2,<1",
|
||||
"websocket-client>=0.57,<1",
|
||||
"wrapt>=1.12.1,<2",
|
||||
"emoji>=0.5.4,<1",
|
||||
"sentry-sdk>=0.15.1,<1",
|
||||
"filetype>=1.0.7,<2",
|
||||
"zipstream-new>=1.1.8,<1.2",
|
||||
# vendor bundled dependencies
|
||||
"unidecode>=0.04.14,<0.05", # dependency of awesome-slugify
|
||||
"blinker>=1.4,<2", # dependency of flask_principal
|
||||
]
|
||||
|
||||
# Python 2 specific requirements
|
||||
INSTALL_REQUIRES_PYTHON2 = [
|
||||
"futures>=3.3,<4",
|
||||
"monotonic>=1.5,<2",
|
||||
"scandir>=1.10,<2",
|
||||
"chainmap>=1.0.3,<2",
|
||||
"typing>=3.7.4.1,<4"
|
||||
"feedparser>=5.2.1,<6", # newer versions require Python 3
|
||||
"futures>=3.3,<4",
|
||||
"monotonic>=1.5,<2",
|
||||
"scandir>=1.10,<2",
|
||||
"chainmap>=1.0.3,<2",
|
||||
"typing>=3.7.4.1,<4",
|
||||
"enum34>=1.1.10,<1.2",
|
||||
"frozendict>=1.2,<2",
|
||||
]
|
||||
|
||||
# Python 3 specific requirements
|
||||
INSTALL_REQUIRES_PYTHON3 = [
|
||||
"feedparser>=6.0.2,<7",
|
||||
"zeroconf>=0.24,<0.25",
|
||||
"immutabledict>=1.2.0,<2",
|
||||
]
|
||||
|
||||
# OSX specific requirements
|
||||
INSTALL_REQUIRES_OSX = [
|
||||
"appdirs>=1.4.4",
|
||||
"appdirs>=1.4.4",
|
||||
]
|
||||
|
||||
# Additional requirements for optional install options
|
||||
EXTRA_REQUIRES = dict(
|
||||
# Dependencies for developing OctoPrint
|
||||
develop=[
|
||||
# Testing dependencies - SEE ALSO tox.ini
|
||||
"mock>=3.0.5,<4",
|
||||
"pytest==4.6.10",
|
||||
"pytest-doctest-custom>=1.0.0,<2",
|
||||
"ddt",
|
||||
|
||||
# linter
|
||||
"flake8",
|
||||
|
||||
# profiler
|
||||
"pyinstrument",
|
||||
],
|
||||
|
||||
# Dependencies for developing OctoPrint plugins
|
||||
plugins=[
|
||||
"cookiecutter>=1.7.2,<1.8"
|
||||
],
|
||||
|
||||
# Dependencies for building the documentation - Python 3 required!
|
||||
docs=[
|
||||
"sphinx>=3,<4",
|
||||
"sphinxcontrib-httpdomain",
|
||||
"sphinxcontrib-mermaid",
|
||||
"sphinx_rtd_theme",
|
||||
"readthedocs-sphinx-ext"
|
||||
],
|
||||
)
|
||||
EXTRA_REQUIRES = {
|
||||
"develop": [
|
||||
# Testing dependencies
|
||||
"mock>=3.0.5,<4",
|
||||
"pytest==4.6.10",
|
||||
"pytest-doctest-custom>=1.0.0,<2",
|
||||
"ddt",
|
||||
# pre-commit
|
||||
"pre-commit",
|
||||
# profiler
|
||||
"pyinstrument",
|
||||
],
|
||||
# Dependencies for developing OctoPrint plugins
|
||||
"plugins": ["cookiecutter>=1.7.2,<1.8"],
|
||||
# Dependencies for building the documentation - Python 3 required!
|
||||
"docs": [
|
||||
"sphinx>=3,<4",
|
||||
"sphinxcontrib-httpdomain",
|
||||
"sphinxcontrib-mermaid",
|
||||
"sphinx_rtd_theme",
|
||||
"readthedocs-sphinx-ext",
|
||||
],
|
||||
}
|
||||
|
||||
# Dependency links for any of the aforementioned dependencies
|
||||
DEPENDENCY_LINKS = []
|
||||
|
||||
# adapted from https://hynek.me/articles/conditional-python-dependencies/
|
||||
if int(setuptools.__version__.split(".", 1)[0]) < 18:
|
||||
# no bdist_wheel support for setuptools < 18 since we build universal wheels and our optional dependencies
|
||||
# would get lost there
|
||||
assert "bdist_wheel" not in sys.argv
|
||||
# no bdist_wheel support for setuptools < 18 since we build universal wheels and our optional dependencies
|
||||
# would get lost there
|
||||
assert "bdist_wheel" not in sys.argv
|
||||
|
||||
# add optional dependencies for setuptools versions < 18 that don't yet support environment markers
|
||||
if sys.version_info[0] < 3:
|
||||
INSTALL_REQUIRES += INSTALL_REQUIRES_PYTHON2
|
||||
# add optional dependencies for setuptools versions < 18 that don't yet support environment markers
|
||||
if sys.version_info[0] < 3:
|
||||
INSTALL_REQUIRES += INSTALL_REQUIRES_PYTHON2
|
||||
else:
|
||||
INSTALL_REQUIRES += INSTALL_REQUIRES_PYTHON3
|
||||
|
||||
if sys.platform == "darwin":
|
||||
INSTALL_REQUIRES += INSTALL_REQUIRES_OSX
|
||||
if sys.platform == "darwin":
|
||||
INSTALL_REQUIRES += INSTALL_REQUIRES_OSX
|
||||
else:
|
||||
# environment markers supported
|
||||
EXTRA_REQUIRES[":python_version < '3'"] = INSTALL_REQUIRES_PYTHON2
|
||||
EXTRA_REQUIRES[":sys_platform == 'darwin'"] = INSTALL_REQUIRES_OSX
|
||||
# environment markers supported
|
||||
EXTRA_REQUIRES[":python_version < '3'"] = INSTALL_REQUIRES_PYTHON2
|
||||
EXTRA_REQUIRES[":python_version >= '3'"] = INSTALL_REQUIRES_PYTHON3
|
||||
EXTRA_REQUIRES[":sys_platform == 'darwin'"] = INSTALL_REQUIRES_OSX
|
||||
|
||||
#-----------------------------------------------------------------------------------------------------------------------
|
||||
# -----------------------------------------------------------------------------------------------------------------------
|
||||
# Anything below here is just command setup and general setup configuration
|
||||
|
||||
here = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
|
||||
def read_file_contents(path):
|
||||
import codecs
|
||||
with codecs.open(path, encoding="utf-8") as f:
|
||||
return f.read()
|
||||
import codecs
|
||||
|
||||
with codecs.open(path, encoding="utf-8") as f:
|
||||
return f.read()
|
||||
|
||||
|
||||
def md_to_html_build_py_factory(files, baseclass):
|
||||
class md_to_html_build_py(baseclass):
|
||||
files = dict()
|
||||
class md_to_html_build_py(baseclass):
|
||||
files = {}
|
||||
|
||||
def run(self):
|
||||
print("RUNNING md_to_html_build_py")
|
||||
if not self.dry_run:
|
||||
for directory, files in self.files.items():
|
||||
target_dir = os.path.join(self.build_lib, directory)
|
||||
self.mkpath(target_dir)
|
||||
def run(self):
|
||||
print("RUNNING md_to_html_build_py")
|
||||
if not self.dry_run:
|
||||
for directory, files in self.files.items():
|
||||
target_dir = os.path.join(self.build_lib, directory)
|
||||
self.mkpath(target_dir)
|
||||
|
||||
for entry in files:
|
||||
if isinstance(entry, tuple):
|
||||
if len(entry) != 2:
|
||||
continue
|
||||
source, dest = entry[0], os.path.join(target_dir, entry[1])
|
||||
else:
|
||||
source = entry
|
||||
dest = os.path.join(target_dir, source + ".html")
|
||||
for entry in files:
|
||||
if isinstance(entry, tuple):
|
||||
if len(entry) != 2:
|
||||
continue
|
||||
source, dest = entry[0], os.path.join(target_dir, entry[1])
|
||||
else:
|
||||
source = entry
|
||||
dest = os.path.join(target_dir, source + ".html")
|
||||
|
||||
print("Rendering markdown from {} to {}".format(source, dest))
|
||||
print("Rendering markdown from {} to {}".format(source, dest))
|
||||
|
||||
from markdown import markdownFromFile
|
||||
markdownFromFile(input=source,
|
||||
output=dest,
|
||||
encoding="utf-8")
|
||||
baseclass.run(self)
|
||||
from markdown import markdownFromFile
|
||||
|
||||
markdownFromFile(input=source, output=dest, encoding="utf-8")
|
||||
baseclass.run(self)
|
||||
|
||||
return type(md_to_html_build_py)(
|
||||
md_to_html_build_py.__name__, (md_to_html_build_py,), {"files": files}
|
||||
)
|
||||
|
||||
return type(md_to_html_build_py)(md_to_html_build_py.__name__,
|
||||
(md_to_html_build_py,),
|
||||
dict(files=files))
|
||||
|
||||
def get_cmdclass():
|
||||
# make sure these are always available, even when run by dependabot
|
||||
global versioneer, octoprint_setuptools, md_to_html_build_py_factory
|
||||
# make sure these are always available, even when run by dependabot
|
||||
global versioneer, octoprint_setuptools, md_to_html_build_py_factory
|
||||
|
||||
cmdclass = versioneer.get_cmdclass()
|
||||
cmdclass = versioneer.get_cmdclass()
|
||||
|
||||
# add clean command
|
||||
cmdclass.update(dict(clean=octoprint_setuptools.CleanCommand.for_options(source_folder="src", eggs=["OctoPrint*.egg-info"])))
|
||||
# add clean command
|
||||
cmdclass.update(
|
||||
{
|
||||
"clean": octoprint_setuptools.CleanCommand.for_options(
|
||||
source_folder="src", eggs=["OctoPrint*.egg-info"]
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
# add translation commands
|
||||
translation_dir = "translations"
|
||||
pot_file = os.path.join(translation_dir, "messages.pot")
|
||||
bundled_dir = os.path.join("src", "octoprint", "translations")
|
||||
cmdclass.update(octoprint_setuptools.get_babel_commandclasses(pot_file=pot_file, output_dir=translation_dir, pack_name_prefix="OctoPrint-i18n-", pack_path_prefix="", bundled_dir=bundled_dir))
|
||||
# add translation commands
|
||||
translation_dir = "translations"
|
||||
pot_file = os.path.join(translation_dir, "messages.pot")
|
||||
bundled_dir = os.path.join("src", "octoprint", "translations")
|
||||
cmdclass.update(
|
||||
octoprint_setuptools.get_babel_commandclasses(
|
||||
pot_file=pot_file,
|
||||
output_dir=translation_dir,
|
||||
pack_name_prefix="OctoPrint-i18n-",
|
||||
pack_path_prefix="",
|
||||
bundled_dir=bundled_dir,
|
||||
)
|
||||
)
|
||||
|
||||
cmdclass["build_py"] = md_to_html_build_py_factory({
|
||||
"octoprint/templates/_data": [
|
||||
"AUTHORS.md",
|
||||
"SUPPORTERS.md",
|
||||
"THIRDPARTYLICENSES.md",
|
||||
]
|
||||
}, cmdclass["build_py"] if "build_py" in cmdclass else _build_py)
|
||||
cmdclass["build_py"] = md_to_html_build_py_factory(
|
||||
{
|
||||
"octoprint/templates/_data": [
|
||||
"AUTHORS.md",
|
||||
"SUPPORTERS.md",
|
||||
"THIRDPARTYLICENSES.md",
|
||||
]
|
||||
},
|
||||
cmdclass["build_py"] if "build_py" in cmdclass else _build_py,
|
||||
)
|
||||
|
||||
return cmdclass
|
||||
return cmdclass
|
||||
|
||||
|
||||
def params():
|
||||
# make sure these are always available, even when run by dependabot
|
||||
global versioneer, get_cmdclass, read_file_contents, here, \
|
||||
PYTHON_REQUIRES, SETUP_REQUIRES, INSTALL_REQUIRES, EXTRA_REQUIRES, DEPENDENCY_LINKS
|
||||
# make sure these are always available, even when run by dependabot
|
||||
global versioneer, get_cmdclass, read_file_contents, here, PYTHON_REQUIRES, SETUP_REQUIRES, INSTALL_REQUIRES, EXTRA_REQUIRES, DEPENDENCY_LINKS
|
||||
|
||||
name = "OctoPrint"
|
||||
version = versioneer.get_version()
|
||||
cmdclass = get_cmdclass()
|
||||
name = "OctoPrint"
|
||||
version = versioneer.get_version()
|
||||
cmdclass = get_cmdclass()
|
||||
|
||||
description = "The snappy web interface for your 3D printer"
|
||||
long_description = read_file_contents(os.path.join(here, "README.md"))
|
||||
long_description_content_type = "text/markdown"
|
||||
description = "The snappy web interface for your 3D printer"
|
||||
long_description = read_file_contents(os.path.join(here, "README.md"))
|
||||
long_description_content_type = "text/markdown"
|
||||
|
||||
python_requires = PYTHON_REQUIRES
|
||||
setup_requires = SETUP_REQUIRES
|
||||
install_requires = INSTALL_REQUIRES
|
||||
extras_require = EXTRA_REQUIRES
|
||||
dependency_links = DEPENDENCY_LINKS
|
||||
python_requires = PYTHON_REQUIRES
|
||||
setup_requires = SETUP_REQUIRES
|
||||
install_requires = INSTALL_REQUIRES
|
||||
extras_require = EXTRA_REQUIRES
|
||||
dependency_links = DEPENDENCY_LINKS
|
||||
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Environment :: Web Environment",
|
||||
"Framework :: Flask",
|
||||
"Intended Audience :: Developers",
|
||||
"Intended Audience :: Education",
|
||||
"Intended Audience :: End Users/Desktop",
|
||||
"Intended Audience :: Manufacturing",
|
||||
"Intended Audience :: Other Audience",
|
||||
"Intended Audience :: Science/Research",
|
||||
"License :: OSI Approved :: GNU Affero General Public License v3",
|
||||
"Natural Language :: English",
|
||||
"Natural Language :: German",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 2",
|
||||
"Programming Language :: Python :: 2.7",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
"Programming Language :: JavaScript",
|
||||
"Topic :: Printing",
|
||||
"Topic :: System :: Monitoring"
|
||||
]
|
||||
author = "Gina Häußge"
|
||||
author_email = "gina@octoprint.org"
|
||||
url = "https://octoprint.org"
|
||||
license = "GNU Affero General Public License v3"
|
||||
keywords = "3dprinting 3dprinter 3d-printing 3d-printer octoprint"
|
||||
classifiers = [
|
||||
"Development Status :: 5 - Production/Stable",
|
||||
"Environment :: Web Environment",
|
||||
"Framework :: Flask",
|
||||
"Intended Audience :: Developers",
|
||||
"Intended Audience :: Education",
|
||||
"Intended Audience :: End Users/Desktop",
|
||||
"Intended Audience :: Manufacturing",
|
||||
"Intended Audience :: Other Audience",
|
||||
"Intended Audience :: Science/Research",
|
||||
"License :: OSI Approved :: GNU Affero General Public License v3",
|
||||
"Natural Language :: English",
|
||||
"Natural Language :: German",
|
||||
"Operating System :: OS Independent",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 2",
|
||||
"Programming Language :: Python :: 2.7",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.6",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: Implementation :: CPython",
|
||||
"Programming Language :: JavaScript",
|
||||
"Topic :: Printing",
|
||||
"Topic :: System :: Monitoring",
|
||||
]
|
||||
author = "Gina Häußge"
|
||||
author_email = "gina@octoprint.org"
|
||||
url = "https://octoprint.org"
|
||||
license = "GNU Affero General Public License v3"
|
||||
keywords = "3dprinting 3dprinter 3d-printing 3d-printer octoprint"
|
||||
|
||||
project_urls={
|
||||
"Community Forum": "https://community.octoprint.org",
|
||||
"Bug Reports": "https://github.com/foosel/OctoPrint/issues",
|
||||
"Source": "https://github.com/foosel/OctoPrint",
|
||||
"Funding": "https://donate.octoprint.org"
|
||||
}
|
||||
project_urls = {
|
||||
"Community Forum": "https://community.octoprint.org",
|
||||
"Bug Reports": "https://github.com/OctoPrint/OctoPrint/issues",
|
||||
"Source": "https://github.com/OctoPrint/OctoPrint",
|
||||
"Funding": "https://support.octoprint.org",
|
||||
}
|
||||
|
||||
packages = setuptools.find_packages(where="src")
|
||||
package_dir = {
|
||||
"": "src",
|
||||
}
|
||||
package_data = {
|
||||
"octoprint": octoprint_setuptools.package_data_dirs('src/octoprint',
|
||||
['static', 'templates', 'plugins', 'translations'])
|
||||
+ ['util/piptestballoon/setup.py']
|
||||
}
|
||||
packages = setuptools.find_packages(where="src")
|
||||
package_dir = {
|
||||
"": "src",
|
||||
}
|
||||
package_data = {
|
||||
"octoprint": octoprint_setuptools.package_data_dirs(
|
||||
"src/octoprint", ["static", "templates", "plugins", "translations"]
|
||||
)
|
||||
+ ["util/piptestballoon/setup.py"]
|
||||
}
|
||||
|
||||
include_package_data = True
|
||||
zip_safe = False
|
||||
include_package_data = True
|
||||
zip_safe = False
|
||||
|
||||
if os.environ.get('READTHEDOCS', None) == 'True':
|
||||
# we can't tell read the docs to please perform a pip install -e .[docs], so we help
|
||||
# it a bit here by explicitly adding the development dependencies, which include our
|
||||
# documentation dependencies
|
||||
install_requires = install_requires + extras_require['docs']
|
||||
if os.environ.get("READTHEDOCS", None) == "True":
|
||||
# we can't tell read the docs to please perform a pip install -e .[docs], so we help
|
||||
# it a bit here by explicitly adding the development dependencies, which include our
|
||||
# documentation dependencies
|
||||
install_requires = install_requires + extras_require["docs"]
|
||||
|
||||
entry_points = {
|
||||
"console_scripts": [
|
||||
"octoprint = octoprint:main"
|
||||
]
|
||||
}
|
||||
entry_points = {"console_scripts": ["octoprint = octoprint:main"]}
|
||||
|
||||
return locals()
|
||||
|
||||
return locals()
|
||||
|
||||
setuptools.setup(**params())
|
||||
Loaded 100 of 617 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user