From a894846e7cbb7f1253a3a1f2e5af7d7053e401e8 Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:03:23 +0200 Subject: [PATCH 01/18] test workflow --- .github/workflows/fpb-lint.yml | 31 +++++++++++++++++++++++---- books/free-programming-books-langs.md | 2 +- courses/free-courses-en.md | 2 +- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/workflows/fpb-lint.yml b/.github/workflows/fpb-lint.yml index 3762ea6607b3a..a001021c50f91 100644 --- a/.github/workflows/fpb-lint.yml +++ b/.github/workflows/fpb-lint.yml @@ -2,6 +2,11 @@ name: free-programming-books-lint on: [push, pull_request] +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_RUN_ID: ${{ github.run_id }} + PR: ${{ github.event.pull_request.html_url }} + jobs: build: @@ -14,7 +19,25 @@ jobs: with: node-version: '16.x' - run: npm install -g free-programming-books-lint - - run: fpb-lint ./books/ - - run: fpb-lint ./casts/ - - run: fpb-lint ./courses/ - - run: fpb-lint ./more/ + - run: | + fpb-lint ./books/ &>> output.log || cat output.log + - run: | + fpb-lint ./casts/ &>> output.log || cat output.log + - run: | + fpb-lint ./courses/ &>> output.log || cat output.log + - run: | + fpb-lint ./more/ &>> output.log || cat output.log + + - name: Output job + if: ${{ always() && + github.event_name == 'pull_request' }} + run: | + if [ -s output.log ] + then + gh pr review $PR -r -b "Linter failed, fix the errors: + \`\`\` + $(cat output.log) + \`\`\`" + else + gh pr review $PR -a + fi diff --git a/books/free-programming-books-langs.md b/books/free-programming-books-langs.md index d267afd864f79..810ae3697c54c 100644 --- a/books/free-programming-books-langs.md +++ b/books/free-programming-books-langs.md @@ -380,7 +380,7 @@ That section got so big, we decided to split it into its own file, the [BY SUBJE * [Advanced Bash-Scripting Guide](http://tldp.org/LDP/abs/html/) - M. Cooper (HTML) * [Bash Guide for Beginners (2008)](http://www.tldp.org/LDP/Bash-Beginners-Guide/html/) - M. Garrels (HTML) -* [Bash Notes for Professionals](http://goalkicker.com/BashBook/) - Compiled from StackOverflow documentation (PDF) +* [ABash Notes for Professionals](http://goalkicker.com/BashBook/) - Compiled from StackOverflow documentation (PDF) * [BASH Programming (2000)](http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html) - Mike G. (HTML) * [Bash Reference Manual](http://www.gnu.org/software/bash/manual/bashref.html) (HTML) * [Bash tutorial](https://web.archive.org/web/20180328183806/http://gdrcorelec.ups-tlse.fr/files/bash.pdf) - Anthony Scemama (PDF) diff --git a/courses/free-courses-en.md b/courses/free-courses-en.md index 58121575ac1cf..c430a1e50cb63 100644 --- a/courses/free-courses-en.md +++ b/courses/free-courses-en.md @@ -105,7 +105,7 @@ ### Algorithms & Data Structures * [Advanced Data Structures](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-851-advanced-data-structures-spring-2012/) - Erik Demaine -* [Algorithm Design and Implementation](https://www.youtube.com/playlist?list=PL6EF0274BD849A7D5) +* [BAlgorithm Design and Implementation](https://www.youtube.com/playlist?list=PL6EF0274BD849A7D5) * [Algorithms](https://www.youtube.com/playlist?list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O) - Abdul Bari * [Berkeley University CS 61B: Data Structures](http://datastructur.es/sp16/) * [Berkeley's CS 61B: Data Structures](https://archive.org/details/ucberkeley_webcast_QMV45tHCYNI) From d71a33d719076e3b3c1fc4c57dec3cc2c226587b Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:06:06 +0200 Subject: [PATCH 02/18] test approve pr --- books/free-programming-books-langs.md | 2 +- courses/free-courses-en.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/books/free-programming-books-langs.md b/books/free-programming-books-langs.md index 810ae3697c54c..d267afd864f79 100644 --- a/books/free-programming-books-langs.md +++ b/books/free-programming-books-langs.md @@ -380,7 +380,7 @@ That section got so big, we decided to split it into its own file, the [BY SUBJE * [Advanced Bash-Scripting Guide](http://tldp.org/LDP/abs/html/) - M. Cooper (HTML) * [Bash Guide for Beginners (2008)](http://www.tldp.org/LDP/Bash-Beginners-Guide/html/) - M. Garrels (HTML) -* [ABash Notes for Professionals](http://goalkicker.com/BashBook/) - Compiled from StackOverflow documentation (PDF) +* [Bash Notes for Professionals](http://goalkicker.com/BashBook/) - Compiled from StackOverflow documentation (PDF) * [BASH Programming (2000)](http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html) - Mike G. (HTML) * [Bash Reference Manual](http://www.gnu.org/software/bash/manual/bashref.html) (HTML) * [Bash tutorial](https://web.archive.org/web/20180328183806/http://gdrcorelec.ups-tlse.fr/files/bash.pdf) - Anthony Scemama (PDF) diff --git a/courses/free-courses-en.md b/courses/free-courses-en.md index c430a1e50cb63..58121575ac1cf 100644 --- a/courses/free-courses-en.md +++ b/courses/free-courses-en.md @@ -105,7 +105,7 @@ ### Algorithms & Data Structures * [Advanced Data Structures](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-851-advanced-data-structures-spring-2012/) - Erik Demaine -* [BAlgorithm Design and Implementation](https://www.youtube.com/playlist?list=PL6EF0274BD849A7D5) +* [Algorithm Design and Implementation](https://www.youtube.com/playlist?list=PL6EF0274BD849A7D5) * [Algorithms](https://www.youtube.com/playlist?list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O) - Abdul Bari * [Berkeley University CS 61B: Data Structures](http://datastructur.es/sp16/) * [Berkeley's CS 61B: Data Structures](https://archive.org/details/ucberkeley_webcast_QMV45tHCYNI) From 570340171cbbd64441b012f5bcf02b454337b731 Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:13:33 +0200 Subject: [PATCH 03/18] test label automation --- .github/workflows/fpb-lint.yml | 4 +++- books/free-programming-books-langs.md | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fpb-lint.yml b/.github/workflows/fpb-lint.yml index a001021c50f91..73c88348575d7 100644 --- a/.github/workflows/fpb-lint.yml +++ b/.github/workflows/fpb-lint.yml @@ -34,10 +34,12 @@ jobs: run: | if [ -s output.log ] then - gh pr review $PR -r -b "Linter failed, fix the errors: + gh pr review $PR -r -b "Linter failed, fix the error(s): \`\`\` $(cat output.log) \`\`\`" + gh pr edit $PR --add-label "linter error" else gh pr review $PR -a + gh pr edit $PR --remove-label "linter error" fi diff --git a/books/free-programming-books-langs.md b/books/free-programming-books-langs.md index d267afd864f79..810ae3697c54c 100644 --- a/books/free-programming-books-langs.md +++ b/books/free-programming-books-langs.md @@ -380,7 +380,7 @@ That section got so big, we decided to split it into its own file, the [BY SUBJE * [Advanced Bash-Scripting Guide](http://tldp.org/LDP/abs/html/) - M. Cooper (HTML) * [Bash Guide for Beginners (2008)](http://www.tldp.org/LDP/Bash-Beginners-Guide/html/) - M. Garrels (HTML) -* [Bash Notes for Professionals](http://goalkicker.com/BashBook/) - Compiled from StackOverflow documentation (PDF) +* [ABash Notes for Professionals](http://goalkicker.com/BashBook/) - Compiled from StackOverflow documentation (PDF) * [BASH Programming (2000)](http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html) - Mike G. (HTML) * [Bash Reference Manual](http://www.gnu.org/software/bash/manual/bashref.html) (HTML) * [Bash tutorial](https://web.archive.org/web/20180328183806/http://gdrcorelec.ups-tlse.fr/files/bash.pdf) - Anthony Scemama (PDF) From 9d465169da3e7ef01501e7569bdea995d712fa32 Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:19:48 +0200 Subject: [PATCH 04/18] test label automation --- books/free-programming-books-langs.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/books/free-programming-books-langs.md b/books/free-programming-books-langs.md index 810ae3697c54c..1677dd35b1982 100644 --- a/books/free-programming-books-langs.md +++ b/books/free-programming-books-langs.md @@ -380,8 +380,8 @@ That section got so big, we decided to split it into its own file, the [BY SUBJE * [Advanced Bash-Scripting Guide](http://tldp.org/LDP/abs/html/) - M. Cooper (HTML) * [Bash Guide for Beginners (2008)](http://www.tldp.org/LDP/Bash-Beginners-Guide/html/) - M. Garrels (HTML) -* [ABash Notes for Professionals](http://goalkicker.com/BashBook/) - Compiled from StackOverflow documentation (PDF) -* [BASH Programming (2000)](http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html) - Mike G. (HTML) +* [Bash Notes for Professionals](http://goalkicker.com/BashBook/) - Compiled from StackOverflow documentation (PDF) +* [ABASH Programming (2000)](http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html) - Mike G. (HTML) * [Bash Reference Manual](http://www.gnu.org/software/bash/manual/bashref.html) (HTML) * [Bash tutorial](https://web.archive.org/web/20180328183806/http://gdrcorelec.ups-tlse.fr/files/bash.pdf) - Anthony Scemama (PDF) * [BashGuide](http://mywiki.wooledge.org/BashGuide) - Maarten Billemont (HTML) [(PDF)](http://s.ntnu.no/bashguide.pdf) From ec83f200fae7d06ff7ce26f55a920ff9e1852ce9 Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Wed, 6 Jul 2022 15:27:01 +0200 Subject: [PATCH 05/18] test: fixed alphabetical order --- books/free-programming-books-langs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/books/free-programming-books-langs.md b/books/free-programming-books-langs.md index 1677dd35b1982..d267afd864f79 100644 --- a/books/free-programming-books-langs.md +++ b/books/free-programming-books-langs.md @@ -381,7 +381,7 @@ That section got so big, we decided to split it into its own file, the [BY SUBJE * [Advanced Bash-Scripting Guide](http://tldp.org/LDP/abs/html/) - M. Cooper (HTML) * [Bash Guide for Beginners (2008)](http://www.tldp.org/LDP/Bash-Beginners-Guide/html/) - M. Garrels (HTML) * [Bash Notes for Professionals](http://goalkicker.com/BashBook/) - Compiled from StackOverflow documentation (PDF) -* [ABASH Programming (2000)](http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html) - Mike G. (HTML) +* [BASH Programming (2000)](http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html) - Mike G. (HTML) * [Bash Reference Manual](http://www.gnu.org/software/bash/manual/bashref.html) (HTML) * [Bash tutorial](https://web.archive.org/web/20180328183806/http://gdrcorelec.ups-tlse.fr/files/bash.pdf) - Anthony Scemama (PDF) * [BashGuide](http://mywiki.wooledge.org/BashGuide) - Maarten Billemont (HTML) [(PDF)](http://s.ntnu.no/bashguide.pdf) From 9b3b81d42160cad8793c23bcae7a19a35494152d Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Wed, 6 Jul 2022 16:54:38 +0200 Subject: [PATCH 06/18] test: new workflow --- .github/workflows/fpb-lint.yml | 18 +++++++++--------- books/free-programming-books-langs.md | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/fpb-lint.yml b/.github/workflows/fpb-lint.yml index 73c88348575d7..2440d4d9c5b47 100644 --- a/.github/workflows/fpb-lint.yml +++ b/.github/workflows/fpb-lint.yml @@ -19,16 +19,16 @@ jobs: with: node-version: '16.x' - run: npm install -g free-programming-books-lint - - run: | - fpb-lint ./books/ &>> output.log || cat output.log - - run: | - fpb-lint ./casts/ &>> output.log || cat output.log - - run: | - fpb-lint ./courses/ &>> output.log || cat output.log - - run: | - fpb-lint ./more/ &>> output.log || cat output.log - - name: Output job + - name: Push + if: ${{ github.event_name == 'push' }} + run: | + fpb-lint ./books/ + fpb-lint ./casts/ + fpb-lint ./courses/ + fpb-lint ./more/ + + - name: Pull Request if: ${{ always() && github.event_name == 'pull_request' }} run: | diff --git a/books/free-programming-books-langs.md b/books/free-programming-books-langs.md index d267afd864f79..1677dd35b1982 100644 --- a/books/free-programming-books-langs.md +++ b/books/free-programming-books-langs.md @@ -381,7 +381,7 @@ That section got so big, we decided to split it into its own file, the [BY SUBJE * [Advanced Bash-Scripting Guide](http://tldp.org/LDP/abs/html/) - M. Cooper (HTML) * [Bash Guide for Beginners (2008)](http://www.tldp.org/LDP/Bash-Beginners-Guide/html/) - M. Garrels (HTML) * [Bash Notes for Professionals](http://goalkicker.com/BashBook/) - Compiled from StackOverflow documentation (PDF) -* [BASH Programming (2000)](http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html) - Mike G. (HTML) +* [ABASH Programming (2000)](http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html) - Mike G. (HTML) * [Bash Reference Manual](http://www.gnu.org/software/bash/manual/bashref.html) (HTML) * [Bash tutorial](https://web.archive.org/web/20180328183806/http://gdrcorelec.ups-tlse.fr/files/bash.pdf) - Anthony Scemama (PDF) * [BashGuide](http://mywiki.wooledge.org/BashGuide) - Maarten Billemont (HTML) [(PDF)](http://s.ntnu.no/bashguide.pdf) From 72a9b2739df7d936c34201ca9c49fb74e5c07407 Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Wed, 6 Jul 2022 17:01:18 +0200 Subject: [PATCH 07/18] adapt lint, test new workflow --- .github/workflows/fpb-lint.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/fpb-lint.yml b/.github/workflows/fpb-lint.yml index 2440d4d9c5b47..5dddb233965a9 100644 --- a/.github/workflows/fpb-lint.yml +++ b/.github/workflows/fpb-lint.yml @@ -32,6 +32,11 @@ jobs: if: ${{ always() && github.event_name == 'pull_request' }} run: | + fpb-lint ./books/ &>> output.log + fpb-lint ./casts/ &>> output.log + fpb-lint ./courses/ &>> output.log + fpb-lint ./more/ &>> output.log || cat output.log + if [ -s output.log ] then gh pr review $PR -r -b "Linter failed, fix the error(s): From ffda48263005954588e5cfac5d69a869671e9182 Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Wed, 6 Jul 2022 17:12:16 +0200 Subject: [PATCH 08/18] test new fix --- .github/workflows/fpb-lint.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/fpb-lint.yml b/.github/workflows/fpb-lint.yml index 5dddb233965a9..b84c3032a063d 100644 --- a/.github/workflows/fpb-lint.yml +++ b/.github/workflows/fpb-lint.yml @@ -32,9 +32,9 @@ jobs: if: ${{ always() && github.event_name == 'pull_request' }} run: | - fpb-lint ./books/ &>> output.log - fpb-lint ./casts/ &>> output.log - fpb-lint ./courses/ &>> output.log + fpb-lint ./books/ &>> output.log || echo "Analyzing..." + fpb-lint ./casts/ &>> output.log || echo "Analyzing..." + fpb-lint ./courses/ &>> output.log || echo "Analyzing..." fpb-lint ./more/ &>> output.log || cat output.log if [ -s output.log ] From 33f23e8ec50c6765adb282d32c3c6be8eb612e85 Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Wed, 6 Jul 2022 17:53:41 +0200 Subject: [PATCH 09/18] test: course test --- courses/free-courses-en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/courses/free-courses-en.md b/courses/free-courses-en.md index 58121575ac1cf..c430a1e50cb63 100644 --- a/courses/free-courses-en.md +++ b/courses/free-courses-en.md @@ -105,7 +105,7 @@ ### Algorithms & Data Structures * [Advanced Data Structures](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-851-advanced-data-structures-spring-2012/) - Erik Demaine -* [Algorithm Design and Implementation](https://www.youtube.com/playlist?list=PL6EF0274BD849A7D5) +* [BAlgorithm Design and Implementation](https://www.youtube.com/playlist?list=PL6EF0274BD849A7D5) * [Algorithms](https://www.youtube.com/playlist?list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O) - Abdul Bari * [Berkeley University CS 61B: Data Structures](http://datastructur.es/sp16/) * [Berkeley's CS 61B: Data Structures](https://archive.org/details/ucberkeley_webcast_QMV45tHCYNI) From 78d614c7ef4339529ad62d56744a1529b86012df Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:36:22 +0200 Subject: [PATCH 10/18] build: created python script to clean the output --- .github/workflows/clean-output.py | 14 ++++++++++++++ .github/workflows/fpb-lint.yml | 12 +++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/clean-output.py diff --git a/.github/workflows/clean-output.py b/.github/workflows/clean-output.py new file mode 100644 index 0000000000000..10db9ef4323e4 --- /dev/null +++ b/.github/workflows/clean-output.py @@ -0,0 +1,14 @@ +import re + +with open('output.log') as oldfile, open('error.log', 'w') as newfile: + for line in oldfile: + if not (b'\xc3\xa2\xc5\xa1\xc2\xa0' in line.encode()): + if ('warning' in line): + r = re.search('warning (.*) remark', line) + s = r.group(1).rsplit(' ', 1)[0] + newfile.write(s) + if ('home/runner/work' in line): + s = line.replace("/home/runner/work/free-programming-books/", "", 1) + newfile.write(s) + else: + newfile.write("\n\n") diff --git a/.github/workflows/fpb-lint.yml b/.github/workflows/fpb-lint.yml index b84c3032a063d..c33ac578abdfd 100644 --- a/.github/workflows/fpb-lint.yml +++ b/.github/workflows/fpb-lint.yml @@ -14,6 +14,9 @@ jobs: steps: - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.x' - name: Use Node.js uses: actions/setup-node@v3 with: @@ -35,13 +38,16 @@ jobs: fpb-lint ./books/ &>> output.log || echo "Analyzing..." fpb-lint ./casts/ &>> output.log || echo "Analyzing..." fpb-lint ./courses/ &>> output.log || echo "Analyzing..." - fpb-lint ./more/ &>> output.log || cat output.log + fpb-lint ./more/ &>> output.log || echo "Analyzing..." + + python clean-output.py + cat error.log - if [ -s output.log ] + if [ -s error.log ] then gh pr review $PR -r -b "Linter failed, fix the error(s): \`\`\` - $(cat output.log) + $(cat error.log) \`\`\`" gh pr edit $PR --add-label "linter error" else From a2df53049916d8c7e9c34589ce7793833685402c Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Wed, 6 Jul 2022 20:54:14 +0200 Subject: [PATCH 11/18] fix: python file don't found --- .github/workflows/fpb-lint.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/fpb-lint.yml b/.github/workflows/fpb-lint.yml index c33ac578abdfd..4d98e6b722201 100644 --- a/.github/workflows/fpb-lint.yml +++ b/.github/workflows/fpb-lint.yml @@ -14,7 +14,8 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - name: Use Python + uses: actions/setup-python@v4 with: python-version: '3.x' - name: Use Node.js @@ -40,7 +41,7 @@ jobs: fpb-lint ./courses/ &>> output.log || echo "Analyzing..." fpb-lint ./more/ &>> output.log || echo "Analyzing..." - python clean-output.py + python ./.github/workflows/clean-output.py cat error.log if [ -s error.log ] From edfc7ead7e830695c2dab988da5601b9126642e5 Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Thu, 7 Jul 2022 18:06:17 +0200 Subject: [PATCH 12/18] test: clean output ignoring spaces --- .github/workflows/clean-output.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clean-output.py b/.github/workflows/clean-output.py index 10db9ef4323e4..9945e5869c888 100644 --- a/.github/workflows/clean-output.py +++ b/.github/workflows/clean-output.py @@ -4,8 +4,8 @@ for line in oldfile: if not (b'\xc3\xa2\xc5\xa1\xc2\xa0' in line.encode()): if ('warning' in line): - r = re.search('warning (.*) remark', line) - s = r.group(1).rsplit(' ', 1)[0] + r = re.search('warning(.*)remark', line) + s = r.group(1).rsplit(' ', 1)[0] newfile.write(s) if ('home/runner/work' in line): s = line.replace("/home/runner/work/free-programming-books/", "", 1) From ee02771defb621a8cf8710b87a63bf8f90ad5aa4 Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Thu, 7 Jul 2022 18:21:39 +0200 Subject: [PATCH 13/18] Update free-courses-en.md --- courses/free-courses-en.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/courses/free-courses-en.md b/courses/free-courses-en.md index c430a1e50cb63..a29f8795393e8 100644 --- a/courses/free-courses-en.md +++ b/courses/free-courses-en.md @@ -105,7 +105,7 @@ ### Algorithms & Data Structures * [Advanced Data Structures](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-851-advanced-data-structures-spring-2012/) - Erik Demaine -* [BAlgorithm Design and Implementation](https://www.youtube.com/playlist?list=PL6EF0274BD849A7D5) +* [BBAlgorithm Design and Implementation](https://www.youtube.com/playlist?list=PL6EF0274BD849A7D5) * [Algorithms](https://www.youtube.com/playlist?list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O) - Abdul Bari * [Berkeley University CS 61B: Data Structures](http://datastructur.es/sp16/) * [Berkeley's CS 61B: Data Structures](https://archive.org/details/ucberkeley_webcast_QMV45tHCYNI) From 2523962944a7846c0eecf58ca535c8ec684c851d Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Thu, 7 Jul 2022 18:49:04 +0200 Subject: [PATCH 14/18] test: debug --- .github/workflows/clean-output.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/clean-output.py b/.github/workflows/clean-output.py index 9945e5869c888..61cc665d3f7c6 100644 --- a/.github/workflows/clean-output.py +++ b/.github/workflows/clean-output.py @@ -4,11 +4,13 @@ for line in oldfile: if not (b'\xc3\xa2\xc5\xa1\xc2\xa0' in line.encode()): if ('warning' in line): - r = re.search('warning(.*)remark', line) - s = r.group(1).rsplit(' ', 1)[0] + print(line) + r = re.search('warning (.+?) remark', line).group(1) + s = str(r).rsplit(' ', 1)[0] newfile.write(s) if ('home/runner/work' in line): s = line.replace("/home/runner/work/free-programming-books/", "", 1) newfile.write(s) else: newfile.write("\n\n") + From 998fec0248406252ca50463731be75c5c3787c6b Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Thu, 7 Jul 2022 18:55:47 +0200 Subject: [PATCH 15/18] Update clean-output.py --- .github/workflows/clean-output.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/clean-output.py b/.github/workflows/clean-output.py index 61cc665d3f7c6..8082a0aa62470 100644 --- a/.github/workflows/clean-output.py +++ b/.github/workflows/clean-output.py @@ -5,7 +5,9 @@ if not (b'\xc3\xa2\xc5\xa1\xc2\xa0' in line.encode()): if ('warning' in line): print(line) - r = re.search('warning (.+?) remark', line).group(1) + r = re.search('warning(.+?)remark', line) + print(r) + r = r.group(1) s = str(r).rsplit(' ', 1)[0] newfile.write(s) if ('home/runner/work' in line): From 9ac378805c9f357726fc5b2056eabd24fd38c7b7 Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Thu, 7 Jul 2022 19:03:16 +0200 Subject: [PATCH 16/18] fix: stop using .group() --- .github/workflows/clean-output.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/clean-output.py b/.github/workflows/clean-output.py index 8082a0aa62470..05ab4edfd4ccf 100644 --- a/.github/workflows/clean-output.py +++ b/.github/workflows/clean-output.py @@ -4,11 +4,16 @@ for line in oldfile: if not (b'\xc3\xa2\xc5\xa1\xc2\xa0' in line.encode()): if ('warning' in line): - print(line) - r = re.search('warning(.+?)remark', line) - print(r) - r = r.group(1) - s = str(r).rsplit(' ', 1)[0] + #print(line) + #r = re.search('warning(.+?)remark', line) + #print(r) + #r = r.group(1) + #s = str(r).rsplit(' ', 1)[0] + + + r = line.partition("warning")[2].partition("remark")[0] + s = str(r).rsplit(' ', 1)[0] + newfile.write(s) if ('home/runner/work' in line): s = line.replace("/home/runner/work/free-programming-books/", "", 1) From f187f15d52a0c95af507ece98f212f8e267d2fce Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Thu, 7 Jul 2022 19:06:29 +0200 Subject: [PATCH 17/18] build(clean-output): removed last word from error me ssage --- .github/workflows/clean-output.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/clean-output.py b/.github/workflows/clean-output.py index 05ab4edfd4ccf..0752a5e01b78d 100644 --- a/.github/workflows/clean-output.py +++ b/.github/workflows/clean-output.py @@ -2,18 +2,10 @@ with open('output.log') as oldfile, open('error.log', 'w') as newfile: for line in oldfile: - if not (b'\xc3\xa2\xc5\xa1\xc2\xa0' in line.encode()): + if not (b'\xE2\x9A\xA0' in line.encode()): if ('warning' in line): - #print(line) - #r = re.search('warning(.+?)remark', line) - #print(r) - #r = r.group(1) - #s = str(r).rsplit(' ', 1)[0] - - - r = line.partition("warning")[2].partition("remark")[0] + r = line.partition("warning")[2].partition(" remark")[0] s = str(r).rsplit(' ', 1)[0] - newfile.write(s) if ('home/runner/work' in line): s = line.replace("/home/runner/work/free-programming-books/", "", 1) From 6486e29f1b2d4720b2f36087d20ef26e97aeb60b Mon Sep 17 00:00:00 2001 From: ImVector <59611597+LuigiImVector@users.noreply.github.com> Date: Thu, 7 Jul 2022 19:11:30 +0200 Subject: [PATCH 18/18] fix: linter alphabetical order --- books/free-programming-books-langs.md | 2 +- courses/free-courses-en.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/books/free-programming-books-langs.md b/books/free-programming-books-langs.md index 1677dd35b1982..d267afd864f79 100644 --- a/books/free-programming-books-langs.md +++ b/books/free-programming-books-langs.md @@ -381,7 +381,7 @@ That section got so big, we decided to split it into its own file, the [BY SUBJE * [Advanced Bash-Scripting Guide](http://tldp.org/LDP/abs/html/) - M. Cooper (HTML) * [Bash Guide for Beginners (2008)](http://www.tldp.org/LDP/Bash-Beginners-Guide/html/) - M. Garrels (HTML) * [Bash Notes for Professionals](http://goalkicker.com/BashBook/) - Compiled from StackOverflow documentation (PDF) -* [ABASH Programming (2000)](http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html) - Mike G. (HTML) +* [BASH Programming (2000)](http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html) - Mike G. (HTML) * [Bash Reference Manual](http://www.gnu.org/software/bash/manual/bashref.html) (HTML) * [Bash tutorial](https://web.archive.org/web/20180328183806/http://gdrcorelec.ups-tlse.fr/files/bash.pdf) - Anthony Scemama (PDF) * [BashGuide](http://mywiki.wooledge.org/BashGuide) - Maarten Billemont (HTML) [(PDF)](http://s.ntnu.no/bashguide.pdf) diff --git a/courses/free-courses-en.md b/courses/free-courses-en.md index a29f8795393e8..58121575ac1cf 100644 --- a/courses/free-courses-en.md +++ b/courses/free-courses-en.md @@ -105,7 +105,7 @@ ### Algorithms & Data Structures * [Advanced Data Structures](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-851-advanced-data-structures-spring-2012/) - Erik Demaine -* [BBAlgorithm Design and Implementation](https://www.youtube.com/playlist?list=PL6EF0274BD849A7D5) +* [Algorithm Design and Implementation](https://www.youtube.com/playlist?list=PL6EF0274BD849A7D5) * [Algorithms](https://www.youtube.com/playlist?list=PLDN4rrl48XKpZkf03iYFl-O29szjTrs_O) - Abdul Bari * [Berkeley University CS 61B: Data Structures](http://datastructur.es/sp16/) * [Berkeley's CS 61B: Data Structures](https://archive.org/details/ucberkeley_webcast_QMV45tHCYNI)