mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:17:01 +00:00
Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51cf60dfc1 | ||
|
|
a441a62417 | ||
|
|
b1e7f6c8d3 | ||
|
|
9f0b5c4156 | ||
|
|
06458f0283 | ||
|
|
b0973e2ad4 | ||
|
|
5deffe0ef4 | ||
|
|
770a04eaca | ||
|
|
93cebf337e | ||
|
|
03c76ebcd7 | ||
|
|
13c047c8d4 | ||
|
|
b34df6d682 | ||
|
|
3cb9a007f2 | ||
|
|
ab37382fa8 | ||
|
|
a5766b5e6a | ||
|
|
a37d349cd4 | ||
|
|
16ac26e2bd | ||
|
|
f9fa18585f | ||
|
|
1927d1222d | ||
|
|
bf396ef4ba | ||
|
|
adb57f5ee8 | ||
|
|
81297b724f | ||
|
|
50f8f989c7 | ||
|
|
0bb365cadb | ||
|
|
98a108f1f6 | ||
|
|
429b98ab00 | ||
|
|
e60b50b9e1 | ||
|
|
ef76f6db50 | ||
|
|
f3d6218a7b | ||
|
|
55d8b8b120 | ||
|
|
8bc01f4d02 | ||
|
|
1e67ea4645 | ||
|
|
5b2394a325 | ||
|
|
3a4d5d449a |
147
.VSCodeCounter/2025-09-09_16-55-56/details.md
Normal file
147
.VSCodeCounter/2025-09-09_16-55-56/details.md
Normal file
@@ -0,0 +1,147 @@
|
||||
# Details
|
||||
|
||||
Date : 2025-09-09 16:55:56
|
||||
|
||||
Directory d:\\Projects\\Lua\\LeonOS\\leonos
|
||||
|
||||
Total : 132 files, 11040 codes, 1124 comments, 2344 blanks, all 14508 lines
|
||||
|
||||
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
|
||||
## Files
|
||||
| filename | language | code | comment | blank | total |
|
||||
| :--- | :--- | ---: | ---: | ---: | ---: |
|
||||
| [.github/workflows/release.yml](/.github/workflows/release.yml) | YAML | 44 | 2 | 5 | 51 |
|
||||
| [.trae/rules/project_rules.md](/.trae/rules/project_rules.md) | Markdown | 4 | 0 | 0 | 4 |
|
||||
| [NEW_COMMANDS_SUGGESTIONS.md](/NEW_COMMANDS_SUGGESTIONS.md) | Markdown | 54 | 0 | 13 | 67 |
|
||||
| [README.md](/README.md) | Markdown | 6 | 0 | 1 | 7 |
|
||||
| [data/computercraft/lua/bios.lua](/data/computercraft/lua/bios.lua) | Lua | 150 | 7 | 29 | 186 |
|
||||
| [data/computercraft/lua/packages/example-pkg/1.0.0/example.lua](/data/computercraft/lua/packages/example-pkg/1.0.0/example.lua) | Lua | 22 | 1 | 2 | 25 |
|
||||
| [data/computercraft/lua/packages/example-pkg/1.0.0/package.json](/data/computercraft/lua/packages/example-pkg/1.0.0/package.json) | JSON | 11 | 0 | 0 | 11 |
|
||||
| [data/computercraft/lua/packages/installed.json](/data/computercraft/lua/packages/installed.json) | JSON | 3 | 0 | 0 | 3 |
|
||||
| [data/computercraft/lua/rom/apis/colors.lua](/data/computercraft/lua/rom/apis/colors.lua) | Lua | 70 | 1 | 12 | 83 |
|
||||
| [data/computercraft/lua/rom/apis/colours.lua](/data/computercraft/lua/rom/apis/colours.lua) | Lua | 1 | 0 | 1 | 2 |
|
||||
| [data/computercraft/lua/rom/apis/disk.lua](/data/computercraft/lua/rom/apis/disk.lua) | Lua | 27 | 1 | 8 | 36 |
|
||||
| [data/computercraft/lua/rom/apis/gps.lua](/data/computercraft/lua/rom/apis/gps.lua) | Lua | 11 | 1 | 7 | 19 |
|
||||
| [data/computercraft/lua/rom/apis/help.lua](/data/computercraft/lua/rom/apis/help.lua) | Lua | 78 | 1 | 24 | 103 |
|
||||
| [data/computercraft/lua/rom/apis/keys.lua](/data/computercraft/lua/rom/apis/keys.lua) | Lua | 17 | 6 | 7 | 30 |
|
||||
| [data/computercraft/lua/rom/apis/lgui.lua](/data/computercraft/lua/rom/apis/lgui.lua) | Lua | 540 | 43 | 94 | 677 |
|
||||
| [data/computercraft/lua/rom/apis/multishell.lua](/data/computercraft/lua/rom/apis/multishell.lua) | Lua | 20 | 1 | 11 | 32 |
|
||||
| [data/computercraft/lua/rom/apis/paintutils.lua](/data/computercraft/lua/rom/apis/paintutils.lua) | Lua | 130 | 1 | 28 | 159 |
|
||||
| [data/computercraft/lua/rom/apis/parallel.lua](/data/computercraft/lua/rom/apis/parallel.lua) | Lua | 40 | 3 | 12 | 55 |
|
||||
| [data/computercraft/lua/rom/apis/rednet.lua](/data/computercraft/lua/rom/apis/rednet.lua) | Lua | 95 | 1 | 18 | 114 |
|
||||
| [data/computercraft/lua/rom/apis/settings.lua](/data/computercraft/lua/rom/apis/settings.lua) | Lua | 89 | 1 | 25 | 115 |
|
||||
| [data/computercraft/lua/rom/apis/shell.lua](/data/computercraft/lua/rom/apis/shell.lua) | Lua | 254 | 3 | 78 | 335 |
|
||||
| [data/computercraft/lua/rom/apis/textutils.lua](/data/computercraft/lua/rom/apis/textutils.lua) | Lua | 308 | 3 | 81 | 392 |
|
||||
| [data/computercraft/lua/rom/apis/vector.lua](/data/computercraft/lua/rom/apis/vector.lua) | Lua | 57 | 1 | 19 | 77 |
|
||||
| [data/computercraft/lua/rom/apis/window.lua](/data/computercraft/lua/rom/apis/window.lua) | Lua | 299 | 1 | 69 | 369 |
|
||||
| [data/computercraft/lua/rom/completions/alias.lua](/data/computercraft/lua/rom/completions/alias.lua) | Lua | 5 | 0 | 2 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/bedit.lua](/data/computercraft/lua/rom/completions/bedit.lua) | Lua | 5 | 0 | 2 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/bg.lua](/data/computercraft/lua/rom/completions/bg.lua) | Lua | 5 | 0 | 2 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/calc.lua](/data/computercraft/lua/rom/completions/calc.lua) | Lua | 5 | 2 | 1 | 8 |
|
||||
| [data/computercraft/lua/rom/completions/cd.lua](/data/computercraft/lua/rom/completions/cd.lua) | Lua | 3 | 0 | 2 | 5 |
|
||||
| [data/computercraft/lua/rom/completions/copy.lua](/data/computercraft/lua/rom/completions/copy.lua) | Lua | 6 | 0 | 2 | 8 |
|
||||
| [data/computercraft/lua/rom/completions/delete.lua](/data/computercraft/lua/rom/completions/delete.lua) | Lua | 5 | 0 | 2 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/devbin.lua](/data/computercraft/lua/rom/completions/devbin.lua) | Lua | 10 | 0 | 2 | 12 |
|
||||
| [data/computercraft/lua/rom/completions/edit.lua](/data/computercraft/lua/rom/completions/edit.lua) | Lua | 5 | 0 | 2 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/fg.lua](/data/computercraft/lua/rom/completions/fg.lua) | Lua | 5 | 0 | 2 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/help.lua](/data/computercraft/lua/rom/completions/help.lua) | Lua | 6 | 0 | 2 | 8 |
|
||||
| [data/computercraft/lua/rom/completions/list.lua](/data/computercraft/lua/rom/completions/list.lua) | Lua | 5 | 0 | 2 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/mkdir.lua](/data/computercraft/lua/rom/completions/mkdir.lua) | Lua | 5 | 0 | 2 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/move.lua](/data/computercraft/lua/rom/completions/move.lua) | Lua | 6 | 0 | 2 | 8 |
|
||||
| [data/computercraft/lua/rom/completions/paint.lua](/data/computercraft/lua/rom/completions/paint.lua) | Lua | 4 | 0 | 3 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/pkg.lua](/data/computercraft/lua/rom/completions/pkg.lua) | Lua | 4 | 0 | 3 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/reboot.lua](/data/computercraft/lua/rom/completions/reboot.lua) | Lua | 5 | 0 | 2 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/redstone.lua](/data/computercraft/lua/rom/completions/redstone.lua) | Lua | 12 | 0 | 2 | 14 |
|
||||
| [data/computercraft/lua/rom/completions/set.lua](/data/computercraft/lua/rom/completions/set.lua) | Lua | 5 | 0 | 2 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/shutdown.lua](/data/computercraft/lua/rom/completions/shutdown.lua) | Lua | 5 | 0 | 2 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/tree.lua](/data/computercraft/lua/rom/completions/tree.lua) | Lua | 5 | 1 | 1 | 7 |
|
||||
| [data/computercraft/lua/rom/completions/ver.lua](/data/computercraft/lua/rom/completions/ver.lua) | Lua | 4 | 1 | 1 | 6 |
|
||||
| [data/computercraft/lua/rom/editors/advanced.lua](/data/computercraft/lua/rom/editors/advanced.lua) | Lua | 255 | 2 | 61 | 318 |
|
||||
| [data/computercraft/lua/rom/editors/basic.lua](/data/computercraft/lua/rom/editors/basic.lua) | Lua | 183 | 1 | 46 | 230 |
|
||||
| [data/computercraft/lua/rom/help/chest_sorter_tutorial.md](/data/computercraft/lua/rom/help/chest_sorter_tutorial.md) | Markdown | 76 | 0 | 18 | 94 |
|
||||
| [data/computercraft/lua/rom/keymaps/lwjgl2.lua](/data/computercraft/lua/rom/keymaps/lwjgl2.lua) | Lua | 23 | 1 | 2 | 26 |
|
||||
| [data/computercraft/lua/rom/keymaps/lwjgl3.lua](/data/computercraft/lua/rom/keymaps/lwjgl3.lua) | Lua | 118 | 1 | 2 | 121 |
|
||||
| [data/computercraft/lua/rom/modules/main/cc/audio/dfpwm.lua](/data/computercraft/lua/rom/modules/main/cc/audio/dfpwm.lua) | Lua | 168 | 6 | 55 | 229 |
|
||||
| [data/computercraft/lua/rom/modules/main/cc/completion.lua](/data/computercraft/lua/rom/modules/main/cc/completion.lua) | Lua | 31 | 3 | 12 | 46 |
|
||||
| [data/computercraft/lua/rom/modules/main/cc/expect.lua](/data/computercraft/lua/rom/modules/main/cc/expect.lua) | Lua | 39 | 1 | 11 | 51 |
|
||||
| [data/computercraft/lua/rom/modules/main/cc/http/gist.lua](/data/computercraft/lua/rom/modules/main/cc/http/gist.lua) | Lua | 215 | 62 | 17 | 294 |
|
||||
| [data/computercraft/lua/rom/modules/main/cc/pretty.lua](/data/computercraft/lua/rom/modules/main/cc/pretty.lua) | Lua | 345 | 101 | 78 | 524 |
|
||||
| [data/computercraft/lua/rom/modules/main/cc/shell/completion.lua](/data/computercraft/lua/rom/modules/main/cc/shell/completion.lua) | Lua | 87 | 2 | 25 | 114 |
|
||||
| [data/computercraft/lua/rom/modules/main/cc/strings.lua](/data/computercraft/lua/rom/modules/main/cc/strings.lua) | Lua | 99 | 1 | 34 | 134 |
|
||||
| [data/computercraft/lua/rom/modules/main/edit/syntax.lua](/data/computercraft/lua/rom/modules/main/edit/syntax.lua) | Lua | 135 | 40 | 24 | 199 |
|
||||
| [data/computercraft/lua/rom/modules/main/edit/syntax/lua.lua](/data/computercraft/lua/rom/modules/main/edit/syntax/lua.lua) | Lua | 149 | 0 | 4 | 153 |
|
||||
| [data/computercraft/lua/rom/modules/main/edit/syntax/python.lua](/data/computercraft/lua/rom/modules/main/edit/syntax/python.lua) | Lua | 127 | 0 | 1 | 128 |
|
||||
| [data/computercraft/lua/rom/modules/main/rc/copy.lua](/data/computercraft/lua/rom/modules/main/rc/copy.lua) | Lua | 28 | 2 | 7 | 37 |
|
||||
| [data/computercraft/lua/rom/modules/main/rc/io.lua](/data/computercraft/lua/rom/modules/main/rc/io.lua) | Lua | 186 | 2 | 44 | 232 |
|
||||
| [data/computercraft/lua/rom/modules/main/rc/json.lua](/data/computercraft/lua/rom/modules/main/rc/json.lua) | Lua | 280 | 45 | 64 | 389 |
|
||||
| [data/computercraft/lua/rom/modules/main/rc/thread.lua](/data/computercraft/lua/rom/modules/main/rc/thread.lua) | Lua | 309 | 6 | 87 | 402 |
|
||||
| [data/computercraft/lua/rom/programs/about.lua](/data/computercraft/lua/rom/programs/about.lua) | Lua | 4 | 1 | 3 | 8 |
|
||||
| [data/computercraft/lua/rom/programs/alias.lua](/data/computercraft/lua/rom/programs/alias.lua) | Lua | 29 | 5 | 13 | 47 |
|
||||
| [data/computercraft/lua/rom/programs/app.lua](/data/computercraft/lua/rom/programs/app.lua) | Lua | 37 | 7 | 9 | 53 |
|
||||
| [data/computercraft/lua/rom/programs/appdelete.lua](/data/computercraft/lua/rom/programs/appdelete.lua) | Lua | 90 | 15 | 16 | 121 |
|
||||
| [data/computercraft/lua/rom/programs/applist.lua](/data/computercraft/lua/rom/programs/applist.lua) | Lua | 55 | 8 | 13 | 76 |
|
||||
| [data/computercraft/lua/rom/programs/bg.lua](/data/computercraft/lua/rom/programs/bg.lua) | Lua | 13 | 1 | 6 | 20 |
|
||||
| [data/computercraft/lua/rom/programs/calc.lua](/data/computercraft/lua/rom/programs/calc.lua) | Lua | 54 | 19 | 16 | 89 |
|
||||
| [data/computercraft/lua/rom/programs/catos.lua](/data/computercraft/lua/rom/programs/catos.lua) | Lua | 58 | 6 | 5 | 69 |
|
||||
| [data/computercraft/lua/rom/programs/chest_sorter.lua](/data/computercraft/lua/rom/programs/chest_sorter.lua) | Lua | 300 | 44 | 46 | 390 |
|
||||
| [data/computercraft/lua/rom/programs/clear.lua](/data/computercraft/lua/rom/programs/clear.lua) | Lua | 14 | 5 | 5 | 24 |
|
||||
| [data/computercraft/lua/rom/programs/commands.lua](/data/computercraft/lua/rom/programs/commands.lua) | Lua | 47 | 8 | 9 | 64 |
|
||||
| [data/computercraft/lua/rom/programs/config.lua](/data/computercraft/lua/rom/programs/config.lua) | Lua | 224 | 17 | 32 | 273 |
|
||||
| [data/computercraft/lua/rom/programs/copy.lua](/data/computercraft/lua/rom/programs/copy.lua) | Lua | 30 | 0 | 7 | 37 |
|
||||
| [data/computercraft/lua/rom/programs/craftos.lua](/data/computercraft/lua/rom/programs/craftos.lua) | Lua | 43 | 1 | 15 | 59 |
|
||||
| [data/computercraft/lua/rom/programs/delete.lua](/data/computercraft/lua/rom/programs/delete.lua) | Lua | 21 | 0 | 4 | 25 |
|
||||
| [data/computercraft/lua/rom/programs/devbin.lua](/data/computercraft/lua/rom/programs/devbin.lua) | Lua | 69 | 2 | 19 | 90 |
|
||||
| [data/computercraft/lua/rom/programs/edit.lua](/data/computercraft/lua/rom/programs/edit.lua) | Lua | 18 | 5 | 7 | 30 |
|
||||
| [data/computercraft/lua/rom/programs/fg.lua](/data/computercraft/lua/rom/programs/fg.lua) | Lua | 13 | 1 | 6 | 20 |
|
||||
| [data/computercraft/lua/rom/programs/find.lua](/data/computercraft/lua/rom/programs/find.lua) | Lua | 156 | 19 | 24 | 199 |
|
||||
| [data/computercraft/lua/rom/programs/help.lua](/data/computercraft/lua/rom/programs/help.lua) | Lua | 27 | 8 | 10 | 45 |
|
||||
| [data/computercraft/lua/rom/programs/helplist.lua](/data/computercraft/lua/rom/programs/helplist.lua) | Lua | 47 | 8 | 8 | 63 |
|
||||
| [data/computercraft/lua/rom/programs/history.lua](/data/computercraft/lua/rom/programs/history.lua) | Lua | 93 | 12 | 6 | 111 |
|
||||
| [data/computercraft/lua/rom/programs/imageview.lua](/data/computercraft/lua/rom/programs/imageview.lua) | Lua | 69 | 16 | 17 | 102 |
|
||||
| [data/computercraft/lua/rom/programs/list.lua](/data/computercraft/lua/rom/programs/list.lua) | Lua | 44 | 5 | 14 | 63 |
|
||||
| [data/computercraft/lua/rom/programs/lua.lua](/data/computercraft/lua/rom/programs/lua.lua) | Lua | 46 | 5 | 13 | 64 |
|
||||
| [data/computercraft/lua/rom/programs/mkdir.lua](/data/computercraft/lua/rom/programs/mkdir.lua) | Lua | 10 | 0 | 3 | 13 |
|
||||
| [data/computercraft/lua/rom/programs/move.lua](/data/computercraft/lua/rom/programs/move.lua) | Lua | 30 | 0 | 7 | 37 |
|
||||
| [data/computercraft/lua/rom/programs/network.lua](/data/computercraft/lua/rom/programs/network.lua) | Lua | 159 | 9 | 26 | 194 |
|
||||
| [data/computercraft/lua/rom/programs/paint.lua](/data/computercraft/lua/rom/programs/paint.lua) | Lua | 1 | 1 | 2 | 4 |
|
||||
| [data/computercraft/lua/rom/programs/peripherals.lua](/data/computercraft/lua/rom/programs/peripherals.lua) | Lua | 23 | 4 | 7 | 34 |
|
||||
| [data/computercraft/lua/rom/programs/pkg.lua](/data/computercraft/lua/rom/programs/pkg.lua) | Lua | 508 | 69 | 82 | 659 |
|
||||
| [data/computercraft/lua/rom/programs/programs.lua](/data/computercraft/lua/rom/programs/programs.lua) | Lua | 5 | 0 | 2 | 7 |
|
||||
| [data/computercraft/lua/rom/programs/reboot.lua](/data/computercraft/lua/rom/programs/reboot.lua) | Lua | 7 | 0 | 4 | 11 |
|
||||
| [data/computercraft/lua/rom/programs/redstone.lua](/data/computercraft/lua/rom/programs/redstone.lua) | Lua | 80 | 4 | 23 | 107 |
|
||||
| [data/computercraft/lua/rom/programs/set.lua](/data/computercraft/lua/rom/programs/set.lua) | Lua | 51 | 5 | 10 | 66 |
|
||||
| [data/computercraft/lua/rom/programs/shell.lua](/data/computercraft/lua/rom/programs/shell.lua) | Lua | 85 | 13 | 18 | 116 |
|
||||
| [data/computercraft/lua/rom/programs/shutdown.lua](/data/computercraft/lua/rom/programs/shutdown.lua) | Lua | 7 | 0 | 4 | 11 |
|
||||
| [data/computercraft/lua/rom/programs/storage.lua](/data/computercraft/lua/rom/programs/storage.lua) | Lua | 41 | 10 | 10 | 61 |
|
||||
| [data/computercraft/lua/rom/programs/test_comparator.lua](/data/computercraft/lua/rom/programs/test_comparator.lua) | Lua | 126 | 18 | 17 | 161 |
|
||||
| [data/computercraft/lua/rom/programs/test_config.lua](/data/computercraft/lua/rom/programs/test_config.lua) | Lua | 52 | 16 | 18 | 86 |
|
||||
| [data/computercraft/lua/rom/programs/test_config_find.lua](/data/computercraft/lua/rom/programs/test_config_find.lua) | Lua | 38 | 17 | 15 | 70 |
|
||||
| [data/computercraft/lua/rom/programs/test_find.lua](/data/computercraft/lua/rom/programs/test_find.lua) | Lua | 101 | 26 | 31 | 158 |
|
||||
| [data/computercraft/lua/rom/programs/test_help_format.lua](/data/computercraft/lua/rom/programs/test_help_format.lua) | Lua | 35 | 4 | 5 | 44 |
|
||||
| [data/computercraft/lua/rom/programs/test_helplist.lua](/data/computercraft/lua/rom/programs/test_helplist.lua) | Lua | 57 | 1 | 5 | 63 |
|
||||
| [data/computercraft/lua/rom/programs/test_history.lua](/data/computercraft/lua/rom/programs/test_history.lua) | Lua | 63 | 2 | 7 | 72 |
|
||||
| [data/computercraft/lua/rom/programs/test_imageview.lua](/data/computercraft/lua/rom/programs/test_imageview.lua) | Lua | 26 | 3 | 5 | 34 |
|
||||
| [data/computercraft/lua/rom/programs/test_lgui.lua](/data/computercraft/lua/rom/programs/test_lgui.lua) | Lua | 47 | 10 | 9 | 66 |
|
||||
| [data/computercraft/lua/rom/programs/threads.lua](/data/computercraft/lua/rom/programs/threads.lua) | Lua | 22 | 5 | 8 | 35 |
|
||||
| [data/computercraft/lua/rom/programs/time.lua](/data/computercraft/lua/rom/programs/time.lua) | Lua | 56 | 6 | 6 | 68 |
|
||||
| [data/computercraft/lua/rom/programs/tree.lua](/data/computercraft/lua/rom/programs/tree.lua) | Lua | 62 | 12 | 19 | 93 |
|
||||
| [data/computercraft/lua/rom/programs/turtle.lua](/data/computercraft/lua/rom/programs/turtle.lua) | Lua | 253 | 14 | 25 | 292 |
|
||||
| [data/computercraft/lua/rom/programs/turtle_farmer.lua](/data/computercraft/lua/rom/programs/turtle_farmer.lua) | Lua | 293 | 66 | 64 | 423 |
|
||||
| [data/computercraft/lua/rom/programs/turtle_miner.lua](/data/computercraft/lua/rom/programs/turtle_miner.lua) | Lua | 346 | 58 | 58 | 462 |
|
||||
| [data/computercraft/lua/rom/programs/ver.lua](/data/computercraft/lua/rom/programs/ver.lua) | Lua | 14 | 6 | 6 | 26 |
|
||||
| [data/computercraft/lua/rom/programs/wget.lua](/data/computercraft/lua/rom/programs/wget.lua) | Lua | 46 | 3 | 10 | 59 |
|
||||
| [data/computercraft/lua/rom/startup/00_fs.lua](/data/computercraft/lua/rom/startup/00_fs.lua) | Lua | 148 | 24 | 30 | 202 |
|
||||
| [data/computercraft/lua/rom/startup/10_package.lua](/data/computercraft/lua/rom/startup/10_package.lua) | Lua | 99 | 7 | 26 | 132 |
|
||||
| [data/computercraft/lua/rom/startup/15_term.lua](/data/computercraft/lua/rom/startup/15_term.lua) | Lua | 303 | 11 | 75 | 389 |
|
||||
| [data/computercraft/lua/rom/startup/20_io.lua](/data/computercraft/lua/rom/startup/20_io.lua) | Lua | 9 | 0 | 5 | 14 |
|
||||
| [data/computercraft/lua/rom/startup/30_peripheral.lua](/data/computercraft/lua/rom/startup/30_peripheral.lua) | Lua | 139 | 4 | 42 | 185 |
|
||||
| [data/computercraft/lua/rom/startup/35_http.lua](/data/computercraft/lua/rom/startup/35_http.lua) | Lua | 112 | 31 | 26 | 169 |
|
||||
| [data/computercraft/lua/rom/startup/40_commands.lua](/data/computercraft/lua/rom/startup/40_commands.lua) | Lua | 26 | 1 | 10 | 37 |
|
||||
| [data/computercraft/lua/rom/startup/90_settings.lua](/data/computercraft/lua/rom/startup/90_settings.lua) | Lua | 82 | 1 | 19 | 102 |
|
||||
| [data/computercraft/lua/rom/update.lua](/data/computercraft/lua/rom/update.lua) | Lua | 62 | 6 | 18 | 86 |
|
||||
| [installer.lua](/installer.lua) | Lua | 167 | 14 | 30 | 211 |
|
||||
| [unbios.lua](/unbios.lua) | Lua | 84 | 33 | 1 | 118 |
|
||||
| [updater.lua](/updater.lua) | Lua | 261 | 34 | 54 | 349 |
|
||||
|
||||
[Summary](results.md) / Details / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
28
.VSCodeCounter/2025-09-09_16-55-56/diff-details.md
Normal file
28
.VSCodeCounter/2025-09-09_16-55-56/diff-details.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Diff Details
|
||||
|
||||
Date : 2025-09-09 16:55:56
|
||||
|
||||
Directory d:\\Projects\\Lua\\LeonOS\\leonos
|
||||
|
||||
Total : 13 files, 1875 codes, 262 comments, 282 blanks, all 2419 lines
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
||||
|
||||
## Files
|
||||
| filename | language | code | comment | blank | total |
|
||||
| :--- | :--- | ---: | ---: | ---: | ---: |
|
||||
| [.github/workflows/release.yml](/.github/workflows/release.yml) | YAML | 44 | 2 | 5 | 51 |
|
||||
| [data/computercraft/lua/rom/editors/advanced.lua](/data/computercraft/lua/rom/editors/advanced.lua) | Lua | 8 | 0 | 1 | 9 |
|
||||
| [data/computercraft/lua/rom/help/chest_sorter_tutorial.md](/data/computercraft/lua/rom/help/chest_sorter_tutorial.md) | Markdown | 76 | 0 | 18 | 94 |
|
||||
| [data/computercraft/lua/rom/modules/main/edit/syntax/python.lua](/data/computercraft/lua/rom/modules/main/edit/syntax/python.lua) | Lua | 127 | 0 | 1 | 128 |
|
||||
| [data/computercraft/lua/rom/programs/catos.lua](/data/computercraft/lua/rom/programs/catos.lua) | Lua | 58 | 6 | 5 | 69 |
|
||||
| [data/computercraft/lua/rom/programs/chest_sorter.lua](/data/computercraft/lua/rom/programs/chest_sorter.lua) | Lua | 300 | 44 | 46 | 390 |
|
||||
| [data/computercraft/lua/rom/programs/pkg.lua](/data/computercraft/lua/rom/programs/pkg.lua) | Lua | 121 | 22 | 30 | 173 |
|
||||
| [data/computercraft/lua/rom/programs/test_comparator.lua](/data/computercraft/lua/rom/programs/test_comparator.lua) | Lua | 126 | 18 | 17 | 161 |
|
||||
| [data/computercraft/lua/rom/programs/turtle.lua](/data/computercraft/lua/rom/programs/turtle.lua) | Lua | 253 | 14 | 25 | 292 |
|
||||
| [data/computercraft/lua/rom/programs/turtle_farmer.lua](/data/computercraft/lua/rom/programs/turtle_farmer.lua) | Lua | 293 | 66 | 64 | 423 |
|
||||
| [data/computercraft/lua/rom/programs/turtle_miner.lua](/data/computercraft/lua/rom/programs/turtle_miner.lua) | Lua | 346 | 58 | 58 | 462 |
|
||||
| [data/computercraft/lua/rom/programs/wget.lua](/data/computercraft/lua/rom/programs/wget.lua) | Lua | 1 | 0 | 0 | 1 |
|
||||
| [updater.lua](/updater.lua) | Lua | 122 | 32 | 12 | 166 |
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / [Diff Summary](diff.md) / Diff Details
|
||||
15
.VSCodeCounter/2025-09-09_16-55-56/diff.csv
Normal file
15
.VSCodeCounter/2025-09-09_16-55-56/diff.csv
Normal file
@@ -0,0 +1,15 @@
|
||||
"filename", "language", "Lua", "Markdown", "YAML", "comment", "blank", "total"
|
||||
"d:\Projects\Lua\LeonOS\leonos\.github\workflows\release.yml", "YAML", 0, 0, 44, 2, 5, 51
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\editors\advanced.lua", "Lua", 8, 0, 0, 0, 1, 9
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\help\chest_sorter_tutorial.md", "Markdown", 0, 76, 0, 0, 18, 94
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\edit\syntax\python.lua", "Lua", 127, 0, 0, 0, 1, 128
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\catos.lua", "Lua", 58, 0, 0, 6, 5, 69
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\chest_sorter.lua", "Lua", 300, 0, 0, 44, 46, 390
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\pkg.lua", "Lua", 121, 0, 0, 22, 30, 173
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_comparator.lua", "Lua", 126, 0, 0, 18, 17, 161
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\turtle.lua", "Lua", 253, 0, 0, 14, 25, 292
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\turtle_farmer.lua", "Lua", 293, 0, 0, 66, 64, 423
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\turtle_miner.lua", "Lua", 346, 0, 0, 58, 58, 462
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\wget.lua", "Lua", 1, 0, 0, 0, 0, 1
|
||||
"d:\Projects\Lua\LeonOS\leonos\updater.lua", "Lua", 122, 0, 0, 32, 12, 166
|
||||
"Total", "-", 1755, 76, 44, 262, 282, 2419
|
||||
|
37
.VSCodeCounter/2025-09-09_16-55-56/diff.md
Normal file
37
.VSCodeCounter/2025-09-09_16-55-56/diff.md
Normal file
@@ -0,0 +1,37 @@
|
||||
# Diff Summary
|
||||
|
||||
Date : 2025-09-09 16:55:56
|
||||
|
||||
Directory d:\\Projects\\Lua\\LeonOS\\leonos
|
||||
|
||||
Total : 13 files, 1875 codes, 262 comments, 282 blanks, all 2419 lines
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
||||
|
||||
## Languages
|
||||
| language | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| Lua | 11 | 1,755 | 260 | 259 | 2,274 |
|
||||
| Markdown | 1 | 76 | 0 | 18 | 94 |
|
||||
| YAML | 1 | 44 | 2 | 5 | 51 |
|
||||
|
||||
## Directories
|
||||
| path | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| . | 13 | 1,875 | 262 | 282 | 2,419 |
|
||||
| . (Files) | 1 | 122 | 32 | 12 | 166 |
|
||||
| .github | 1 | 44 | 2 | 5 | 51 |
|
||||
| .github\\workflows | 1 | 44 | 2 | 5 | 51 |
|
||||
| data | 11 | 1,709 | 228 | 265 | 2,202 |
|
||||
| data\\computercraft | 11 | 1,709 | 228 | 265 | 2,202 |
|
||||
| data\\computercraft\\lua | 11 | 1,709 | 228 | 265 | 2,202 |
|
||||
| data\\computercraft\\lua\\rom | 11 | 1,709 | 228 | 265 | 2,202 |
|
||||
| data\\computercraft\\lua\\rom\\editors | 1 | 8 | 0 | 1 | 9 |
|
||||
| data\\computercraft\\lua\\rom\\help | 1 | 76 | 0 | 18 | 94 |
|
||||
| data\\computercraft\\lua\\rom\\modules | 1 | 127 | 0 | 1 | 128 |
|
||||
| data\\computercraft\\lua\\rom\\modules\\main | 1 | 127 | 0 | 1 | 128 |
|
||||
| data\\computercraft\\lua\\rom\\modules\\main\\edit | 1 | 127 | 0 | 1 | 128 |
|
||||
| data\\computercraft\\lua\\rom\\modules\\main\\edit\\syntax | 1 | 127 | 0 | 1 | 128 |
|
||||
| data\\computercraft\\lua\\rom\\programs | 8 | 1,498 | 228 | 245 | 1,971 |
|
||||
|
||||
[Summary](results.md) / [Details](details.md) / Diff Summary / [Diff Details](diff-details.md)
|
||||
53
.VSCodeCounter/2025-09-09_16-55-56/diff.txt
Normal file
53
.VSCodeCounter/2025-09-09_16-55-56/diff.txt
Normal file
@@ -0,0 +1,53 @@
|
||||
Date : 2025-09-09 16:55:56
|
||||
Directory : d:\Projects\Lua\LeonOS\leonos
|
||||
Total : 13 files, 1875 codes, 262 comments, 282 blanks, all 2419 lines
|
||||
|
||||
Languages
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
| language | files | code | comment | blank | total |
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
| Lua | 11 | 1,755 | 260 | 259 | 2,274 |
|
||||
| Markdown | 1 | 76 | 0 | 18 | 94 |
|
||||
| YAML | 1 | 44 | 2 | 5 | 51 |
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
|
||||
Directories
|
||||
+----------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| path | files | code | comment | blank | total |
|
||||
+----------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| . | 13 | 1,875 | 262 | 282 | 2,419 |
|
||||
| . (Files) | 1 | 122 | 32 | 12 | 166 |
|
||||
| .github | 1 | 44 | 2 | 5 | 51 |
|
||||
| .github\workflows | 1 | 44 | 2 | 5 | 51 |
|
||||
| data | 11 | 1,709 | 228 | 265 | 2,202 |
|
||||
| data\computercraft | 11 | 1,709 | 228 | 265 | 2,202 |
|
||||
| data\computercraft\lua | 11 | 1,709 | 228 | 265 | 2,202 |
|
||||
| data\computercraft\lua\rom | 11 | 1,709 | 228 | 265 | 2,202 |
|
||||
| data\computercraft\lua\rom\editors | 1 | 8 | 0 | 1 | 9 |
|
||||
| data\computercraft\lua\rom\help | 1 | 76 | 0 | 18 | 94 |
|
||||
| data\computercraft\lua\rom\modules | 1 | 127 | 0 | 1 | 128 |
|
||||
| data\computercraft\lua\rom\modules\main | 1 | 127 | 0 | 1 | 128 |
|
||||
| data\computercraft\lua\rom\modules\main\edit | 1 | 127 | 0 | 1 | 128 |
|
||||
| data\computercraft\lua\rom\modules\main\edit\syntax | 1 | 127 | 0 | 1 | 128 |
|
||||
| data\computercraft\lua\rom\programs | 8 | 1,498 | 228 | 245 | 1,971 |
|
||||
+----------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Files
|
||||
+----------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
| filename | language | code | comment | blank | total |
|
||||
+----------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
| d:\Projects\Lua\LeonOS\leonos\.github\workflows\release.yml | YAML | 44 | 2 | 5 | 51 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\editors\advanced.lua | Lua | 8 | 0 | 1 | 9 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\help\chest_sorter_tutorial.md | Markdown | 76 | 0 | 18 | 94 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\edit\syntax\python.lua | Lua | 127 | 0 | 1 | 128 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\catos.lua | Lua | 58 | 6 | 5 | 69 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\chest_sorter.lua | Lua | 300 | 44 | 46 | 390 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\pkg.lua | Lua | 121 | 22 | 30 | 173 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_comparator.lua | Lua | 126 | 18 | 17 | 161 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\turtle.lua | Lua | 253 | 14 | 25 | 292 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\turtle_farmer.lua | Lua | 293 | 66 | 64 | 423 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\turtle_miner.lua | Lua | 346 | 58 | 58 | 462 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\wget.lua | Lua | 1 | 0 | 0 | 1 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\updater.lua | Lua | 122 | 32 | 12 | 166 |
|
||||
| Total | | 1,875 | 262 | 282 | 2,419 |
|
||||
+----------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
134
.VSCodeCounter/2025-09-09_16-55-56/results.csv
Normal file
134
.VSCodeCounter/2025-09-09_16-55-56/results.csv
Normal file
@@ -0,0 +1,134 @@
|
||||
"filename", "language", "Lua", "Markdown", "JSON", "YAML", "comment", "blank", "total"
|
||||
"d:\Projects\Lua\LeonOS\leonos\.github\workflows\release.yml", "YAML", 0, 0, 0, 44, 2, 5, 51
|
||||
"d:\Projects\Lua\LeonOS\leonos\.trae\rules\project_rules.md", "Markdown", 0, 4, 0, 0, 0, 0, 4
|
||||
"d:\Projects\Lua\LeonOS\leonos\NEW_COMMANDS_SUGGESTIONS.md", "Markdown", 0, 54, 0, 0, 0, 13, 67
|
||||
"d:\Projects\Lua\LeonOS\leonos\README.md", "Markdown", 0, 6, 0, 0, 0, 1, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\bios.lua", "Lua", 150, 0, 0, 0, 7, 29, 186
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\packages\example-pkg\1.0.0\example.lua", "Lua", 22, 0, 0, 0, 1, 2, 25
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\packages\example-pkg\1.0.0\package.json", "JSON", 0, 0, 11, 0, 0, 0, 11
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\packages\installed.json", "JSON", 0, 0, 3, 0, 0, 0, 3
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\colors.lua", "Lua", 70, 0, 0, 0, 1, 12, 83
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\colours.lua", "Lua", 1, 0, 0, 0, 0, 1, 2
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\disk.lua", "Lua", 27, 0, 0, 0, 1, 8, 36
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\gps.lua", "Lua", 11, 0, 0, 0, 1, 7, 19
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\help.lua", "Lua", 78, 0, 0, 0, 1, 24, 103
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\keys.lua", "Lua", 17, 0, 0, 0, 6, 7, 30
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\lgui.lua", "Lua", 540, 0, 0, 0, 43, 94, 677
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\multishell.lua", "Lua", 20, 0, 0, 0, 1, 11, 32
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\paintutils.lua", "Lua", 130, 0, 0, 0, 1, 28, 159
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\parallel.lua", "Lua", 40, 0, 0, 0, 3, 12, 55
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\rednet.lua", "Lua", 95, 0, 0, 0, 1, 18, 114
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\settings.lua", "Lua", 89, 0, 0, 0, 1, 25, 115
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\shell.lua", "Lua", 254, 0, 0, 0, 3, 78, 335
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\textutils.lua", "Lua", 308, 0, 0, 0, 3, 81, 392
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\vector.lua", "Lua", 57, 0, 0, 0, 1, 19, 77
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\window.lua", "Lua", 299, 0, 0, 0, 1, 69, 369
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\alias.lua", "Lua", 5, 0, 0, 0, 0, 2, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\bedit.lua", "Lua", 5, 0, 0, 0, 0, 2, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\bg.lua", "Lua", 5, 0, 0, 0, 0, 2, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\calc.lua", "Lua", 5, 0, 0, 0, 2, 1, 8
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\cd.lua", "Lua", 3, 0, 0, 0, 0, 2, 5
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\copy.lua", "Lua", 6, 0, 0, 0, 0, 2, 8
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\delete.lua", "Lua", 5, 0, 0, 0, 0, 2, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\devbin.lua", "Lua", 10, 0, 0, 0, 0, 2, 12
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\edit.lua", "Lua", 5, 0, 0, 0, 0, 2, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\fg.lua", "Lua", 5, 0, 0, 0, 0, 2, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\help.lua", "Lua", 6, 0, 0, 0, 0, 2, 8
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\list.lua", "Lua", 5, 0, 0, 0, 0, 2, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\mkdir.lua", "Lua", 5, 0, 0, 0, 0, 2, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\move.lua", "Lua", 6, 0, 0, 0, 0, 2, 8
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\paint.lua", "Lua", 4, 0, 0, 0, 0, 3, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\pkg.lua", "Lua", 4, 0, 0, 0, 0, 3, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\reboot.lua", "Lua", 5, 0, 0, 0, 0, 2, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\redstone.lua", "Lua", 12, 0, 0, 0, 0, 2, 14
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\set.lua", "Lua", 5, 0, 0, 0, 0, 2, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\shutdown.lua", "Lua", 5, 0, 0, 0, 0, 2, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\tree.lua", "Lua", 5, 0, 0, 0, 1, 1, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\ver.lua", "Lua", 4, 0, 0, 0, 1, 1, 6
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\editors\advanced.lua", "Lua", 255, 0, 0, 0, 2, 61, 318
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\editors\basic.lua", "Lua", 183, 0, 0, 0, 1, 46, 230
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\help\chest_sorter_tutorial.md", "Markdown", 0, 76, 0, 0, 0, 18, 94
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\keymaps\lwjgl2.lua", "Lua", 23, 0, 0, 0, 1, 2, 26
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\keymaps\lwjgl3.lua", "Lua", 118, 0, 0, 0, 1, 2, 121
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\audio\dfpwm.lua", "Lua", 168, 0, 0, 0, 6, 55, 229
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\completion.lua", "Lua", 31, 0, 0, 0, 3, 12, 46
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\expect.lua", "Lua", 39, 0, 0, 0, 1, 11, 51
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\http\gist.lua", "Lua", 215, 0, 0, 0, 62, 17, 294
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\pretty.lua", "Lua", 345, 0, 0, 0, 101, 78, 524
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\shell\completion.lua", "Lua", 87, 0, 0, 0, 2, 25, 114
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\strings.lua", "Lua", 99, 0, 0, 0, 1, 34, 134
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\edit\syntax.lua", "Lua", 135, 0, 0, 0, 40, 24, 199
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\edit\syntax\lua.lua", "Lua", 149, 0, 0, 0, 0, 4, 153
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\edit\syntax\python.lua", "Lua", 127, 0, 0, 0, 0, 1, 128
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\rc\copy.lua", "Lua", 28, 0, 0, 0, 2, 7, 37
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\rc\io.lua", "Lua", 186, 0, 0, 0, 2, 44, 232
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\rc\json.lua", "Lua", 280, 0, 0, 0, 45, 64, 389
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\rc\thread.lua", "Lua", 309, 0, 0, 0, 6, 87, 402
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\about.lua", "Lua", 4, 0, 0, 0, 1, 3, 8
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\alias.lua", "Lua", 29, 0, 0, 0, 5, 13, 47
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\app.lua", "Lua", 37, 0, 0, 0, 7, 9, 53
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\appdelete.lua", "Lua", 90, 0, 0, 0, 15, 16, 121
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\applist.lua", "Lua", 55, 0, 0, 0, 8, 13, 76
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\bg.lua", "Lua", 13, 0, 0, 0, 1, 6, 20
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\calc.lua", "Lua", 54, 0, 0, 0, 19, 16, 89
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\catos.lua", "Lua", 58, 0, 0, 0, 6, 5, 69
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\chest_sorter.lua", "Lua", 300, 0, 0, 0, 44, 46, 390
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\clear.lua", "Lua", 14, 0, 0, 0, 5, 5, 24
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\commands.lua", "Lua", 47, 0, 0, 0, 8, 9, 64
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\config.lua", "Lua", 224, 0, 0, 0, 17, 32, 273
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\copy.lua", "Lua", 30, 0, 0, 0, 0, 7, 37
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\craftos.lua", "Lua", 43, 0, 0, 0, 1, 15, 59
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\delete.lua", "Lua", 21, 0, 0, 0, 0, 4, 25
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\devbin.lua", "Lua", 69, 0, 0, 0, 2, 19, 90
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\edit.lua", "Lua", 18, 0, 0, 0, 5, 7, 30
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\fg.lua", "Lua", 13, 0, 0, 0, 1, 6, 20
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\find.lua", "Lua", 156, 0, 0, 0, 19, 24, 199
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\help.lua", "Lua", 27, 0, 0, 0, 8, 10, 45
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\helplist.lua", "Lua", 47, 0, 0, 0, 8, 8, 63
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\history.lua", "Lua", 93, 0, 0, 0, 12, 6, 111
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\imageview.lua", "Lua", 69, 0, 0, 0, 16, 17, 102
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\list.lua", "Lua", 44, 0, 0, 0, 5, 14, 63
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\lua.lua", "Lua", 46, 0, 0, 0, 5, 13, 64
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\mkdir.lua", "Lua", 10, 0, 0, 0, 0, 3, 13
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\move.lua", "Lua", 30, 0, 0, 0, 0, 7, 37
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\network.lua", "Lua", 159, 0, 0, 0, 9, 26, 194
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\paint.lua", "Lua", 1, 0, 0, 0, 1, 2, 4
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\peripherals.lua", "Lua", 23, 0, 0, 0, 4, 7, 34
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\pkg.lua", "Lua", 508, 0, 0, 0, 69, 82, 659
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\programs.lua", "Lua", 5, 0, 0, 0, 0, 2, 7
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\reboot.lua", "Lua", 7, 0, 0, 0, 0, 4, 11
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\redstone.lua", "Lua", 80, 0, 0, 0, 4, 23, 107
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\set.lua", "Lua", 51, 0, 0, 0, 5, 10, 66
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\shell.lua", "Lua", 85, 0, 0, 0, 13, 18, 116
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\shutdown.lua", "Lua", 7, 0, 0, 0, 0, 4, 11
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\storage.lua", "Lua", 41, 0, 0, 0, 10, 10, 61
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_comparator.lua", "Lua", 126, 0, 0, 0, 18, 17, 161
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_config.lua", "Lua", 52, 0, 0, 0, 16, 18, 86
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_config_find.lua", "Lua", 38, 0, 0, 0, 17, 15, 70
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_find.lua", "Lua", 101, 0, 0, 0, 26, 31, 158
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_help_format.lua", "Lua", 35, 0, 0, 0, 4, 5, 44
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_helplist.lua", "Lua", 57, 0, 0, 0, 1, 5, 63
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_history.lua", "Lua", 63, 0, 0, 0, 2, 7, 72
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_imageview.lua", "Lua", 26, 0, 0, 0, 3, 5, 34
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_lgui.lua", "Lua", 47, 0, 0, 0, 10, 9, 66
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\threads.lua", "Lua", 22, 0, 0, 0, 5, 8, 35
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\time.lua", "Lua", 56, 0, 0, 0, 6, 6, 68
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\tree.lua", "Lua", 62, 0, 0, 0, 12, 19, 93
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\turtle.lua", "Lua", 253, 0, 0, 0, 14, 25, 292
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\turtle_farmer.lua", "Lua", 293, 0, 0, 0, 66, 64, 423
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\turtle_miner.lua", "Lua", 346, 0, 0, 0, 58, 58, 462
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\ver.lua", "Lua", 14, 0, 0, 0, 6, 6, 26
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\wget.lua", "Lua", 46, 0, 0, 0, 3, 10, 59
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\00_fs.lua", "Lua", 148, 0, 0, 0, 24, 30, 202
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\10_package.lua", "Lua", 99, 0, 0, 0, 7, 26, 132
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\15_term.lua", "Lua", 303, 0, 0, 0, 11, 75, 389
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\20_io.lua", "Lua", 9, 0, 0, 0, 0, 5, 14
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\30_peripheral.lua", "Lua", 139, 0, 0, 0, 4, 42, 185
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\35_http.lua", "Lua", 112, 0, 0, 0, 31, 26, 169
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\40_commands.lua", "Lua", 26, 0, 0, 0, 1, 10, 37
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\90_settings.lua", "Lua", 82, 0, 0, 0, 1, 19, 102
|
||||
"d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\update.lua", "Lua", 62, 0, 0, 0, 6, 18, 86
|
||||
"d:\Projects\Lua\LeonOS\leonos\installer.lua", "Lua", 167, 0, 0, 0, 14, 30, 211
|
||||
"d:\Projects\Lua\LeonOS\leonos\unbios.lua", "Lua", 84, 0, 0, 0, 33, 1, 118
|
||||
"d:\Projects\Lua\LeonOS\leonos\updater.lua", "Lua", 261, 0, 0, 0, 34, 54, 349
|
||||
"Total", "-", 10842, 140, 14, 44, 1124, 2344, 14508
|
||||
|
1
.VSCodeCounter/2025-09-09_16-55-56/results.json
Normal file
1
.VSCodeCounter/2025-09-09_16-55-56/results.json
Normal file
File diff suppressed because one or more lines are too long
57
.VSCodeCounter/2025-09-09_16-55-56/results.md
Normal file
57
.VSCodeCounter/2025-09-09_16-55-56/results.md
Normal file
@@ -0,0 +1,57 @@
|
||||
# Summary
|
||||
|
||||
Date : 2025-09-09 16:55:56
|
||||
|
||||
Directory d:\\Projects\\Lua\\LeonOS\\leonos
|
||||
|
||||
Total : 132 files, 11040 codes, 1124 comments, 2344 blanks, all 14508 lines
|
||||
|
||||
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
|
||||
## Languages
|
||||
| language | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| Lua | 125 | 10,842 | 1,122 | 2,307 | 14,271 |
|
||||
| Markdown | 4 | 140 | 0 | 32 | 172 |
|
||||
| YAML | 1 | 44 | 2 | 5 | 51 |
|
||||
| JSON | 2 | 14 | 0 | 0 | 14 |
|
||||
|
||||
## Directories
|
||||
| path | files | code | comment | blank | total |
|
||||
| :--- | ---: | ---: | ---: | ---: | ---: |
|
||||
| . | 132 | 11,040 | 1,124 | 2,344 | 14,508 |
|
||||
| . (Files) | 5 | 572 | 81 | 99 | 752 |
|
||||
| .github | 1 | 44 | 2 | 5 | 51 |
|
||||
| .github\\workflows | 1 | 44 | 2 | 5 | 51 |
|
||||
| .trae | 1 | 4 | 0 | 0 | 4 |
|
||||
| .trae\\rules | 1 | 4 | 0 | 0 | 4 |
|
||||
| data | 125 | 10,420 | 1,041 | 2,240 | 13,701 |
|
||||
| data\\computercraft | 125 | 10,420 | 1,041 | 2,240 | 13,701 |
|
||||
| data\\computercraft\\lua | 125 | 10,420 | 1,041 | 2,240 | 13,701 |
|
||||
| data\\computercraft\\lua (Files) | 1 | 150 | 7 | 29 | 186 |
|
||||
| data\\computercraft\\lua\\packages | 3 | 36 | 1 | 2 | 39 |
|
||||
| data\\computercraft\\lua\\packages (Files) | 1 | 3 | 0 | 0 | 3 |
|
||||
| data\\computercraft\\lua\\packages\\example-pkg | 2 | 33 | 1 | 2 | 36 |
|
||||
| data\\computercraft\\lua\\packages\\example-pkg\\1.0.0 | 2 | 33 | 1 | 2 | 36 |
|
||||
| data\\computercraft\\lua\\rom | 121 | 10,234 | 1,033 | 2,209 | 13,476 |
|
||||
| data\\computercraft\\lua\\rom (Files) | 1 | 62 | 6 | 18 | 86 |
|
||||
| data\\computercraft\\lua\\rom\\apis | 16 | 2,036 | 68 | 494 | 2,598 |
|
||||
| data\\computercraft\\lua\\rom\\completions | 22 | 120 | 4 | 43 | 167 |
|
||||
| data\\computercraft\\lua\\rom\\editors | 2 | 438 | 3 | 107 | 548 |
|
||||
| data\\computercraft\\lua\\rom\\help | 1 | 76 | 0 | 18 | 94 |
|
||||
| data\\computercraft\\lua\\rom\\keymaps | 2 | 141 | 2 | 4 | 147 |
|
||||
| data\\computercraft\\lua\\rom\\modules | 14 | 2,198 | 271 | 463 | 2,932 |
|
||||
| data\\computercraft\\lua\\rom\\modules\\main | 14 | 2,198 | 271 | 463 | 2,932 |
|
||||
| data\\computercraft\\lua\\rom\\modules\\main\\cc | 7 | 984 | 176 | 232 | 1,392 |
|
||||
| data\\computercraft\\lua\\rom\\modules\\main\\cc (Files) | 4 | 514 | 106 | 135 | 755 |
|
||||
| data\\computercraft\\lua\\rom\\modules\\main\\cc\\audio | 1 | 168 | 6 | 55 | 229 |
|
||||
| data\\computercraft\\lua\\rom\\modules\\main\\cc\\http | 1 | 215 | 62 | 17 | 294 |
|
||||
| data\\computercraft\\lua\\rom\\modules\\main\\cc\\shell | 1 | 87 | 2 | 25 | 114 |
|
||||
| data\\computercraft\\lua\\rom\\modules\\main\\edit | 3 | 411 | 40 | 29 | 480 |
|
||||
| data\\computercraft\\lua\\rom\\modules\\main\\edit (Files) | 1 | 135 | 40 | 24 | 199 |
|
||||
| data\\computercraft\\lua\\rom\\modules\\main\\edit\\syntax | 2 | 276 | 0 | 5 | 281 |
|
||||
| data\\computercraft\\lua\\rom\\modules\\main\\rc | 4 | 803 | 55 | 202 | 1,060 |
|
||||
| data\\computercraft\\lua\\rom\\programs | 55 | 4,245 | 600 | 829 | 5,674 |
|
||||
| data\\computercraft\\lua\\rom\\startup | 8 | 918 | 79 | 233 | 1,230 |
|
||||
|
||||
Summary / [Details](details.md) / [Diff Summary](diff.md) / [Diff Details](diff-details.md)
|
||||
192
.VSCodeCounter/2025-09-09_16-55-56/results.txt
Normal file
192
.VSCodeCounter/2025-09-09_16-55-56/results.txt
Normal file
@@ -0,0 +1,192 @@
|
||||
Date : 2025-09-09 16:55:56
|
||||
Directory : d:\Projects\Lua\LeonOS\leonos
|
||||
Total : 132 files, 11040 codes, 1124 comments, 2344 blanks, all 14508 lines
|
||||
|
||||
Languages
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
| language | files | code | comment | blank | total |
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
| Lua | 125 | 10,842 | 1,122 | 2,307 | 14,271 |
|
||||
| Markdown | 4 | 140 | 0 | 32 | 172 |
|
||||
| YAML | 1 | 44 | 2 | 5 | 51 |
|
||||
| JSON | 2 | 14 | 0 | 0 | 14 |
|
||||
+----------+------------+------------+------------+------------+------------+
|
||||
|
||||
Directories
|
||||
+-----------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| path | files | code | comment | blank | total |
|
||||
+-----------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
| . | 132 | 11,040 | 1,124 | 2,344 | 14,508 |
|
||||
| . (Files) | 5 | 572 | 81 | 99 | 752 |
|
||||
| .github | 1 | 44 | 2 | 5 | 51 |
|
||||
| .github\workflows | 1 | 44 | 2 | 5 | 51 |
|
||||
| .trae | 1 | 4 | 0 | 0 | 4 |
|
||||
| .trae\rules | 1 | 4 | 0 | 0 | 4 |
|
||||
| data | 125 | 10,420 | 1,041 | 2,240 | 13,701 |
|
||||
| data\computercraft | 125 | 10,420 | 1,041 | 2,240 | 13,701 |
|
||||
| data\computercraft\lua | 125 | 10,420 | 1,041 | 2,240 | 13,701 |
|
||||
| data\computercraft\lua (Files) | 1 | 150 | 7 | 29 | 186 |
|
||||
| data\computercraft\lua\packages | 3 | 36 | 1 | 2 | 39 |
|
||||
| data\computercraft\lua\packages (Files) | 1 | 3 | 0 | 0 | 3 |
|
||||
| data\computercraft\lua\packages\example-pkg | 2 | 33 | 1 | 2 | 36 |
|
||||
| data\computercraft\lua\packages\example-pkg\1.0.0 | 2 | 33 | 1 | 2 | 36 |
|
||||
| data\computercraft\lua\rom | 121 | 10,234 | 1,033 | 2,209 | 13,476 |
|
||||
| data\computercraft\lua\rom (Files) | 1 | 62 | 6 | 18 | 86 |
|
||||
| data\computercraft\lua\rom\apis | 16 | 2,036 | 68 | 494 | 2,598 |
|
||||
| data\computercraft\lua\rom\completions | 22 | 120 | 4 | 43 | 167 |
|
||||
| data\computercraft\lua\rom\editors | 2 | 438 | 3 | 107 | 548 |
|
||||
| data\computercraft\lua\rom\help | 1 | 76 | 0 | 18 | 94 |
|
||||
| data\computercraft\lua\rom\keymaps | 2 | 141 | 2 | 4 | 147 |
|
||||
| data\computercraft\lua\rom\modules | 14 | 2,198 | 271 | 463 | 2,932 |
|
||||
| data\computercraft\lua\rom\modules\main | 14 | 2,198 | 271 | 463 | 2,932 |
|
||||
| data\computercraft\lua\rom\modules\main\cc | 7 | 984 | 176 | 232 | 1,392 |
|
||||
| data\computercraft\lua\rom\modules\main\cc (Files) | 4 | 514 | 106 | 135 | 755 |
|
||||
| data\computercraft\lua\rom\modules\main\cc\audio | 1 | 168 | 6 | 55 | 229 |
|
||||
| data\computercraft\lua\rom\modules\main\cc\http | 1 | 215 | 62 | 17 | 294 |
|
||||
| data\computercraft\lua\rom\modules\main\cc\shell | 1 | 87 | 2 | 25 | 114 |
|
||||
| data\computercraft\lua\rom\modules\main\edit | 3 | 411 | 40 | 29 | 480 |
|
||||
| data\computercraft\lua\rom\modules\main\edit (Files) | 1 | 135 | 40 | 24 | 199 |
|
||||
| data\computercraft\lua\rom\modules\main\edit\syntax | 2 | 276 | 0 | 5 | 281 |
|
||||
| data\computercraft\lua\rom\modules\main\rc | 4 | 803 | 55 | 202 | 1,060 |
|
||||
| data\computercraft\lua\rom\programs | 55 | 4,245 | 600 | 829 | 5,674 |
|
||||
| data\computercraft\lua\rom\startup | 8 | 918 | 79 | 233 | 1,230 |
|
||||
+-----------------------------------------------------------------------------------------------+------------+------------+------------+------------+------------+
|
||||
|
||||
Files
|
||||
+-----------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
| filename | language | code | comment | blank | total |
|
||||
+-----------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
| d:\Projects\Lua\LeonOS\leonos\.github\workflows\release.yml | YAML | 44 | 2 | 5 | 51 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\.trae\rules\project_rules.md | Markdown | 4 | 0 | 0 | 4 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\NEW_COMMANDS_SUGGESTIONS.md | Markdown | 54 | 0 | 13 | 67 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\README.md | Markdown | 6 | 0 | 1 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\bios.lua | Lua | 150 | 7 | 29 | 186 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\packages\example-pkg\1.0.0\example.lua | Lua | 22 | 1 | 2 | 25 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\packages\example-pkg\1.0.0\package.json | JSON | 11 | 0 | 0 | 11 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\packages\installed.json | JSON | 3 | 0 | 0 | 3 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\colors.lua | Lua | 70 | 1 | 12 | 83 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\colours.lua | Lua | 1 | 0 | 1 | 2 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\disk.lua | Lua | 27 | 1 | 8 | 36 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\gps.lua | Lua | 11 | 1 | 7 | 19 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\help.lua | Lua | 78 | 1 | 24 | 103 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\keys.lua | Lua | 17 | 6 | 7 | 30 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\lgui.lua | Lua | 540 | 43 | 94 | 677 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\multishell.lua | Lua | 20 | 1 | 11 | 32 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\paintutils.lua | Lua | 130 | 1 | 28 | 159 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\parallel.lua | Lua | 40 | 3 | 12 | 55 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\rednet.lua | Lua | 95 | 1 | 18 | 114 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\settings.lua | Lua | 89 | 1 | 25 | 115 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\shell.lua | Lua | 254 | 3 | 78 | 335 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\textutils.lua | Lua | 308 | 3 | 81 | 392 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\vector.lua | Lua | 57 | 1 | 19 | 77 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\apis\window.lua | Lua | 299 | 1 | 69 | 369 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\alias.lua | Lua | 5 | 0 | 2 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\bedit.lua | Lua | 5 | 0 | 2 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\bg.lua | Lua | 5 | 0 | 2 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\calc.lua | Lua | 5 | 2 | 1 | 8 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\cd.lua | Lua | 3 | 0 | 2 | 5 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\copy.lua | Lua | 6 | 0 | 2 | 8 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\delete.lua | Lua | 5 | 0 | 2 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\devbin.lua | Lua | 10 | 0 | 2 | 12 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\edit.lua | Lua | 5 | 0 | 2 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\fg.lua | Lua | 5 | 0 | 2 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\help.lua | Lua | 6 | 0 | 2 | 8 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\list.lua | Lua | 5 | 0 | 2 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\mkdir.lua | Lua | 5 | 0 | 2 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\move.lua | Lua | 6 | 0 | 2 | 8 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\paint.lua | Lua | 4 | 0 | 3 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\pkg.lua | Lua | 4 | 0 | 3 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\reboot.lua | Lua | 5 | 0 | 2 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\redstone.lua | Lua | 12 | 0 | 2 | 14 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\set.lua | Lua | 5 | 0 | 2 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\shutdown.lua | Lua | 5 | 0 | 2 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\tree.lua | Lua | 5 | 1 | 1 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\completions\ver.lua | Lua | 4 | 1 | 1 | 6 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\editors\advanced.lua | Lua | 255 | 2 | 61 | 318 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\editors\basic.lua | Lua | 183 | 1 | 46 | 230 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\help\chest_sorter_tutorial.md | Markdown | 76 | 0 | 18 | 94 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\keymaps\lwjgl2.lua | Lua | 23 | 1 | 2 | 26 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\keymaps\lwjgl3.lua | Lua | 118 | 1 | 2 | 121 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\audio\dfpwm.lua | Lua | 168 | 6 | 55 | 229 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\completion.lua | Lua | 31 | 3 | 12 | 46 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\expect.lua | Lua | 39 | 1 | 11 | 51 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\http\gist.lua | Lua | 215 | 62 | 17 | 294 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\pretty.lua | Lua | 345 | 101 | 78 | 524 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\shell\completion.lua | Lua | 87 | 2 | 25 | 114 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\cc\strings.lua | Lua | 99 | 1 | 34 | 134 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\edit\syntax.lua | Lua | 135 | 40 | 24 | 199 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\edit\syntax\lua.lua | Lua | 149 | 0 | 4 | 153 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\edit\syntax\python.lua | Lua | 127 | 0 | 1 | 128 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\rc\copy.lua | Lua | 28 | 2 | 7 | 37 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\rc\io.lua | Lua | 186 | 2 | 44 | 232 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\rc\json.lua | Lua | 280 | 45 | 64 | 389 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\modules\main\rc\thread.lua | Lua | 309 | 6 | 87 | 402 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\about.lua | Lua | 4 | 1 | 3 | 8 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\alias.lua | Lua | 29 | 5 | 13 | 47 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\app.lua | Lua | 37 | 7 | 9 | 53 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\appdelete.lua | Lua | 90 | 15 | 16 | 121 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\applist.lua | Lua | 55 | 8 | 13 | 76 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\bg.lua | Lua | 13 | 1 | 6 | 20 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\calc.lua | Lua | 54 | 19 | 16 | 89 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\catos.lua | Lua | 58 | 6 | 5 | 69 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\chest_sorter.lua | Lua | 300 | 44 | 46 | 390 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\clear.lua | Lua | 14 | 5 | 5 | 24 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\commands.lua | Lua | 47 | 8 | 9 | 64 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\config.lua | Lua | 224 | 17 | 32 | 273 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\copy.lua | Lua | 30 | 0 | 7 | 37 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\craftos.lua | Lua | 43 | 1 | 15 | 59 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\delete.lua | Lua | 21 | 0 | 4 | 25 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\devbin.lua | Lua | 69 | 2 | 19 | 90 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\edit.lua | Lua | 18 | 5 | 7 | 30 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\fg.lua | Lua | 13 | 1 | 6 | 20 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\find.lua | Lua | 156 | 19 | 24 | 199 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\help.lua | Lua | 27 | 8 | 10 | 45 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\helplist.lua | Lua | 47 | 8 | 8 | 63 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\history.lua | Lua | 93 | 12 | 6 | 111 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\imageview.lua | Lua | 69 | 16 | 17 | 102 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\list.lua | Lua | 44 | 5 | 14 | 63 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\lua.lua | Lua | 46 | 5 | 13 | 64 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\mkdir.lua | Lua | 10 | 0 | 3 | 13 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\move.lua | Lua | 30 | 0 | 7 | 37 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\network.lua | Lua | 159 | 9 | 26 | 194 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\paint.lua | Lua | 1 | 1 | 2 | 4 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\peripherals.lua | Lua | 23 | 4 | 7 | 34 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\pkg.lua | Lua | 508 | 69 | 82 | 659 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\programs.lua | Lua | 5 | 0 | 2 | 7 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\reboot.lua | Lua | 7 | 0 | 4 | 11 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\redstone.lua | Lua | 80 | 4 | 23 | 107 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\set.lua | Lua | 51 | 5 | 10 | 66 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\shell.lua | Lua | 85 | 13 | 18 | 116 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\shutdown.lua | Lua | 7 | 0 | 4 | 11 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\storage.lua | Lua | 41 | 10 | 10 | 61 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_comparator.lua | Lua | 126 | 18 | 17 | 161 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_config.lua | Lua | 52 | 16 | 18 | 86 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_config_find.lua | Lua | 38 | 17 | 15 | 70 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_find.lua | Lua | 101 | 26 | 31 | 158 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_help_format.lua | Lua | 35 | 4 | 5 | 44 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_helplist.lua | Lua | 57 | 1 | 5 | 63 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_history.lua | Lua | 63 | 2 | 7 | 72 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_imageview.lua | Lua | 26 | 3 | 5 | 34 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\test_lgui.lua | Lua | 47 | 10 | 9 | 66 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\threads.lua | Lua | 22 | 5 | 8 | 35 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\time.lua | Lua | 56 | 6 | 6 | 68 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\tree.lua | Lua | 62 | 12 | 19 | 93 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\turtle.lua | Lua | 253 | 14 | 25 | 292 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\turtle_farmer.lua | Lua | 293 | 66 | 64 | 423 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\turtle_miner.lua | Lua | 346 | 58 | 58 | 462 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\ver.lua | Lua | 14 | 6 | 6 | 26 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\programs\wget.lua | Lua | 46 | 3 | 10 | 59 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\00_fs.lua | Lua | 148 | 24 | 30 | 202 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\10_package.lua | Lua | 99 | 7 | 26 | 132 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\15_term.lua | Lua | 303 | 11 | 75 | 389 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\20_io.lua | Lua | 9 | 0 | 5 | 14 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\30_peripheral.lua | Lua | 139 | 4 | 42 | 185 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\35_http.lua | Lua | 112 | 31 | 26 | 169 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\40_commands.lua | Lua | 26 | 1 | 10 | 37 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\startup\90_settings.lua | Lua | 82 | 1 | 19 | 102 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\data\computercraft\lua\rom\update.lua | Lua | 62 | 6 | 18 | 86 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\installer.lua | Lua | 167 | 14 | 30 | 211 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\unbios.lua | Lua | 84 | 33 | 1 | 118 |
|
||||
| d:\Projects\Lua\LeonOS\leonos\updater.lua | Lua | 261 | 34 | 54 | 349 |
|
||||
| Total | | 11,040 | 1,124 | 2,344 | 14,508 |
|
||||
+-----------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
15
LICENSE_BSL
Normal file
15
LICENSE_BSL
Normal file
@@ -0,0 +1,15 @@
|
||||
BLC Certificate
|
||||
|
||||
Copyright © LeonOS Organization. All rights reserved.
|
||||
|
||||
The full name of the BLC Certificate is "Build with LeonCore".
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the operating system with the BLC Certificate, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the operating system; when using or modifying the operating system with the BLC Certificate, you may keep the operating system closed-source, but shall indicate this agreement on the system information page; you must indicate "Powered by LeonCore" at startup or in other relevant locations of the operating system; you may use the operating system for commercial profit, but for commercialized versions of the operating system, you shall report the profit situation to LeonCore via GitHub Issues; you may open-source the operating system under any open-source license other than the BLC License; this agreement shall only apply to the open-source projects of LeonCore.
|
||||
|
||||
Any contributor who submits code, documents, or other contributions to the LeonCore open-source project hereby grants the LeonOS Organization the right to use, modify, and redistribute such contributions, and the submitted content must comply with the terms of this agreement. The contributor shall ensure that the submitted content is free of copyright disputes and does not infringe the legitimate rights and interests of third parties; otherwise, the contributor shall bear full responsibility for any consequences arising therefrom.
|
||||
|
||||
This version of the BLC Agreement is Version 1.0. The LeonOS Organization reserves the right to revise this agreement, and the revised agreement shall be published through the official GitHub repository of the LeonCore project. After the revised agreement takes effect, any act of using or modifying the operating system shall comply with the latest version of the agreement.
|
||||
|
||||
THE OPERATING SYSTEM WITH THE BLC CERTIFICATE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE OPERATING SYSTEM OR THE USE OR OTHER DEALINGS IN THE OPERATING SYSTEM.
|
||||
@@ -2,12 +2,7 @@
|
||||
|
||||
The following is a non-exhaustive list of new
|
||||
and/or changed features in LeonOS compared to
|
||||
LeonOS.
|
||||
|
||||
!!!! THIS FILE IS OUTDATED !!!!
|
||||
|
||||
See https://ocaweso.me/LeonOS for more
|
||||
up-to-date documentation.
|
||||
CraftOS.
|
||||
|
||||
Major Changes
|
||||
=============
|
||||
|
||||
31
README.md
31
README.md
@@ -1,6 +1,35 @@
|
||||

