Working Notes - CodeClubLuxembourg/plottybot-toolkit-web GitHub Wiki
**Just writing (raw) here stuff done while building the scratch env. **
``---- wget https://github.com/CodeClubLuxembourg/codeclub-scratch-mod/releases/download/v1.0.0/scratch-gui-build.tar.gz
cd /var/www/html/``
sudo mkdir scratch
cd test/
tar -xzvf ../scratch-gui-build.tar.gz
sudo mv scratch-gui/build/* /var/www/html/scratch/
cd scratch-gui/build/
cd /var/www/html/scratch/
cat /var/log/apache2/error.log
rm scratch-gui-build.tar.gz
scp [email protected]:/home/michael/scratch/codeclub-scratch-mod/scratch-gui-build.tar.gz .
---
pi@plottybot:~/test/t $ ls
scratch-gui
pi@plottybot:~/test/t $ rm -r scratch-gui/
tar -xzvf ../scratch-gui-build.tar.gz
tar -xzvf ../scratch-gui-build.tar.gz
scratch-gui/build/
scratch-gui/build/index.html
scratch-gui/build/lib.min.js.map
scratch-gui/build/extension-worker.js.map
scratch-gui/build/static/
scratch-gui/build/static/assets/
scratch-gui/build/static/assets/e195e0b2926dc575a8f05c44ab9eb2d4.png
scratch-gui/build/static/assets/10a6126b7bc54305463d0488d7b8c67e.svg
scratch-gui/build/static/assets/ed8a6dddc7b55ce8a0bcaee2d3affb80.png
scratch-gui/build/chunks/uk-steps.js
scratch-gui/build/compatibility-testing.html
pi@plottybot:~/test/t $
pi@plottybot:~/test/t $ sudo rm -r /var/www/html/scratch
pi@plottybot:~/test/t $ sudo mkdir /var/www/html/scratch
pi@plottybot:~/test/t $ sudo mv scratch-gui/build/* /var/www/html/scratch/
pi@plottybot:~/test/t $ sudo poweroff
------
michaelstilmant@Michaels-Mac-mini ~ % scp [email protected]:/home/michael/scratch/codeclub-scratch-mod/scratch-gui-build.tar.gz .
michaelstilmant@Michaels-Mac-mini ~ % cd Desktop/codeclub/plottybot
michaelstilmant@Michaels-Mac-mini plottybot % ls
git plottybot.psd plottybot_blok.png
gondola_plottybot_2023-01-31.img plottybot.svg scratch-gui-build.tar.gz
plottybot-origina.png plottybot_2021-04-22.img test
plottybot-small.svg plottybot_arm.png ubuntu-22.04.3-live-server-amd64.iso
plottybot.png plottybot_base.png
michaelstilmant@Michaels-Mac-mini plottybot % mv scratch-gui-build.tar.gz scratch-gui-build_1_0_0.tar.gz
michaelstilmant@Michaels-Mac-mini plottybot % scp [email protected]:/home/michael/scratch/codeclub-scratch-mod/scratch-gui-build.tar.gz .
----
michaelstilmant@Michaels-Mac-mini plottybot % ssh [email protected]
michael@nestor:~$
cd scratch-gui/ npm install npm cache clean --force npm install --only=prod npm install -g husky npm install --only=prod cat package.json nano package.json npm install --only=prod 39 cd .. 40 cd scratch-vm/ 41 npm build 42 npm run build 43 cd .. 44 cd scratch-gui/ 45 npm link ../scratch-vm 46 sudo npm link ../scratch-vm 47 sudo npm install --only=prod 48 sudo npm link ../scratch-vm 49 sudo npm install --no-optional 50 node -v 51 CHROMEDRIVER_SKIP_DOWNLOAD=true npm install 52 node -v
73 ls
74 cd scratch/ls
75 cd scratch/
76 ls
77 cd scratch-vm
78 npm run watch
79 ls
80 cd scratch/
81 ls
82 cd plottyconf/
83 node index.js
84 npm install cors
85 node index.js
86 sudo poweroff
87 cd scratch/
88 ls
89 cd scratch-gui
90 npm start
91 ping 192.168.178.104
92 telnet 192.168.178.104 8766
93 cd scratch/
94 cd scratch-vm/
95 npm watch
96 npm run watch
97 ls
98 cd src/extensions/
99 ls
100 git status
101 mkdir scratch3_plottybot
102 cp scratch3_pen/index.js scratch3_plottybot/.
103 npm run watch
104 cd scratch/scratch-gui/
105 npm start
106 cat /proc/sys/fs/inotify/max_user_watches
107 sudo nano /etc/sysctl.conf
108 sudo sysctl -p
109 cat /proc/sys/fs/inotify/max_user_watches
110 npm start
111 cd scratch/
112 ls
113 cd plottyconf/
114 ls
115 node devices.json
116 ls
117 node index.js
118 sudo halt
119 cd scratch/scratch-vm
120 npm run watch
121 ls
122 cd scratch/
123 ls
124 cd plottyconf
125 ls
126 node index.js
127 npm install pm2 -g
128 sudo npm install pm2 -g
129 cd ..
130 ls
131 cd scratch-gui
132 ls
133 cat node_modules/
134 cd node_modules/
135 ls
136 ls -l ls\ -l\ |\ grep\ scratch-vm
137 ls -l | grep scratch-vm
138 sudo npm install -g serve
139 cd ..
140 cd ../scratch-vm
141 ls
142 npm run build
143 cd ../scratch-gui
144 npm run build
145 cd
146 pm2 start serve -name "scratch-gui" -- -s ~/scratch/scratch-gui/build/ -p 8601
147 ls
148 cd scratch/plottyconf/
149 ls
150 pm2 start index.js --name "plottyconf"
151 pm2 delete -a
152 pm2 restart '-a' --name scratch-gui
153 pm2 restart '-a' --name scratch-gui
154 pm2 list
155 pm2 delete "-a"
156 pm2 delete '-a'
157 pm2 delete 0
158 pm2 start serve --name "scratch-gui" -- -s ~/scratch/scratch-gui/build/ -p 8601
159 pm2 list
160 cd
161 ls
162 ls -la
163 cat scratch-gui
164 pmé logs scratch-gui
165 pm2 logs scratch-gui
166 npm install -g http-server
167 sudp npm install -g http-server
168 sudo npm install -g http-server
169 pm2 list
170 pm2 delete 2
171 pm2 start http-server --name "scratch-gui" -- ~/scratch/scratch-gui/build/ -p 8601
172 pm2 list
173 pm2 logs scratch-gui
174 cd scratch/
175 ls
176 cd scratch-gui/build/
177 ls
178 ls )la
179 ls -la
180 cd static/
181 ls
182 cd ..
183 ls
184 pm2 list
185 pm2 stop all
186 cd ..
187 npm start
188 sudo poweroff
189 ls
190 mkdir test
191 cd test
192 ls
193 git clone https://github.com/scratchfoundation/scratch-vm.git
194 git status
195 git checkout PenExtensionWebsocket
196 git merge --no-ff scratchfoundation-develop
197 cd ..
198 ls
199 cd scratch/
200 ls
201 cd scratch-vm/
202 ls
203 history
204 cd ..
205 cd scratch-gui
206 git status
207 cd ..
208 cd scratch-vm/
209 ls
210 git status
211 git diff
212 ls
213 git status
214 git diff src/extensions/scratch3_pen/index.js
215 ls
216 git statu
217 git status
218 git diff src/extension-support/extension-manager.js
219 git status
220 mkdir ../temp
221 mkdir ../temp/vm
222 cp package-lock.json ../temp/vm/.
223 cp src/extension-support/extension-manager.js ../temp/vm/.
224 cp src/extensions/scratch3_pen/index.js ../temp/vm/.
225 cd ..
226 ls
227 cd temp/
228 cd vm/
229 ls
230 cd ..
231 cd scratch-vm/
232 ls
233 git status
234 git config user.email
235 git config user.name
236 git config --global user.name
237 git config --global user.email
238 git status
239 history | grep git
240 ls
241 git status
242 git add .
243 git status
244 git commit -m "First version of the plottybot extension. Pen extension is in transition phase and need to be restored properly since we can now make independent extensions"
245 git config --global user.email "[email protected]"
246 git config --global user.nale "Michaël Stilmant"
247 git commit -m "First version of the plottybot extension. Pen extension is in transition phase and need to be restored properly since we can now make independent extensions"
248 git commit
249 git fetch origin
250 git status
251 git rebase origin/PenExtensionWebsocket
252 git status
253 git checkout 416f955d -- package-lock.json
254 git status
255 git rebase --continue
256 y
257 git status
258 git push
259 git status
260 git pull
261 git hisotry
262 git history
263 git log
264 ls
265 npm install
266 npm run watch
267 cd ..
268 ls
269 cd scratch-gui/
270 git status
271 git pull
272 git status
273 git diff package.json
274 ls
275 history | grep git
276 git status
277 mkdir ../temp/gui
278 cp package.json ../temp/gui/.
279 cp src/lib/default-project/project-data.js ../temp/gui/.
280 cp src/lib/libraries/extensions/index.jsx ../temp/gui/.
281 git remote add fork https://github.com/CodeClubLuxembourg/scratch-gui.git
282 git checkout -b codeclub
283 git status
284 git add
285 git add .
286 git status
287 git commit
288 git push -u fork codeclub
289 cd ..
290 cd scratch-vm/
291 git status
292 git branch -m codeclub
293 git push origin --delete PenExtensionWebsocket
294 git push origin codeclub
295 git push origin -u codeclub
296 git status
297 cd ..
298 cd scratch-gui/
299 ls
300 npm install
301 npm start
302 npm build
303 npm run build
304 cd build/
305 ms
306 ls
307 cat 30d09ba32a17082ef820b57d52d60b7b.hex
308 ls
309 cd ..
310 ls
311 mkdir codeclub-scratch-mod
312 cd codeclub-scratch-mod/
313 tar -czvf scratch-gui-build.tar.gz ../scratch-gui/build/
314 ls
315 scp scratch-gui-build.tar.gz [email protected]:/Users/michaelstilmant/Desktop/codeclub/plottybot/
316 pwd
317 sudo poweroff
318 poweroff
319 sudo poweroff
320 ls
321 ls -la
322 cat scratch-gui
323 ls
324 ls -la
325 rm scratch-gui
326 cd scratch/
327 ls
328 cd scratch-gui/
329 npm start
330 cd ../scratch-vm
331 npm link
332 cd ../scratch-gui/
333 npm link scratch-vm
334 npm start
335 npm build
336 npm run build
337 history
338 cd
339 cd scratch/codeclub-scratch-mod/
340 ls
341 mv scratch-gui-build.tar.gz scratch-gui-build-1_0_0.tar.gz
342 tar -czvf scratch-gui-build.tar.gz ../scratch-gui/build/
343 cd ..
344 ls
345 ping plottybot.local
346 ping plotty.local
347 sudo poweroff
348 ls /mnt/
349 mkdir /mnt/image
350 sudo mkdir /mnt/image
351 ls
352 sudo mount -o loop plottybot_2021-04-22.img /mnt/image
353 sudo fdisk -l plottybot_2021-04-22.img
354 offset=$(expr 532480 * 512)
355 echo offset
356 sudo mount -o loop,offset=$offset plottybot_2021-04-22.img /mnt/image
357 cd /mnt/image/
358 ls
359 cd
360 ls
361 mkdir plottybot
362 cd plottybot/
363 ls
364 mkdir PlottyControlWeb
365 cd PlottyControlWeb/
366 cp /mnt/image/var/_var_www_html/* .
367 cp -r /mnt/image/var/_var_www_html/* .
368 ls
369 cat /mnt/image/var/_var_www_html/.DS_Store
370 ls /mnt/image/var/_var_www_html/webfonts/
371 ls /mnt/image/var/_var_www_html/webfonts/ -la
372 cd ..
373 ls
374 cd PlottyControlWeb/
375 ls
376 ls /mnt/image/root/
377 sudo ls /mnt/image/root/
378 sudo cat /mnt/image/etc/rc.local
379 cd ..
380 mkdir PlottyDriverPy
381 cd PlottyDriverPy/
382 cp /mnt/image/usr/local/bin/plottybot.py .
383 ls
384 cd ..
385 ls
386 cd PlottyControlWeb/
387 git init
388 ls
389 rm -r .git
390 cd ..
391 mkdir git
392 git clone https://github.com/CodeClubLuxembourg/PlottyControlWeb.git
393 cd git
394 git clone https://github.com/CodeClubLuxembourg/PlottyControlWeb.git
395 cd PlottyControlWeb/
396 mv -r ../../PlottyControlWeb/* .
397 mv ../../PlottyControlWeb/* .
398 ls -la
399 git add .
400 git commit -m "Added project files"
401 ls -la
402 git push origin main
403 cd ..
404 ls
405 cd ..
406 ls
407 cd git
408 git clone https://github.com/CodeClubLuxembourg/PlottyDriverPy.git
409 cd PlottyDriverPy/
410 ls
411 mv ../../PlottyDriverPy/* .
412 ls
413 git add .
414 history
at this point I used ben img to mount gondola and plotty bit version ot have both on git
michaelstilmant@Michaels-Mac-mini ~ % sudo brew services start php michaelstilmant@Michaels-Mac-mini ~ % ls /usr/local/opt/php/lib/httpd/modules michaelstilmant@Michaels-Mac-mini Documents % tail -f /var/log/apache2/error_log michaelstilmant@Michaels-Mac-mini Documents % php -S localhost:8080 [Mon Nov 6 19:24:04 2023] PHP 8.2.12 Development Server (http://localhost:8080) started [Mon Nov 6 19:24:23 2023] [::1]:59211 Accepted [Mon Nov 6 19:24:23 2023] [::1]:59212 Accepted [Mon Nov 6 19:24:23 2023] [::1]:59211 [200]: GET /phpinfo.php [Mon Nov 6 19:24:23 2023] [::1]:59211 Closing [Mon Nov 6 19:24:23 2023] [::1]:59212 [404]: GET /favicon.ico - No such file or directory [Mon Nov 6 19:24:23 2023] [::1]:59212 Closing michaelstilmant@Michaels-Mac-mini Documents % sudo brew services start php michaelstilmant@Michaels-Mac-mini ~ % cd Desktop/codeclub michaelstilmant@Michaels-Mac-mini codeclub % cd plottybot michaelstilmant@Michaels-Mac-mini plottybot % ls IMG ISO assets git scratch mod release michaelstilmant@Michaels-Mac-mini plottybot % cd git michaelstilmant@Michaels-Mac-mini git % ls ArtifyZone Drawing-Robot PlottyBotEmulator PlottyDriverPy michaelstilmant@Michaels-Mac-mini git % git clone https://github.com/CodeClubLuxembourg/PlottybotSettingsWeb.git
[Mon Nov 6 20:27:39 2023] PHP 8.2.12 Development Server (http://localhost:8080) started
michaelstilmant@Michaels-Mac-mini PlottybotSettingsWeb % php -S localhost:8080 router.php
michaelstilmant@Michaels-Mac-mini PlottybotSettingsWeb % ls
README.md api.php devices.json devices.php router.php
michaelstilmant@Michaels-Mac-mini git % php -S localhost:8080michaelstilmant@Michaels-Mac-mini ~ % cd /Users/michaelstilmant/Desktop/codeclub/plottybot/git/Drawing-Robot/plottybot ; /usr/bin/env /usr/local/bin/python3 /Users/michaelstilmant/.vscode/extensions/ms-python.python-2023.20.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher 63041 -- /Users/michaelstilmant/Desktop/codeclub/plottybot/git/Drawing-Robot/plottybot/plottybot_emulator.py