Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e46e8fa17a | ||
|
|
12d6de51da | ||
|
|
424dc0a13d | ||
|
|
d9fef47e78 | ||
|
|
222b9997a1 | ||
|
|
3124c08927 | ||
|
|
2697bd7a42 | ||
|
|
a2d4fc08a5 | ||
|
|
bdeb765f75 | ||
|
|
84b61e01f4 | ||
|
|
38256815ef | ||
|
|
c111054fd6 | ||
|
|
82dd94d51b | ||
|
|
1536ed6da3 | ||
|
|
9f9d0fc788 | ||
|
|
a23daa7c81 | ||
|
|
82d308c9ac | ||
|
|
fe7437388a | ||
|
|
28a1c8bb4f | ||
|
|
f67c15a9a4 | ||
|
|
a74309d650 | ||
|
|
220979bf68 | ||
|
|
49cd9d3283 | ||
|
|
308ac450e7 | ||
|
|
d80a27a64a | ||
|
|
a4630df622 | ||
|
|
149161694d | ||
|
|
5e7ea35239 | ||
|
|
4768a7eb5a | ||
|
|
84fb97f82a | ||
|
|
c30673fac0 | ||
|
|
9f5781eff4 | ||
|
|
f2ed1ebc74 | ||
|
|
e7e731800b | ||
|
|
89f3edcb27 | ||
|
|
c44e90302d | ||
|
|
5b5163c812 | ||
|
|
d311fb18e0 | ||
|
|
ab5d19bf12 | ||
|
|
75796dafbc | ||
|
|
2670d16407 | ||
|
|
54f98a5ad1 | ||
|
|
1238edf1b9 | ||
|
|
5f2a95d154 | ||
|
|
8cd51103d9 | ||
|
|
b94424411a | ||
|
|
fabf331197 | ||
|
|
bed0f8d1c8 | ||
|
|
f55d7e29f7 | ||
|
|
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 | ||
|
|
45d3e7c864 | ||
|
|
89412a761a | ||
|
|
b8b3cdde53 | ||
|
|
8c829048af | ||
|
|
14a5f89b59 | ||
|
|
65d5d8963b | ||
|
|
ea58e48dad | ||
|
|
0a605ccb12 | ||
|
|
5a33ecf63b | ||
|
|
abbbd926bc | ||
|
|
ad6230074a | ||
|
|
58fa6004bb | ||
|
|
1d55e488ae | ||
|
|
ffb2a0ed73 | ||
|
|
0364130dd3 | ||
|
|
ac967499f3 | ||
|
|
3ab84ed7e4 | ||
|
|
3f7bc1ebb5 | ||
|
|
e49d0b0c22 | ||
|
|
a846fd8f83 | ||
|
|
c9186edd34 | ||
|
|
e7e04271fd | ||
|
|
894178918b | ||
|
|
05cd917693 | ||
|
|
ffde393c66 | ||
|
|
252b9b7e41 | ||
|
|
b0247597f9 | ||
|
|
fb8fcb0685 | ||
|
|
cae900b1fb | ||
|
|
65937a9244 | ||
|
|
06637280e5 | ||
|
|
c57c2b5a2b | ||
|
|
57b8d0b88e | ||
|
|
462f90979d | ||
|
|
458ab91f91 | ||
|
|
ab8ad72bc3 | ||
|
|
e9b6d22932 | ||
|
|
3b6be8b4b9 | ||
|
|
57b085ff5c | ||
|
|
0cfc08748b | ||
|
|
0188745d05 | ||
|
|
5246e2ccb4 | ||
|
|
f1d4cb670a | ||
|
|
9dd1e95eae | ||
|
|
6083943e03 | ||
|
|
a8ba43308e | ||
|
|
87cd0a88fb | ||
|
|
6165e5b0f0 | ||
|
|
d47ea73dfc | ||
|
|
f62addc5e8 | ||
|
|
4511d8667b | ||
|
|
af3a63fd9b | ||
|
|
8b939d89a5 | ||
|
|
b973b5fab2 | ||
|
|
c1bddcd594 | ||
|
|
b1e2121682 | ||
|
|
b3d094db02 | ||
|
|
bc015da547 | ||
|
|
a9ad2aa2fa | ||
|
|
232d5ce54f | ||
|
|
8f508067e6 | ||
|
|
93e54f57e0 | ||
|
|
a884888caa | ||
|
|
c40ae9f181 | ||
|
|
e33b3b5883 | ||
|
|
1da4c2b7ab | ||
|
|
c5baa05b5e | ||
|
|
719c3e3b0b | ||
|
|
123266d0ff | ||
|
|
aa0ba6881c | ||
|
|
b8246d41e3 | ||
|
|
7d037ab1a4 | ||
|
|
01940bbb10 | ||
|
|
dbd7f719f6 | ||
|
|
63135a4b2b | ||
|
|
6ef5b5001e | ||
|
|
2a4853bbd4 | ||
|
|
003b80689e | ||
|
|
df66dd9abf | ||
|
|
6bac39c193 | ||
|
|
7915e6c04e | ||
|
|
b20c15f56d | ||
|
|
1b05e782bf | ||
|
|
d2a23c3dc7 | ||
|
|
27191f5202 | ||
|
|
d628f11388 | ||
|
|
87cd6de96c | ||
|
|
650d54d188 | ||
|
|
a2510cf32a | ||
|
|
42abcd7009 | ||
|
|
b150989286 | ||
|
|
736dca4d07 | ||
|
|
6c891a3e29 | ||
|
|
f2ca247731 | ||
|
|
fa148a8b7e | ||
|
|
20a3700a2c | ||
|
|
f1cc40a87c | ||
|
|
a19c9366ed | ||
|
|
46203fd43c | ||
|
|
38f1c74379 | ||
|
|
7f6d2c9582 | ||
|
|
113dcd3fc9 | ||
|
|
0b471aae9e | ||
|
|
42769dad7d | ||
|
|
d2110c3013 | ||
|
|
1746820d69 | ||
|
|
32b655451c | ||
|
|
0bc2bd6e40 | ||
|
|
0ff72a3510 | ||
|
|
b61b75e015 | ||
|
|
7339cb5d7b | ||
|
|
78b503239e | ||
|
|
2da5799677 | ||
|
|
ee74453839 | ||
|
|
7fe5af0466 | ||
|
|
9f68900dc5 | ||
|
|
7c4e0b2344 | ||
|
|
75c1b02760 | ||
|
|
fd1ddab50f | ||
|
|
940909c0f8 | ||
|
|
622aad07dc | ||
|
|
9921887047 | ||
|
|
e3a83ccb00 | ||
|
|
13c575b3bc | ||
|
|
0c9c25fb41 | ||
|
|
ff67171d46 | ||
|
|
f6fef5e61f | ||
|
|
ff552daf31 | ||
|
|
cf9de3d11c | ||
|
|
637f34162f | ||
|
|
3846a55c5e | ||
|
|
6cc0a5ae34 | ||
|
|
e88bd1f441 | ||
|
|
4fc5aa7c3a | ||
|
|
ca493459b3 | ||
|
|
a01128b273 | ||
|
|
727c69bb3f | ||
|
|
43fc028e2e | ||
|
|
2e4c3fed24 | ||
|
|
805159b07f | ||
|
|
27d2e22433 | ||
|
|
bbab42cacd | ||
|
|
9b6a14cf19 | ||
|
|
9a48342ce2 | ||
|
|
eb8eeae418 | ||
|
|
331cc3614a | ||
|
|
5287dca4e5 | ||
|
|
ced1bbf53d | ||
|
|
d114551bd1 | ||
|
|
8d32f65c5b | ||
|
|
ada121d2ec | ||
|
|
eac45562f8 | ||
|
|
0461992496 | ||
|
|
7224970e2c | ||
|
|
a0c0b2d8af | ||
|
|
e9f9ad3a0d | ||
|
|
9deabb895a | ||
|
|
c2705a96f1 | ||
|
|
a370f1e42f | ||
|
|
5b022a7321 | ||
|
|
063ad6cb3b | ||
|
|
8bf0ef5ddb | ||
|
|
4ac8476f74 | ||
|
|
86925a43c4 | ||
|
|
70ba9d56ab | ||
|
|
f3327eb3aa | ||
|
|
22177092be | ||
|
|
f9387a46c3 | ||
|
|
8e13e4fcc0 | ||
|
|
a81e2cd983 | ||
|
|
987b2e858f | ||
|
|
6396d5ede0 | ||
|
|
6d8a131c6d | ||
|
|
a4eb739a95 | ||
|
|
533039619e | ||
|
|
6e6af0203d | ||
|
|
2e4b5ebef6 | ||
|
|
82b07ae8f2 | ||
|
|
a9440eea88 | ||
|
|
eeaac73a5d | ||
|
|
0ac205cdf2 | ||
|
|
b399ce6fbc | ||
|
|
9d1633ae65 | ||
|
|
def106f409 | ||
|
|
462f2e602b | ||
|
|
a6fc4b6c7f | ||
|
|
6625f81b6e | ||
|
|
7290a6d350 | ||
|
|
4555200027 | ||
|
|
4415481604 | ||
|
|
0aed3c05cb | ||
|
|
1903a7a319 | ||
|
|
4689e87a1f | ||
|
|
165b3421f1 | ||
|
|
80aa7933ab | ||
|
|
5dd1b19373 | ||
|
|
2f630f69de | ||
|
|
0a9e9ef3a3 | ||
|
|
143cffd060 | ||
|
|
1d48d49453 | ||
|
|
0a5f9dfc00 | ||
|
|
607e4b376c | ||
|
|
9042442bea | ||
|
|
55dafd511b | ||
|
|
ddb88ea737 | ||
|
|
31e98b8949 | ||
|
|
37526800c1 | ||
|
|
eef51b1cb9 | ||
|
|
8e662fea9e | ||
|
|
4c73774104 | ||
|
|
b675ec6137 | ||
|
|
0c5a458759 | ||
|
|
ff47314d76 | ||
|
|
86d442a1e3 | ||
|
|
a819b5d2ca | ||
|
|
379c969a9f | ||
|
|
c3d2b31232 | ||
|
|
a909be7f49 | ||
|
|
207da9cda1 | ||
|
|
23f2b6c7d0 | ||
|
|
6fc415bb67 | ||
|
|
e4f8448d26 | ||
|
|
72ebf6f4c4 | ||
|
|
5cbba2b2b7 | ||
|
|
eb3d73bcf3 | ||
|
|
12cca448c7 | ||
|
|
a4d6e24dad | ||
|
|
2206b84f3e | ||
|
|
488a75737c | ||
|
|
2570b296ca | ||
|
|
a2c38dbc12 | ||
|
|
fb43bc0e25 | ||
|
|
839dc3e07f | ||
|
|
2bbe566f72 | ||
|
|
23a4a581a5 | ||
|
|
80f94946e3 | ||
|
|
42943050fe | ||
|
|
dac60a6783 | ||
|
|
1a37f0209c | ||
|
|
db46b4fb6f | ||
|
|
2b527f333f | ||
|
|
73fbd15bca | ||
|
|
f88b5e8142 | ||
|
|
a934075407 | ||
|
|
2e5d97e99c | ||
|
|
499b9130dd | ||
|
|
fd640c6962 | ||
|
|
1eb022e42b | ||
|
|
6751d683f3 | ||
|
|
1f5391fc2c | ||
|
|
5533263e91 | ||
|
|
65a66b11eb | ||
|
|
052f81275b | ||
|
|
e0a5751d9f | ||
|
|
8a18963a72 | ||
|
|
12d674882a | ||
|
|
b0d3c4a512 | ||
|
|
97483bc0cb | ||
|
|
92cfa98d88 | ||
|
|
6d501c84c5 | ||
|
|
58a6649157 | ||
|
|
3387b22040 | ||
|
|
52d3b9cf13 | ||
|
|
b763c0516d | ||
|
|
f4ba30b4ce | ||
|
|
6367ab8bf9 | ||
|
|
d99d2581aa | ||
|
|
1d2e82644c | ||
|
|
4d8a6faac3 | ||
|
|
3fd88b4f13 | ||
|
|
2baea4e5de | ||
|
|
d71b8e9e82 | ||
|
|
2bd29a7cb2 | ||
|
|
5c1271a56e | ||
|
|
bbbebe35fd | ||
|
|
3e777dd43c | ||
|
|
f862473969 | ||
|
|
f016bb1e0c | ||
|
|
85de9d5f45 | ||
|
|
ed1b02dcb2 | ||
|
|
4ba94c3ce9 | ||
|
|
679713f169 | ||
|
|
1b66edcb2e | ||
|
|
9e3cf58bc9 | ||
|
|
84e6ea99f3 | ||
|
|
2281b6e8e9 | ||
|
|
90b94c265d | ||
|
|
e62d50eb21 | ||
|
|
4ddaf350b4 | ||
|
|
8330a1d05f | ||
|
|
3bc4ae14cc | ||
|
|
51f5ff4193 | ||
|
|
8bae5ace0f | ||
|
|
553f8ce28f | ||
|
|
fb8ef4e7fa | ||
|
|
15f5873cc2 | ||
|
|
ef3c8bb6c2 | ||
|
|
87b20ddfe9 | ||
|
|
7bd781e7d2 | ||
|
|
fa2153f3e3 | ||
|
|
c766e99743 | ||
|
|
d97fdb5ce8 | ||
|
|
a96167729c | ||
|
|
52f990b9cb | ||
|
|
403b638eb6 | ||
|
|
0a889dc7e6 | ||
|
|
81e1ad2ee7 | ||
|
|
6aa2fc51f9 | ||
|
|
127bd37e29 | ||
|
|
e3d360a51a | ||
|
|
45aff52c81 | ||
|
|
65b960f0f0 | ||
|
|
1c371a24fb | ||
|
|
2d8904e2cf | ||
|
|
5b92be5889 | ||
|
|
bec4d04c15 | ||
|
|
a871766175 | ||
|
|
97a82c0cc1 | ||
|
|
5cb7fa4dc9 | ||
|
|
e6336c62ab | ||
|
|
582c3739e7 | ||
|
|
258250131f | ||
|
|
2cb8b03f7b | ||
|
|
fedbbdf3fb | ||
|
|
aab012d530 | ||
|
|
b930fb0edb | ||
|
|
8fd3ec6d6a | ||
|
|
d215715b52 | ||
|
|
2519c764c3 | ||
|
|
dcd0a8499e | ||
|
|
09823115af | ||
|
|
6b379fbef3 | ||
|
|
00a5243ec9 | ||
|
|
2bed65d819 | ||
|
|
ae16dcc16a | ||
|
|
d513459c63 | ||
|
|
63e915c8cc | ||
|
|
bd2a72d178 | ||
|
|
a55eeaf794 | ||
|
|
e366bbb588 | ||
|
|
31161e7a08 | ||
|
|
e6b747aef5 | ||
|
|
c5759e3349 | ||
|
|
2fc094a563 | ||
|
|
99efba4fc3 | ||
|
|
43fe5cd8be | ||
|
|
2b603b6f60 | ||
|
|
26feb27b83 | ||
|
|
45b9fcefd2 | ||
|
|
5ad06bc602 | ||
|
|
40a0913fa4 | ||
|
|
f66421c1a8 | ||
|
|
ff09cd0e54 | ||
|
|
810ee2f6d0 | ||
|
|
09b07274ab | ||
|
|
8604b5c105 | ||
|
|
fde070665d | ||
|
|
ebe2c53de7 | ||
|
|
3fccee1bc2 | ||
|
|
0a658e1b2e | ||
|
|
02ec6c5a47 | ||
|
|
01574aadfe | ||
|
|
93f78efed4 | ||
|
|
7c66f51395 | ||
|
|
46d4a73955 | ||
|
|
c4c4d055ea | ||
|
|
8ee6b9fdf1 | ||
|
|
0da0e6cf8b | ||
|
|
79cd98d467 | ||
|
|
7767c16916 | ||
|
|
014d32b83b | ||
|
|
ee70e9d546 | ||
|
|
2cc0e91c38 | ||
|
|
596a01ab30 | ||
|
|
0861e6f176 | ||
|
|
3dfbad68c9 | ||
|
|
f99ba720a8 | ||
|
|
7e4c29befb | ||
|
|
ef7a247df3 | ||
|
|
b63eec3e91 | ||
|
|
5596daf346 | ||
|
|
99072cd63d | ||
|
|
eec9a5c6e9 | ||
|
|
669668a134 | ||
|
|
698c13b2f1 | ||
|
|
00057e997d | ||
|
|
851539cc6f | ||
|
|
761a0fdb61 | ||
|
|
85ce90ca52 | ||
|
|
8a01d89049 | ||
|
|
610a7ed8a8 | ||
|
|
27bbab9582 | ||
|
|
05cbe89d87 | ||
|
|
9781d5c1ff | ||
|
|
86751249be | ||
|
|
5b795014e2 | ||
|
|
504137d249 | ||
|
|
c37f83c6c3 | ||
|
|
fe7894fb5f | ||
|
|
38e8878ded | ||
|
|
0c3b0b8a40 | ||
|
|
cf560a47d5 | ||
|
|
e0b09857c4 | ||
|
|
0d035496f5 |
No files matched your search
+12
-4
@@ -8,15 +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
|
||||
|
||||
[**.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,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
|
||||
@@ -17,7 +17,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 +37,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 +61,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.
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
contact_links:
|
||||
- name: Have questions or need support?
|
||||
url: https://community.octoprint.org
|
||||
about: Please get in touch on the OctoPrint Community Forum!
|
||||
@@ -1,6 +1,7 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: '[Request]'
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -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!
|
||||
-->
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
accessControl:
|
||||
salt: zXmvzI3uWuTLkSPOEfA2ZLwn3f3sGUNS
|
||||
plugins:
|
||||
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
|
||||
@@ -0,0 +1,22 @@
|
||||
admin:
|
||||
active: true
|
||||
apikey: null
|
||||
groups:
|
||||
- admins
|
||||
- users
|
||||
password: 3033587f3b040680c77ce4fb7e8d61422878ef49a2a784227689f3b44ce66ada7f6161f8b2b037267f0d37b783a5600276eb88e1d224d24915f64e187a49a89f
|
||||
permissions: []
|
||||
roles:
|
||||
- user
|
||||
- admin
|
||||
settings: {}
|
||||
user:
|
||||
active: true
|
||||
apikey: null
|
||||
groups:
|
||||
- users
|
||||
password: 3033587f3b040680c77ce4fb7e8d61422878ef49a2a784227689f3b44ce66ada7f6161f8b2b037267f0d37b783a5600276eb88e1d224d24915f64e187a49a89f
|
||||
permissions: []
|
||||
roles:
|
||||
- user
|
||||
settings: {}
|
||||
@@ -0,0 +1,230 @@
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
types: [opened, sychronize, reopened]
|
||||
release:
|
||||
types: [published, prereleased]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: 🔨 Build distribution
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: 🏗 Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: 🏗 Install build dependencies
|
||||
run: |
|
||||
python -m pip install wheel --user
|
||||
- name: 🔨 Build a binary wheel and a source tarball
|
||||
run: |
|
||||
python setup.py sdist bdist_wheel
|
||||
- name: ⬆ Upload build result
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
lint-black:
|
||||
name: 🧹 black
|
||||
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 black
|
||||
run: |
|
||||
pre-commit run --hook-stage manual black --all-files --show-diff-on-failure
|
||||
|
||||
lint-prettier:
|
||||
name: 🧹 prettier
|
||||
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 prettier
|
||||
run: |
|
||||
pre-commit run --hook-stage manual prettier --all-files --show-diff-on-failure
|
||||
|
||||
lint-isort:
|
||||
name: 🧹 isort
|
||||
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 isort
|
||||
run: |
|
||||
pre-commit run --hook-stage manual isort --all-files --show-diff-on-failure
|
||||
|
||||
lint-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 dev dependencies
|
||||
run: |
|
||||
pip install -e .[develop]
|
||||
- name: 🚀 Run flake8
|
||||
run: |
|
||||
pre-commit run --hook-stage manual flake8 --all-files
|
||||
|
||||
test-unit:
|
||||
name: 🧪 Unit tests
|
||||
strategy:
|
||||
matrix:
|
||||
python: ["2.7", "3.7", "3.8"]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: 🏗 Set up Python ${{ matrix.python }}
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
- name: 🏗 Set up test dependencies
|
||||
run: |
|
||||
pip install -e .[develop]
|
||||
- name: 🚀 Run test suite
|
||||
run: |
|
||||
pytest
|
||||
|
||||
test-install:
|
||||
name: 🧪 Installation tests
|
||||
needs: build
|
||||
strategy:
|
||||
matrix:
|
||||
python: ["2.7", "3.7", "3.8"]
|
||||
installable: ["wheel", "sdist"]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: ⬇ Download build result
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
- name: 🏗 Set up Python ${{ matrix.python }}
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
- name: 🚀 Install wheel
|
||||
if: matrix.installable == 'wheel'
|
||||
run: |
|
||||
pip install dist/OctoPrint-*-py2.py3-none-any.whl
|
||||
- name: 🚀 Install source tarball
|
||||
if: matrix.installable == 'sdist'
|
||||
run: |
|
||||
pip install dist/OctoPrint-*.tar.gz
|
||||
|
||||
test-e2e:
|
||||
name: 🧪 E2E tests
|
||||
needs: build
|
||||
runs-on: ubuntu-16.04
|
||||
steps:
|
||||
- name: ⬇ Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: ⬇ Download build result
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
- name: 🏗 Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: 🚀 Install wheel
|
||||
run: |
|
||||
pip install dist/OctoPrint-*-py2.py3-none-any.whl
|
||||
|
||||
- name: 🏗 Create base config for test server
|
||||
run: |
|
||||
mkdir e2econfig
|
||||
cp -r .github/fixtures/with_acl/* e2econfig
|
||||
|
||||
- name: 🚀 Run Cypress
|
||||
uses: cypress-io/github-action@v2
|
||||
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"
|
||||
|
||||
- name: ⬆ Upload screenshots
|
||||
uses: actions/upload-artifact@v1
|
||||
if: failure()
|
||||
with:
|
||||
name: cypress-screenshots
|
||||
path: tests/cypress/screenshots
|
||||
- name: ⬆ Upload videos
|
||||
uses: actions/upload-artifact@v1
|
||||
if: always()
|
||||
with:
|
||||
name: cypress-videos
|
||||
path: tests/cypress/videos
|
||||
|
||||
publish-on-testpypi:
|
||||
name: 📦 Publish on TestPyPI
|
||||
if: github.event_name == 'release'
|
||||
needs:
|
||||
- lint-black
|
||||
- lint-prettier
|
||||
- lint-isort
|
||||
- lint-flake8
|
||||
- test-unit
|
||||
- test-install
|
||||
- test-e2e
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: ⬇ Download build result
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
- name: 📦 Publish to index
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
continue-on-error: true
|
||||
with:
|
||||
password: ${{ secrets.testpypi_password }}
|
||||
repository_url: https://test.pypi.org/legacy/
|
||||
|
||||
publish-on-pypi:
|
||||
name: 📦 Publish tagged releases to PyPI
|
||||
if: github.event_name == 'release'
|
||||
needs: publish-on-testpypi
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: ⬇ Download build result
|
||||
uses: actions/download-artifact@v1
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
- name: 📦 Publish to index
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
with:
|
||||
password: ${{ secrets.pypi_password }}
|
||||
@@ -0,0 +1,64 @@
|
||||
name: "Issue Labeler"
|
||||
on:
|
||||
issues:
|
||||
types: [opened, edited, closed, reopened]
|
||||
|
||||
jobs:
|
||||
label-opened-and-edited:
|
||||
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
|
||||
})
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
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,79 @@
|
||||
name: Test install of branches and latest release twice per day
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: "0 */12 * * *"
|
||||
|
||||
jobs:
|
||||
install-branch:
|
||||
name: Install branch
|
||||
strategy:
|
||||
matrix:
|
||||
os: ["ubuntu-latest"]
|
||||
python: ["2.7", "3.7", "3.8"]
|
||||
branch: ["master"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: 🐍 Set up Python ${{ matrix.python }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
- name: ⬇ Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: ${{ matrix.branch }}
|
||||
fetch-depth: 0
|
||||
- name: 👷 Build and install checkout
|
||||
run: |
|
||||
pip install .
|
||||
- name: 📧 Discord success notification
|
||||
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 }}` 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"
|
||||
|
||||
install-latest:
|
||||
name: Install latest release
|
||||
strategy:
|
||||
matrix:
|
||||
os: ["ubuntu-latest"]
|
||||
python: ["2.7", "3.7", "3.8"]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: 👀 Determine latest release
|
||||
id: latest
|
||||
uses: foosel/github-action-get-latest-release@master
|
||||
with:
|
||||
repository: "OctoPrint/OctoPrint"
|
||||
- name: 🐍 Set up Python ${{ matrix.python }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
- name: 👷 Build and install latest release
|
||||
run: |
|
||||
pip install https://github.com/OctoPrint/OctoPrint/archive/${{ steps.latest.outputs.release }}.zip
|
||||
- name: 📧 Discord success notification
|
||||
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 }}` 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"
|
||||
@@ -0,0 +1,47 @@
|
||||
name: Trigger docker build
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- released
|
||||
- prereleased
|
||||
push:
|
||||
branches:
|
||||
- maintenance
|
||||
- devel
|
||||
|
||||
jobs:
|
||||
dispatch_releases:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name != 'push'
|
||||
steps:
|
||||
- name: 🚀 Repository Dispatch
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.DOCKER_ACCESS_TOKEN }}
|
||||
repository: ${{ github.repository_owner }}/octoprint-docker
|
||||
event-type: ${{ github.event_name }}
|
||||
client-payload: '{"tag_name": "${{ github.event.release.tag_name }}"}'
|
||||
|
||||
dispatch_canary:
|
||||
runs-on: ubuntu-latest
|
||||
if: 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": "${{ github.sha }}"}'
|
||||
|
||||
dispatch_bleeding:
|
||||
runs-on: ubuntu-latest
|
||||
if: 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": "${{ github.sha }}"}'
|
||||
@@ -0,0 +1,19 @@
|
||||
name: Trigger doc build
|
||||
on:
|
||||
push:
|
||||
release:
|
||||
types:
|
||||
- released
|
||||
- prereleased
|
||||
|
||||
jobs:
|
||||
trigger:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: 🚀 Repository Dispatch
|
||||
uses: peter-evans/repository-dispatch@v1
|
||||
with:
|
||||
token: ${{ secrets.DOCS_ACCESS_TOKEN }}
|
||||
repository: OctoPrint/docs.octoprint.org
|
||||
event-type: docs
|
||||
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
|
||||
+17
-12
@@ -2,6 +2,8 @@ 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
|
||||
|
||||
@@ -19,24 +21,27 @@ linux-Cura-*
|
||||
Printrun
|
||||
=======
|
||||
.idea
|
||||
.vscode
|
||||
.DS_Store
|
||||
Cura/current_profile.ini
|
||||
Cura/preferences.ini
|
||||
build
|
||||
dist
|
||||
pypy
|
||||
OctoPrint.egg-info
|
||||
*.orig
|
||||
|
||||
*.orig
|
||||
*.codekit
|
||||
|
||||
venv
|
||||
venv2
|
||||
venv3
|
||||
venv26
|
||||
venv27
|
||||
venv33
|
||||
venv34
|
||||
venv35
|
||||
venv36
|
||||
venv37
|
||||
*.egg-info
|
||||
.eggs
|
||||
.mypy_cache
|
||||
.pytest_cache
|
||||
.python-version
|
||||
.tox
|
||||
|
||||
venv*
|
||||
testconf*
|
||||
|
||||
node_modules
|
||||
tests/cypress/screenshots
|
||||
tests/cypress/videos
|
||||
@@ -0,0 +1,44 @@
|
||||
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/OctoPrint/codemods
|
||||
rev: devel
|
||||
hooks:
|
||||
- id: codemod_dict_to_literal
|
||||
args: ["--ignore", "src/octoprint/vendor"]
|
||||
stages: ["manual"]
|
||||
- id: codemod_set_to_literal
|
||||
args: ["--ignore", "src/octoprint/vendor"]
|
||||
stages: ["manual"]
|
||||
- id: codemod_not_in
|
||||
args: ["--ignore", "src/octoprint/vendor"]
|
||||
stages: ["manual"]
|
||||
- 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
|
||||
@@ -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
|
||||
-22
@@ -1,22 +0,0 @@
|
||||
---
|
||||
|
||||
language: python
|
||||
dist: xenial
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- python: '3.7'
|
||||
env: RUN_FLAKE8=true
|
||||
|
||||
python:
|
||||
- "3.7"
|
||||
- "3.6"
|
||||
- "2.7"
|
||||
install:
|
||||
- pip install -e .[develop]
|
||||
script:
|
||||
- test -n "$RUN_FLAKE8" || pytest
|
||||
- test -z "$RUN_FLAKE8" || flake8 --ignore=D,E,W,F401 src/ tests setup.py
|
||||
sudo: false
|
||||
git:
|
||||
depth: 250
|
||||
@@ -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
|
||||
|
||||
+14
-11
@@ -18,19 +18,22 @@ prerelease
|
||||
HEAD
|
||||
\(detached.*
|
||||
|
||||
# maintenance is currently the branch for preparation of maintenance release 1.4.1
|
||||
# maintenance is currently the branch for preparation of maintenance release 1.5.0
|
||||
# so are any fix/... and improve/... branches
|
||||
maintenance 1.4.1 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
fix/.* 1.4.1 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
improve/.* 1.4.1 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
maintenance 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
|
||||
fix/.* 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
|
||||
improve/.* 1.5.0 42769dad7dda3bc0c6c94e0e8ce832af9b14a565 pep440-dev
|
||||
|
||||
# staging/maintenance is currently the branch for preparation of 1.4.0rc6
|
||||
# staging/hotfix is the branch for preparation of the 1.5.2 hotfix release
|
||||
staging/hotfix 1.5.2 38256815ef6d6dd602e0fac949a17fbf8f30f838 pep440-dev
|
||||
|
||||
# staging/maintenance is currently the branch for preparation of 1.5.0rc4
|
||||
# so is regressionfix/...
|
||||
staging/maintenance 1.4.0rc6 73f7c4d8a11a7aea7b0ece474d3bf37ad53c65d4 pep440-dev
|
||||
regressionfix/.* 1.4.0rc6 73f7c4d8a11a7aea7b0ece474d3bf37ad53c65d4 pep440-dev
|
||||
staging/maintenance 1.5.0rc4 5e7ea35239908f9ed91895751d8a8202aa76ed4b pep440-dev
|
||||
regressionfix/.* 1.5.0rc4 5e7ea35239908f9ed91895751d8a8202aa76ed4b pep440-dev
|
||||
|
||||
# staging/devel is currently inactive (but has the 1.4.0rc6 namespace)
|
||||
staging/devel 1.4.0rc6 73f7c4d8a11a7aea7b0ece474d3bf37ad53c65d4 pep440-dev
|
||||
# staging/devel is currently inactive (but has the 1.4.1rc4 namespace)
|
||||
staging/devel 1.4.1rc4 650d54d1885409fa1d411eb54b9e8c7ff428910f pep440-dev
|
||||
|
||||
# every other branch is a development branch and thus gets resolved to 1.5.0-dev for now
|
||||
.* 1.5.0 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
# every other branch is a development branch and thus gets resolved to 2.0.0.dev for now
|
||||
.* 2.0.0 2da7aa358d950b4567aaab8f18d6b5779193e077 pep440-dev
|
||||
+15
@@ -115,6 +115,21 @@ date of first contribution):
|
||||
* [Ludovico de Nittis](https://github.com/RyuzakiKK)
|
||||
* [Dominik Paľo](https://github.com/DominikPalo)
|
||||
* [Kelly Anderson](https://github.com/cbxbiker61)
|
||||
* [Jim Neill](https://github.com/jneilliii)
|
||||
* [Dustin Kerber](https://github.com/kerber)
|
||||
* [Tobias Schürg](https://github.com/tobiasschuerg)
|
||||
* [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)
|
||||
|
||||
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
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Changelog
|
||||
|
||||
See [the releases on Github](https://github.com/foosel/OctoPrint/releases) for detailed changelogs for all releases
|
||||
See [the releases on Github](https://github.com/OctoPrint/OctoPrint/releases) for detailed changelogs for all releases
|
||||
and release candidates.
|
||||
@@ -0,0 +1 @@
|
||||
OctoPrint's Code of Conduct can be found at [octoprint.org/conduct/](https://octoprint.org/conduct/).
|
||||
+62
-117
@@ -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.
|
||||
@@ -49,7 +49,7 @@ 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
|
||||
@@ -71,12 +71,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
|
||||
@@ -125,17 +125,17 @@ following section *completely* and also follow the instructions in the
|
||||
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
|
||||
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
|
||||
**Always use the following template, even if only adding a "me too" to an
|
||||
existing ticket**:
|
||||
|
||||
```
|
||||
@@ -152,7 +152,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
|
||||
@@ -172,7 +172,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.
|
||||
@@ -195,7 +195,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.
|
||||
|
||||
@@ -287,9 +287,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 +298,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 +312,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 +336,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 +389,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 +424,12 @@ 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`
|
||||
|
||||
## 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,21 +1,29 @@
|
||||
# OctoPrint
|
||||
<p align="center"><img src="https://octoprint.org/assets/img/logo.png" alt="OctoPrint's logo" /></p>
|
||||
|
||||
<h1 align="center">OctoPrint</h1>
|
||||
|
||||

|
||||
[](https://travis-ci.org/foosel/OctoPrint)
|
||||
[](https://community.octoprint.org)
|
||||
[](https://chat.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).
|
||||
|
||||
Its website can be found at [octoprint.org](https://octoprint.org/?utm_source=github&utm_medium=readme).
|
||||
|
||||
The community forum is available at [community.octoprint.org](https://community.octoprint.org/?utm_source=github&utm_medium=readme).
|
||||
The community forum is available at [community.octoprint.org](https://community.octoprint.org/?utm_source=github&utm_medium=readme). It also serves as central knowledge base.
|
||||
|
||||
The official IRC channel is [#octoprint on freenode](https://chat.octoprint.org). Its logs can be found [here](https://freenode.logbot.info/octoprint).
|
||||
An invite to the Discord server can be found at [discord.octoprint.org](https://discord.octoprint.org).
|
||||
|
||||
The FAQ can be accessed by following [faq.octoprint.org](https://faq.octoprint.org/?utm_source=github&utm_medium=readme).
|
||||
|
||||
@@ -26,21 +34,21 @@ 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
|
||||
want to find out how to use it, [the documentation](http://docs.octoprint.org/) and [the public wiki](https://github.com/foosel/OctoPrint/wiki)
|
||||
might be of more interest for you. You might also want to subscribe to join
|
||||
want to find out how to use it, [the documentation](http://docs.octoprint.org/) might be of more interest for you. You might also want to subscribe to join
|
||||
[the community forum at community.octoprint.org](https://community.octoprint.org) where there are other active users who might be
|
||||
able to help you with any questions you might have.
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions of all kinds are welcome, not only in the form of code but also with regards to the
|
||||
[official documentation](http://docs.octoprint.org/) or [the public wiki](https://github.com/foosel/OctoPrint/wiki), debugging help
|
||||
in the [bug tracker](https://github.com/foosel/OctoPrint/issues), support of other users on
|
||||
[the community forum at community.octoprint.org](https://community.octoprint.org)
|
||||
[official documentation](http://docs.octoprint.org/), debugging help
|
||||
in the [bug tracker](https://github.com/OctoPrint/OctoPrint/issues), support of other users on
|
||||
[the community forum at community.octoprint.org](https://community.octoprint.org) or
|
||||
[the official discord at discord.octoprint.org](https://discord.octoprint.org)
|
||||
and also [financially](https://octoprint.org/support-octoprint/?utm_source=github&utm_medium=readme).
|
||||
|
||||
If you think something is bad about OctoPrint or its documentation the way it is, please help
|
||||
@@ -48,26 +56,25 @@ in any way to make it better instead of just complaining about it -- this is an
|
||||
after all :)
|
||||
|
||||
For information about how to go about submitting bug reports or pull requests, please see the project's
|
||||
[Contribution Guidelines](https://github.com/foosel/OctoPrint/blob/master/CONTRIBUTING.md).
|
||||
[Contribution Guidelines](https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md).
|
||||
|
||||
## Installation
|
||||
|
||||
Installation instructions for installing from source for different operating
|
||||
systems can be found [on the wiki](https://github.com/foosel/OctoPrint/wiki#assorted-guides).
|
||||
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
|
||||
and runtime environment are the following (as *regular
|
||||
user*, please keep your hands *off* of the `sudo` command here!) - this assumes
|
||||
you already have Python 2.7, 3.6 or 3.7, pip and virtualenv set up on your system:
|
||||
you already have Python 2.7, 3.6 or 3.7, pip and virtualenv and their dependencies set up on your system:
|
||||
|
||||
1. Checkout OctoPrint: `git clone https://github.com/foosel/OctoPrint.git`
|
||||
2. Change into the OctoPrint folder: `cd OctoPrint`
|
||||
3. Create a user-owned virtual environment therein: `virtualenv venv` if your system default python version is
|
||||
python 2.7, otherwise you need to specify the version explicitly, e.g. `virtualenv --python=python2.7 venv`.
|
||||
4. Install OctoPrint *into that virtual environment*: `./venv/bin/pip install .`
|
||||
1. Create a user-owned virtual environment therein: `virtualenv venv`. If you want to specify a specific python
|
||||
to use instead of whatever version your system defaults to, you can also explicitly require that via the `--python`
|
||||
parameter, e.g. `virtualenv --python=python3 venv`.
|
||||
2. Install OctoPrint *into that virtual environment*: `./venv/bin/pip install OctoPrint`
|
||||
|
||||
You may then start the OctoPrint server via `/path/to/OctoPrint/venv/bin/octoprint`, see [Usage](#usage)
|
||||
for details.
|
||||
@@ -78,11 +85,7 @@ access control as necessary.
|
||||
## Dependencies
|
||||
|
||||
OctoPrint depends on a few python modules to do its job. Those are automatically installed when installing
|
||||
OctoPrint via `pip`:
|
||||
|
||||
pip install .
|
||||
|
||||
You should do this every time after pulling from the repository, since the dependencies may have changed.
|
||||
OctoPrint via `pip`.
|
||||
|
||||
OctoPrint currently supports Python 2.7, 3.6 and 3.7.
|
||||
|
||||
@@ -90,7 +93,7 @@ OctoPrint currently supports Python 2.7, 3.6 and 3.7.
|
||||
|
||||
Running the pip install via
|
||||
|
||||
pip install .
|
||||
pip install OctoPrint
|
||||
|
||||
installs the `octoprint` script in your Python installation's scripts folder
|
||||
(which, depending on whether you installed OctoPrint globally or into a virtual env, will be in your `PATH` or not). The
|
||||
|
||||
+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.
|
||||
+18
-12
@@ -1,66 +1,72 @@
|
||||
# Supporters
|
||||
# Supporters
|
||||
|
||||
Development of this version of OctoPrint wouldn't have been possible without
|
||||
[the financial support by the community](https://octoprint.org/support-octoprint/) -
|
||||
[the financial support by the community](https://support.octoprint.org) -
|
||||
thanks to everyone who contributed!
|
||||
|
||||
## Patreon Patrons
|
||||
## Patrons & Sponsors
|
||||
|
||||
* Alex Krilov
|
||||
* Andrew Moorby
|
||||
* Arnljot Arntsen
|
||||
* Ash King
|
||||
* BigTreeTech
|
||||
* Boris Hussein
|
||||
* Brad Jackson
|
||||
* BuildBee
|
||||
* Christian Petropolis
|
||||
* Christian Wolf
|
||||
* D Brian Kimmel
|
||||
* DeltaMaker 3D Printers
|
||||
* Dennis Breining
|
||||
* Dorian Gray
|
||||
* Eric Berry
|
||||
* Eric Betts
|
||||
* Ernesto Martinez
|
||||
* Franziska Kunsmann
|
||||
* GadgetAngel
|
||||
* George Robles
|
||||
* Greg Holloway
|
||||
* Hog Duske
|
||||
* Hopewell Medical Acupuncture Center
|
||||
* Hugh Blemings
|
||||
* jean-claude migneault
|
||||
* Jeff Renfer
|
||||
* Jeremiah Avery
|
||||
* Jefferson Hunt
|
||||
* Jeremy Cole
|
||||
* Joe Pasqua
|
||||
* John Gregory Robinson
|
||||
* Joshua Wills
|
||||
* Justin Kaufman
|
||||
* Kaile Riser
|
||||
* Kale Stedman
|
||||
* Kazuhiro Ogura
|
||||
* Kelly C McNiece
|
||||
* Kenneth Jiang
|
||||
* Kurt Wubbels
|
||||
* Kyle Menigoz
|
||||
* LA 3D Printer Repair
|
||||
* Lee Dohm
|
||||
* Loyal Moses
|
||||
* Makespace Madrid
|
||||
* Mark Walker
|
||||
* Martin Majewski
|
||||
* Michael Aumock
|
||||
* Michael Begala
|
||||
* Miles Flavel
|
||||
* Mosaic Manufacturing
|
||||
* Neil R. Goldberg
|
||||
* Patrick Glyré
|
||||
* Patrick McGinnis
|
||||
* Prof Yuh Wen Chen
|
||||
* Raise3D
|
||||
* Randy C. Will
|
||||
* Ranjib Dey
|
||||
* Richard McGuire
|
||||
* Richard Michaud
|
||||
* Rigid3D
|
||||
* Robert Gusek
|
||||
* Ronald Griehsler
|
||||
* Sacha Telgenhof
|
||||
* Simon Hallam
|
||||
* Sebastien Andrivet
|
||||
* Stefan Krister
|
||||
* Steve Thompson
|
||||
* Sven Mueller
|
||||
* Trent Shumay
|
||||
* Ulrich Kempken
|
||||
|
||||
and 1741 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
|
||||
and 2147 more wonderful people pledging on the [Patreon campaign](https://patreon.com/foosel) or via [Github Sponsors](https://github.com/users/foosel/sponsorship)!
|
||||
+12
-1
@@ -12,6 +12,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)
|
||||
@@ -24,10 +25,12 @@
|
||||
* [LESS](http://lesscss.org): Apache License 2.0
|
||||
* [lodash](https://lodash.com): MIT
|
||||
* [Loglevel](https://github.com/pimterry/loglevel): MIT
|
||||
* [md5.js](https://blueimp.github.io/JavaScript-MD5/): MIT
|
||||
* [Modernizr](http://modernizr.com): MIT
|
||||
* [Moment.js](http://momentjs.com/): MIT
|
||||
* [PNotify](http://sciactive.com/pnotify/): GPL, LGPL, MPL (triple licensed)
|
||||
* [pusher.color.js](http://cache.preserve.io/5g18q0pw/index.html) (original link dead): MIT
|
||||
* [ResizeSensor.js](https://github.com/procurios/ResizeSensor): MIT
|
||||
* [SockJS](https://github.com/sockjs/sockjs-client): MIT
|
||||
* [sprintf-js](http://alexei.ro/): BSD
|
||||
|
||||
@@ -39,12 +42,14 @@
|
||||
* [Click](http://click.pocoo.org/): BSD
|
||||
* [emoji](https://github.com/carpedm20/emoji/): BSD
|
||||
* [feedparser](https://github.com/kurtmckee/feedparser): BSD
|
||||
* [filetype](https://h2non.github.io/filetype.py/): MIT
|
||||
* [Flask](http://flask.pocoo.org/): BSD
|
||||
* [Flask-Assets](http://github.com/miracle2k/flask-assets): BSD
|
||||
* [Flask-Babel](http://github.com/mitsuhiko/flask-babel): BSD
|
||||
* [Flask-Login](https://github.com/maxcountryman/flask-login): MIT
|
||||
* [Flask-Markdown](http://github.com/dcolish/flask-markdown): BSD
|
||||
* [Flask-Principal](http://packages.python.org/Flask-Principal/): MIT
|
||||
* [frozendict](https://github.com/slezica/python-frozendict): MIT
|
||||
* [future](https://python-future.org/): MIT
|
||||
* [futures](https://github.com/agronholm/pythonfutures): Python
|
||||
* [monotonic](https://github.com/atdt/monotonic): Apache License 2.0
|
||||
@@ -58,19 +63,25 @@
|
||||
* [requests](http://python-requests.org/): Apache License 2.0
|
||||
* [rsa](http://stuvel.eu/rsa): Apache License 2.0
|
||||
* [sarge](http://sarge.readthedocs.org/): BSD
|
||||
* [sentry-sdk](https://github.com/getsentry/sentry-python): BSD
|
||||
* [scandir](https://github.com/benhoyt/scandir): BSD
|
||||
* [semantic_version](https://github.com/rbarrois/python-semanticversion): BSD
|
||||
* [SockJS-Tornado](http://github.com/mrjoes/sockjs-tornado/): MIT
|
||||
* [Tornado](http://www.tornadoweb.org/): Apache License 2.0
|
||||
* [typing](https://pypi.org/project/typing/): Python
|
||||
* [watchdog](http://github.com/gorakhargosh/watchdog): Apache License 2.0
|
||||
* [websocket-client](https://github.com/liris/websocket-client): LGPLv3
|
||||
* [wrapt](http://wrapt.readthedocs.org/): BSD
|
||||
|
||||
## Development (testing, documentation generation, etc)
|
||||
|
||||
* [cookiecutter](https://github.com/cookiecutter/cookiecutter): BSD
|
||||
* [ddt](https://github.com/txels/ddt): MIT
|
||||
* [flake8](https://gitlab.com/pycqa/flake8): MIT
|
||||
* [mock](https://github.com/testing-cabal/mock): BSD
|
||||
* [nose](http://pythonhosted.org/nose/): LGPL
|
||||
* [pyinstrument](https://github.com/joerick/pyinstrument): BSD
|
||||
* [pytest](https://docs.pytest.org/en/latest/): MIT
|
||||
* [pytest-doctest-custom](http://github.com/danilobellini/pytest-doctest-custom): MIT
|
||||
* [Sphinx](http://sphinx-doc.org/): BSD
|
||||
* [sphinxcontrib-httpdomain](https://bitbucket.org/birkenfeld/sphinx-contrib/src/default/httpdomain/): BSD
|
||||
* [sphinxcontrib-mermad](https://github.com/mgaitan/sphinxcontrib-mermaid): BSD
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
[python: src/octoprint/**.py]
|
||||
|
||||
[jinja2: src/octoprint/templates/**.jinja2]
|
||||
silent=false
|
||||
extensions=jinja2.ext.autoescape, jinja2.ext.with_, webassets.ext.jinja2.AssetsExtension, jinja2.ext.do, octoprint.util.jinja.trycatch
|
||||
|
||||
[jinja2: src/octoprint/plugins/**.jinja2]
|
||||
extensions=jinja2.ext.autoescape, jinja2.ext.with_, webassets.ext.jinja2.AssetsExtension
|
||||
silent=false
|
||||
extensions=jinja2.ext.autoescape, jinja2.ext.with_, webassets.ext.jinja2.AssetsExtension, jinja2.ext.do, octoprint.util.jinja.trycatch
|
||||
|
||||
[javascript: src/octoprint/static/js/app/**.js]
|
||||
extract_messages = gettext, ngettext
|
||||
|
||||
[javascript: src/octoprint/plugins/**.js]
|
||||
extract_messages = gettext, ngettext
|
||||
+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
|
||||
)
|
||||
'''
|
||||
-177
@@ -1,177 +0,0 @@
|
||||
# Makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS =
|
||||
SPHINXBUILD = sphinx-build
|
||||
PAPER =
|
||||
BUILDDIR = _build
|
||||
|
||||
# User-friendly check for sphinx-build
|
||||
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
||||
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
||||
endif
|
||||
|
||||
# Internal variables.
|
||||
PAPEROPT_a4 = -D latex_paper_size=a4
|
||||
PAPEROPT_letter = -D latex_paper_size=letter
|
||||
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
# the i18n builder cannot share the environment and doctrees with the others
|
||||
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
||||
|
||||
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
|
||||
|
||||
help:
|
||||
@echo "Please use \`make <target>' where <target> is one of"
|
||||
@echo " html to make standalone HTML files"
|
||||
@echo " dirhtml to make HTML files named index.html in directories"
|
||||
@echo " singlehtml to make a single large HTML file"
|
||||
@echo " pickle to make pickle files"
|
||||
@echo " json to make JSON files"
|
||||
@echo " htmlhelp to make HTML files and a HTML help project"
|
||||
@echo " qthelp to make HTML files and a qthelp project"
|
||||
@echo " devhelp to make HTML files and a Devhelp project"
|
||||
@echo " epub to make an epub"
|
||||
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
||||
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
||||
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
||||
@echo " text to make text files"
|
||||
@echo " man to make manual pages"
|
||||
@echo " texinfo to make Texinfo files"
|
||||
@echo " info to make Texinfo files and run them through makeinfo"
|
||||
@echo " gettext to make PO message catalogs"
|
||||
@echo " changes to make an overview of all changed/added/deprecated items"
|
||||
@echo " xml to make Docutils-native XML files"
|
||||
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
||||
@echo " linkcheck to check all external links for integrity"
|
||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)/*
|
||||
|
||||
html:
|
||||
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||
|
||||
dirhtml:
|
||||
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
||||
|
||||
singlehtml:
|
||||
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
||||
@echo
|
||||
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
||||
|
||||
pickle:
|
||||
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
||||
@echo
|
||||
@echo "Build finished; now you can process the pickle files."
|
||||
|
||||
json:
|
||||
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
||||
@echo
|
||||
@echo "Build finished; now you can process the JSON files."
|
||||
|
||||
htmlhelp:
|
||||
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
||||
".hhp project file in $(BUILDDIR)/htmlhelp."
|
||||
|
||||
qthelp:
|
||||
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
||||
@echo
|
||||
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
||||
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
||||
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/OctoPrint.qhcp"
|
||||
@echo "To view the help file:"
|
||||
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/OctoPrint.qhc"
|
||||
|
||||
devhelp:
|
||||
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
||||
@echo
|
||||
@echo "Build finished."
|
||||
@echo "To view the help file:"
|
||||
@echo "# mkdir -p $$HOME/.local/share/devhelp/OctoPrint"
|
||||
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/OctoPrint"
|
||||
@echo "# devhelp"
|
||||
|
||||
epub:
|
||||
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
||||
@echo
|
||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||
|
||||
latex:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo
|
||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||
"(use \`make latexpdf' here to do that automatically)."
|
||||
|
||||
latexpdf:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through pdflatex..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
latexpdfja:
|
||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||
@echo "Running LaTeX files through platex and dvipdfmx..."
|
||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||
|
||||
text:
|
||||
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
||||
@echo
|
||||
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
||||
|
||||
man:
|
||||
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
||||
@echo
|
||||
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
||||
|
||||
texinfo:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo
|
||||
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
||||
@echo "Run \`make' in that directory to run these through makeinfo" \
|
||||
"(use \`make info' here to do that automatically)."
|
||||
|
||||
info:
|
||||
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
||||
@echo "Running Texinfo files through makeinfo..."
|
||||
make -C $(BUILDDIR)/texinfo info
|
||||
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
||||
|
||||
gettext:
|
||||
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
||||
@echo
|
||||
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
||||
|
||||
changes:
|
||||
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
||||
@echo
|
||||
@echo "The overview file is in $(BUILDDIR)/changes."
|
||||
|
||||
linkcheck:
|
||||
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
||||
@echo
|
||||
@echo "Link check complete; look for any errors in the above output " \
|
||||
"or in $(BUILDDIR)/linkcheck/output.txt."
|
||||
|
||||
doctest:
|
||||
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
||||
@echo "Testing of doctests in the sources finished, look at the " \
|
||||
"results in $(BUILDDIR)/doctest/output.txt."
|
||||
|
||||
xml:
|
||||
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
||||
@echo
|
||||
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
||||
|
||||
pseudoxml:
|
||||
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
||||
@echo
|
||||
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
||||
@@ -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:
|
||||
|
||||
|
||||
+11
-5
@@ -319,7 +319,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 +342,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 +352,7 @@ Upload file or create folder
|
||||
T0
|
||||
G21
|
||||
G90
|
||||
...
|
||||
|
||||
------WebKitFormBoundaryDeC2E3iWbTv1PwMC
|
||||
Content-Disposition: form-data; name="select"
|
||||
|
||||
@@ -400,6 +402,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 +412,7 @@ Upload file or create folder
|
||||
T0
|
||||
G21
|
||||
G90
|
||||
...
|
||||
|
||||
------WebKitFormBoundaryDeC2E3iWbTv1PwMC--
|
||||
|
||||
.. sourcecode:: http
|
||||
@@ -440,6 +443,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"
|
||||
@@ -572,7 +576,8 @@ Issue a file command
|
||||
is not operational when this parameter is present and set to ``true``, the request will fail with a response
|
||||
of ``409 Conflict``.
|
||||
|
||||
Upon success, a status code of :http:statuscode:`204` and an empty body is returned.
|
||||
Upon success, a status code of :http:statuscode:`204` and an empty body is returned. If there already is an
|
||||
active print job, a :http:statuscode:`409` is returned.
|
||||
|
||||
Requires the ``FILES_SELECT`` permission.
|
||||
|
||||
@@ -768,7 +773,8 @@ Issue a file command
|
||||
:statuscode 400: If the ``command`` is unknown or the request is otherwise invalid
|
||||
:statuscode 415: If a ``slice`` command was issued against something other than an STL file.
|
||||
:statuscode 404: If ``location`` is neither ``local`` nor ``sdcard`` or the requested file was not found
|
||||
:statuscode 409: If a selected file is supposed to start printing directly but the printer is not operational or
|
||||
:statuscode 409: If a selected file is supposed to start printing directly but the printer is not operational
|
||||
or if a file is to be selected but the printer is already printing or
|
||||
if a file to be sliced is supposed to be selected or start printing directly but the printer
|
||||
is not operational or already printing.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+4
-2
@@ -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": {
|
||||
|
||||
@@ -177,6 +177,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``
|
||||
-
|
||||
+147
-2
@@ -6,8 +6,8 @@ Util
|
||||
|
||||
.. _sec-api-util-test:
|
||||
|
||||
Test paths or URLs
|
||||
==================
|
||||
Various tests
|
||||
=============
|
||||
|
||||
.. http:post:: /api/util/test
|
||||
|
||||
@@ -99,6 +99,23 @@ Test paths or URLs
|
||||
The ``server`` command returns :http:statuscode:`200` with a :ref:`Server test result <sec-api-util-datamodel-servertestresult>`
|
||||
when the test could be performed. The status code of the response does NOT reflect the test result!
|
||||
|
||||
resolution
|
||||
Tests whether a provided hostname can be resolved (via DNS lookup). Supported parameters are:
|
||||
|
||||
* ``name``: The host name to test. Mandatory.
|
||||
|
||||
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**
|
||||
@@ -286,6 +303,84 @@ Test paths or URLs
|
||||
"result": true
|
||||
}
|
||||
|
||||
**Example 7**
|
||||
|
||||
Test whether a host name can be resolved successfully.
|
||||
|
||||
.. sourcecode:: http
|
||||
|
||||
POST /api/util/test HTTP/1.1
|
||||
Host: example.com
|
||||
X-Api-Key: abcdef...
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"command": "resolution",
|
||||
"name": "octoprint"
|
||||
}
|
||||
|
||||
.. sourcecode:: http
|
||||
|
||||
HTTP/1.1 200 OK
|
||||
Content-Type: application/json
|
||||
|
||||
{
|
||||
"name": "octoprint.org",
|
||||
"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``
|
||||
@@ -302,6 +397,8 @@ Test paths or URLs
|
||||
:json host: ``server`` command only: the server to test
|
||||
: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:
|
||||
@@ -409,3 +506,51 @@ Server test result
|
||||
- 1
|
||||
- bool
|
||||
- ``true`` if the check passed.
|
||||
|
||||
.. _sec-api-util-datamodel-resolutiontestresult:
|
||||
|
||||
Resolution test result
|
||||
----------------------
|
||||
|
||||
.. list-table::
|
||||
:widths: 15 5 10 30
|
||||
:header-rows: 1
|
||||
|
||||
* - Name
|
||||
- Multiplicity
|
||||
- Type
|
||||
- Description
|
||||
* - ``name``
|
||||
- 1
|
||||
- string
|
||||
- The host name that was tested.
|
||||
* - ``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).
|
||||
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
.. _sec-bundledplugins-action_command_notification:
|
||||
|
||||
Action Command Notification support
|
||||
===================================
|
||||
|
||||
.. 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.
|
||||
|
||||
.. _fig-bundledplugins-action_command_notification-example:
|
||||
.. figure:: ../images/bundledplugins-action_command_notification-example.png
|
||||
:align: center
|
||||
:alt: Simple notification example
|
||||
|
||||
A simple notification example triggered by the firmware
|
||||
|
||||
.. _sec-bundledplugins-action_command_notification-configuration:
|
||||
|
||||
Configuring the plugin
|
||||
----------------------
|
||||
|
||||
The plugin supports the following configuration keys:
|
||||
|
||||
* ``enable``: Whether to enable the support of notifications (enabled by default).
|
||||
* ``enable_popup``: Whether to enable the additional display of notifications as popups in the UI (disabled by default).
|
||||
|
||||
You can modify them either through the plugin's configuration dialog under Settings, or by directly editing ``config.yaml``.
|
||||
|
||||
.. _sec-bundledplugins-action_command_notification-action_commands:
|
||||
|
||||
Supported action commands
|
||||
-------------------------
|
||||
|
||||
notification <message>
|
||||
Displays the notification ``<message>``
|
||||
|
||||
.. _sec-bundledplugins-action_command_prompt-example:
|
||||
|
||||
Example communication with the firmware
|
||||
---------------------------------------
|
||||
|
||||
.. _sec-bundledplugins-action_command_prompt-sourcecode:
|
||||
|
||||
To display the :ref:`above notification <fig-bundledplugins-action_command_notification-example>` the firmware sent this action command:
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
//action:notification Hello World!
|
||||
|
||||
|
||||
.. _sec-bundledplugins-action_command_notification-sourcecode:
|
||||
|
||||
|
||||
Source code
|
||||
-----------
|
||||
|
||||
The source of the Action Command Prompt Notification plugin is bundled with OctoPrint and can be found in
|
||||
its source repository under ``src/octoprint/plugins/action_command_notification``.
|
||||
@@ -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
|
||||
@@ -19,17 +21,6 @@ placeholder for the selected option's index.
|
||||
|
||||
A simple dialog example triggered by the firmware
|
||||
|
||||
.. _sec-bundledplugins-action_command_prompt-firststeps:
|
||||
|
||||
First Steps
|
||||
-----------
|
||||
|
||||
In order for this plugin to work, you'll need to configure it with the command your firmware uses to accept
|
||||
dialog selections. You can do that in the settings dialog.
|
||||
|
||||
Currently there is no agreed upon command for this since no firmware has yet made use of this feature, so OctoPrint
|
||||
ships with an empty value here.
|
||||
|
||||
.. _sec-bundledplugins-action_command_prompt-configuration:
|
||||
|
||||
Configuring the plugin
|
||||
@@ -37,7 +28,13 @@ Configuring the plugin
|
||||
|
||||
The plugin supports the following configuration keys:
|
||||
|
||||
* ``selection_command``: The command to send to the firmware on choice, including the ``{choice}`` placeholder, e.g. ``M876 S{choice}``.
|
||||
* ``enable``: Whether to always enable (``always``), disable (``never``) or ``detect`` support.
|
||||
* ``enable_emergency_sending``: Will make the selection command be sent as an emergency command to jump the internal
|
||||
send queue and even be sent to the printer if it's not signaling to be able to received. Only done if this is true
|
||||
and the printer signals support for emergency command processing. Defaults to ``true``.
|
||||
* ``enable_signaling``: If enabled, will send the configured command with the ``P1`` parameter to the printer to
|
||||
signal prompt support of the host. Defaults to ``true``.
|
||||
* ``command``: The command to send to the firmware on choice, defaults to ``M876``.
|
||||
|
||||
You can modify them either through the plugin's configuration dialog under Settings, or by directly editing ``config.yaml``.
|
||||
|
||||
@@ -69,8 +66,6 @@ prompt_end
|
||||
Example communication with the firmware
|
||||
---------------------------------------
|
||||
|
||||
.. _sec-bundledplugins-action_command_prompt-sourcecode:
|
||||
|
||||
To display the :ref:`above dialog <fig-bundledplugins-action_command_prompt-example>` the firmware sent these action commands:
|
||||
|
||||
.. code-block:: none
|
||||
@@ -79,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:
|
||||
|
||||
@@ -103,6 +97,8 @@ This would produce the following output:
|
||||
|
||||
If the user selects "Abort print", OctoPrint will send ``2`` as selected choice.
|
||||
|
||||
.. _sec-bundledplugins-action_command_prompt-sourcecode:
|
||||
|
||||
Source code
|
||||
-----------
|
||||
|
||||
|
||||
@@ -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,111 @@ 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
|
||||
|
||||
.. _sec-bundledplugins-backup-sourcecode:
|
||||
|
||||
Source code
|
||||
@@ -65,6 +185,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/>`_.
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
.. _sec-bundledplugins-file_check:
|
||||
|
||||
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>`_.
|
||||
@@ -0,0 +1,11 @@
|
||||
.. _sec-bundledplugins-firmware_check:
|
||||
|
||||
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.
|
||||
@@ -0,0 +1,37 @@
|
||||
.. _sec-bundledplugins-gcodeviewer:
|
||||
|
||||
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:
|
||||
.. figure:: ../images/bundledplugins-gcodeviewer-example.png
|
||||
:align: center
|
||||
:alt: OctoPrint GCode Viewer Plugin
|
||||
|
||||
An example of the GCode Viewer in action.
|
||||
|
||||
The viewer has been included in OctoPrint ever since the first releases back in 2013, however as of
|
||||
OctoPrint 1.4.1 it has been extracted into its own bundled plugin.
|
||||
|
||||
.. _sec-bundledplugins-gcodeviewer-configuration:
|
||||
|
||||
Configuring the plugin
|
||||
----------------------
|
||||
|
||||
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
|
||||
|
||||
.. _sec-bundledplugins-gcodeviewer-sourcecode:
|
||||
|
||||
Source Code
|
||||
-----------
|
||||
|
||||
The source of the GCode Viewer plugin is bundled with OctoPrint and can be
|
||||
found in its source repository under ``src/octoprint/plugins/gcodeviewer``.
|
||||
@@ -7,6 +7,7 @@ Bundled Plugins
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
action_command_notification.rst
|
||||
action_command_prompt.rst
|
||||
announcements.rst
|
||||
tracking.rst
|
||||
@@ -14,8 +15,11 @@ Bundled Plugins
|
||||
backup.rst
|
||||
discovery.rst
|
||||
errortracking.rst
|
||||
file_check.rst
|
||||
firmware_check.rst
|
||||
gcodeviewer.rst
|
||||
logging.rst
|
||||
loginui.rst
|
||||
pluginmanager.rst
|
||||
printer_safety_check.rst
|
||||
softwareupdate.rst
|
||||
virtual_printer.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
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
.. _sec-bundledplugins-printer_safety_check:
|
||||
|
||||
Printer Safety Check
|
||||
====================
|
||||
|
||||
The Printer Safety Check plugin comes bundled with OctoPrint starting with version 1.3.7.
|
||||
|
||||
It tries to identify printers or rather printer firmwares with known safety issues, such as
|
||||
disabled thermal runaway protection, and displays a warning box to logged in users on
|
||||
such identification.
|
||||
|
||||
.. _fig-bundledplugins-printer_safety_check-example:
|
||||
.. figure:: ../images/bundledplugins-printer_safety_check-example.png
|
||||
:align: center
|
||||
:alt: Printer Safety Check warning example
|
||||
|
||||
An example of a warning generated by the Printer Safety Check
|
||||
|
||||
Please refer to the `entry on the "unsafe firmware" warning in OctoPrint's FAQ <https://faq.octoprint.org/warning-firmware-unsafe>`_
|
||||
for a list of currently identified printers.
|
||||
|
||||
If you know of further printers/printer firmwares that need to be added here, please
|
||||
`get in touch on the forum and provide their response to an M115 <https://faq.octoprint.org/warning-firmware-unsafe>`_.
|
||||
|
||||
.. note::
|
||||
|
||||
Feel free to disable the plugin in OctoPrint's Plugin Manager if you feel like it is unnecessary. Be advised though
|
||||
that even if your printer might be running totally fine with a known unsafe configuration, that might change
|
||||
unexpectedly and with `catastrophic <https://www.thissmarthouse.net/dont-burn-your-house-down-3d-printing-a-cautionary-tale/>`_
|
||||
`results <https://www.reddit.com/r/3Dprinting/comments/6cekgk/house_fire_thanks_to_cheap_printer_from_china/>`_.
|
||||
|
||||
.. _sec-bundledplugins-printer_safety_check-events:
|
||||
|
||||
Events
|
||||
------
|
||||
|
||||
warning
|
||||
A printer safety warning was triggered.
|
||||
|
||||
Payload:
|
||||
|
||||
* ``check_type``: type of check that was triggered (e.g. ``m115``, ``received`` or ``cap``)
|
||||
* ``check_name``: name of check that was triggered (e.g. ``aneta8``)
|
||||
* ``warning_type``: type of warning that was triggered (e.g. ``firmware-unsafe``)
|
||||
|
||||
.. _sec-bundledplugins-printer_safety_check-source:
|
||||
|
||||
Source Code
|
||||
-----------
|
||||
|
||||
The source of the Printer Safety Check plugin is bundled with OctoPrint and can be
|
||||
found in its source repository under ``src/octoprint/plugins/printer_safety_check``.
|
||||
@@ -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://github.com/foosel/OctoPrint/wiki/Using-Release-Channels>`_.
|
||||
* **OctoPrint checkout folder** (if tracking git commits): 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://github.com/foosel/OctoPrint/wiki/Setup-on-a-Raspberry-Pi-running-Raspbian>`_).
|
||||
* **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
|
||||
@@ -133,7 +138,7 @@ Configuring the Plugin
|
||||
user: foosel
|
||||
repo: OctoPrint
|
||||
method: pip
|
||||
pip: 'https://github.com/foosel/OctoPrint/archive/{target_version}.zip'
|
||||
pip: 'https://github.com/OctoPrint/OctoPrint/archive/{target_version}.zip'
|
||||
|
||||
# further checks may be defined here
|
||||
|
||||
@@ -141,11 +146,49 @@ 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
|
||||
++++++++++++++
|
||||
|
||||
Version check types are configured through the ``type`` parameter. The following
|
||||
types are currently recognized:
|
||||
|
||||
* ``github_release``: Checks against releases published on Github. Additional
|
||||
config parameters:
|
||||
|
||||
@@ -153,10 +196,28 @@ Version checks
|
||||
* ``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
|
||||
* ``committish``: List of values 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 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_comittish``
|
||||
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_comittish`` 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
|
||||
@@ -190,16 +251,42 @@ Version checks
|
||||
``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:
|
||||
|
||||
* ``checkout_folder``: (mandatory) The full path to the folder with a valid git
|
||||
repository to check.
|
||||
|
||||
* ``pypi_release``: Checks `pypi.org <https://pypi.org>`_ for new releases of a specified package.
|
||||
* ``pypi_release``: Checks `pypi.org <https://pypi.org>`_ for new releases of a specified package. Additional
|
||||
config parameters:
|
||||
|
||||
* ``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:
|
||||
|
||||
* ``header_url`` or ``url``: (mandatory) URL to check. ``url`` can be used to avoid duplication in case of updater
|
||||
methods such as ``single_file_plugin``.
|
||||
* ``header_name``: (mandatory) HTTP header to check, case-insensitive, e.g. ``ETag`` or ``Last-Modified``.
|
||||
* ``header_method``: HTTP request method to use for the check, defaults to ``HEAD``.
|
||||
* ``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:
|
||||
|
||||
@@ -222,35 +309,63 @@ Version checks
|
||||
|
||||
* ``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
|
||||
++++++++++++++
|
||||
|
||||
* ``pip``: An URL to provide to ``pip install`` in order to perform the
|
||||
update. May contain a placeholder ``{target}`` which will be the most
|
||||
recent version specifier as retrieved from the update check.
|
||||
* ``update_script``: A script to execute in order to perform the update. May
|
||||
contain placeholders ``{target}`` (for the most recent version specified
|
||||
as retrieved from the update check), ``{branch}`` for the branch to switch
|
||||
to to access the release, ``{folder}`` for the working directory
|
||||
of the script and ``{python}`` for the python executable OctoPrint is
|
||||
running under. The working directory must be specified either by an
|
||||
``update_folder`` setting or if the ``git_commit`` check is used its
|
||||
``checkout_folder`` setting.
|
||||
* ``python_updater``: Can only be specified by plugins through the
|
||||
:ref:`hook <sec-bundledplugins-softwareupdate-hooks>`. A Python callable
|
||||
which performs the update, see below for details.
|
||||
Update methods are specified via the ``method`` parameter. Some update methods are assigned implicitly
|
||||
through the presence of their mandatory configuration parameters. The following methods are currently
|
||||
supported:
|
||||
|
||||
* ``pip``: Update by ``pip install``ing the supplied URL. May contain a
|
||||
placeholder ``{target}`` which will be the most recent version specifier as retrieved from the update check.
|
||||
Additional config parameters:
|
||||
|
||||
* ``pip``: The URL to use for installing. Presence implies ``method: pip``.
|
||||
|
||||
* ``single_file_plugin``: Update a single file plugin by re-downloading it from a configured URL.
|
||||
Additional config parameters:
|
||||
|
||||
* ``url``: (mandatory) The URL from which to install the single file plugin. Must be a single self contained
|
||||
python file.
|
||||
|
||||
* ``update_script``: Update by executing a script.
|
||||
Additional config parameters:
|
||||
|
||||
* ``update_script``: (mandatory) The path of the script to run. May
|
||||
contain placeholders ``{target}`` (for the most recent version specified
|
||||
as retrieved from the update check), ``{branch}`` for the branch to switch
|
||||
to to access the release, ``{folder}`` for the working directory
|
||||
of the script and ``{python}`` for the python executable OctoPrint is
|
||||
running under. Presence implies ``method: update_script``.
|
||||
* ``update_folder`` or ``checkout_folder``: (mandatory) The working directory.
|
||||
``checkout_folder`` can be used to avoid duplication in case of check
|
||||
types such as ``git_commit``.
|
||||
|
||||
* ``python_updater``: Update by executing a custom python callable.
|
||||
Additional config parameters:
|
||||
|
||||
* ``python_updater``: (mandatory) Can only be specified by plugins through the
|
||||
:ref:`hook <sec-bundledplugins-softwareupdate-hooks>`. A Python callable
|
||||
which performs the update, see below for details. Presence implies ``method: python_updater``.
|
||||
|
||||
* ``sleep_a_bit``: Does nothing but block for a configurable ``duration`` and log
|
||||
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
|
||||
@@ -273,7 +388,7 @@ Update methods
|
||||
user: foosel
|
||||
repo: OctoPrint
|
||||
method: pip
|
||||
pip: 'https://github.com/foosel/OctoPrint/archive/{target_version}.zip'
|
||||
pip: 'https://github.com/OctoPrint/OctoPrint/archive/{target_version}.zip'
|
||||
update_script: '{python} "/path/to/octoprint-update.py" --python="{python}" "{folder}" "{target}"'
|
||||
checkout_folder: /path/to/octoprint/checkout/folder
|
||||
|
||||
@@ -314,7 +429,69 @@ 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
|
||||
comittish:
|
||||
- master
|
||||
prerelease_branches:
|
||||
- name: Maintenance RCs
|
||||
branch: rc/maintenance
|
||||
comittish:
|
||||
- rc/maintenance
|
||||
- master
|
||||
- name: Devel RCs
|
||||
branch: rc/devel
|
||||
comittish:
|
||||
- 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):
|
||||
|
||||
plugins:
|
||||
softwareupdate:
|
||||
checks:
|
||||
some_plugin:
|
||||
type: github_release
|
||||
user: someUser
|
||||
repo: OctoPrint-SomePlugin
|
||||
stable_branch:
|
||||
name: Stable
|
||||
branch: master
|
||||
comittish:
|
||||
- master
|
||||
prerelease_branches:
|
||||
- name: Maintenance RCs
|
||||
branch: rc/maintenance
|
||||
comittish:
|
||||
- rc/maintenance
|
||||
- master
|
||||
- name: Devel RCs
|
||||
branch: rc/devel
|
||||
comittish:
|
||||
- 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
|
||||
@@ -329,6 +506,59 @@ The same, but tracking all commits pushed to branch ``devel`` (thus allowing
|
||||
branch: devel
|
||||
pip: 'https://github.com/someUser/OctoPrint-SomePlugin/archive/{target}.zip'
|
||||
|
||||
Single file plugin hosted in a gist ``https://gist.github.com/someUser/somegist`` and updated whenever there are changes:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
plugins:
|
||||
softwareupdate:
|
||||
checks:
|
||||
some_plugin:
|
||||
type: httpheader
|
||||
header_name: ETag
|
||||
url: 'https://gist.github.com/someUser/somegist/raw/some_plugin.py'
|
||||
method: single_file_plugin
|
||||
|
||||
The same but updated when a ``version.json`` hosted alongside gets updated with a new version can be found at
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
plugins:
|
||||
softwareupdate:
|
||||
checks:
|
||||
some_plugin:
|
||||
type: jsondata
|
||||
jsondata: 'https://gist.github.com/someUser/somegist/raw/version.json'
|
||||
url: 'https://gist.github.com/someUser/somegist/raw/some_plugin.py'
|
||||
method: single_file_plugin
|
||||
|
||||
Note that for gist hosted single file plugins, you need to use the "Raw" install link but should remove the
|
||||
commit identifier. E.g. ``https://gist.githubusercontent.com/<user>/<gistid>/raw/my_plugin.py`` instead of
|
||||
``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.
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
.. _sec-bundledplugins-virtual_printer:
|
||||
|
||||
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>`.
|
||||
|
||||
The virtual printer has been included in OctoPrint ever since the first releases back in 2013, however as of
|
||||
OctoPrint 1.4.1 it has finally been fully extracted into its own bundled plugin.
|
||||
|
||||
.. _sec-bundledplugins-virtual_printer-configuration:
|
||||
|
||||
Configuring the plugin
|
||||
----------------------
|
||||
|
||||
Please refer to :ref:`the development documentation <sec-development-virtual-printer-config>`.
|
||||
|
||||
.. _sec-bundledplugins-virtual_printer-sourcecode:
|
||||
|
||||
Source Code
|
||||
-----------
|
||||
|
||||
The source of the Virtual Printer plugin is bundled with OctoPrint and can be
|
||||
found in its source repository under ``src/octoprint/plugins/virtual_printer``.
|
||||
+91
-72
@@ -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,29 +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']
|
||||
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),
|
||||
}
|
||||
|
||||
# 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
|
||||
@@ -65,137 +82,136 @@ 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
|
||||
|
||||
# -- Options for HTML output ---------------------------------------------------
|
||||
|
||||
# on_rtd is whether we are on readthedocs.org, this line of code grabbed from docs.readthedocs.org
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
import sphinx_rtd_theme
|
||||
|
||||
if not on_rtd: # only import and set the theme if we're building docs locally
|
||||
import sphinx_rtd_theme
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
|
||||
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_stylesheet("theme_overrides.css")
|
||||
app.add_css_file("theme_overrides.css")
|
||||
|
||||
|
||||
# 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',
|
||||
|
||||
@@ -204,47 +220,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 ------------------------------------------------
|
||||
@@ -253,19 +266,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,9 +24,6 @@ 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)
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -283,184 +316,20 @@ The following settings are only relevant to you if you want to do OctoPrint deve
|
||||
# false, no minification will take place regardless of the minify setting below.
|
||||
bundle: true
|
||||
|
||||
# If set to true, OctoPrint will minify its viewmodels (that includes those of plugins). Note: if bundle is
|
||||
# If set to true, OctoPrint will the core and library javascript assets. Note: if bundle is
|
||||
# set to false, no minification will take place either.
|
||||
minify: true
|
||||
|
||||
# If set to true, OctoPrint will also minify the third party plugin javascript assets. Note: if bundle or
|
||||
# minify are set to false, no minification of the plugin assets will take place either.
|
||||
minify_plugins: false
|
||||
|
||||
# Whether to delete generated web assets on server startup (forcing a regeneration)
|
||||
clean_on_startup: true
|
||||
|
||||
# enable or disable the loading animation
|
||||
showLoadingAnimation: true
|
||||
|
||||
# Settings for the virtual printer
|
||||
virtualPrinter:
|
||||
|
||||
# Whether to enable the virtual printer and include it in the list of available serial connections.
|
||||
# Defaults to false.
|
||||
enabled: true
|
||||
|
||||
# Whether to send an additional "ok" after a resend request (like Repetier)
|
||||
okAfterResend: false
|
||||
|
||||
# Whether to force checksums and line number in the communication (like Repetier), if set to true
|
||||
# printer will only accept commands that come with linenumber and checksum and throw an error for
|
||||
# lines that don't. Defaults to false
|
||||
forceChecksum: false
|
||||
|
||||
# Whether to send "ok" responses with the line number that gets acknowledged by the "ok". Defaults
|
||||
# to false.
|
||||
okWithLinenumber: false
|
||||
|
||||
# Number of extruders to simulate on the virtual printer. Map from tool id (0, 1, ...) to temperature
|
||||
# in °C
|
||||
numExtruders: 1
|
||||
|
||||
# Allows pinning certain hotends to a fixed temperature
|
||||
pinnedExtruders: null
|
||||
|
||||
# Whether to include the current tool temperature in the M105 output as separate T segment or not.
|
||||
#
|
||||
# True: > M105
|
||||
# < ok T:23.5/0.0 T0:34.3/0.0 T1:23.5/0.0 B:43.2/0.0
|
||||
# False: > M105
|
||||
# < ok T0:34.3/0.0 T1:23.5/0.0 B:43.2/0.0
|
||||
includeCurrentToolInTemps: true
|
||||
|
||||
# Whether to include the selected filename in the M23 File opened response.
|
||||
#
|
||||
# True: > M23 filename.gcode
|
||||
# < File opened: filename.gcode Size: 27
|
||||
# False: > M23 filename.gcode
|
||||
# > File opened
|
||||
includeFilenameInOpened: true
|
||||
|
||||
# Whether the simulated printer should also simulate a heated bed or not
|
||||
hasBed: true
|
||||
|
||||
# Whether the simulated printer should also simulate a heated chamber or not
|
||||
hasChamber: false
|
||||
|
||||
# If enabled, reports the set target temperatures as separate messages from the firmware
|
||||
#
|
||||
# True: > M109 S220.0
|
||||
# < TargetExtr0:220.0
|
||||
# < ok
|
||||
# > M105
|
||||
# < ok T0:34.3 T1:23.5 B:43.2
|
||||
# False: > M109 S220.0
|
||||
# < ok
|
||||
# > M105
|
||||
# < ok T0:34.3/220.0 T1:23.5/0.0 B:43.2/0.0
|
||||
repetierStyleTargetTemperature: false
|
||||
|
||||
# If enabled, uses repetier style resends, sending multiple resends for the same line
|
||||
# to make sure nothing gets lost on the line
|
||||
repetierStyleResends: false
|
||||
|
||||
# If enabled, ok will be sent before a commands output, otherwise after or inline (M105)
|
||||
#
|
||||
# True: > M20
|
||||
# < ok
|
||||
# < Begin file list
|
||||
# < End file list
|
||||
# False: > M20
|
||||
# < Begin file list
|
||||
# < End file list
|
||||
# < ok
|
||||
okBeforeCommandOutput: false
|
||||
|
||||
# If enabled, reports the first extruder in M105 responses as T instead of T0
|
||||
#
|
||||
# True: > M105
|
||||
# < ok T:34.3/0.0 T1:23.5/0.0 B:43.2/0.0
|
||||
# False: > M105
|
||||
# < 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
|
||||
|
||||
# Forced pause for retrieving from the outgoing buffer
|
||||
throttle: 0.01
|
||||
|
||||
# Whether to send "wait" responses every "waitInterval" seconds when serial rx buffer is empty
|
||||
sendWait: false
|
||||
|
||||
# Interval in which to send "wait" lines when rx buffer is empty
|
||||
waitInterval: 1
|
||||
|
||||
# Size of the simulated RX buffer in bytes, when it's full a send from OctoPrint's
|
||||
# side will block
|
||||
rxBuffer: 64
|
||||
|
||||
# Size of simulated command buffer, number of commands. If full, buffered commands will block
|
||||
# until a slot frees up
|
||||
commandBuffer: 4
|
||||
|
||||
# Whether to support the M112 command with simulated kill
|
||||
supportM112: true
|
||||
|
||||
# Whether to send messages received via M117 back as "echo:" lines
|
||||
echoOnM117: true
|
||||
|
||||
# Whether to simulate broken M29 behaviour (missing ok after response)
|
||||
brokenM29: true
|
||||
|
||||
# Whether F is supported as individual command
|
||||
supportF: false
|
||||
|
||||
# Firmware name to report (useful for testing firmware detection)
|
||||
firmwareName: Virtual Marlin 1.0
|
||||
|
||||
# Simulate a shared nozzle
|
||||
sharedNozzle: false
|
||||
|
||||
# Send "busy" messages if busy processing something
|
||||
sendBusy: false
|
||||
|
||||
# Simulate a reset on connect
|
||||
simulateReset: true
|
||||
|
||||
# Lines to send on simulated reset
|
||||
resetLines:
|
||||
- start
|
||||
- "Marlin: Virtual Marlin!"
|
||||
- "SD card ok"
|
||||
|
||||
# Initial set of prepared oks to use instead of regular ok (e.g. to simulate
|
||||
# mis-sent oks). Can also be filled at runtime via the debug command prepare_ok
|
||||
preparedOks: []
|
||||
|
||||
# Format string for ok response.
|
||||
#
|
||||
# Placeholders:
|
||||
# - lastN: last acknowledged line number
|
||||
# - buffer: empty slots in internal command buffer
|
||||
#
|
||||
# Example format string for "extended" ok format:
|
||||
# ok N{lastN} P{buffer}
|
||||
okFormatString: ok
|
||||
|
||||
# Format string for M115 output.
|
||||
#
|
||||
# Placeholders:
|
||||
# - firmare_name: The firmware name as defined in firmwareName
|
||||
m115FormatString: "FIRMWARE_NAME: {firmware_name} PROTOCOL_VERSION:1.0"
|
||||
|
||||
# Whether to include capability report in M115 output
|
||||
m115ReportCapabilites: false
|
||||
|
||||
# Capabilities to report if capability report is enabled
|
||||
capabilities:
|
||||
AUTOREPORT_TEMP: true
|
||||
|
||||
# Simulated ambient temperature in °C
|
||||
ambientTemperature: 21.3
|
||||
|
||||
.. _sec-configuration-config_yaml-estimation:
|
||||
|
||||
Estimation
|
||||
@@ -938,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
|
||||
@@ -1025,6 +897,25 @@ Use the following settings to configure the server:
|
||||
- 192.168.1.254
|
||||
- 192.168.23.42
|
||||
|
||||
# Whether to allow OctoPrint to be embedded in a frame or not. Note that depending on your setup you might
|
||||
# have to set SameSite to None, Secure to true and serve OctoPrint through a reverse proxy that enables https
|
||||
# for cookies and thus logging in to work
|
||||
allowFraming: true
|
||||
|
||||
# Settings for further configuration of the cookies that OctoPrint sets (login, remember me, ...)
|
||||
cookies:
|
||||
# SameSite setting to use on the cookies. Possible values are None, Lax and Strict. Defaults to None but
|
||||
# be advised that browsers will soon force this to Lax unless also being set as Secure and served over
|
||||
# https, which will cause issues with embedding OctoPrint in frames.
|
||||
#
|
||||
# See also https://www.chromestatus.com/feature/5088147346030592,
|
||||
# https://www.chromestatus.com/feature/5633521622188032 and issue #3482
|
||||
samesite: lax
|
||||
|
||||
# Whether to set the Secure flag to true on cookies. Defaults to false. Only set to true if you are running
|
||||
# OctoPrint behind a reverse proxy taking care of SSL termination.
|
||||
secure: false
|
||||
|
||||
# Settings for file uploads to OctoPrint, such as maximum allowed file size and
|
||||
# header suffixes to use for streaming uploads. OctoPrint does some nifty things internally in
|
||||
# order to allow streaming of large file uploads to the application rather than just storing
|
||||
@@ -1058,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
|
||||
@@ -1126,9 +1023,24 @@ Use the following settings to configure the server:
|
||||
* ``X-Scheme``: should contain your custom URL scheme to use (if different from ``http``), e.g. ``https``
|
||||
|
||||
If you use these headers OctoPrint will work both via the reverse proxy as well as when called directly. Take a look
|
||||
`into OctoPrint's wiki <https://github.com/foosel/OctoPrint/wiki/Reverse-proxy-configuration-examples>`_ for some
|
||||
`into OctoPrint's wiki <https://community.octoprint.org/t/reverse-proxy-configuration-examples/1107>`_ for some
|
||||
examples on how to configure this.
|
||||
|
||||
.. note::
|
||||
|
||||
If you want to embed OctoPrint in a frame, you'll need to set ``allowFraming`` to ``true`` or your browser will
|
||||
prevent this.
|
||||
|
||||
In future browser builds you will also have to make sure you frame is on the same domain as OctoPrint or that
|
||||
OctoPrint is served via https through a reverse proxy and has set ``cookies.secure`` to ``true`` or your browser
|
||||
will refuse to persist cookies and logging in will not work.
|
||||
|
||||
See also `Cookies default to SameSite=Lax <https://www.chromestatus.com/feature/5088147346030592>`_ and
|
||||
`Reject insecure SameSite=None cookies <https://www.chromestatus.com/feature/5633521622188032>`_ as well as
|
||||
`this ticket <https://github.com/OctoPrint/OctoPrint/issues/3482>`_,
|
||||
and `this twitter thread <https://twitter.com/foosel/status/1022030752349913088>`_ on why OctoPrint cannot
|
||||
solve this on its own/ship with https that doesn't cause scary warnings in your browser.
|
||||
|
||||
.. _sec-configuration-config_yaml-slicing:
|
||||
|
||||
Slicing
|
||||
@@ -1225,6 +1137,8 @@ Use `Javascript regular expressions <https://developer.mozilla.org/en/docs/Web/J
|
||||
regex: '(Send: (N\d+\s+)?M27)|(Recv: SD printing byte)'
|
||||
- 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
|
||||
@@ -81,8 +81,8 @@ used for the ``serial.log`` and the ``console`` handler used for the output to s
|
||||
maxBytes: 2097152 # 2 * 1024 * 1024 = 2 MB in bytes
|
||||
filename: /path/to/octoprints/logs/serial.log
|
||||
|
||||
You can find more information on the used logging handlers in the
|
||||
`Python documentation on logging handlers <https://docs.python.org/2/library/logging.handlers.html>`_.
|
||||
You can find more information on the used logging handlers in the Python documentation on
|
||||
:py:mod:`logging.handlers`.
|
||||
|
||||
Changing logging formatters
|
||||
---------------------------
|
||||
@@ -97,4 +97,4 @@ expressed in YAML as follows:
|
||||
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
||||
|
||||
The possible keys for the logging format can be found in the
|
||||
`Python documentation on LogRecord attributes <https://docs.python.org/2/library/logging.html#logrecord-attributes>`_.
|
||||
:ref:`Python documentation on LogRecord attributes <logrecord-attributes>`.
|
||||
@@ -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/hotfix``
|
||||
Any preparation for potential hotfix 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:
|
||||
|
||||
``hotfix/...``
|
||||
Hotfixes under development that are to be merged into the ``staging/hotfix``
|
||||
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.
|
||||
@@ -13,26 +13,33 @@ 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:
|
||||
|
||||
* ``git clone -b devel https://github.com/foosel/OctoPrint.git``
|
||||
* ``git clone https://github.com/OctoPrint/OctoPrint.git``
|
||||
|
||||
* Enter the checked out source folder: ``cd OctoPrint``
|
||||
* Create virtual environments in the checked out source folder for both Python 2.7 and Python 3.7 to use for
|
||||
installing and running OctoPrint and its dependencies (this avoids potential versioning issues for the dependencies
|
||||
with system wide installed instances):
|
||||
* Create virtual environments in the checked out source folder for both Python 2 and Python 3 to use for
|
||||
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``
|
||||
|
||||
* Activate one of the virtual environments:
|
||||
.. note::
|
||||
|
||||
This assumes that `python2` and `python3` are binaries available directly on your ``PATH``. If your Python 2 and 3
|
||||
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 (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:
|
||||
|
||||
@@ -41,52 +48,58 @@ below.
|
||||
* Install OctoPrint in `"editable" mode <https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs>`_,
|
||||
including its regular *and* development and plugin development dependencies:
|
||||
|
||||
* ``pip install -e .[develop,plugins]``
|
||||
* ``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 ``nosetests --with-doctest``
|
||||
* build the documentation from the ``docs`` sub folder of the checked out sources via ``sphinx-build -b html . _build``
|
||||
* 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.
|
||||
|
||||
To deactivate the virtual environment and return to the system's default Python: ``deactivate``.
|
||||
|
||||
If you also want to be able to build the documentation that resides in the ``docs`` subfolder, you need to activate
|
||||
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]``
|
||||
|
||||
You can then build the documentation:
|
||||
|
||||
* ``sphinx-build -b html . _build``
|
||||
|
||||
.. _sec-development-environment-source-linux:
|
||||
|
||||
Linux
|
||||
.....
|
||||
|
||||
.. todo::
|
||||
|
||||
This guide is not yet adapted to the concurrent use of Python 2.7 and 3.7 environments during development.
|
||||
|
||||
This assumes you'll host your OctoPrint development checkout at ``~/devel/OctoPrint``. If you want to use a different
|
||||
location, please substitute accordingly.
|
||||
|
||||
First make sure you have python including its header files, pip, setuptools, virtualenv, git and some build requirements
|
||||
First make sure you have python 2 and 3 including their header files, pip, setuptools, virtualenv, git and some build requirements
|
||||
installed:
|
||||
|
||||
* On apt based distributions (e.g. Debian, Ubuntu, ...):
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo apt-get install python python-pip python-dev python-setuptools python-virtualenv git libyaml-dev build-essential
|
||||
|
||||
* On zypper based distributions (example below for SLES 12 SP2):
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
sudo zypper ar https://download.opensuse.org/repositories/devel:/languages:/python/SLE_12_SP2/ python_devel
|
||||
sudo zypper ref
|
||||
sudo zypper in python python-pip python-devel python-setuptools python-virtualenv git libyaml-devel
|
||||
sudo zypper in -t pattern Basis-Devel
|
||||
sudo apt-get install python python-pip python-dev python-setuptools python-virtualenv python3 python3-virtualenv python3-dev git libyaml-dev build-essential
|
||||
|
||||
.. todo::
|
||||
|
||||
Using a Linux distribution that doesn't use ``apt`` or ``zypper``? Please send a
|
||||
`Pull Request <https://github.com/foosel/OctoPrint/blob/master/CONTRIBUTING.md#pull-requests>`_ to get the necessary
|
||||
Using a Linux distribution that doesn't use ``apt``? Please send a
|
||||
`Pull Request <https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md#pull-requests>`_ to get the necessary
|
||||
steps into this guide!
|
||||
|
||||
Then:
|
||||
@@ -94,36 +107,44 @@ Then:
|
||||
.. code-block:: none
|
||||
|
||||
cd ~/devel
|
||||
git clone -b devel https://github.com/foosel/OctoPrint.git
|
||||
git clone https://github.com/OctoPrint/OctoPrint.git
|
||||
cd OctoPrint
|
||||
virtualenv venv
|
||||
source ./venv/bin/activate
|
||||
virtualenv --python=python2 venv2
|
||||
virtualenv --python=python3 venv3
|
||||
source ./venv2/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install -e .[develop,plugins]
|
||||
source ./venv3/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install -e .[develop,plugins,docs]
|
||||
pre-commit install
|
||||
git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
|
||||
You can then start OctoPrint via ``~/devel/OctoPrint/venv/bin/octoprint`` or just ``octoprint`` if you activated the virtual
|
||||
environment.
|
||||
You can then start OctoPrint via ``octoprint`` after activating one of the two virtual environments.
|
||||
|
||||
.. _sec-development-environment-windows:
|
||||
|
||||
Windows
|
||||
.......
|
||||
|
||||
.. todo::
|
||||
|
||||
This guide is not yet adapted to the concurrent use of Python 2.7 and 3.7 environments during development.
|
||||
|
||||
This assumes you'll host your OctoPrint development checkout at ``C:\Devel\OctoPrint``. If you want to use a different
|
||||
location, please substitute accordingly.
|
||||
|
||||
First download & install:
|
||||
|
||||
* `Python 2.7.15 Windows x86 MSI installer <https://www.python.org/downloads/release/python-2715/>`_
|
||||
* `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``)
|
||||
|
||||
* 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
|
||||
|
||||
* `Microsoft Visual C++ Compiler for Python 2.7 <http://www.microsoft.com/en-us/download/details.aspx?id=44266>`_
|
||||
* `Git for Windows <https://git-for-windows.github.io/>`_
|
||||
* `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.
|
||||
|
||||
Open the Git Bash you just installed and in that:
|
||||
|
||||
@@ -131,12 +152,18 @@ Open the Git Bash you just installed and in that:
|
||||
|
||||
pip install virtualenv
|
||||
cd /c/Devel
|
||||
git clone https://github.com/foosel/OctoPrint.git
|
||||
git clone https://github.com/OctoPrint/OctoPrint.git
|
||||
cd OctoPrint
|
||||
virtualenv venv
|
||||
source ./venv/Scripts/activate
|
||||
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]
|
||||
source ./venv3/Scripts/activate
|
||||
pip install --upgrade pip
|
||||
pip install -e .[develop,plugins,docs]
|
||||
pre-commit install
|
||||
git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
|
||||
.. _sec-development-environment-mac:
|
||||
|
||||
@@ -145,12 +172,14 @@ Mac OS X
|
||||
|
||||
.. note::
|
||||
|
||||
This guide is based on the `Setup Guide for Mac OS X on OctoPrint's wiki <https://github.com/foosel/OctoPrint/wiki/Setup-on-Mac/>`_.
|
||||
This guide is based on the `Setup Guide for Mac OS X on OctoPrint's Community Forum <https://community.octoprint.org/t/setting-up-octoprint-on-macos/13425>`_.
|
||||
Please report back if it works for you, due to lack of access to a Mac I cannot test it myself. Thanks.
|
||||
|
||||
.. todo::
|
||||
|
||||
This guide is not yet adapted to the concurrent use of Python 2.7 and 3.7 environments during development.
|
||||
This guide is not yet adapted to the concurrent use of Python 2 and 3 environments during development. Please send a
|
||||
`Pull Request <https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md#pull-requests>`_ to get the necessary
|
||||
steps into this guide!
|
||||
|
||||
This assumes you'll host your OctoPrint development checkout at ``~/devel/OctoPrint``. If you want to use a different
|
||||
location, please substitute accordingly.
|
||||
@@ -178,26 +207,24 @@ You'll need a user account with administrator privileges.
|
||||
.. code-block:: none
|
||||
|
||||
cd ~/devel
|
||||
git clone https://github.com/foosel/OctoPrint.git
|
||||
git clone https://github.com/OctoPrint/OctoPrint.git
|
||||
cd OctoPrint
|
||||
virtualenv venv
|
||||
source venv/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install -e .[develop,plugins]
|
||||
pre-commit install
|
||||
git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
|
||||
.. _sec-development-environment-ides:
|
||||
|
||||
IDE Setup
|
||||
---------
|
||||
|
||||
.. todo::
|
||||
|
||||
This guide is not yet adapted to the concurrent use of Python 2.7 and 3.7 environments during development.
|
||||
|
||||
.. todo::
|
||||
|
||||
Using another IDE than the ones below? Please send a
|
||||
`Pull Request <https://github.com/foosel/OctoPrint/blob/master/CONTRIBUTING.md#pull-requests>`_ to get the necessary
|
||||
`Pull Request <https://github.com/OctoPrint/OctoPrint/blob/master/CONTRIBUTING.md#pull-requests>`_ to get the necessary
|
||||
steps into this guide!
|
||||
|
||||
.. _sec-development-environment-ides-pycharm:
|
||||
@@ -206,49 +233,82 @@ PyCharm
|
||||
.......
|
||||
|
||||
- "File" > "Open ...", select OctoPrint checkout folder (e.g. ``~/devel/OctoPrint`` or ``C:\Devel\OctoPrint``)
|
||||
- **(Linux, Windows)** "File" > "Settings ..." > "Project: OctoPrint" > "Project Interpreter" > "Add local ...", select OctoPrint venv
|
||||
folder (e.g. ``~/devel/OctoPrint/venv`` or ``C:\Devel\OctoPrint\venv``)
|
||||
- **(macOS)** "PyCharm" > "Preferences ..." > "Project: OctoPrint" > "Project Interpreter" > "Add ..." >
|
||||
"Virtualenv Environment > "Existing Environment", select OctoPrint venv folder (e.g. ``~/devel/OctoPrint/venv``)
|
||||
- Register virtual environments:
|
||||
|
||||
- **(Linux, Windows)** "File" > "Settings ..." > "Project: OctoPrint" > "Project Interpreter" > "Add local ...",
|
||||
select OctoPrint ``venv2`` folder (e.g. ``~/devel/OctoPrint/venv2`` or ``C:\Devel\OctoPrint\venv2``).
|
||||
- **(macOS)** "PyCharm" > "Preferences ..." > "Project: OctoPrint" > "Project Interpreter" > "Add ..." >
|
||||
"Virtualenv Environment > "Existing Environment", select OctoPrint ``venv2`` folder (e.g. ``~/devel/OctoPrint/venv2``).
|
||||
|
||||
Repeat for the ``venv3`` folder.
|
||||
|
||||
- Right click "src" in project tree, mark as source folder
|
||||
- Add Run/Debug Configuration, select "Python":
|
||||
|
||||
* Name: OctoPrint server
|
||||
* Script: path to ``run`` in the OctoPrint checkout folder (e.g. ``~/devel/OctoPrint/run`` or ``C:\Devel\OctoPrint\run``)
|
||||
* Script parameters: ``serve --debug``
|
||||
* Module name: ``octoprint``
|
||||
* Parameters: ``serve --debug``
|
||||
* Project: ``OctoPrint``
|
||||
* Python interpreter: the ``venv`` local virtual environment
|
||||
* Python interpreter: Project Default
|
||||
* Working directory: the OctoPrint checkout folder (e.g. ``~/devel/OctoPrint`` or ``C:\Devel\OctoPrint``)
|
||||
* If you want dependencies to auto-update on run if necessary: "Before Launch" > "+" > "Run external tool" > "+"
|
||||
* If you want build artifacts to be cleaned up on run (recommended): "Before Launch" > "+" > "Run external tool" > "+"
|
||||
|
||||
* Name: Update OctoPrint dependencies
|
||||
* Program: ``$PyInterpreterDirectory$/pip`` (or ``$PyInterpreterDirectory$/pip.exe`` on Windows)
|
||||
* Parameters: ``install -e .[develop,plugins]``
|
||||
* Name: Clean build directory
|
||||
* Program: ``$ModuleSdkPath$``
|
||||
* Parameters: ``setup.py clean``
|
||||
* Working directory: ``$ProjectFileDir$``
|
||||
|
||||
- Add Run/Debug Configuration, select "Python tests" and therein "Nosetests":
|
||||
* If you want dependencies to auto-update on run if necessary (recommended): "Before Launch" > "+" > "Run external tool" > "+"
|
||||
|
||||
* Name: OctoPrint nosetests
|
||||
* Target: Path, ``.``
|
||||
* Name: Update OctoPrint dependencies
|
||||
* Program: ``$ModuleSdkPath$``
|
||||
* 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$``
|
||||
being empty sometimes, so if this fails to run on your installation, you should update your dependencies manually
|
||||
for now.
|
||||
|
||||
- Add Run/Debug Configuration, select "Python tests" and therein "pytest":
|
||||
|
||||
* Name: OctoPrint tests
|
||||
* Target: Custom
|
||||
* Project: ``OctoPrint``
|
||||
* Python interpreter: the ``venv`` local virtual environment
|
||||
* Python interpreter: Project Default
|
||||
* Working directory: the OctoPrint checkout folder (e.g. ``~/devel/OctoPrint`` or ``C:\Devel\OctoPrint``)
|
||||
* Just like with the run configuration for the server you can also have the dependencies auto-update on run of
|
||||
the tests, see above on how to set this up.
|
||||
|
||||
- Add Run/Debug Configuration, select "Python docs" and therein "Sphinx task"
|
||||
- Add Run/Debug Configuration, select "Python":
|
||||
|
||||
* Name: OctoPrint docs
|
||||
* Command: ``html``
|
||||
* Input: the ``docs`` folder in the OctoPrint checkout folder (e.g. ``~/devel/OctoPrint/docs`` or
|
||||
``C:\Devel\OctoPrint\docs``)
|
||||
* Output: the ``docs/_build`` folder in the OctoPrint checkout folder (e.g. ``~/devel/OctoPrint/docs/_build`` or
|
||||
``C:\Devel\OctoPrint\docs\_build``)
|
||||
* Module name: ``sphinx.cmd.build``
|
||||
* Parameters: ``-v -T -E ./docs ./docs/_build -b html``
|
||||
* Project: ``OctoPrint``
|
||||
* Python interpreter: the ``venv`` local virtual environment
|
||||
* Python interpreter: ``venv3`` environment (the docs build requires Python 3)
|
||||
* Working directory: the OctoPrint checkout folder (e.g. ``~/devel/OctoPrint`` or ``C:\Devel\OctoPrint``)
|
||||
* Just like with the run configuration for the server you can also have the dependencies auto-update when building
|
||||
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]``.
|
||||
|
||||
- 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.
|
||||
Otherwise go through Settings.
|
||||
|
||||
.. note::
|
||||
|
||||
Make sure you are running a PyCharm version of 2016.1 or later, or manually fix
|
||||
|
||||
@@ -7,5 +7,11 @@ Development
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
|
||||
versioning.rst
|
||||
branches.rst
|
||||
environment.rst
|
||||
virtual_printer.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,20 @@
|
||||
.. _sec-request-profiling:
|
||||
|
||||
Profiling requests
|
||||
==================
|
||||
|
||||
Once you have a development environment set up, you will need to launch
|
||||
OctoPrint using ``serve --debug`` as parameters.
|
||||
|
||||
At this point, you are able to make the exact same requests as before. To
|
||||
profile a specific request, just add ``?perfprofile`` or ``&perfprofile`` to the
|
||||
request parameters. The request will be rendered as usual, but you will receive
|
||||
an html document with the profiling results instead of the contents of the
|
||||
response.
|
||||
|
||||
Errors
|
||||
------
|
||||
|
||||
If you receive a ``500: Internal Server Error`` and a ``ModuleNotFoundError: No
|
||||
module named 'pyinstrument'`` in the console, you didn't install development
|
||||
dependencies. Do that now using ``pip install -e '.[develop]'``.
|
||||
@@ -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.
|
||||
@@ -3,7 +3,7 @@
|
||||
Setting up the virtual printer for debugging
|
||||
============================================
|
||||
|
||||
OctoPrint includes, by default, a virtual printer plugin. This plugin allows you to debug OctoPrint's serial
|
||||
OctoPrint includes, by default, a :ref:`virtual printer plugin <sec-bundledplugins-virtual_printer>`. This plugin allows you to debug OctoPrint's serial
|
||||
communication without connecting to an actual printer. Furthermore, it is possible to create certain edge conditions
|
||||
that may be hard to reproduce with a real printer.
|
||||
|
||||
@@ -12,33 +12,219 @@ that may be hard to reproduce with a real printer.
|
||||
Enabling the virtual printer
|
||||
----------------------------
|
||||
|
||||
The virtual printer is enabled by editing OctoPrint's config.yaml file. Details on the configuration file can
|
||||
be found in the full :ref:`config.yaml documentation <sec-configuration-config_yaml>`.
|
||||
|
||||
The steps to take are as follows:
|
||||
|
||||
* Find config.yaml in the OctoPrint settings folder. Usually in ``~/.octoprint`` on Linux, in ``%APPDATA%/OctoPrint`` on Windows and in ``~/Library/Application Support/OctoPrint`` on macOS.
|
||||
* Add or extend the ``devel`` section with:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
devel:
|
||||
virtualPrinter:
|
||||
enabled: true
|
||||
|
||||
* Restart OctoPrint.
|
||||
* In the connection panel, a new option will appear in the Serial Port dropdown labeled ``VIRTUAL``.
|
||||
* Select this option and click ``connect``.
|
||||
* The virtual printer is now active.
|
||||
The virtual printer can be enabled through its Settings pane.
|
||||
|
||||
.. _sec-development-virtual-printer-config:
|
||||
|
||||
Virtual printer configuration options
|
||||
-------------------------------------
|
||||
|
||||
The config.yaml file has many configuration options for the virtual printer that allow you to fine-tune its behavior.
|
||||
There many configuration options via ``config.yaml`` for the virtual printer that allow you to fine-tune its behavior:
|
||||
|
||||
Please see the relevant :ref:`config.yaml section <sec-configuration-config_yaml-devel>` for the full details.
|
||||
.. code-block:: yaml
|
||||
|
||||
plugins:
|
||||
|
||||
# Settings for the virtual printer
|
||||
virtual_printer:
|
||||
|
||||
# Whether to enable the virtual printer and include it in the list of available serial connections.
|
||||
# Defaults to false.
|
||||
enabled: true
|
||||
|
||||
# Whether to send an additional "ok" after a resend request (like Repetier)
|
||||
okAfterResend: false
|
||||
|
||||
# Whether to force checksums and line number in the communication (like Repetier), if set to true
|
||||
# printer will only accept commands that come with linenumber and checksum and throw an error for
|
||||
# lines that don't. Defaults to false
|
||||
forceChecksum: false
|
||||
|
||||
# Whether to send "ok" responses with the line number that gets acknowledged by the "ok". Defaults
|
||||
# to false.
|
||||
okWithLinenumber: false
|
||||
|
||||
# Number of extruders to simulate on the virtual printer. Map from tool id (0, 1, ...) to temperature
|
||||
# in °C
|
||||
numExtruders: 1
|
||||
|
||||
# Allows pinning certain hotends to a fixed temperature
|
||||
pinnedExtruders: null
|
||||
|
||||
# Whether to include the current tool temperature in the M105 output as separate T segment or not.
|
||||
#
|
||||
# True: > M105
|
||||
# < ok T:23.5/0.0 T0:34.3/0.0 T1:23.5/0.0 B:43.2/0.0
|
||||
# False: > M105
|
||||
# < ok T0:34.3/0.0 T1:23.5/0.0 B:43.2/0.0
|
||||
includeCurrentToolInTemps: true
|
||||
|
||||
# Whether to include the selected filename in the M23 File opened response.
|
||||
#
|
||||
# True: > M23 filename.gcode
|
||||
# < File opened: filename.gcode Size: 27
|
||||
# False: > M23 filename.gcode
|
||||
# > File opened
|
||||
includeFilenameInOpened: true
|
||||
|
||||
# Whether the simulated printer should also simulate a heated bed or not
|
||||
hasBed: true
|
||||
|
||||
# Whether the simulated printer should also simulate a heated chamber or not
|
||||
hasChamber: false
|
||||
|
||||
# If enabled, reports the set target temperatures as separate messages from the firmware
|
||||
#
|
||||
# True: > M109 S220.0
|
||||
# < TargetExtr0:220.0
|
||||
# < ok
|
||||
# > M105
|
||||
# < ok T0:34.3 T1:23.5 B:43.2
|
||||
# False: > M109 S220.0
|
||||
# < ok
|
||||
# > M105
|
||||
# < ok T0:34.3/220.0 T1:23.5/0.0 B:43.2/0.0
|
||||
repetierStyleTargetTemperature: false
|
||||
|
||||
# If enabled, uses repetier style resends, sending multiple resends for the same line
|
||||
# to make sure nothing gets lost on the line
|
||||
repetierStyleResends: false
|
||||
|
||||
# If enabled, ok will be sent before a commands output, otherwise after or inline (M105)
|
||||
#
|
||||
# True: > M20
|
||||
# < ok
|
||||
# < Begin file list
|
||||
# < End file list
|
||||
# False: > M20
|
||||
# < Begin file list
|
||||
# < End file list
|
||||
# < ok
|
||||
okBeforeCommandOutput: false
|
||||
|
||||
# If enabled, reports the first extruder in M105 responses as T instead of T0
|
||||
#
|
||||
# True: > M105
|
||||
# < ok T:34.3/0.0 T1:23.5/0.0 B:43.2/0.0
|
||||
# False: > M105
|
||||
# < ok T0:34.3/0.0 T1:23.5/0.0 B:43.2/0.0
|
||||
smoothieTemperatureReporting: 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
|
||||
|
||||
# Whether to send "wait" responses every "waitInterval" seconds when serial rx buffer is empty
|
||||
sendWait: false
|
||||
|
||||
# Interval in which to send "wait" lines when rx buffer is empty
|
||||
waitInterval: 1
|
||||
|
||||
# Size of the simulated RX buffer in bytes, when it's full a send from OctoPrint's
|
||||
# side will block
|
||||
rxBuffer: 64
|
||||
|
||||
# Size of simulated command buffer, number of commands. If full, buffered commands will block
|
||||
# until a slot frees up
|
||||
commandBuffer: 4
|
||||
|
||||
# Whether to support the M112 command with simulated kill
|
||||
supportM112: true
|
||||
|
||||
# Whether to send messages received via M117 back as "echo:" lines
|
||||
echoOnM117: true
|
||||
|
||||
# Whether to simulate broken M29 behaviour (missing ok after response)
|
||||
brokenM29: true
|
||||
|
||||
# Whether F is supported as individual command
|
||||
supportF: false
|
||||
|
||||
# Firmware name to report (useful for testing firmware detection)
|
||||
firmwareName: Virtual Marlin 1.0
|
||||
|
||||
# Simulate a shared nozzle
|
||||
sharedNozzle: false
|
||||
|
||||
# Send "busy" messages if busy processing something
|
||||
sendBusy: false
|
||||
|
||||
# Simulate a reset on connect
|
||||
simulateReset: true
|
||||
|
||||
# Lines to send on simulated reset
|
||||
resetLines:
|
||||
- start
|
||||
- "Marlin: Virtual Marlin!"
|
||||
- "SD card ok"
|
||||
|
||||
# Initial set of prepared oks to use instead of regular ok (e.g. to simulate
|
||||
# mis-sent oks). Can also be filled at runtime via the debug command prepare_ok
|
||||
preparedOks: []
|
||||
|
||||
# Format string for ok response.
|
||||
#
|
||||
# Placeholders:
|
||||
# - lastN: last acknowledged line number
|
||||
# - buffer: empty slots in internal command buffer
|
||||
#
|
||||
# Example format string for "extended" ok format:
|
||||
# ok N{lastN} P{buffer}
|
||||
okFormatString: ok
|
||||
|
||||
# Format string for M115 output.
|
||||
#
|
||||
# Placeholders:
|
||||
# - firmare_name: The firmware name as defined in firmwareName
|
||||
m115FormatString: "FIRMWARE_NAME: {firmware_name} PROTOCOL_VERSION:1.0"
|
||||
|
||||
# Whether to include capability report in M115 output
|
||||
m115ReportCapabilites: false
|
||||
|
||||
# Capabilities to report if capability report is enabled
|
||||
capabilities:
|
||||
AUTOREPORT_TEMP: true
|
||||
|
||||
# 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:
|
||||
|
||||
@@ -46,7 +232,7 @@ Log file
|
||||
--------
|
||||
|
||||
Once activated, the virtual printer will log all serial communication in the ``plugin_virtual_printer_serial.log`` file
|
||||
that can be found in the OctoPrint settings folder.
|
||||
that can be found in the OctoPrint logs folder.
|
||||
|
||||
.. _sec-development-virtual-printer-debug:
|
||||
|
||||
|
||||
+97
-1
@@ -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,23 +206,30 @@ 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
|
||||
-------------
|
||||
|
||||
Upload
|
||||
A file has been uploaded through the web interface.
|
||||
A file has been uploaded through the :ref:`REST API <sec-api-fileops-uploadfile>`.
|
||||
|
||||
Payload:
|
||||
* ``name``: the file's name
|
||||
* ``path``: the file's path within its storage location
|
||||
* ``target``: the target storage location to which the file was uploaded, either ``local`` or ``sdcard``
|
||||
* ``select``: whether the file will immediately be selected, as requested on the API by the corresponding parameter
|
||||
* ``print``: whether the file will immediately start printing, as requested on the API by the corresponding parameter
|
||||
* ``userdata``: optional ``userdata`` if provided on the API, will only be present if supplied in the upload request
|
||||
|
||||
.. deprecated:: 1.3.0
|
||||
|
||||
* ``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.
|
||||
|
||||
@@ -223,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.
|
||||
|
||||
@@ -237,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.
|
||||
|
||||
@@ -250,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.
|
||||
|
||||
@@ -262,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.
|
||||
|
||||
@@ -276,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.
|
||||
@@ -290,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.
|
||||
|
||||
@@ -304,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.
|
||||
|
||||
@@ -318,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.
|
||||
|
||||
@@ -331,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.
|
||||
|
||||
@@ -362,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.
|
||||
|
||||
@@ -380,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.
|
||||
|
||||
@@ -397,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.
|
||||
|
||||
@@ -410,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.
|
||||
|
||||
@@ -440,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.
|
||||
|
||||
@@ -469,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.
|
||||
|
||||
@@ -486,6 +537,8 @@ 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
|
||||
|
||||
.. _sec-events-available_events-gcode_processing:
|
||||
|
||||
GCODE processing
|
||||
@@ -540,6 +593,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.
|
||||
@@ -549,6 +604,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
|
||||
@@ -574,6 +657,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.
|
||||
|
||||
@@ -666,6 +751,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.
|
||||
|
||||
@@ -674,6 +761,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.
|
||||
|
||||
@@ -682,6 +771,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
|
||||
@@ -693,6 +784,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
|
||||
@@ -704,3 +797,6 @@ PrinterProfileModified
|
||||
Payload:
|
||||
|
||||
* ``identifier``: the identifier of the modified printer profile
|
||||
|
||||
.. versionadded:: 1.3.12
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
Access Control
|
||||
==============
|
||||
|
||||
.. versionchanged:: 1.4.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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -210,20 +211,31 @@ Controls
|
||||
* - ``input.slider.step``
|
||||
- (Optional) Step size per slider "tick", defaults to 1.
|
||||
* - ``regex``
|
||||
- (Optional) A `regular expression <https://docs.python.org/2/library/re.html#regular-expression-syntax>`_ to
|
||||
- (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
|
||||
`Python Format String Syntax <https://docs.python.org/2/library/string.html#format-string-syntax>`_ for either named
|
||||
: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
|
||||
|
||||
@@ -18,13 +18,7 @@ simple "send-as-is" scripts but making use of a full blown templating language i
|
||||
this end, OctoPrint injects some variables into the :ref:`template rendering context <sec-features-gcode_scripts-context>`
|
||||
as described below.
|
||||
|
||||
You can find the docs on the Jinja templating engine as used in OctoPrint at `jinja.octoprint.org <http://jinja.octoprint.org/templates.html>`_.
|
||||
|
||||
.. note::
|
||||
|
||||
Due to backwards compatibility issues with Jinja versions 2.9+, OctoPrint currently only supports Jinja 2.8. For this
|
||||
reason use the template documentation at `jinja.octoprint.org <http://jinja.octoprint.org/templates.html>`_ instead of the
|
||||
documentation of current stable Jinja versions.
|
||||
You can find the docs on the Jinja templating engine as used in OctoPrint `here <https://jinja.palletsprojects.com/en/2.11.x/templates/>`_.
|
||||
|
||||
.. _sec-features-gcode_scripts-predefined:
|
||||
|
||||
@@ -190,7 +184,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.
|
||||
@@ -250,7 +244,6 @@ to the persisted pause position on resume, making sure to also reset the extrude
|
||||
|
||||
.. seealso::
|
||||
|
||||
`Jinja Template Designer Documentation <http://jinja.octoprint.org/templates.html>`_
|
||||
`Jinja Template Designer Documentation <https://jinja.palletsprojects.com/en/2.11.x/templates/>`_
|
||||
Jinja's Template Designer Documentation describes the syntax and semantics of the template language used
|
||||
also by OctoPrint's GCODE scripts. Linked here are the docs for Jinja 2.8.1, which OctoPrint still
|
||||
relies on for backwards compatibility reasons.
|
||||
also by OctoPrint's GCODE scripts.
|
||||
@@ -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.
|
||||
|
||||
@@ -28,7 +30,7 @@ Finding Plugins
|
||||
|
||||
The official OctoPrint Plugin Repository can be found at `plugins.octoprint.org <http://plugins.octoprint.org>`_.
|
||||
|
||||
Some plugins may also be found in the list provided in `the OctoPrint wiki <https://github.com/foosel/OctoPrint/wiki#plugins>`_
|
||||
Some plugins may also be found in the list provided in `the OctoPrint wiki <https://github.com/OctoPrint/OctoPrint/wiki#plugins>`_
|
||||
and on the `OctoPrint organization Github page <https://github.com/OctoPrint>`_.
|
||||
|
||||
.. _sec-features-plugins-installing:
|
||||
|
||||
@@ -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.
|
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 80 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 89 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 35 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 24 KiB |
@@ -144,7 +144,7 @@
|
||||
|
||||
Sets the current flowrate multiplier.
|
||||
|
||||
``factor`` is expected to be a integer value between 75 and 125 representing the new flowrate percentage.
|
||||
``factor`` is expected to be a integer value >0 representing the new flowrate percentage.
|
||||
|
||||
See the ``flowrate`` command in :ref:`Issue a tool command <sec-api-printer-toolcommand>` for more details.
|
||||
|
||||
@@ -325,7 +325,7 @@
|
||||
|
||||
Sets the feedrate multiplier to use.
|
||||
|
||||
``factor`` is expected to be a integer value between 0 and 200 representing the new feedrate percentage.
|
||||
``factor`` is expected to be a integer value >0 representing the new feedrate percentage.
|
||||
|
||||
See the ``feedrate`` command in :ref:`Issue a print head command <sec-api-printer-printheadcommand>` for more details.
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
OctoPrint.util.testUrl("127.0.0.1", 1234, {"protocol": "udp"})
|
||||
OctoPrint.util.testServer("127.0.0.1", 1234, {"protocol": "udp"})
|
||||
.done(function(response) {
|
||||
if (response.result) {
|
||||
// check passed
|
||||
@@ -203,6 +203,30 @@
|
||||
:param object opts: Additional options for the request
|
||||
:returns Promise: A `jQuery Promise <http://api.jquery.com/Types/#Promise>`_ for the request's response
|
||||
|
||||
.. js:function:: OctoPrintClient.util.testResolution(name, additional, opts)
|
||||
|
||||
Test if a host name can be resolved.
|
||||
|
||||
**Example**
|
||||
|
||||
Test if ``octoprint.org`` can be resolved.
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
OctoPrint.util.testResolution("octoprint.org")
|
||||
.done(function(response) {
|
||||
if (response.result) {
|
||||
// check passed
|
||||
} else {
|
||||
// check failed
|
||||
}
|
||||
});
|
||||
|
||||
:param string name: Host name to test
|
||||
:param object additional: Additional parameters for the test command
|
||||
:param object opts: Additional options for the request
|
||||
:returns Promise: A `jQuery Promise <http://api.jquery.com/Types/#Promise>`_ for the request's response
|
||||
|
||||
.. seealso::
|
||||
|
||||
:ref:`Util API <sec-api-util>`
|
||||
|
||||
-242
@@ -1,242 +0,0 @@
|
||||
@ECHO OFF
|
||||
|
||||
REM Command file for Sphinx documentation
|
||||
|
||||
if "%SPHINXBUILD%" == "" (
|
||||
set SPHINXBUILD=sphinx-build
|
||||
)
|
||||
set BUILDDIR=_build
|
||||
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
|
||||
set I18NSPHINXOPTS=%SPHINXOPTS% .
|
||||
if NOT "%PAPER%" == "" (
|
||||
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
|
||||
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
|
||||
)
|
||||
|
||||
if "%1" == "" goto help
|
||||
|
||||
if "%1" == "help" (
|
||||
:help
|
||||
echo.Please use `make ^<target^>` where ^<target^> is one of
|
||||
echo. html to make standalone HTML files
|
||||
echo. dirhtml to make HTML files named index.html in directories
|
||||
echo. singlehtml to make a single large HTML file
|
||||
echo. pickle to make pickle files
|
||||
echo. json to make JSON files
|
||||
echo. htmlhelp to make HTML files and a HTML help project
|
||||
echo. qthelp to make HTML files and a qthelp project
|
||||
echo. devhelp to make HTML files and a Devhelp project
|
||||
echo. epub to make an epub
|
||||
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
|
||||
echo. text to make text files
|
||||
echo. man to make manual pages
|
||||
echo. texinfo to make Texinfo files
|
||||
echo. gettext to make PO message catalogs
|
||||
echo. changes to make an overview over all changed/added/deprecated items
|
||||
echo. xml to make Docutils-native XML files
|
||||
echo. pseudoxml to make pseudoxml-XML files for display purposes
|
||||
echo. linkcheck to check all external links for integrity
|
||||
echo. doctest to run all doctests embedded in the documentation if enabled
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "clean" (
|
||||
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
|
||||
del /q /s %BUILDDIR%\*
|
||||
goto end
|
||||
)
|
||||
|
||||
|
||||
%SPHINXBUILD% 2> nul
|
||||
if errorlevel 9009 (
|
||||
echo.
|
||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||
echo.installed, then set the SPHINXBUILD environment variable to point
|
||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.http://sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if "%1" == "html" (
|
||||
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "dirhtml" (
|
||||
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "singlehtml" (
|
||||
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "pickle" (
|
||||
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; now you can process the pickle files.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "json" (
|
||||
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; now you can process the JSON files.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "htmlhelp" (
|
||||
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; now you can run HTML Help Workshop with the ^
|
||||
.hhp project file in %BUILDDIR%/htmlhelp.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "qthelp" (
|
||||
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
||||
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
||||
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\OctoPrint.qhcp
|
||||
echo.To view the help file:
|
||||
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\OctoPrint.ghc
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "devhelp" (
|
||||
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "epub" (
|
||||
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The epub file is in %BUILDDIR%/epub.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "latex" (
|
||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "latexpdf" (
|
||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
||||
cd %BUILDDIR%/latex
|
||||
make all-pdf
|
||||
cd %BUILDDIR%/..
|
||||
echo.
|
||||
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "latexpdfja" (
|
||||
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
||||
cd %BUILDDIR%/latex
|
||||
make all-pdf-ja
|
||||
cd %BUILDDIR%/..
|
||||
echo.
|
||||
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "text" (
|
||||
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The text files are in %BUILDDIR%/text.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "man" (
|
||||
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The manual pages are in %BUILDDIR%/man.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "texinfo" (
|
||||
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "gettext" (
|
||||
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "changes" (
|
||||
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.The overview file is in %BUILDDIR%/changes.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "linkcheck" (
|
||||
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Link check complete; look for any errors in the above output ^
|
||||
or in %BUILDDIR%/linkcheck/output.txt.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "doctest" (
|
||||
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Testing of doctests in the sources finished, look at the ^
|
||||
results in %BUILDDIR%/doctest/output.txt.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "xml" (
|
||||
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The XML files are in %BUILDDIR%/xml.
|
||||
goto end
|
||||
)
|
||||
|
||||
if "%1" == "pseudoxml" (
|
||||
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
|
||||
if errorlevel 1 exit /b 1
|
||||
echo.
|
||||
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
|
||||
goto end
|
||||
)
|
||||
|
||||
:end
|
||||
@@ -4,6 +4,7 @@ octoprint.plugin
|
||||
----------------
|
||||
|
||||
.. automodule:: octoprint.plugin
|
||||
:members:
|
||||
|
||||
.. _sec-modules-plugin-core:
|
||||
|
||||
@@ -11,6 +12,7 @@ octoprint.plugin.core
|
||||
---------------------
|
||||
|
||||
.. automodule:: octoprint.plugin.core
|
||||
:members:
|
||||
|
||||
.. _sec-modules-plugin-types:
|
||||
|
||||
@@ -18,3 +20,4 @@ octoprint.plugin.types
|
||||
----------------------
|
||||
|
||||
.. automodule:: octoprint.plugin.types
|
||||
:members:
|
||||
@@ -4,6 +4,7 @@ octoprint.printer
|
||||
-----------------
|
||||
|
||||
.. automodule:: octoprint.printer
|
||||
:members:
|
||||
|
||||
.. _sec-modules-printer-profile:
|
||||
|
||||
@@ -11,3 +12,4 @@ octoprint.printer.profile
|
||||
-------------------------
|
||||
|
||||
.. automodule:: octoprint.printer.profile
|
||||
:members:
|
||||
@@ -4,3 +4,4 @@ octoprint.settings
|
||||
------------------
|
||||
|
||||
.. automodule:: octoprint.settings
|
||||
:members:
|
||||
@@ -4,10 +4,12 @@ octoprint.slicing
|
||||
-----------------
|
||||
|
||||
.. automodule:: octoprint.slicing
|
||||
:members:
|
||||
|
||||
.. _sec-modules-slicing-exceptions:
|
||||
|
||||
octoprint.slicing.exceptions
|
||||
----------------------------
|
||||
|
||||
.. automodule:: octoprint.slicing.exceptions
|
||||
.. automodule:: octoprint.slicing.exceptions
|
||||
:members:
|
||||
@@ -13,3 +13,11 @@ octoprint.util.commandline
|
||||
|
||||
.. automodule:: octoprint.util.commandline
|
||||
:members:
|
||||
|
||||
.. _sec-modules-util-platform:
|
||||
|
||||
octoprint.util.platform
|
||||
-----------------------
|
||||
|
||||
.. automodule:: octoprint.util.platform
|
||||
:members:
|
||||
@@ -14,7 +14,7 @@ First of all let use make sure that you have OctoPrint checked out and set up fo
|
||||
development environment::
|
||||
|
||||
$ cd ~/devel
|
||||
$ git clone https://github.com/foosel/OctoPrint
|
||||
$ git clone https://github.com/OctoPrint/OctoPrint
|
||||
[...]
|
||||
$ cd OctoPrint
|
||||
$ virtualenv venv
|
||||
@@ -143,7 +143,7 @@ as a simple python file following the naming convention ``<plugin identifier>.py
|
||||
that can be done in one file. Distributing multiple files and getting your users to install them in the right way
|
||||
so that OctoPrint will be able to actually find and load them is certainly not impossible, but we want to do it in the
|
||||
best way possible, meaning we want to make our plugin a fully installable Python module that your users will be able to
|
||||
install directly via `OctoPrint's built-in Plugin Manager <https://github.com/foosel/OctoPrint/wiki/Plugin:-Plugin-Manager>`_
|
||||
install directly via `OctoPrint's built-in Plugin Manager <https://docs.octoprint.org/en/master/bundledplugins/pluginmanager.html>`_
|
||||
or alternatively manually utilizing Python's standard package manager ``pip`` directly.
|
||||
|
||||
So let's begin. We'll use the `cookiecutter <https://github.com/audreyr/cookiecutter>`_ template for OctoPrint plugins
|
||||
@@ -1091,7 +1091,7 @@ you haven't seen yet, :ref:`take a look at the available plugin mixins <sec-plug
|
||||
|
||||
For some insight on how to create plugins that react to various events within OctoPrint,
|
||||
`the Growl Plugin <https://github.com/OctoPrint/OctoPrint-Growl>`_ might be a good example to learn from. For how to
|
||||
add support for a slicer, OctoPrint's own bundled `CuraEngine plugin <https://github.com/foosel/OctoPrint/wiki/Plugin:-Cura>`_
|
||||
add support for a slicer, the `CuraEngine Legacy plugin <https://github.com/OctoPrint/OctoPrint-CuraEngineLegacy>`_
|
||||
might give some hints. For extending OctoPrint's interface, the `NavbarTemp plugin <https://github.com/imrahil/OctoPrint-NavbarTemp>`_
|
||||
might show what's possible with a few lines of code already. Finally, just take a look at the
|
||||
`official Plugin Repository <http://plugins.octoprint.org>`_ if you are looking for examples.
|
||||
|
||||
@@ -7,7 +7,7 @@ Helpers are methods that plugins can expose to other plugins in order to make co
|
||||
system. They are registered with the OctoPrint plugin system through the use of the control property ``__plugin_helpers__``.
|
||||
|
||||
An example for providing some helper functions to the system can be found in the
|
||||
`Discovery Plugin <https://github.com/foosel/OctoPrint/wiki/Plugin:-Discovery>`_,
|
||||
`Discovery Plugin <https://docs.octoprint.org/en/master/bundledplugins/discovery.html>`_,
|
||||
which provides its SSDP browsing and Zeroconf browsing and publishing functions as helper methods.
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
+185
-13
@@ -65,7 +65,7 @@ the general type of script for which to look for additions ("gcode") and the scr
|
||||
return a 2-tuple of prefix and postfix if has something for either of those, otherwise ``None``. OctoPrint will then take
|
||||
care to add prefix and suffix as necessary after a small round of preprocessing.
|
||||
|
||||
Plugins can easily add their own hooks too. For example, the `Software Update Plugin <https://github.com/foosel/OctoPrint/tree/master/src/octoprint/plugins/softwareupdate>`_
|
||||
Plugins can easily add their own hooks too. For example, the `Software Update Plugin <https://docs.octoprint.org/en/master/bundledplugins/softwareupdate.html>`_
|
||||
declares a custom hook "octoprint.plugin.softwareupdate.check_config" which other plugins can add handlers for in order
|
||||
to register themselves with the Software Update Plugin by returning their own update check configuration.
|
||||
|
||||
@@ -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.
|
||||
@@ -215,7 +217,7 @@ octoprint.access.permissions
|
||||
fields are as follows:
|
||||
|
||||
* ``key``: A key for the permission to be used for referring to it from source code. This will turned uppercase
|
||||
and prefixed with ``PLUGIN_<PLUGIN IDENTIFIER>_`` before being made available on ``octoprint.access.permissions.Permissions``,
|
||||
and prefixed with ``PLUGIN_<PLUGIN IDENTIFIER>_`` before being made available on ``octoprint.access.permissions.Permissions``,
|
||||
e.g. ``my_permission`` on the plugin with identifier ``example`` turns into ``PLUGIN_EXAMPLE_MY_PERMISSION`` and
|
||||
can be accessed as ``octoprint.access.permissions.Permissions.PLUGIN_EXAMPLE_MY_PERMISSION`` on the server and
|
||||
``permissions.PLUGIN_EXAMPLE_MY_PERMISSION`` on the ``AccessViewModel`` on the client. Must only contain a-z, A-Z, 0-9 and _.
|
||||
@@ -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
|
||||
@@ -472,16 +482,18 @@ octoprint.comm.protocol.firmware.info
|
||||
This includes I/O of any kind.
|
||||
|
||||
:param object comm_instance: The :class:`~octoprint.util.comm.MachineCom` instance which triggered the hook.
|
||||
:param str firmware_name: The name of the parsed capability
|
||||
:param str firmware_name: The parsed name of the firmware
|
||||
:param dict firmware_data: All data contained in the ``M115`` report
|
||||
|
||||
.. _sec-plugins-hook-comm-protocol-firmware-capabilities:
|
||||
|
||||
octoprint.comm.firmware.protocol.capabilities
|
||||
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.firmware.protocol.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.
|
||||
|
||||
@@ -890,6 +921,27 @@ octoprint.comm.protocol.temperatures.received
|
||||
:tab-width: 4
|
||||
:caption: `sanitize_temperatures.py <https://github.com/OctoPrint/Plugin-Examples/blob/master/sanitize_temperatures.py>`_
|
||||
|
||||
.. _sec-plugins-hook-comm-transport-serial-additonal-port-names:
|
||||
|
||||
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.
|
||||
|
||||
Useful in combination with :ref:`octoprint.comm.transport.serial.factory <sec-plugins-hook-comm-transport-serial-factory>`
|
||||
to implement custom serial-like ports through plugins.
|
||||
|
||||
For an example of use see the bundled ``virtual_printer`` plugin.
|
||||
|
||||
:param list candidates: The port names already found on the system available for connection.
|
||||
:return: Additional port names to offer up for connection.
|
||||
:rtype: list
|
||||
|
||||
.. _sec-plugins-hook-comm-transport-serial-factory:
|
||||
|
||||
octoprint.comm.transport.serial.factory
|
||||
@@ -897,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``.
|
||||
|
||||
@@ -907,21 +961,21 @@ octoprint.comm.transport.serial.factory
|
||||
closely if directly utilizing :class:`~octoprint.util.comm.MachineCom` functionality.
|
||||
|
||||
A valid serial instance is expected to provide the following methods, analogue to PySerial's
|
||||
`serial.Serial <https://pythonhosted.org//pyserial/pyserial_api.html#serial.Serial>`_:
|
||||
:py:class:`serial.Serial`:
|
||||
|
||||
readline(size=None, eol='\n')
|
||||
Reads a line from the serial connection, compare `serial.Filelike.readline <https://pythonhosted.org//pyserial/pyserial_api.html#serial.FileLike.readline>`_.
|
||||
Reads a line from the serial connection, compare :py:meth:`serial.Serial.readline`.
|
||||
write(data)
|
||||
Writes data to the serial connection, compare `serial.Filelike.write <https://pythonhosted.org//pyserial/pyserial_api.html#serial.FileLike.write>`_.
|
||||
Writes data to the serial connection, compare :py:meth:`serial.Serial.write`.
|
||||
close()
|
||||
Closes the serial connection, compare `serial.Serial.close <https://pythonhosted.org//pyserial/pyserial_api.html#serial.Serial.close>`_.
|
||||
Closes the serial connection, compare :py:meth:`serial.Serial.close`.
|
||||
|
||||
Additionally setting the following attributes need to be supported if baudrate detection is supposed to work:
|
||||
|
||||
baudrate
|
||||
An integer describing the baudrate to use for the serial connection, compare `serial.Serial.baudrate <https://pythonhosted.org//pyserial/pyserial_api.html#serial.Serial.baudrate>`_.
|
||||
An integer describing the baudrate to use for the serial connection, compare :py:attr:`serial.Serial.baudrate`.
|
||||
timeout
|
||||
An integer describing the read timeout on the serial connection, compare `serial.Serial.timeout <https://pythonhosted.org//pyserial/pyserial_api.html#serial.Serial.timeout>`_.
|
||||
An integer describing the read timeout on the serial connection, compare :py:attr:`serial.Serial.timeout`.
|
||||
|
||||
**Example:**
|
||||
|
||||
@@ -973,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
|
||||
@@ -1001,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
|
||||
@@ -1039,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
|
||||
@@ -1075,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
|
||||
@@ -1102,11 +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-backup-excludes:
|
||||
|
||||
octoprint.plugin.backup.additional_excludes
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 1.5.0
|
||||
|
||||
See :ref:`here <sec-bundledplugins-backup-hooks-excludes>`.
|
||||
|
||||
.. _sec-plugins-hook-plugin-loginui-theming:
|
||||
|
||||
octoprint.plugin.loginui.theming
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. versionadded:: 1.4.0
|
||||
|
||||
See :ref:`here <sec-bundledplugins-loginui-hooks-theming>`.
|
||||
|
||||
.. _sec-plugins-hook-plugin-pluginmanager-reconnect:
|
||||
@@ -1114,6 +1187,8 @@ See :ref:`here <sec-bundledplugins-loginui-hooks-theming>`.
|
||||
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:
|
||||
@@ -1121,8 +1196,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
|
||||
@@ -1130,6 +1236,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.
|
||||
|
||||
@@ -1161,6 +1269,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,
|
||||
@@ -1207,6 +1317,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``
|
||||
@@ -1292,6 +1404,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.
|
||||
@@ -1307,6 +1421,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.
|
||||
@@ -1322,6 +1438,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.
|
||||
@@ -1337,6 +1455,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.
|
||||
|
||||
@@ -1379,6 +1499,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
|
||||
@@ -1446,6 +1568,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
|
||||
@@ -1458,6 +1582,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``
|
||||
@@ -1477,6 +1603,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.
|
||||
@@ -1497,6 +1625,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.
|
||||
|
||||
@@ -1523,6 +1653,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.
|
||||
@@ -1629,6 +1761,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
|
||||
@@ -1636,6 +1804,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.
|
||||
@@ -1651,6 +1821,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.
|
||||
|
||||
@@ -22,7 +22,7 @@ An overview of these properties follows.
|
||||
data files etc). Plugins should not access this property directly but instead utilize :func:`~octoprint.plugin.types.OctoPrintPlugin.get_plugin_data_folder`
|
||||
which will make sure the path actually does exist and if not create it before returning it.
|
||||
``self._logger``
|
||||
A `python logger instance <https://docs.python.org/2/library/logging.html>`_ logging to the log target
|
||||
A :py:class:`logging.Logger` instance logging to the log target
|
||||
``octoprint.plugin.<plugin identifier>``.
|
||||
``self._settings``
|
||||
The plugin's personalized settings manager, injected only into plugins that include the :class:`~octoprint.plugin.SettingsPlugin` mixin.
|
||||
|
||||
@@ -70,7 +70,7 @@ Then create an editable install of your plugin, start the server and start testi
|
||||
|
||||
.. note::
|
||||
|
||||
If you want to migrate your existing OctoPrint install *on OctoPi* to Python 3, I suggest to first make a
|
||||
If you want to migrate your existing OctoPrint install *on OctoPi 0.17.0* to Python 3, I suggest to first make a
|
||||
:ref:`backup <sec-bundledplugins-backup>`, then move the existing venv ``/home/pi/oprint`` out of the way and
|
||||
create a new one based on Python 3 (which should already be present on current OctoPi images):
|
||||
|
||||
@@ -79,7 +79,7 @@ Then create an editable install of your plugin, start the server and start testi
|
||||
mv ~/oprint ~/oprint.py2
|
||||
virtualenv --python=/usr/bin/python3 oprint
|
||||
source ~/oprint/bin/activate
|
||||
pip install "OctoPrint>=1.4.0rc1"
|
||||
pip install "OctoPrint>=1.4.0"
|
||||
sudo service octoprint restart
|
||||
|
||||
.. _sec-plugins-python3-markup:
|
||||
@@ -218,7 +218,7 @@ You can read more about this specific issue in the corresponding section of the
|
||||
`Python porting guide <https://docs.python.org/3/howto/pyporting.html#text-versus-binary-data>`__ and also in the
|
||||
`cheat sheet <https://python-future.org/compatible_idioms.html#strings-and-bytes>`__.
|
||||
|
||||
.. _sec-plugins-python3-pitfalls-imports:
|
||||
.. _sec-plugins-python3-pitfalls-absolute-imports:
|
||||
|
||||
Absolute imports
|
||||
................
|
||||
@@ -246,6 +246,33 @@ You can read more about this specific issue in the
|
||||
`cheat sheet <https://python-future.org/compatible_idioms.html#imports-relative-to-a-package>`__ and also in
|
||||
`the book <http://python3porting.com/problems.html#relative-import-problems>`__.
|
||||
|
||||
.. _sec-plugins-python3-pitfalls-version-specific-imports:
|
||||
|
||||
Version specific imports
|
||||
........................
|
||||
|
||||
Sometimes it is necessary to use an import statement that is explicitly related to a specific Python version, e.g. due to
|
||||
a package change between Python 2 and 3. You can do this by first trying the Python 3 import and if that doesn't work
|
||||
out trying the Python 2 import instead:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
try:
|
||||
import queue
|
||||
except ImportError:
|
||||
import Queue as queue
|
||||
|
||||
This should be the preferred method of handling situations like this. If you actually do need to do explicit version
|
||||
specific imports that cannot be handled this way, you can check for the Python version like this:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import sys
|
||||
if sys.version[0] == '2':
|
||||
# Python 2 specific imports
|
||||
else:
|
||||
# Python 3 specific imports
|
||||
|
||||
.. _sec-plugins-python3-pitfalls-intdiv:
|
||||
|
||||
Integer division
|
||||
@@ -312,13 +339,14 @@ As a summary, follow this checklist to migrate your plugin to be compatible to b
|
||||
* Thorougly test your plugin under Python 3. Pay special attention to any kind of string handling issues, integer
|
||||
division, relative imports from your plugin package and how the results of ``map``, ``filter`` and ``zip`` are
|
||||
used in your code, as those have proven to be the biggest issues during past migrations.
|
||||
* Once everything works under both Python versions and you've prepared a new release of your plugin, update your
|
||||
registration file in the Official Plugin Repository to include the correct Python compatibility information as well:
|
||||
* Once everything works under both Python versions and you've prepared a new release of your plugin (don't forget to
|
||||
increment the version!), update your registration file in the Official Plugin Repository to include the correct
|
||||
Python compatibility information as well:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
compatibility:
|
||||
python: ">=2.7,<3"
|
||||
python: ">=2.7,<4"
|
||||
|
||||
.. _sec-plugins-python3-furtherreading:
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -438,7 +443,7 @@ Web interface reconnect
|
||||
|
||||
.. seealso::
|
||||
|
||||
`OctoPrint's core viewmodels <https://github.com/foosel/OctoPrint/tree/devel/src/octoprint/static/js/app/viewmodels>`_
|
||||
`OctoPrint's core viewmodels <https://github.com/OctoPrint/OctoPrint/tree/master/src/octoprint/static/js/app/viewmodels>`_
|
||||
OctoPrint's own view models use the same mechanisms for interacting with each other and the web application as
|
||||
plugins. Their source code is therefore a good point of reference on how to achieve certain things.
|
||||
`KnockoutJS documentation <http://knockoutjs.com/documentation/introduction.html>`_
|
||||
|
||||
+217
-192
@@ -2,17 +2,15 @@
|
||||
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.nodes import General, FixedTextElement, literal_block, container
|
||||
from docutils import nodes
|
||||
from docutils.parsers.rst import directives
|
||||
|
||||
from six import text_type
|
||||
@@ -22,237 +20,264 @@ from pygments.filters import VisibleWhitespaceFilter, ErrorToken
|
||||
from pygments.lexers.python import PythonConsoleLexer
|
||||
from pygments.util import ClassNotFound
|
||||
|
||||
if False:
|
||||
# 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(General, 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.
|
||||
"""
|
||||
|
||||
@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 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.
|
||||
"""
|
||||
|
||||
@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):
|
||||
# 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, 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, 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"}
|
||||
Loaded 100 of 657 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user