commit 2ef199d2b444bfe7c019489c7f112fe85509ddd2 Author: Aki Kareha Date: Tue Jul 22 20:09:10 2025 +0900 add initial version diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..dc77114 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright (c) 2025 Aki Kareha + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..231ec93 --- /dev/null +++ b/README.md @@ -0,0 +1,88 @@ +# Programming Lessons for GNU Typist + +**Programming Lessons for GNU Typist** is a collection of typing lessons for +[GNU Typist (gtypist)](https://www.gnu.org/software/gtypist/) that help you +memorize and reinforce programming language keywords and standard library +vocabulary through repetitive and mindful typing practice. + +Ideal for beginners who want to internalize syntax while learning to type +efficiently. + +## Contents + +Currently included lessons: + +- Go reserved words +- Lua reserved words +- *(More coming soon: Python, JavaScript, C, etc.)* + +Each `.typ` file contains structured lessons that focus on one language at a +time. + +## Requirements + +- [GNU Typist](https://www.gnu.org/software/gtypist/) version 2.9 or later + +## Usage + +1. Clone this repository or download individual `.typ` files. +2. Run `gtypist` with your chosen lesson file. For example: + +```sh +gtypist programming.typ +gtypist go.typ +``` + +## About the Lessons + +- Each lesson repeats key terms to build muscle memory and familiarity. +- Focused lessons: reserved words only. +- Future plans include lessons for: + * Built-in functions (print, len, type, etc.) + * Module functions (math.sqrt, os.path.join, etc.) + * Phrase-style lessons with realistic code-like patterns + +## Combining Lessons + +To generate a unified `.typ` file containing all available lessons, use the +provided `combine.sh` script: + +```sh +./combine.sh +``` + +This will create a file called `programming.typ`, which you can run directly: + +```sh +gtypist programming.typ +``` + +The file includes a top-level menu and all included lesson files. + +You can also run individual lesson files: + +```sh +gtypist lua.typ +gtypist go.typ +``` + +## Roadmap + +- Add Python and JavaScript reserved words +- Add standard library vocabulary lessons +- Group by domain (e.g. math, strings, I/O) +- Optional code-style phrase typing (e.g. `if x > 0: print("yes")`) + +## Contributing + +Contributions are welcome! +Feel free to submit `.typ` files for other languages, improvements, or +corrections. + +Please follow the existing lesson structure and keep lesson files simple and +educational. + +## License + +This project is licensed under the MIT License. +Feel free to use, modify, and redistribute. diff --git a/combine.sh b/combine.sh new file mode 100755 index 0000000..134a07f --- /dev/null +++ b/combine.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +cat menu.typ lua.typ go.typ > programming.typ diff --git a/go.typ b/go.typ new file mode 100644 index 0000000..1da1178 --- /dev/null +++ b/go.typ @@ -0,0 +1,46 @@ +# +# Go Lessons for GNU Typist +# + +*:GO_MENU +B:Go Lessons +M: "Go Lessons" + :GO_RESERVED_WORDS "Go Reserved Words" + +# +# Go Reserved Words +# + +*:GO_RESERVED_WORDS +B:Go Reserved Words +T: Go Reserved Words + : + :1: break default func interface select case + :2: defer go map struct chan else + :3: goto package switch const fallthrough if + :4: range type continue for import return var + : + : 25 words +I:Go Reserved Words 1 +D:break break break break default default default default func func func func + :interface interface interface interface select select select select + :case case case case + +I:Go Reserved Words 2 +D:defer defer defer defer go go go go map map map map + :struct struct struct struct chan chan chan chan else else else else + +I:Go Reserved Words 3 +D:goto goto goto goto package package package package + :switch switch switch switch const const const const + :fallthrough fallthrough fallthrough fallthrough if if if if + +I:Go Reserved Words 4 +D:range range range range type type type type + :continue continue continue continue for for for for + :import import import import return return return return var var var var + +Q:Repeat this lesson [Y/N] ? +N:GO_MENU +G:GO_RESERVED_WORDS + diff --git a/lua.typ b/lua.typ new file mode 100644 index 0000000..05ede5c --- /dev/null +++ b/lua.typ @@ -0,0 +1,43 @@ +# +# Lua Lessons for GNU Typist +# + +*:LUA_MENU +B:Lua Lessons +M: "Lua Lessons" + :LUA_RESERVED_WORDS "Lua Reserved Words" + +# +# Lua Reserved Words +# + +*:LUA_RESERVED_WORDS +B:Lua Reserved Words +T: Lua Reserved Words + : + :1: and break do else elseif end + :2: false for function goto if + :3: in local nil not or repeat + :4: return then true until while + : + : 22 words +I:Lua Reserved Words 1 +D:and and and and break break break break do do do do + :else else else else elseif elseif elseif elseif end end end end + +I:Lua Reserved Words 2 +D:false false false false for for for for function function function function + :goto goto goto goto if if if if + +I:Lua Reserved Words 3 +D:in in in in local local local local nil nil nil nil + :not not not not or or or or repeat repeat repeat repeat + +I:Lua Reserved Words 4 +D:return return return return then then then then true true true true + :until until until until while while while while + +Q:Repeat this lesson [Y/N] ? +N:LUA_MENU +G:LUA_RESERVED_WORDS + diff --git a/menu.typ b/menu.typ new file mode 100644 index 0000000..a13765b --- /dev/null +++ b/menu.typ @@ -0,0 +1,10 @@ +# +# Menu of Programming Lessons for GNU Typist +# + +*:MENU +B:Programming Lessons +M: "Programming Lessons" + :LUA_MENU "Lua Language" + :GO_MENU "Go Language" + diff --git a/programming.typ b/programming.typ new file mode 100644 index 0000000..463e1ac --- /dev/null +++ b/programming.typ @@ -0,0 +1,99 @@ +# +# Menu of Programming Lessons for GNU Typist +# + +*:MENU +B:Programming Lessons +M: "Programming Lessons" + :LUA_MENU "Lua Language" + :GO_MENU "Go Language" + +# +# Lua Lessons for GNU Typist +# + +*:LUA_MENU +B:Lua Lessons +M: "Lua Lessons" + :LUA_RESERVED_WORDS "Lua Reserved Words" + +# +# Lua Reserved Words +# + +*:LUA_RESERVED_WORDS +B:Lua Reserved Words +T: Lua Reserved Words + : + :1: and break do else elseif end + :2: false for function goto if + :3: in local nil not or repeat + :4: return then true until while + : + : 22 words +I:Lua Reserved Words 1 +D:and and and and break break break break do do do do + :else else else else elseif elseif elseif elseif end end end end + +I:Lua Reserved Words 2 +D:false false false false for for for for function function function function + :goto goto goto goto if if if if + +I:Lua Reserved Words 3 +D:in in in in local local local local nil nil nil nil + :not not not not or or or or repeat repeat repeat repeat + +I:Lua Reserved Words 4 +D:return return return return then then then then true true true true + :until until until until while while while while + +Q:Repeat this lesson [Y/N] ? +N:LUA_MENU +G:LUA_RESERVED_WORDS + +# +# Go Lessons for GNU Typist +# + +*:GO_MENU +B:Go Lessons +M: "Go Lessons" + :GO_RESERVED_WORDS "Go Reserved Words" + +# +# Go Reserved Words +# + +*:GO_RESERVED_WORDS +B:Go Reserved Words +T: Go Reserved Words + : + :1: break default func interface select case + :2: defer go map struct chan else + :3: goto package switch const fallthrough if + :4: range type continue for import return var + : + : 25 words +I:Go Reserved Words 1 +D:break break break break default default default default func func func func + :interface interface interface interface select select select select + :case case case case + +I:Go Reserved Words 2 +D:defer defer defer defer go go go go map map map map + :struct struct struct struct chan chan chan chan else else else else + +I:Go Reserved Words 3 +D:goto goto goto goto package package package package + :switch switch switch switch const const const const + :fallthrough fallthrough fallthrough fallthrough if if if if + +I:Go Reserved Words 4 +D:range range range range type type type type + :continue continue continue continue for for for for + :import import import import return return return return var var var var + +Q:Repeat this lesson [Y/N] ? +N:GO_MENU +G:GO_RESERVED_WORDS +