Merge branch 'master' of https://github.com/tallguyjenks/fla.sh into master

This commit is contained in:
bryan 2020-12-06 18:53:33 -08:00
commit 58763294be
4 changed files with 43 additions and 9 deletions

View File

@ -28,6 +28,13 @@ If applicable, add screenshots to help explain your problem.
- Terminal Emulator [e.g. st, kitty, etc] - Terminal Emulator [e.g. st, kitty, etc]
- Shell [e.g. bash, zsh, fish] - Shell [e.g. bash, zsh, fish]
## Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
**Additional context** **Additional context**
Add any other context about the problem here. Add any other context about the problem here.

13
.github/workflows/greetings.yml vendored Normal file
View File

@ -0,0 +1,13 @@
name: Greetings
on: [pull_request, issues]
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'This was your first issue! Thank you for contributing!'' first issue'
pr-message: 'This was your first Pull Request! Thank you for contributing!'' first pr'

19
.github/workflows/stale.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: "30 1 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'

13
flash
View File

@ -198,7 +198,7 @@ while getopts 'hivp:' flag; do
case "${flag}" in case "${flag}" in
h) print_usage && exit 0 ;; h) print_usage && exit 0 ;;
i) print_info && exit 0 ;; i) print_info && exit 0 ;;
v) echo -e "\n${YELLOW}fla.sh Current Version:${NC} ${RED}1.1${NC}\n" && exit 0 ;; v) echo -e "\n${YELLOW}fla.sh Current Version:${NC} ${RED}1.2${NC}\n" && exit 0 ;;
p) { [[ $(command -v "$OPTARG" 2>&1) ]] && PREVIEWER=$OPTARG; } || echo "Unable to find previewer $OPTARG. Exiting..." && exit 1 ;; p) { [[ $(command -v "$OPTARG" 2>&1) ]] && PREVIEWER=$OPTARG; } || echo "Unable to find previewer $OPTARG. Exiting..." && exit 1 ;;
*) print_usage && exit 1 ;; *) print_usage && exit 1 ;;
esac esac
@ -330,16 +330,11 @@ ${LGREY}Select a number to continue, or${NC} ${LRED}Q${NC} ${LGREY}to quit...${N
# Update item score for each flashcard item # Update item score for each flashcard item
## Remove forward slashes in the Questions and answers ## Remove forward slashes in the Questions and answers
<<<<<<< Updated upstream
QUESTION_REGEX=$(sed "s/\(\/\|\[\|\]\|\*\)/\\\\\1/g" <<<"${q[1]}")
ANSWER_REGEX=$(sed "s/\(\/\|\[\|\]\|\*\)/\\\\\1/g" <<<"${q[2]}")
=======
QUESTION_REGEX="$(sed "s/\(\/\|\[\|\]\|\*\)/\\\\\1/g" <<<"${q[1]}")" QUESTION_REGEX="$(sed "s/\(\/\|\[\|\]\|\*\)/\\\\\1/g" <<<"${q[1]}")"
ANSWER_REGEX="$(sed "s/\(\/\|\[\|\]\|\*\)/\\\\\1/g" <<<"${q[2]}")" ANSWER_REGEX="$(sed "s/\(\/\|\[\|\]\|\*\)/\\\\\1/g" <<<"${q[2]}")"
# sed -i "s/${q[0]}:$QUESTION_REGEX:$ANSWER_REGEX:${q[3]}/${q[0]}:$QUESTION_REGEX:$ANSWER_REGEX:$NEW_ITEM_SCORE/g" "$DECK" sed -i .bak "s/${q[0]}:$QUESTION_REGEX:$ANSWER_REGEX:${q[3]}/${q[0]}:$QUESTION_REGEX:$ANSWER_REGEX:$NEW_ITEM_SCORE/g" "$DECK" && rm ./*.bak
>>>>>>> Stashed changes
sed -i .bak "s/${q[0]}:$QUESTION_REGEX:$ANSWER_REGEX:${q[3]}/${q[0]}:$QUESTION_REGEX:$ANSWER_REGEX:$NEW_ITEM_SCORE/g" "$DECK"
rm ./*.bak
# If no highscore currently set, set it. # If no highscore currently set, set it.
[ -z "$(cat "$HIGH_SCORE")" ] && echo "$COUNTER" >"$HIGH_SCORE" [ -z "$(cat "$HIGH_SCORE")" ] && echo "$COUNTER" >"$HIGH_SCORE"