Outvoke
This is a library, and at the same time a framework, and at the same time an internal DSL.
If you need Japanese Edition of this README, see README.ja.md
CAUTION
I have only tested it under Linux.
Requirements
- Ruby 3.0 or later
What's This?
Outvoke makes it easy to write code that hooks into the data stream.
Setup
Put outvoke.rb in the current directory and give it execute permission.
Start it using the -e option as follows, and if you see output every 5 seconds, it is running for now.
$ ./outvoke.rb -e 'hook "every-sec", /:.[05] /'
# starting Outvoke 0.1 ---- 2023-12-31 17:50:16 +0900
# ----
# given ruby code:
# hook "every-sec", /:.[05] /
# ----
[2023-12-31 17:50:17 +0900] [outvoke-system] vrchat-001: first time log check has done.
[2023-12-31 17:50:20 +0900] 2023-12-31 17:50:20 +0900
[2023-12-31 17:50:25 +0900] 2023-12-31 17:50:25 +0900
[2023-12-31 17:50:30 +0900] 2023-12-31 17:50:30 +0900
[2023-12-31 17:50:35 +0900] 2023-12-31 17:50:35 +0900
[2023-12-31 17:50:40 +0900] 2023-12-31 17:50:40 +0900
There may be error lines if VRChat is not installed or the log files are in a different location.
How To Use
When you run Outvoke with no arguments, it looks for main.rb in the current directory and includes it.
You can specify a file name or write a one-liner using the -e option, but for the sake of clarity, this README.md assumes that you are writing in main.rb.
If you write "using OutvokeDSL" at the beginning of main.rb, you will be in the mode of internal DSL. You can write it as casually as writing a configuration file.
Since main.rb is interpreted as a Ruby script, you can write complex programs.
The following is an example of main.rb.
using OutvokeDSL
hook 'every-sec', / 05:00:00 / do
spawn 'play', '-q', '-t', 'wav', '-v', '0.6', 'ring.wav', 'repeat', '50'
end
At 5:00 AM, ring.wav in the current directory is played by the play command.
(The rest is currently being written)