Skip to content

Commit

Permalink
🔄 Created local '.github/AnVIL_Feedback_Script.sh' from remote '.gith…
Browse files Browse the repository at this point in the history
…ub/AnVIL_Feedback_Script.sh'

release-null
  • Loading branch information
cansavvy committed Jan 28, 2025
1 parent b4ee8fd commit 83d4929
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/AnVIL_Feedback_Script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

# Extract the title from the YAML front matter of index.Rmd
title=$(awk '/^title:/{gsub(/^title: /,""); print}' "index.Rmd" | grep -v '^$')

# Remove the outside quotation marks
title=$(sed -e 's/^"//' -e 's/"$//' <<< "$title")

# Replace spaces with '+'
title=${title// /+}

# Base url for the AnVIL Google Form
url_base="https://docs.google.com/forms/d/e/1FAIpQLScrDVb_utm55pmb_SHx-RgELTEbCCWdLea0T3IzS0Oj00GE4w/viewform?usp=pp_url&entry.1565230805="

# Replace the url inside _output.yml
perl -i -pe 's|https://docs.google.com/forms/d/e/1FAIpQLScrDVb_utm55pmb_SHx-RgELTEbCCWdLea0T3IzS0Oj00GE4w/viewform\?usp=pp_url&entry\.1565230805=.*"> Click|'${url_base}${title}'"> Click|g' _output.yml

# Print for Github actions
echo "The feedback link is: ${url_base}${title}"

0 comments on commit 83d4929

Please sign in to comment.