diff options
| author | Zach DeCook <zachdecook@librem.one> | 2020-11-19 04:28:16 +0000 |
|---|---|---|
| committer | Zach DeCook <zachdecook@librem.one> | 2020-11-19 04:28:16 +0000 |
| commit | ed5bd8914f79010eb04ac2b3564856a2985d9f91 (patch) | |
| tree | 805d4891d4a2bf519985d678dfd2a786349e9fcb /laravel/public | |
| parent | e8ffb3701c681f9107d3f165b05e49e7abe7d06e (diff) | |
| download | prosongsa-ed5bd8914f79010eb04ac2b3564856a2985d9f91.tar.gz | |
* Gemini: Transpose song widget
Diffstat (limited to 'laravel/public')
| -rwxr-xr-x | laravel/public/song.gmi.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/laravel/public/song.gmi.php b/laravel/public/song.gmi.php index c65896c..315e5da 100755 --- a/laravel/public/song.gmi.php +++ b/laravel/public/song.gmi.php @@ -7,6 +7,10 @@ require __DIR__.'/../load-eloquent.php'; $app = require_once __DIR__.'/../bootstrap/app.php'; $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); use App\Song; +$query = getenv('QUERY_STRING')??''; +if($query == 'q') { + printf("10 Transpose into key /([0-9]+|[A-G][b#]?)/\r\n");return; +} $id = substr(getenv('PATH_INFO')??'',1); $song = Song::find($id); if($song){ @@ -19,6 +23,8 @@ printf("40 song $id not found\r\n");return; <?= $song->author ?> +=> <?= $song->id ?>?q Transpose from <?= $song->plain_key ?> + ``` <?= $song->textTranspose(getenv('QUERY_STRING')??'') ?> |
