From e84dd5c284fb72a922bb94a9a879b65c91a84643 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Mon, 29 Apr 2024 17:12:43 -0400 Subject: [PATCH] fix!: use single file for each command --- .github/workflows/ci.yml | 28 ++------------------- commands/sunshine/{vban/body.md => vban.md} | 7 ++++++ commands/sunshine/vban/footer.md | 6 ----- 3 files changed, 9 insertions(+), 32 deletions(-) rename commands/sunshine/{vban/body.md => vban.md} (66%) delete mode 100644 commands/sunshine/vban/footer.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1673b3e..8e52d6b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -53,40 +53,16 @@ jobs: run: | exit_code=0 - # find invalid file names - for file in $(find ./commands -type f -name '*.md'); do - filename=$(basename "$file") - if [[ $filename != 'body.md' && $filename != 'footer.md' ]]; then - echo "Invalid file $file. Only body.md and footer.md are allowed" >> $GITHUB_STEP_SUMMARY - exit_code=1 - fi - done - # check character count - for file in $(find ./commands -type f \( -name 'body.md' -o -name 'footer.md' \)); do + for file in $(find ./commands -type f -name '*.md'); do echo "Checking $file" char_count=$(wc -c <"$file") echo "Character count: $char_count" filename=$(basename "$file") echo "Filename: $filename" - if [[ $filename == 'body.md' && $char_count -gt 4096 ]]; then + if [[ $char_count -gt 4096 ]]; then echo "$file exceeds the 4096 character limit" >> $GITHUB_STEP_SUMMARY exit_code=1 - elif [[ $filename == 'footer.md' && $char_count -gt 2048 ]]; then - echo "$file exceeds the 2048 character limit" - exit_code=1 - fi - if [[ $filename == 'body.md' ]]; then - dir=$(dirname "$file") - if [[ -f "$dir/footer.md" ]]; then - footer_char_count=$(wc -c <"$dir/footer.md") - total_char_count=$((char_count + footer_char_count)) - if [[ $total_char_count -gt 6000 ]]; then - echo "The combined character count of $file and $dir/footer.md exceeds the 6000 character limit" \ - >> $GITHUB_STEP_SUMMARY - exit_code=1 - fi - fi fi done diff --git a/commands/sunshine/vban/body.md b/commands/sunshine/vban.md similarity index 66% rename from commands/sunshine/vban/body.md rename to commands/sunshine/vban.md index be74dd2..af72f8a 100644 --- a/commands/sunshine/vban/body.md +++ b/commands/sunshine/vban.md @@ -13,3 +13,10 @@ configuration as follows: Then click the stream name. The stream you made from Talkie should appear as an option. That's it! + +:information_source: **Notes** + +- As Receptor does not auto-start as it is not an installed program, you may want to add it as a + Sunshine pre-launch command. Receptor will remember the last audio stream it was connected to. +- You may have to configure Windows/Game audio setting on the host to use the Microphone if you are using VB cable. +- To use Vban over the internet, you will also have to manually forward UDP Port 6980. diff --git a/commands/sunshine/vban/footer.md b/commands/sunshine/vban/footer.md deleted file mode 100644 index 18bf72a..0000000 --- a/commands/sunshine/vban/footer.md +++ /dev/null @@ -1,6 +0,0 @@ -# Notes - -- As Receptor does not auto-start as it is not an installed program, you may want to add it as a - Sunshine pre-launch command. Receptor will remember the last audio stream it was connected to. -- You may have to configure Windows/Game audio setting on the host to use the Microphone if you are using VB cable. -- To use Vban over the internet, you will also have to manually forward UDP Port 6980.