mirror of
https://github.com/CCLeonOS/LeonOS.git
synced 2026-03-03 15:17:01 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 |
|
||||
+-----------------------------------------------------------------------------------------------+----------+------------+------------+------------+------------+
|
||||
@@ -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
|
||||
=============
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
_G._HOST = _G._HOST .. " (LeonOS 1.0.0)"
|
||||
_G._HOST = _G._HOST .. " (LeonOS 1.0.2)"
|
||||
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 = 2
|
||||
},
|
||||
queueEvent = pull(os, "queueEvent"),
|
||||
startTimer = pull(os, "startTimer"),
|
||||
|
||||
@@ -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 = {}
|
||||
|
||||
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
|
||||
@@ -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
|
||||
}
|
||||
|
||||
-- 创建新包
|
||||
@@ -168,6 +169,173 @@ 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()
|
||||
|
||||
-- 下载并安装文件
|
||||
print("Installing version: " .. pkg_version)
|
||||
local app_dir = "/app"
|
||||
if not fs.exists(app_dir) then
|
||||
fs.makeDir(app_dir)
|
||||
end
|
||||
|
||||
local success_count = 0
|
||||
local fail_count = 0
|
||||
|
||||
for _, file_path in ipairs(meta.files or {}) do
|
||||
local dest = fs.combine(app_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 +348,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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
-- LeonOS installer
|
||||
local INSTALLER_VERSION = "1.0.0"
|
||||
local INSTALLER_VERSION = "1.0.2"
|
||||
local DEFAULT_ROM_DIR = "/leonos"
|
||||
|
||||
print("Start loading LeonOS installer ("..INSTALLER_VERSION..")...")
|
||||
@@ -193,11 +193,13 @@ 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"
|
||||
)):close()
|
||||
ok()
|
||||
|
||||
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