README.md in scarpe-0.2.1 vs README.md in scarpe-0.2.2

- old
+ new

@@ -7,15 +7,15 @@ <img src="https://user-images.githubusercontent.com/7865030/217309905-7f25e3cf-1850-481d-811b-dfddea2df54a.png" width="200" height="200"> "Scarpe" means shoes in Italian. "Scarpe" also means [Shoes](https://github.com/shoes/shoes-deprecated) in modern Ruby and webview! -Scarpe isn't feature complete with any version of Shoes (yet?). We're initially targeting Shoes Classic. +Scarpe isn't feature complete with any version of Shoes (yet?). We're initially targeting [Shoes 3](https://github.com/scarpe-team/scarpe/wiki/ShoesImplementations.md), also called "Red Shoes." ## Wait, What's A Shoes? -Shoes is an old library (really several different ones) that let you build little local desktop computer programs, package them up and give copies to people. Imagine if you can write a tiny little Ruby program (e.g. sneak a peek at the next section) and then it would make a runnable app, opening a window in Ruby, where you could click buttons and play sounds and stuff. +Shoes is an old library (really [several different ones](https://github.com/scarpe-team/scarpe/wiki/ShoesImplementations.md)) that let you build little local desktop computer programs, package them up and give copies to people. Imagine if you can write a tiny little Ruby program (e.g. sneak a peek at the next section) and then it would make a runnable app, opening a window in Ruby, where you could click buttons and play sounds and stuff. Scarpe is a rewrite of Shoes, because old Shoes doesn't really work any more. There have been a surprising number of rewrites of Shoes over the years -- people love it and miss having it around. This one is ours. Also it uses Webview. ## Usage @@ -27,11 +27,11 @@ Shoes.app do para "Hello World" end ``` -More examples can be found in the `examples` folder! +More examples can be found in the [`examples` folder](https://github.com/scarpe-team/scarpe/tree/main/examples)! ## Screenshots From the hello world example: @@ -43,80 +43,83 @@ ## Scarpe in Development ### Quickstart -Scarpe requires [Ruby 3.2](https://www.ruby-lang.org/en/downloads/) or higher! use `rvm` or `rbenv` for version control +Scarpe requires [Ruby 3.2](https://www.ruby-lang.org/en/downloads/) or higher! You can use `rvm`, `rbenv` or your favourite version control just like normal. -This is where most of the action is happening right now, and to have the full Scarpe experience _today_ this is probably what you want to do. +This repo is where most of the action is happening right now, and to have the full Scarpe experience _today_ this is probably what you want to do. ``` +# dependencies - Mac version +brew install portaudio pkg-config # for sound! +# dependencies - Ubuntu Linux version +sudo apt install libgtk-3-dev libwebkit2gtk-4.0-dev libportaudio2 + +for any other linux or windows. please see the webview docs for your [platform](https://github.com/webview/webview#prerequisites) + # get it git clone http://github.com/scarpe-team/scarpe cd scarpe; bundle install + # run it ./exe/scarpe examples/button.rb --dev ``` +If you are using Visual Studio Code, you can use this [extension](https://github.com/gintama91/Scarpe-Vscode-Extension). This extension simplifies the process of executing commands by eliminating the need to repeatedly type lengthy file paths, resulting in a more efficient and productive development experience. + ### Finer details First, clone the [main GitHub repository](https://github.com/scarpe-team/scarpe). `bundle install` dependencies like webview from the cloned directory in your Ruby of choice. -You can run without Scarpe being installed by including its directory. For instance, from the "examples" directory you can run `ruby -I../lib hello_world.rb`. You can also install Scarpe locally (`gem build scarpe.gemspec && gem install scarpe-0.1.0.gem`) or using a Gemfile with the "path" option for local Scarpe. +You can run without Scarpe being installed by including its directory. For instance, from the "examples" directory you can run `ruby -I../lib -I../lacci/lib -rscarpe hello_world.rb`. You can also install Scarpe locally (`gem build scarpe.gemspec && gem install scarpe-0.1.0.gem`) or using a Gemfile with the "path" option for local Scarpe. -Most commonly we are all using this command: `./exe/scarpe examples/button.rb --dev` +Most commonly we are all using this command: `./exe/scarpe examples/button.rb --dev --debug` The `--dev` flag points to your local scarpe rather than an installed Scarpe gem. -It's very early in the development process. If you'd like to help develop Scarpe, great! It would be useful to drop us a message/issue/PR on GitHub early on, so we know you're working in a particular area, and we can warn you if anybody else is currently doing so. +The `--debug` flag will dump a ton of useful information to the console if you want to see what's happening with your app. +It's very early in the development process. If you'd like to help develop Scarpe, great! It would be useful to drop us a message/issue/PR on GitHub early on, so we know you're working in a particular area, and we can warn you if anybody else is currently doing so. We also have a Discord. + We'd love the help! If you want to quickly add a feature, you can use the `ruby scarpegen.rb` command. This command will generate the necessary files for you, along with a simple template and a set of questions to guide you through the process. By following these steps, you will be good to go! By leveraging the `ruby scarpegen.rb` command and the provided resources, you can expedite the feature addition process and ensure a smoother development experience. ## Are we done yet? -Huh. Great question. Right now we have a few key things we want to achieve. The first is passing all of the examples we can get our hands on. The second is passing HacketyHack. We're manually keeping tabs on that here. +Great question! Right now we have a few key things we want to achieve. The first is passing all of the examples we can get our hands on. The second is passing [Hackety-Hack](https://github.com/hacketyhack/hacketyhack). We're manually keeping tabs on that here. -🚨 **This is manually checked and not an automation.** 🚨 - ### Webview Display Service Examples Passing -![](https://geps.dev/progress/16?dangerColor=800000&warningColor=ff9900&successColor=006600) +![](https://geps.dev/progress/30?dangerColor=800000&warningColor=ff9900&successColor=006600) -__41/288__ - -### GlimmerLibUI Display Service Examples Passing - -![](https://geps.dev/progress/2?dangerColor=800000&warningColor=ff9900&successColor=006600) - -__4/288__ - +__92/304__ ## Teach me more about Shoes, the DSL, what it is and why it is amazing 1. [Nobody Knows Shoes - _why's Manual](https://github.com/whymirror/why-archive/raw/master/shoes/nobody-knows-shoes.pdf) 1. [Known examples](examples) 1. [shoes-original manual](docs/static/manual.md) ## Environment Variables Scarpe allows you to modify the app's behaviour outside of the normal Shoes API with environment variables. -For example, we are working with multiple display services like Webview, Glimmer, and possibly some others. +The SCARPE_DISPLAY_SERVICE environment variable allows you to choose one or more display services, from the default Webview service, to [Scarpe-Wasm](https://github.com/scarpe-team/scarpe-wasm) to potentially other experimental or incomplete services. This may be important if you're developing a new display method for Scarpe. The display service variable will contain a name like "wv_local" or "wv_remote" or "wasm_local" which correspond to a require-able Ruby file under lib/scarpe, either in the Scarpe gem or another gem your app requires. -The SCARPE_DISPLAY_SERVICE environment variable allows you to choose one or more display services, from the default Webview service to potentially other experimental or incomplete services. This may be important if you're developing a new display method for Scarpe. The display service variable will contain a name like "wv_local" or "wv_remote" or "glibui" which corresponds to a require-able Ruby file under lib/scarpe, either in the Scarpe gem or another gem your app requires. - Example usage: -`SCARPE_DISPLAY_SERVICE=glibui ./exe/scarpe examples/hello_world.rb` +`SCARPE_DISPLAY_SERVICE=wv_relay ./exe/scarpe examples/hello_world.rb` The SCARPE_TEST_CONTROL environment variable can contain a path to a test-control-interface script for the Webview display service. If you look at test_helper, it gives some examples of how to use it. +If you run ./exe/scarpe --dev env, you can see all current environment settings. + ## More info * [Nobody Knows Shoes manual](https://github.com/whymirror/why-archive/raw/master/shoes/nobody-knows-shoes.pdf) * [Original shoes (archived)](https://github.com/shoes/shoes-deprecated) - For now we are aiming towards _original shoes_, but I believe later can learn from Shoes3. @@ -147,9 +150,13 @@ "WV::WebWrangler": ["logger/web_wrangler.log", "debug"] } ``` ## Documentation + +Usually it's easiest to [just view the latest on GitHub](https://scarpe-team.github.io/scarpe/). + +But you can also built it yourself, locally, for testing or to take on the road. Scarpe uses [YARD](https://yardoc.org/) for basic API documentation. You can run "yard doc" to generate documentation locally, and then view it with "yard server". Point your browser at "http://localhost:8808" for local viewing. ## Contributing