|
||||
# LeonOS
|
||||
Use
|
||||
```shell
|
||||
wget run https://gh.catmak.name/https://raw.githubusercontent.com/Leonmmcoset/LeonOS/refs/heads/main/installer.lua
|
||||
wget run https://gh.catmak.name/https://raw.githubusercontent.com/CCLeonOS/LeonOS/refs/heads/main/installer.lua
|
||||
```
|
||||
to install the LeonOS system.
|
||||
|
||||
> [!NOTE]
|
||||
> The CatOS program is moved to `ccleonos/catos-installer`.
|
||||
|
||||
## How did LeonOS work?
|
||||
[](https://mermaid.live/edit#pako:eNq1WO9T00gY_lc6cfwGTSgUSmfuZrQtZ-dkdE79ctZxQhpoJE06STrKqTMgVMvPogeIiAIHHnhzU_HUo0LR_-Wum5RP_Av3bjZJE1qmMtPrlya77_Pus---u--zuU9xcpKnwtSgKN_lUqyi-a5HE5IPfufP-9DLL9WNHeP9AXo9fVxeqT75o1Kaqo7OVErT-qcxY2caDI7L-etR33e-63KmPSrflY7LkwnJ8aCv76FyARVXKp8nwVIvzKPJWbS5qy_PHZdnjI1i5esrfXJUX52sTj0yHn02Ftb0xbzpA3vgRFZVo_ygT5BUjRVFXvENCqIYPhdlYqG-vjZVU-RhPnyu60IvEwu0cbIoK-FzDMOcgCtZSRPSvAWOMX19McYBd0Z6ujujp4P5exqvSKxooTH2YsBBx7p7YgHv0M7sjYUdPb9X2d-q7D8jjTdUXrmZoEgHDkippOcL6HEObS2hzQ944tStcDhsEbaZCNywCfUlqJSmZdQwTQ8JWio74OfkNM1xIi9LskpbfwOiPECnWUGik6zG0mCSycIUOIUd1Ggxy9IDgqz64SFBucii4mR1M3e0_Lde_EQa43bQgTHpxUu-XwDeznpgNw5rp9XN2_FyVvKeMTBVO4C-9vbvHySo6tf56sbMCasHtfFOTMJGze2hwtJPV_rR3LRRfotmchj0g6Bdyg40RqDHL1DuTVayo_bv6BjA9aUnlYO_0dZneM2w3LA_zaV5zWRwWeZYse-aO7ZbS0fjO_rqLJraqJTmjnKzxmGR9JKRIcLkAWKL5tbQ9nT100RlfxuMjcm8vvqnE2M7Gwk6EgdkJE5HomjvTeVwFbZlIzOyEpH4WZfAT6zou7IyjE8IlVZ4kWdV3j-SFu0luSxIGrCoHGwa62P65qi-9gbPcXNOXy9XtydQ_sXplDD2zKQ0heVpJSvyKp1R5Ds8p9023_zppM2pH5YCJz_w8izOaTxs-7Ny8Th3L6idbdu_o8JTsoTwgErjOEEi8Qam7h1G6y8_6ku75MVYmdD35xuktgduIRzbGxmYD7asncVAYXWX5K3x4cA4WCNdanZgSGEzKTtvIWYNTKlbxBr_LsqyJspskpwM5UX0roym1quHh875UNstpx0OtdjXvJ01-rVR7OCb7OJXrsUkTRnJyCQzcQPsYFTYhAoD5OqoeU5bFzGPo__h7LWHqz05a5Gg4Iw5WlxF4wW3Jf5d06BMZzM49PPv0NROdWIF1iuRgNKbZ5jbg6Z73z-Pn_l6mdsqr2mCNNRkvrU5W85bNFkFQCrxSDvUTs7nwtW4CpOBP_T-UVOC2Prb2GkKzzdlx2YElT7JqF9O4vMEb4SdDfTqORxnaP_XptQsWAvZpYnHOoJXFRnSJI0ZEuFANh7mWXwN4gKKAcrtNSVsu2kh44zlso5yBMxFXhNkqcYaBCXkLyrO6Pn5pmRdDlrIl6t5raMcSwqarJhpYMs0o7xU_fIUvdhpStcCt5AqTzzW0bzEi-ZhUCqiqbfkzG7KDmNaSC0F7up4_ciPpNkMDt_RQtF4uawvr6PdiabULFgL2Q0Tj_W7CIo3O2Tuc5CB-sI7fWas-Z6xQC3il7Hc1ZGza30yLiX5e5ji3l-WRPj4G9TcpkS9Dlp0oDt07Wqe9N9RZclNnpeSjSqbpUfw5ccUFLCZ3CIHawZi8W2iwXJ3ZsVQG8PN-YrCpXi40bGwwW7aWgrNFqq74yfofRs7t78WltIaBZu8GezaNYNIsf0Cyj9vcJdxKS3S61JelgY1VZxHL2Et6RVCFtYrjiy5C_GC6uOWJQC3NAXB2QID88G1nLSaVR03WTXUUvFWQcUddq0iPU7lwl34TujWuebqkQ8Up1waPWng0squRPXMyB34B57VJRjPervvmRaXUg7NLp68ZzYAkasm0fHOHdN1paTaqCFFSFLhQVZU-TYqzSuQM_BO3cc-E5SW4uE0oMLwmGSVYZwmDwGUYaWfZTlNhTUlCzBFzg6l7Bcyt6jA4oA6FpBYvBKR4Xihwh3dTMD0QYXvU_eocHtHR5e_KxDs7O4JMcEepjPY2UaNQHsg5O8JdoQCvcHOXqYrGOoJPGyjfjEHDvgDwVCog-kJhoK9THdvCDySgtZPPkCZ36Ee_gdH7zUU)
|
||||
Chinese version
|
||||
---
|
||||
|
||||
LeonOS's kernal "The LeonCore Open Source Project" which is LeonCore is open source as BLC Certificate
|
||||
|
||||
```
|
||||
BLC Certificate
|
||||
|
||||
Copyright © LeonOS Organization. All rights reserved.
|
||||
|
||||
The full name of the BLC Certificate is "Build with LeonCore".
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of the operating system with the BLC Certificate, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the operating system; when using or modifying the operating system with the BLC Certificate, you may keep the operating system closed-source, but shall indicate this agreement on the system information page; you must indicate "Powered by LeonCore" at startup or in other relevant locations of the operating system; you may use the operating system for commercial profit, but for commercialized versions of the operating system, you shall report the profit situation to LeonCore via GitHub Issues; you may open-source the operating system under any open-source license other than the BLC License; this agreement shall only apply to the open-source projects of LeonCore.
|
||||
|
||||
Any contributor who submits code, documents, or other contributions to the LeonCore open-source project hereby grants the LeonOS Organization the right to use, modify, and redistribute such contributions, and the submitted content must comply with the terms of this agreement. The contributor shall ensure that the submitted content is free of copyright disputes and does not infringe the legitimate rights and interests of third parties; otherwise, the contributor shall bear full responsibility for any consequences arising therefrom.
|
||||
|
||||
This version of the BLC Agreement is Version 1.0. The LeonOS Organization reserves the right to revise this agreement, and the revised agreement shall be published through the official GitHub repository of the LeonCore project. After the revised agreement takes effect, any act of using or modifying the operating system shall comply with the latest version of the agreement.
|
||||
|
||||
THE OPERATING SYSTEM WITH THE BLC CERTIFICATE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE OPERATING SYSTEM OR THE USE OR OTHER DEALINGS IN THE OPERATING SYSTEM.
|
||||
```
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
_G._HOST = _G._HOST .. " (LeonOS 1.0.0)"
|
||||
_G._HOST = _G._HOST .. " (LeonOS 1.0.3)"
|
||||
local fs = rawget(_G, "fs")
|
||||
|
||||
_G._RC_ROM_DIR = _RC_ROM_DIR or (...) and fs.exists("/leonos") and "/leonos" or "/rom"
|
||||
@@ -32,7 +32,7 @@ local rc = {
|
||||
_VERSION = {
|
||||
major = 1,
|
||||
minor = 0,
|
||||
patch = 0
|
||||
patch = 3
|
||||
},
|
||||
queueEvent = pull(os, "queueEvent"),
|
||||
startTimer = pull(os, "startTimer"),
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"description": "An example package for LeonOS",
|
||||
"author": "LeonMMcoset",
|
||||
"license": "MIT",
|
||||
"type": "app",
|
||||
"dependencies": {},
|
||||
"files": [
|
||||
"example.lua"
|
||||
|
||||
94
data/computercraft/lua/rom/apis/appgui.lua
Normal file
94
data/computercraft/lua/rom/apis/appgui.lua
Normal file
@@ -0,0 +1,94 @@
|
||||
-- appgui API for LeonOS
|
||||
-- Provides simple topbar and downbar drawing functions
|
||||
|
||||
local term = require("term")
|
||||
local colors = require("colors")
|
||||
local expect = require("cc.expect").expect
|
||||
|
||||
local appgui = {}
|
||||
|
||||
--- Draws a top bar with the specified text centered
|
||||
--- @param text string The text to display in the top bar
|
||||
--- @param fgColor number Optional foreground color (default: white)
|
||||
--- @param bgColor number Optional background color (default: blue)
|
||||
function appgui.topbar(text, fgColor, bgColor)
|
||||
expect(1, text, "string")
|
||||
expect(2, fgColor, "number", "nil")
|
||||
expect(3, bgColor, "number", "nil")
|
||||
|
||||
-- Default colors
|
||||
fgColor = fgColor or colors.white
|
||||
bgColor = bgColor or colors.blue
|
||||
|
||||
-- Save current colors
|
||||
local oldFg = term.getTextColor()
|
||||
local oldBg = term.getBackgroundColor()
|
||||
|
||||
-- Get terminal size
|
||||
local w, h = term.getSize()
|
||||
|
||||
-- Set colors and position
|
||||
term.setTextColor(fgColor)
|
||||
term.setBackgroundColor(bgColor)
|
||||
term.setCursorPos(1, 1)
|
||||
|
||||
-- Clear the top line
|
||||
term.clearLine()
|
||||
|
||||
-- Calculate padding for centered text
|
||||
local padding = math.floor((w - #text) / 2)
|
||||
|
||||
-- Draw the top bar with centered text
|
||||
term.write(string.rep(" ", padding) .. text .. string.rep(" ", padding))
|
||||
|
||||
-- Restore original colors
|
||||
term.setTextColor(oldFg)
|
||||
term.setBackgroundColor(oldBg)
|
||||
|
||||
-- Move cursor below the top bar
|
||||
term.setCursorPos(1, 2)
|
||||
end
|
||||
|
||||
--- Draws a bottom bar with the specified text centered
|
||||
--- @param text string The text to display in the bottom bar
|
||||
--- @param fgColor number Optional foreground color (default: white)
|
||||
--- @param bgColor number Optional background color (default: blue)
|
||||
function appgui.downbar(text, fgColor, bgColor)
|
||||
expect(1, text, "string")
|
||||
expect(2, fgColor, "number", "nil")
|
||||
expect(3, bgColor, "number", "nil")
|
||||
|
||||
-- Default colors
|
||||
fgColor = fgColor or colors.white
|
||||
bgColor = bgColor or colors.blue
|
||||
|
||||
-- Save current colors
|
||||
local oldFg = term.getTextColor()
|
||||
local oldBg = term.getBackgroundColor()
|
||||
|
||||
-- Get terminal size
|
||||
local w, h = term.getSize()
|
||||
|
||||
-- Set colors and position
|
||||
term.setTextColor(fgColor)
|
||||
term.setBackgroundColor(bgColor)
|
||||
term.setCursorPos(1, h)
|
||||
|
||||
-- Clear the bottom line
|
||||
term.clearLine()
|
||||
|
||||
-- Calculate padding for centered text
|
||||
local padding = math.floor((w - #text) / 2)
|
||||
|
||||
-- Draw the bottom bar with centered text
|
||||
term.write(string.rep(" ", padding) .. text .. string.rep(" ", padding))
|
||||
|
||||
-- Restore original colors
|
||||
term.setTextColor(oldFg)
|
||||
term.setBackgroundColor(oldBg)
|
||||
|
||||
-- Move cursor to a safe position
|
||||
term.setCursorPos(1, 1)
|
||||
end
|
||||
|
||||
return appgui
|
||||
@@ -86,8 +86,17 @@ local function redraw()
|
||||
win.setVisible(true)
|
||||
end
|
||||
|
||||
local function getSyntaxFile(fileName)
|
||||
local ext = string.match(fileName, "%.([^%.]+)$") or ""
|
||||
local syntaxFiles = {
|
||||
lua = "/leonos/modules/main/edit/syntax/lua.lua",
|
||||
py = "/leonos/modules/main/edit/syntax/python.lua"
|
||||
}
|
||||
return syntaxFiles[ext] or syntaxFiles.lua
|
||||
end
|
||||
|
||||
local syntax = require("edit.syntax")
|
||||
.new("/leonos/modules/main/edit/syntax/lua.lua")
|
||||
.new(getSyntaxFile(file))
|
||||
|
||||
local function rehighlight()
|
||||
local line = {}
|
||||
|
||||
103
data/computercraft/lua/rom/help/appgui.hlp
Normal file
103
data/computercraft/lua/rom/help/appgui.hlp
Normal file
@@ -0,0 +1,103 @@
|
||||
=== appgui API ===
|
||||
|
||||
The `appgui` API provides simple functions for drawing top bars and bottom bars in LeonOS applications, making it easy to create consistent user interfaces.
|
||||
|
||||
== Introduction ==
|
||||
|
||||
The appgui API is designed to simplify the process of adding professional-looking UI elements to your applications. It provides two main functions for drawing centered text bars at the top or bottom of the screen.
|
||||
|
||||
== Available Functions ==
|
||||
|
||||
- **appgui.topbar(text, [fgColor], [bgColor])**: Draws a top bar with centered text
|
||||
- **appgui.downbar(text, [fgColor], [bgColor])**: Draws a bottom bar with centered text
|
||||
|
||||
== Function Parameters ==
|
||||
|
||||
Both functions accept the following parameters:
|
||||
|
||||
- **text**: (string) The text to display in the bar
|
||||
- **fgColor**: (number, optional) The foreground color (default: white)
|
||||
- **bgColor**: (number, optional) The background color (default: blue)
|
||||
|
||||
== Usage Examples ==
|
||||
|
||||
=== Basic Usage ===
|
||||
|
||||
First, you need to import the appgui module:
|
||||
|
||||
>>color yellow
|
||||
local appgui = require("appgui")
|
||||
>>color white
|
||||
|
||||
Then you can use the functions to draw bars:
|
||||
|
||||
1. Draw a top bar with default colors (white text on blue background):
|
||||
>>color yellow
|
||||
appgui.topbar("My Application Title")
|
||||
>>color white
|
||||
|
||||
2. Draw a bottom bar with default colors:
|
||||
>>color yellow
|
||||
appgui.downbar("Status: Ready")
|
||||
>>color white
|
||||
|
||||
=== Custom Colors ===
|
||||
|
||||
You can specify custom colors using the `colors` module:
|
||||
|
||||
>>color yellow
|
||||
local colors = require("colors")
|
||||
|
||||
-- Red text on yellow background
|
||||
appgui.topbar("Warning Message", colors.red, colors.yellow)
|
||||
|
||||
-- Green text on black background
|
||||
appgui.downbar("Success", colors.green, colors.black)
|
||||
>>color white
|
||||
|
||||
=== Complete Example ===
|
||||
|
||||
Here's a complete example showing how to use both top and bottom bars in an application:
|
||||
|
||||
>>color yellow
|
||||
local appgui = require("appgui")
|
||||
local term = require("term")
|
||||
local colors = require("colors")
|
||||
|
||||
-- Clear the screen
|
||||
term.clear()
|
||||
|
||||
-- Draw top and bottom bars
|
||||
appgui.topbar("My Application")
|
||||
appgui.downbar("Press Q to quit")
|
||||
|
||||
-- Add some content
|
||||
print()
|
||||
print("Welcome to my application!")
|
||||
print()
|
||||
print("This is a demonstration of the appgui API.")
|
||||
print()
|
||||
|
||||
-- Wait for 'Q' key to exit
|
||||
while true do
|
||||
local event, key = os.pullEvent("key")
|
||||
if key == 16 then -- Q key
|
||||
break
|
||||
end
|
||||
end
|
||||
>>color white
|
||||
|
||||
== Notes ==
|
||||
|
||||
- The text will be automatically centered in the bar
|
||||
- The functions will preserve the original terminal colors by saving and restoring them
|
||||
- After drawing a top bar, the cursor will be positioned below the bar
|
||||
- After drawing a bottom bar, the cursor will be positioned at the top of the screen
|
||||
- You can use any colors available in the `colors` module
|
||||
- If the text is longer than the terminal width, it will be truncated
|
||||
|
||||
== See Also ==
|
||||
|
||||
- **colors**: For available color values
|
||||
- **term**: For other terminal manipulation functions
|
||||
- **appgui_demo**: A demonstration program showing the appgui API in action
|
||||
@@ -52,10 +52,33 @@ The package.json file contains metadata about your package. Here's an example:
|
||||
- **version**: The package version (semantic versioning recommended)
|
||||
- **author**: Your name or username
|
||||
- **description**: A short description of what the package does
|
||||
- **type**: The type of your package ("app" for applications, "api" for libraries)
|
||||
- **main**: The main Lua file to load
|
||||
- **dependencies**: Other packages your package depends on
|
||||
- **exports**: Functions or variables to export for other programs to use
|
||||
|
||||
== Package Type Field ==
|
||||
|
||||
The `type` field in package.json determines where your package files will be installed:
|
||||
|
||||
- **app**: Files will be installed in the `/app` directory (default behavior)
|
||||
- **api**: Files will be installed in the `/leonos/apis` directory
|
||||
|
||||
Example of a package.json with type field:
|
||||
|
||||
>>color yellow
|
||||
{
|
||||
"name": "example-api",
|
||||
"version": "1.0.0",
|
||||
"author": "Your Name",
|
||||
"description": "An example API package",
|
||||
"type": "api",
|
||||
"main": "example-api.lua",
|
||||
"dependencies": {},
|
||||
"exports": {}
|
||||
}
|
||||
>>color white
|
||||
|
||||
== Writing Package Code ==
|
||||
|
||||
Edit the `<package_name>.lua` file to add your code. Here's a simple example:
|
||||
|
||||
128
data/computercraft/lua/rom/modules/main/edit/syntax/python.lua
Normal file
128
data/computercraft/lua/rom/modules/main/edit/syntax/python.lua
Normal file
@@ -0,0 +1,128 @@
|
||||
local syn = {
|
||||
whitespace = {
|
||||
{
|
||||
function(c)
|
||||
return c:match("[ \n\r\t]")
|
||||
end,
|
||||
function()
|
||||
return false
|
||||
end,
|
||||
function(c)
|
||||
return c:match("^[ \n\r\t]+")
|
||||
end
|
||||
},
|
||||
},
|
||||
word = {
|
||||
{
|
||||
function(c)
|
||||
return not not c:match("[a-zA-Z_]")
|
||||
end,
|
||||
function(_, c)
|
||||
return not not c:match("[a-zA-Z_0-9]")
|
||||
end
|
||||
}
|
||||
},
|
||||
keyword = {
|
||||
"and", "as", "assert", "break", "class", "continue", "def",
|
||||
"del", "elif", "else", "except", "finally", "for", "from",
|
||||
"global", "if", "import", "in", "is", "lambda", "nonlocal",
|
||||
"not", "or", "pass", "raise", "return", "try", "while",
|
||||
"with", "yield"
|
||||
},
|
||||
builtin = {
|
||||
"abs", "all", "any", "ascii", "bin", "bool", "breakpoint", "bytearray",
|
||||
"bytes", "callable", "chr", "classmethod", "compile", "complex", "delattr",
|
||||
"dict", "dir", "divmod", "enumerate", "eval", "exec", "filter", "float",
|
||||
"format", "frozenset", "getattr", "globals", "hasattr", "hash", "help",
|
||||
"hex", "id", "input", "int", "isinstance", "issubclass", "iter", "len",
|
||||
"list", "locals", "map", "max", "memoryview", "min", "next", "object",
|
||||
"oct", "open", "ord", "pow", "print", "property", "range", "repr",
|
||||
"reversed", "round", "set", "setattr", "slice", "sorted", "staticmethod",
|
||||
"str", "sum", "super", "tuple", "type", "vars", "zip", "__import__"
|
||||
},
|
||||
separator = {
|
||||
",", "(", ")", "{", "}", "[", "]", ":", ";",
|
||||
},
|
||||
operator = {
|
||||
"+", "-", "/", "*", "**", "//", "==", "=", ">", "<", ">=", "<=",
|
||||
"!=", "&", "|", "^", "%", "~", ">>", "<<", "+=", "-=", "*=", "/=",
|
||||
"%=", "**=", "//=", "&=", "|=", "^=", ">>=", "<<="
|
||||
},
|
||||
boolean = {
|
||||
"True", "False", "None"
|
||||
},
|
||||
comment = {
|
||||
{
|
||||
function(c)
|
||||
return c == "#"
|
||||
end,
|
||||
function(t,c)
|
||||
return c ~= "\n"
|
||||
end,
|
||||
function(t)
|
||||
return #t > 0
|
||||
end
|
||||
}
|
||||
},
|
||||
string = {
|
||||
{
|
||||
function(c)
|
||||
return c == "'" or c == '"'
|
||||
end,
|
||||
function(t, c)
|
||||
local first = t:sub(1,1)
|
||||
local last = t:sub(#t)
|
||||
local penultimate = t:sub(-2, -2)
|
||||
if #t == 1 then return true end
|
||||
if first == last and penultimate ~= "\\" then return false end
|
||||
return true
|
||||
end
|
||||
},
|
||||
{
|
||||
function(c)
|
||||
return c == '"' and (t == '"' or t == '')
|
||||
end,
|
||||
function(t,c)
|
||||
if t:match("^"""$) and c == '"' then
|
||||
return false
|
||||
end
|
||||
if t:match("^"""[^"]*$) then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end,
|
||||
function(t)
|
||||
return t:match("^"""[^"]*"""$)
|
||||
end
|
||||
},
|
||||
{
|
||||
function(c)
|
||||
return c == "'" and (t == "'" or t == '')
|
||||
end,
|
||||
function(t,c)
|
||||
if t:match("^'''$") and c == "'" then
|
||||
return false
|
||||
end
|
||||
if t:match("^'''[^']*$") then
|
||||
return true
|
||||
end
|
||||
return false
|
||||
end,
|
||||
function(t)
|
||||
return t:match("^'''[^']*'''$)
|
||||
end
|
||||
}
|
||||
},
|
||||
number = {
|
||||
{
|
||||
function(c)
|
||||
return not not tonumber(c)
|
||||
end,
|
||||
function(t, c)
|
||||
return not not tonumber(t .. c .. "0") or (c == '.' and not t:find('\.'))
|
||||
end
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return syn
|
||||
77
data/computercraft/lua/rom/programs/appgui_demo.lua
Normal file
77
data/computercraft/lua/rom/programs/appgui_demo.lua
Normal file
@@ -0,0 +1,77 @@
|
||||
-- appgui_demo.lua
|
||||
-- Demonstration of the appgui API for drawing top and bottom bars
|
||||
|
||||
local appgui = require("appgui")
|
||||
local term = require("term")
|
||||
local colors = require("colors")
|
||||
|
||||
-- Clear the screen before starting
|
||||
term.clear()
|
||||
|
||||
-- Draw the top bar with default colors (white text on blue background)
|
||||
appgui.topbar("LeonOS App GUI Demo")
|
||||
|
||||
-- Add some content in the middle
|
||||
print()
|
||||
print("This is a demonstration of the appgui API.")
|
||||
print()
|
||||
print("The top bar shows the application title.")
|
||||
print("The bottom bar shows the status information.")
|
||||
print()
|
||||
print("Press any key to see custom colors...")
|
||||
|
||||
-- Wait for a key press using a safe event pulling function
|
||||
local pullEventFunc = os.pullEvent or os.pullEventRaw
|
||||
if not pullEventFunc then
|
||||
error("No valid event pulling function found")
|
||||
end
|
||||
local event, key = table.unpack({pullEventFunc("key")})
|
||||
|
||||
-- Clear the screen and redraw with custom colors
|
||||
term.clear()
|
||||
appgui.topbar("Custom Colored Top Bar", colors.yellow, colors.red)
|
||||
|
||||
-- Add some content
|
||||
print()
|
||||
print("Now with custom colors!")
|
||||
print()
|
||||
print("Top bar: Yellow text on Red background")
|
||||
print()
|
||||
print("Press any key to continue...")
|
||||
|
||||
-- Wait for a key press using a safe event pulling function
|
||||
local pullEventFunc = os.pullEvent or os.pullEventRaw
|
||||
if not pullEventFunc then
|
||||
error("No valid event pulling function found")
|
||||
end
|
||||
local event, key = table.unpack({pullEventFunc("key")})
|
||||
|
||||
-- Clear the screen and draw both top and bottom bars
|
||||
term.clear()
|
||||
appgui.topbar("Complete GUI Demo")
|
||||
appgui.downbar("Status: Running - Press Q to quit")
|
||||
|
||||
-- Add some content in the middle
|
||||
print()
|
||||
print("Now you can see both top and bottom bars.")
|
||||
print()
|
||||
print("Try resizing the terminal window to see how the text stays centered.")
|
||||
print()
|
||||
print("Press Q to exit this demo.")
|
||||
|
||||
-- Main loop to handle key presses
|
||||
while true do
|
||||
-- Use a safe event pulling function
|
||||
local pullEventFunc = os.pullEvent or os.pullEventRaw
|
||||
if not pullEventFunc then
|
||||
error("No valid event pulling function found")
|
||||
end
|
||||
local event, key = table.unpack({pullEventFunc("key")})
|
||||
if key == 16 then -- Q key
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
-- Clear the screen before exiting
|
||||
term.clear()
|
||||
print("AppGUI Demo has ended.")
|
||||
@@ -35,7 +35,7 @@ print("LeonOS Lua REPL.\nCall exit() to exit.")
|
||||
local history = {}
|
||||
while run do
|
||||
term.setTextColor(colors.white)
|
||||
io.write("$ lua >>> ")
|
||||
io.write("$ lua # ")
|
||||
local data = term.read(nil, history, function(text)
|
||||
return textutils.complete(text, env)
|
||||
end)
|
||||
|
||||
@@ -28,7 +28,8 @@ local pkg_config = {
|
||||
repo_url = "https://example.com/leonos/packages", -- 包仓库URL
|
||||
local_pkg_dir = "/packages", -- 本地包存储目录
|
||||
installed_db = "/packages/installed.json", -- 已安装包数据库
|
||||
cache_dir = "/packages/cache" -- 缓存目录
|
||||
cache_dir = "/packages/cache", -- 缓存目录
|
||||
github_api_url = "https://gh.catmak.name/https://raw.githubusercontent.com" -- GitHub API基础URL
|
||||
}
|
||||
|
||||
-- 创建新包
|
||||
@@ -53,6 +54,7 @@ local function create_package(pkg_name)
|
||||
description = "A new package for LeonOS",
|
||||
author = "LeonOS User",
|
||||
license = "MIT",
|
||||
type = "app", -- 默认类型为app
|
||||
dependencies = {},
|
||||
files = {
|
||||
pkg_name .. ".lua"
|
||||
@@ -168,6 +170,180 @@ local function show_help()
|
||||
print(" --force Force install/update")
|
||||
end
|
||||
|
||||
-- 从GitHub下载包元数据
|
||||
local function download_github_package_meta(repo_path)
|
||||
print("Downloading metadata from GitHub: " .. repo_path)
|
||||
|
||||
-- 检查http模块是否可用
|
||||
if not http or not http.get then
|
||||
print("Error: HTTP module not available.")
|
||||
return nil
|
||||
end
|
||||
|
||||
-- 构建GitHub API URL
|
||||
-- 假设package.json在仓库根目录
|
||||
local meta_url = string.format("%s/%s/master/package.json", pkg_config.github_api_url, repo_path)
|
||||
|
||||
-- 下载package.json
|
||||
local response, err = http.get(meta_url)
|
||||
if not response then
|
||||
print("Error downloading package.json: " .. err)
|
||||
return nil
|
||||
end
|
||||
|
||||
-- 读取响应内容
|
||||
local content = response.readAll()
|
||||
response.close()
|
||||
|
||||
-- 解析JSON
|
||||
local ok, meta = pcall(textutils.unserializeJSON, content)
|
||||
if not ok or not meta then
|
||||
print("Error parsing package.json.")
|
||||
return nil
|
||||
end
|
||||
|
||||
-- 添加仓库路径信息
|
||||
meta.repo_path = repo_path
|
||||
|
||||
return meta
|
||||
end
|
||||
|
||||
-- 从GitHub下载包文件
|
||||
local function download_github_package_file(repo_path, file_path, save_path)
|
||||
-- 构建文件下载URL
|
||||
local file_url = string.format("%s/%s/master/%s", pkg_config.github_api_url, repo_path, file_path)
|
||||
|
||||
-- 下载文件
|
||||
local response, err = http.get(file_url)
|
||||
if not response then
|
||||
print("Error downloading file: " .. file_path .. " - " .. err)
|
||||
return false
|
||||
end
|
||||
|
||||
-- 确保保存目录存在
|
||||
local save_dir = fs.getDir(save_path)
|
||||
if not fs.exists(save_dir) then
|
||||
fs.makeDir(save_dir)
|
||||
end
|
||||
|
||||
-- 写入文件
|
||||
local file = io.open(save_path, "w")
|
||||
if not file then
|
||||
print("Error creating file: " .. save_path)
|
||||
response.close()
|
||||
return false
|
||||
end
|
||||
|
||||
file:write(response.readAll())
|
||||
file:close()
|
||||
response.close()
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
-- 安装GitHub包
|
||||
local function install_github_package(repo_path, options)
|
||||
print("Installing GitHub package: " .. repo_path)
|
||||
ensure_dirs()
|
||||
|
||||
-- 下载包元数据
|
||||
local meta = download_github_package_meta(repo_path)
|
||||
if not meta then
|
||||
return false
|
||||
end
|
||||
|
||||
-- 解析包名 (从repo_path中提取或使用package.json中的name)
|
||||
local pkg_name = meta.name or string.match(repo_path, "([^/]+)$")
|
||||
if not pkg_name then
|
||||
print("Error: Cannot determine package name.")
|
||||
return false
|
||||
end
|
||||
|
||||
local installed_db = load_installed_db() or { packages = {} }
|
||||
|
||||
-- 检查是否已安装
|
||||
if installed_db.packages[pkg_name] and not options.force then
|
||||
print("Package already installed. Use --force to reinstall.")
|
||||
return false
|
||||
end
|
||||
|
||||
-- 创建包的本地目录结构
|
||||
local pkg_version = meta.version or "1.0.0"
|
||||
local pkg_dir = fs.combine(pkg_config.local_pkg_dir, pkg_name)
|
||||
local version_dir = fs.combine(pkg_dir, pkg_version)
|
||||
|
||||
if not fs.exists(pkg_dir) then
|
||||
fs.makeDir(pkg_dir)
|
||||
end
|
||||
if not fs.exists(version_dir) then
|
||||
fs.makeDir(version_dir)
|
||||
end
|
||||
|
||||
-- 保存package.json到本地
|
||||
local meta_path = fs.combine(version_dir, "package.json")
|
||||
local meta_file = io.open(meta_path, "w")
|
||||
if not meta_file then
|
||||
print("Error: Failed to save package.json")
|
||||
return false
|
||||
end
|
||||
meta_file:write(textutils.serializeJSON(meta, false))
|
||||
meta_file:close()
|
||||
|
||||
-- 根据package类型确定安装目录
|
||||
print("Installing version: " .. pkg_version)
|
||||
local install_dir
|
||||
if meta.type and meta.type == "api" then
|
||||
install_dir = "/leonos/apis"
|
||||
else
|
||||
install_dir = "/app" -- 默认安装到app目录
|
||||
end
|
||||
|
||||
-- 确保安装目录存在
|
||||
if not fs.exists(install_dir) then
|
||||
fs.makeDir(install_dir)
|
||||
end
|
||||
|
||||
local success_count = 0
|
||||
local fail_count = 0
|
||||
|
||||
for _, file_path in ipairs(meta.files or {}) do
|
||||
local dest = fs.combine(install_dir, file_path)
|
||||
|
||||
if download_github_package_file(repo_path, file_path, dest) then
|
||||
print("Installed: " .. file_path)
|
||||
success_count = success_count + 1
|
||||
else
|
||||
fail_count = fail_count + 1
|
||||
end
|
||||
end
|
||||
|
||||
if fail_count > 0 and success_count == 0 then
|
||||
print("Error: Failed to install any files.")
|
||||
return false
|
||||
end
|
||||
|
||||
-- 记录安装信息
|
||||
installed_db.packages[pkg_name] = {
|
||||
version = pkg_version,
|
||||
installed = os.time(),
|
||||
description = meta.description or "",
|
||||
author = meta.author or "",
|
||||
source = "github",
|
||||
repo_path = repo_path
|
||||
}
|
||||
|
||||
if save_installed_db(installed_db) then
|
||||
print("Package installed successfully.")
|
||||
if fail_count > 0 then
|
||||
print("Note: " .. fail_count .. " files failed to install.")
|
||||
end
|
||||
return true
|
||||
else
|
||||
print("Failed to update package database.")
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
-- 安装包
|
||||
local function install_package(pkg_name, options)
|
||||
print("Installing package: " .. pkg_name)
|
||||
@@ -180,6 +356,11 @@ local function install_package(pkg_name, options)
|
||||
return false
|
||||
end
|
||||
|
||||
-- 检查是否为GitHub包格式 (user/repo)
|
||||
if pkg_name:find("/") then
|
||||
return install_github_package(pkg_name, options)
|
||||
end
|
||||
|
||||
-- 本地包安装逻辑
|
||||
local pkg_path = fs.combine(pkg_config.local_pkg_dir, pkg_name)
|
||||
if not fs.exists(pkg_path) then
|
||||
@@ -213,17 +394,23 @@ local function install_package(pkg_name, options)
|
||||
return false
|
||||
end
|
||||
|
||||
-- 安装文件
|
||||
-- 根据package类型确定安装目录
|
||||
print("Installing version: " .. latest_version)
|
||||
-- 确保app目录存在
|
||||
local app_dir = "/app"
|
||||
if not fs.exists(app_dir) then
|
||||
fs.makeDir(app_dir)
|
||||
local install_dir
|
||||
if meta.type and meta.type == "api" then
|
||||
install_dir = "/leonos/apis"
|
||||
else
|
||||
install_dir = "/app" -- 默认安装到app目录
|
||||
end
|
||||
|
||||
-- 确保安装目录存在
|
||||
if not fs.exists(install_dir) then
|
||||
fs.makeDir(install_dir)
|
||||
end
|
||||
|
||||
for _, file_path in ipairs(meta.files or {}) do
|
||||
local src = fs.combine(version_path, file_path)
|
||||
local dest = fs.combine(app_dir, file_path)
|
||||
local dest = fs.combine(install_dir, file_path)
|
||||
|
||||
-- 确保目标目录存在
|
||||
local dest_dir = fs.getDir(dest)
|
||||
@@ -335,9 +522,14 @@ local function remove_package(pkg_name)
|
||||
file:close()
|
||||
local ok, meta = pcall(textutils.unserializeJSON, meta_content)
|
||||
if ok and meta then
|
||||
-- 删除包文件
|
||||
-- 移除包文件
|
||||
for _, file_path in ipairs(meta.files or {}) do
|
||||
local dest = fs.combine("/rom", file_path)
|
||||
local dest
|
||||
if meta.type and meta.type == "api" then
|
||||
dest = fs.combine("/leonos/apis", file_path)
|
||||
else
|
||||
dest = fs.combine("/app", file_path)
|
||||
end
|
||||
if fs.exists(dest) then
|
||||
fs.delete(dest)
|
||||
print("Removed: " .. file_path)
|
||||
|
||||
@@ -37,6 +37,7 @@ if args[1] == "run" then
|
||||
if not _G.colors then _G.colors = require("colors") end
|
||||
if not _G.textutils then _G.textutils = require("textutils") end
|
||||
if not _G.shell then _G.shell = require("shell") end
|
||||
if not _G.http then _G.http = require("http") end
|
||||
|
||||
-- 执行下载的代码
|
||||
local func, err = load(data, "=<wget-run>", "t", _G)
|
||||
|
||||
@@ -40,7 +40,7 @@ textutils.coloredPrint(colors.yellow,
|
||||
print("Checking for update...")
|
||||
|
||||
local http = require("http")
|
||||
local base = "https://gh.catmak.name/https://raw.githubusercontent.com/Leonmmcoset/LeonOS/refs/heads/main/"
|
||||
local base = "https://gh.catmak.name/https://raw.githubusercontent.com/CCLeonOS/LeonOS/refs/heads/main/"
|
||||
|
||||
local Bhandle, Berr = http.get(base .. "data/computercraft/lua/bios.lua")
|
||||
if not Bhandle then
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- LeonOS installer
|
||||
local INSTALLER_VERSION = "1.0.0"
|
||||
local INSTALLER_VERSION = "1.0.3 Beta 7"
|
||||
local DEFAULT_ROM_DIR = "/leonos"
|
||||
|
||||
print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...")
|
||||
@@ -47,7 +47,7 @@ print("[Installer] Loading done.")
|
||||
print("[Installer] Loading module 7")
|
||||
local function rcload(f)
|
||||
return ghload(
|
||||
"Leonmmcoset/LeonOS/refs/heads/main/data/computercraft/lua/rom/"..f, f)
|
||||
"CCLeonOS/LeonOS/refs/heads/main/data/computercraft/lua/rom/"..f, f)
|
||||
end
|
||||
print("[Installer] Loading done.")
|
||||
print("[Installer] Loading module 8")
|
||||
@@ -69,6 +69,7 @@ term.write("[Installer] Loading done.\n")
|
||||
local term = require("term")
|
||||
local colors = require("colors")
|
||||
local rc = require("rc")
|
||||
-- local appgui = require("appgui")
|
||||
-- 保存当前颜色设置
|
||||
local old_fg = term.getTextColor()
|
||||
local old_bg = term.getBackgroundColor()
|
||||
@@ -96,10 +97,13 @@ tu.coloredPrint("If you want to keep the existing files, please backup them firs
|
||||
tu.coloredPrint(colors.yellow, "Are you sure? (y/n)")
|
||||
local confirm = read()
|
||||
if confirm ~= "y" then
|
||||
term.at(1, y).clearLine()
|
||||
print("Installation cancelled.")
|
||||
return
|
||||
end
|
||||
|
||||
for y=2, term.getSize() do
|
||||
term.at(1, y).clearLine()
|
||||
end
|
||||
local ROM_DIR
|
||||
-- tu.coloredPrint("Enter installation directory ", colors.yellow, "[",
|
||||
-- colors.lightBlue, DEFAULT_ROM_DIR, colors.yellow, "]")
|
||||
@@ -123,7 +127,7 @@ end
|
||||
|
||||
bullet("Getting repository tree...")
|
||||
|
||||
local repodata = dl("https://gh.catmak.name/https://api.github.com/repos/Leonmmcoset/LeonOS/git/trees/main?recursive=1")
|
||||
local repodata = dl("https://gh.catmak.name/https://api.github.com/repos/CCLeonOS/LeonOS/git/trees/main?recursive=1")
|
||||
|
||||
repodata = json.decode(repodata)
|
||||
|
||||
@@ -179,7 +183,7 @@ for i=1, #to_dl, 1 do
|
||||
local v = to_dl[i]
|
||||
if v.type == "blob" then
|
||||
parallels[#parallels+1] = function()
|
||||
local data = dl("https://gh.catmak.name/https://raw.githubusercontent.com/Leonmmcoset/LeonOS/refs/heads/main/data/computercraft/lua/"..v.path)
|
||||
local data = dl("https://gh.catmak.name/https://raw.githubusercontent.com/CCLeonOS/LeonOS/refs/heads/main/data/computercraft/lua/"..v.path)
|
||||
assert(io.open(v.real_path, "w")):write(data):close()
|
||||
done = done + 1
|
||||
progress(pby, done, #to_dl)
|
||||
@@ -193,11 +197,14 @@ term.at(1, pby).write((" "):rep((term.getSize())))
|
||||
term.at(okx, oky)
|
||||
ok()
|
||||
|
||||
bullet("Downloading startup file...")
|
||||
assert(io.open(
|
||||
fs.exists("/startup.lua") and "/unbios-rc.lua" or "/startup.lua", "w"))
|
||||
:write(dl(
|
||||
"https://gh.catmak.name/https://raw.githubusercontent.com/Leonmmcoset/LeonOS/refs/heads/main/unbios.lua"
|
||||
"https://gh.catmak.name/https://raw.githubusercontent.com/CCLeonOS/LeonOS/refs/heads/main/unbios.lua"
|
||||
)):close()
|
||||
ok()
|
||||
os.sleep(0.5)
|
||||
|
||||
tu.coloredPrint(colors.yellow, "Your computer will restart in 3 seconds.")
|
||||
local _, y = term.getCursorPos()
|
||||
|
||||
502
updater.lua
502
updater.lua
@@ -1,182 +1,348 @@
|
||||
-- LeonOS updater: stage 2
|
||||
-- LeonOS Updater
|
||||
-- Version: 0.3.8
|
||||
-- This script ensures reliable updates for the LeonOS operating system
|
||||
|
||||
local fs = rawget(_G, "fs")
|
||||
local term = rawget(_G, "term")
|
||||
-- Ensure core APIs are available
|
||||
local fs = rawget(_G, "fs") or error("Filesystem API not available")
|
||||
local term = rawget(_G, "term") or error("Terminal API not available")
|
||||
local http = rawget(_G, "http")
|
||||
if not http then
|
||||
-- Try to load the http module if not directly available
|
||||
local success
|
||||
success, http = pcall(require, "http")
|
||||
if not success then
|
||||
error("HTTP API not available. Cannot perform update.")
|
||||
end
|
||||
_G.http = http
|
||||
end
|
||||
|
||||
-- Configuration
|
||||
_G._RC_ROM_DIR = _RC_ROM_DIR or "/leonos"
|
||||
if _RC_ROM_DIR == "/rom" then _RC_ROM_DIR = "/leonos" end
|
||||
|
||||
-- fail-safe
|
||||
local start_rc = [[
|
||||
|
||||
local fs = rawget(_G, "fs")
|
||||
local term = rawget(_G, "term")
|
||||
|
||||
local w, h = term.getSize()
|
||||
local function at(x,y)
|
||||
term.setCursorPos(x,y)
|
||||
return term
|
||||
end
|
||||
|
||||
term.setBackgroundColor(0x1)
|
||||
at(1,1).clearLine()
|
||||
at(1,h).clearLine()
|
||||
|
||||
local title = "LeonOS Updater (Failure Notice)"
|
||||
term.setTextColor(0x4000)
|
||||
at(math.floor(w/2-#title/2), 1).write(title)
|
||||
|
||||
for i=2, h-1, 1 do
|
||||
term.setBackgroundColor(0x4000)
|
||||
at(1,i).clearLine()
|
||||
end
|
||||
|
||||
term.setTextColor(0x1)
|
||||
local message = {
|
||||
"A LeonOS update has failed or",
|
||||
"been interrupted. Your files are",
|
||||
"intact.",
|
||||
"",
|
||||
"Press any key to revert to the ROM.",
|
||||
"",
|
||||
"",
|
||||
}
|
||||
|
||||
for i=1, #message, 1 do
|
||||
at(3, i+2).write(message[i])
|
||||
end
|
||||
|
||||
term.setCursorBlink(true)
|
||||
|
||||
repeat local x = coroutine.yield() until x == "char"
|
||||
|
||||
pcall(fs.delete, _RC_ROM_DIR)
|
||||
pcall(fs.delete, "/.start_rc.lua")
|
||||
|
||||
os.reboot()
|
||||
while true do coroutine.yield() end
|
||||
|
||||
]]
|
||||
|
||||
local function at(x,y)
|
||||
term.setCursorPos(x,y)
|
||||
return term
|
||||
end
|
||||
|
||||
local handle = fs.open("/.start_rc.lua", "w")
|
||||
handle.write(start_rc)
|
||||
handle.close()
|
||||
|
||||
assert(pcall(function()
|
||||
local w, h = term.getSize()
|
||||
|
||||
local function dl(f)
|
||||
local hand, err = http.request(f, nil, nil, true)
|
||||
local evt
|
||||
repeat
|
||||
evt = table.pack(coroutine.yield())
|
||||
until evt[1] == "http_success" or evt[1] == "http_failure"
|
||||
|
||||
if evt[1] == "http_failure" then
|
||||
term.at(1, h).write(evt[3] or "Unknown HTTP error")
|
||||
|
||||
local id = os.startTimer(5)
|
||||
repeat local _,i = coroutine.yield() until i == id
|
||||
local REPO_OWNER = "Leonmmcoset"
|
||||
local REPO_NAME = "LeonOS"
|
||||
local BRANCH = "main"
|
||||
local BASE_PATH = "data/computercraft/lua/"
|
||||
|
||||
-- Fail-safe mechanism
|
||||
local function createFailsafe()
|
||||
local start_rc = [[
|
||||
local fs = rawget(_G, "fs")
|
||||
local term = rawget(_G, "term")
|
||||
|
||||
local function setupScreen()
|
||||
local w, h = term.getSize()
|
||||
term.setBackgroundColor(0x4000) -- Red background
|
||||
term.clear()
|
||||
|
||||
local title = "LeonOS Updater (Failure Notice)"
|
||||
term.setTextColor(0x1) -- White text
|
||||
local x = math.floor(w/2 - #title/2)
|
||||
term.setCursorPos(x > 1 and x or 1, 1)
|
||||
term.write(title)
|
||||
|
||||
local message = {
|
||||
"A LeonOS update has failed or",
|
||||
"been interrupted.",
|
||||
"Your files should remain intact.",
|
||||
"",
|
||||
"Press any key to revert to the ROM."
|
||||
}
|
||||
|
||||
for i, line in ipairs(message) do
|
||||
term.setCursorPos(math.floor(w/2 - #line/2), i + 3)
|
||||
term.write(line)
|
||||
end
|
||||
term.setCursorBlink(true)
|
||||
end
|
||||
|
||||
-- Setup the screen and wait for user input
|
||||
setupScreen()
|
||||
repeat local event = {coroutine.yield()} until event[1] == "char" or event[1] == "key"
|
||||
|
||||
-- Cleanup and reboot
|
||||
pcall(fs.delete, _RC_ROM_DIR)
|
||||
pcall(fs.delete, "/.start_rc.lua")
|
||||
|
||||
os.reboot()
|
||||
while true do coroutine.yield() end
|
||||
|
||||
else
|
||||
hand = evt[3]
|
||||
|
||||
local data = hand.readAll()
|
||||
hand.close()
|
||||
|
||||
return data
|
||||
end
|
||||
end
|
||||
|
||||
local function ghload(f, c)
|
||||
return assert(loadstring(dl("https://raw.githubusercontent.com/"..f),
|
||||
"=ghload("..(c or f)..")"))()
|
||||
end
|
||||
|
||||
local json = ghload("rxi/json.lua/master/json.lua", "json")
|
||||
|
||||
local function header()
|
||||
term.setTextColor(0x10)
|
||||
at(1, 1).clearLine()
|
||||
at(1, 1).write("LeonOS Updater (Stage 2)")
|
||||
at(1, 2).clearLine()
|
||||
at(1, 2).write("===========================")
|
||||
term.setTextColor(0x1)
|
||||
end
|
||||
|
||||
local y = 1
|
||||
local function write(text)
|
||||
if y > h-3 then
|
||||
term.scroll(1)
|
||||
header()
|
||||
else
|
||||
y = y + 1
|
||||
end
|
||||
at(1, y+2).write(text)
|
||||
end
|
||||
|
||||
header()
|
||||
|
||||
write("Getting repository tree...")
|
||||
|
||||
local repodata = json.decode(dl("https://api.github.com/repos/Leonmmcoset/LeonOS/git/trees/primary?recursive=1"))
|
||||
|
||||
write("Filtering files...")
|
||||
|
||||
local look = "data/computercraft/lua/"
|
||||
local to_dl = {}
|
||||
for _, v in pairs(repodata.tree) do
|
||||
if v.path and v.path:sub(1,#look) == look then
|
||||
v.path = v.path:sub(#look+1)
|
||||
v.real_path = v.path:gsub("^/?rom", _RC_ROM_DIR)
|
||||
to_dl[#to_dl+1] = v
|
||||
end
|
||||
end
|
||||
|
||||
write("Creating directories...")
|
||||
|
||||
for i=#to_dl, 1, -1 do
|
||||
local v = to_dl[i]
|
||||
if v.type == "tree" then
|
||||
fs.makeDir(fs.combine(v.real_path))
|
||||
table.remove(to_dl, i)
|
||||
end
|
||||
end
|
||||
|
||||
write("Downloading files...")
|
||||
|
||||
local function progress(a, b)
|
||||
at(1, 3).clearLine()
|
||||
term.setBackgroundColor(0x1)
|
||||
at(1, 3).write((" "):rep(math.ceil((w-2) * (a/b))))
|
||||
term.setBackgroundColor(0x8000)
|
||||
end
|
||||
|
||||
for i=1, #to_dl do
|
||||
local v = to_dl[i]
|
||||
if v.type == "blob" and v.real_path ~= "unbios.lua" then
|
||||
local data = dl("https://gh.catmak.name/https://raw.githubusercontent.com/Leonmmcoset/LeonOS/refs/heads/main/data/computercraft/lua/"..v.path)
|
||||
write(v.real_path)
|
||||
progress(i, #to_dl)
|
||||
if v.real_path == "bios.lua" then
|
||||
v.real_path = "/.start_rc.lua"
|
||||
end
|
||||
local handle = fs.open(v.real_path, "w")
|
||||
handle.write(data)
|
||||
]]
|
||||
|
||||
local handle, err = fs.open("/.start_rc.lua", "w")
|
||||
if handle then
|
||||
handle.write(start_rc)
|
||||
handle.close()
|
||||
else
|
||||
error("Failed to create failsafe: " .. (err or "unknown error"))
|
||||
end
|
||||
end
|
||||
|
||||
os.reboot()
|
||||
while true do coroutine.yield() end
|
||||
-- Helper function to set cursor position
|
||||
local function at(x, y)
|
||||
term.setCursorPos(x, y)
|
||||
return term
|
||||
end
|
||||
|
||||
end))
|
||||
-- HTTP request with error handling
|
||||
local function httpGet(url, timeout)
|
||||
timeout = timeout or 30
|
||||
|
||||
local request = http.request(url, nil, nil, true)
|
||||
if not request then
|
||||
return nil, "Failed to initiate HTTP request"
|
||||
end
|
||||
|
||||
local startTime = os.clock()
|
||||
while true do
|
||||
local event = table.pack(coroutine.yield())
|
||||
|
||||
if os.clock() - startTime > timeout then
|
||||
return nil, "HTTP request timed out"
|
||||
end
|
||||
|
||||
if event[1] == "http_success" and event[2] == request then
|
||||
local response = event[3]
|
||||
local data = response.readAll()
|
||||
response.close()
|
||||
return data
|
||||
elseif event[1] == "http_failure" and event[2] == request then
|
||||
return nil, "HTTP request failed: " .. (event[3] or "unknown error")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Load JSON library
|
||||
local function loadJsonLib()
|
||||
local jsonData, err = httpGet("https://raw.githubusercontent.com/rxi/json.lua/master/json.lua")
|
||||
if not jsonData then
|
||||
-- Try alternative source if first fails
|
||||
jsonData, err = httpGet("https://raw.githubusercontent.com/meepdarknessmeep/json.lua/master/json.lua")
|
||||
if not jsonData then
|
||||
return nil, "Failed to load JSON library: " .. err
|
||||
end
|
||||
end
|
||||
|
||||
local success, json = pcall(loadstring(jsonData, "json.lua"))
|
||||
if not success then
|
||||
return nil, "Failed to parse JSON library: " .. json
|
||||
end
|
||||
|
||||
return json()
|
||||
end
|
||||
|
||||
-- Get current version from installer.lua
|
||||
local function getCurrentVersion()
|
||||
if fs.exists(_RC_ROM_DIR .. "/installer.lua") then
|
||||
local handle = fs.open(_RC_ROM_DIR .. "/installer.lua", "r")
|
||||
if handle then
|
||||
local content = handle.readAll()
|
||||
handle.close()
|
||||
|
||||
local version = content:match('local%s+version%s*=%s*"([^"]+)"')
|
||||
if version then
|
||||
return version
|
||||
end
|
||||
end
|
||||
end
|
||||
return "unknown"
|
||||
end
|
||||
|
||||
-- Main update function
|
||||
local function updateSystem()
|
||||
createFailsafe()
|
||||
|
||||
-- Setup terminal
|
||||
local w, h = term.getSize()
|
||||
term.clear()
|
||||
term.setBackgroundColor(0x8000) -- Blue background
|
||||
term.setTextColor(0x1) -- White text
|
||||
|
||||
-- Header function
|
||||
local function header()
|
||||
term.setBackgroundColor(0x8000)
|
||||
term.setTextColor(0x10) -- Cyan text
|
||||
at(1, 1).clearLine()
|
||||
at(1, 1).write("LeonOS Updater")
|
||||
at(1, 2).clearLine()
|
||||
at(1, 2).write("=====================")
|
||||
term.setTextColor(0x1)
|
||||
end
|
||||
|
||||
-- Write function with scrolling
|
||||
local y = 1
|
||||
local function write(text)
|
||||
term.setBackgroundColor(0x8000)
|
||||
if y > h - 3 then
|
||||
term.scroll(1)
|
||||
header()
|
||||
else
|
||||
y = y + 1
|
||||
end
|
||||
at(1, y + 2).write(text)
|
||||
end
|
||||
|
||||
-- Progress bar function
|
||||
local function progress(a, b)
|
||||
term.setBackgroundColor(0x8000)
|
||||
at(1, 3).clearLine()
|
||||
|
||||
local barWidth = w - 4
|
||||
local progressWidth = math.ceil(barWidth * (a / b))
|
||||
|
||||
term.setTextColor(0x1) -- White text for progress number
|
||||
at(1, 3).write(string.format("%d/%d ", a, b))
|
||||
|
||||
term.setBackgroundColor(0x1) -- White background for progress bar
|
||||
at(#string.format("%d/%d ", a, b) + 1, 3).write(" ":rep(progressWidth))
|
||||
|
||||
term.setBackgroundColor(0x8000) -- Reset to blue background
|
||||
end
|
||||
|
||||
-- Initialize header
|
||||
header()
|
||||
|
||||
-- Display current version
|
||||
local currentVersion = getCurrentVersion()
|
||||
write("Current version: " .. currentVersion)
|
||||
|
||||
-- Load JSON library
|
||||
write("Loading JSON library...")
|
||||
local json, err = loadJsonLib()
|
||||
if not json then
|
||||
write("Error: " .. err)
|
||||
write("Press any key to exit.")
|
||||
term.setCursorBlink(true)
|
||||
repeat local event = {coroutine.yield()} until event[1] == "char" or event[1] == "key"
|
||||
return false
|
||||
end
|
||||
|
||||
-- Get repository tree
|
||||
write("Getting repository file list...")
|
||||
local repodata, err = httpGet("https://api.github.com/repos/" .. REPO_OWNER .. "/" .. REPO_NAME .. "/git/trees/" .. BRANCH .. "?recursive=1")
|
||||
if not repodata then
|
||||
write("Error: " .. err)
|
||||
write("Press any key to exit.")
|
||||
term.setCursorBlink(true)
|
||||
repeat local event = {coroutine.yield()} until event[1] == "char" or event[1] == "key"
|
||||
return false
|
||||
end
|
||||
|
||||
-- Parse repository data
|
||||
local success, parsedData = pcall(json.decode, repodata)
|
||||
if not success then
|
||||
write("Error parsing repository data: " .. parsedData)
|
||||
write("Press any key to exit.")
|
||||
term.setCursorBlink(true)
|
||||
repeat local event = {coroutine.yield()} until event[1] == "char" or event[1] == "key"
|
||||
return false
|
||||
end
|
||||
|
||||
-- Filter files to download
|
||||
write("Filtering files for download...")
|
||||
local filesToDownload = {}
|
||||
local directoriesToCreate = {}
|
||||
|
||||
for _, entry in pairs(parsedData.tree) do
|
||||
if entry.path and entry.path:sub(1, #BASE_PATH) == BASE_PATH then
|
||||
local relativePath = entry.path:sub(#BASE_PATH + 1)
|
||||
local realPath = relativePath:gsub("^/?rom", _RC_ROM_DIR)
|
||||
|
||||
if entry.type == "tree" then
|
||||
table.insert(directoriesToCreate, realPath)
|
||||
elseif entry.type == "blob" and realPath ~= "unbios.lua" then
|
||||
table.insert(filesToDownload, {
|
||||
path = relativePath,
|
||||
realPath = realPath
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
write("Found " .. #filesToDownload .. " files to update.")
|
||||
|
||||
-- Create directories
|
||||
write("Creating necessary directories...")
|
||||
for _, dirPath in ipairs(directoriesToCreate) do
|
||||
pcall(fs.makeDir, dirPath)
|
||||
end
|
||||
|
||||
-- Download and write files
|
||||
write("Downloading and installing files...")
|
||||
local successCount = 0
|
||||
local failCount = 0
|
||||
local lastProgress = 0
|
||||
|
||||
for i, fileInfo in ipairs(filesToDownload) do
|
||||
local url = "https://raw.githubusercontent.com/" .. REPO_OWNER .. "/" .. REPO_NAME .. "/" .. BRANCH .. "/" .. BASE_PATH .. fileInfo.path
|
||||
local content, err = httpGet(url)
|
||||
|
||||
if content then
|
||||
-- Ensure the directory exists
|
||||
local dir = fs.getDir(fileInfo.realPath)
|
||||
if not fs.isDir(dir) then
|
||||
pcall(fs.makeDir, dir)
|
||||
end
|
||||
|
||||
-- Write the file
|
||||
local handle, writeErr = fs.open(fileInfo.realPath, "w")
|
||||
if handle then
|
||||
handle.write(content)
|
||||
handle.close()
|
||||
successCount = successCount + 1
|
||||
|
||||
-- Update progress bar if it changed significantly
|
||||
local currentProgress = math.floor((i / #filesToDownload) * 10)
|
||||
if currentProgress > lastProgress then
|
||||
lastProgress = currentProgress
|
||||
progress(i, #filesToDownload)
|
||||
end
|
||||
else
|
||||
failCount = failCount + 1
|
||||
write("Failed to write " .. fileInfo.realPath .. ": " .. (writeErr or "unknown error"))
|
||||
end
|
||||
else
|
||||
failCount = failCount + 1
|
||||
write("Failed to download " .. fileInfo.path .. ": " .. err)
|
||||
end
|
||||
end
|
||||
|
||||
-- Final status
|
||||
progress(#filesToDownload, #filesToDownload)
|
||||
write("")
|
||||
write("Update completed!")
|
||||
write(string.format("Success: %d, Failed: %d", successCount, failCount))
|
||||
|
||||
if failCount > 0 then
|
||||
write("")
|
||||
write("Some files failed to update.")
|
||||
write("You may need to run the updater again.")
|
||||
end
|
||||
|
||||
write("")
|
||||
write("Press any key to reboot and apply changes.")
|
||||
term.setCursorBlink(true)
|
||||
repeat local event = {coroutine.yield()} until event[1] == "char" or event[1] == "key"
|
||||
|
||||
-- Cleanup and reboot
|
||||
pcall(fs.delete, "/.start_rc.lua")
|
||||
os.reboot()
|
||||
while true do coroutine.yield() end
|
||||
end
|
||||
|
||||
-- Run the update with error handling
|
||||
local success, err = pcall(updateSystem)
|
||||
if not success then
|
||||
term.clear()
|
||||
term.setBackgroundColor(0x4000)
|
||||
term.setTextColor(0x1)
|
||||
at(1, 1).write("LeonOS Update Error")
|
||||
at(1, 3).write("An error occurred during the update:")
|
||||
at(1, 5).write(err)
|
||||
at(1, 7).write("Press any key to exit.")
|
||||
term.setCursorBlink(true)
|
||||
repeat local event = {coroutine.yield()} until event[1] == "char" or event[1] == "key"
|
||||
|
||||
-- Try to cleanup
|
||||
pcall(fs.delete, "/.start_rc.lua")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user