Skip to content

Commit cf03bd0

Browse files
committed
Merge EbookFoundation#7034 into maintenance/homogenize-in-process-notes
Cherry picked until commit 9bfd191 + f7fea66
2 parents 4f31e96 + 9bfd191 commit cf03bd0

40 files changed

+548
-374
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: 'AwesomeBot Markdown Summary Report'
2+
description: 'Composes the summary report using JSON results of any AwesomeBot execution'
3+
4+
inputs:
5+
ab-root:
6+
description: 'Path where AwesomeBot result files are written.'
7+
required: true
8+
files:
9+
description: 'A delimited string containing the filenames to process.'
10+
required: true
11+
separator:
12+
description: 'Token used to delimit each filename. Default: " ".'
13+
required: false
14+
default: ' '
15+
append-heading:
16+
description: 'When should append report heading.'
17+
required: false
18+
default: "false"
19+
write:
20+
description: 'When should append the report to GITHUB_STEP_SUMMARY file descriptor.'
21+
required: false
22+
default: "true"
23+
24+
outputs:
25+
text:
26+
description: Generated Markdown text.
27+
value: ${{ steps.generate.outputs.text }}
28+
29+
runs:
30+
using: "composite"
31+
32+
steps:
33+
34+
- name: Generate markdown
35+
id: generate
36+
# Using PowerShell
37+
shell: pwsh
38+
# sec: sanatize inputs using environment variables
39+
env:
40+
GITHUB_ACTION_PATH: ${{ github.action_path }}
41+
GITHUB_WORKSPACE: ${{ github.workspace }}
42+
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
43+
# https://github.community/t/input-variable-name-is-not-available-in-composite-run-steps/127611
44+
INPUT_AB_ROOT: ${{ inputs.ab-root }}
45+
INPUT_FILES: ${{ inputs.files }}
46+
INPUT_SEPARATOR: ${{ inputs.separator }}
47+
INPUT_APPEND_HEADING: ${{ inputs.append-heading }}
48+
run: |
49+
$text = ""
50+
51+
# Handle optional heading
52+
if ("true" -eq $env:INPUT_APPEND_HEADING) {
53+
$text += "### Report of Checked URLs!"
54+
$text += "`n`n"
55+
$text += "<div align=`"right`" markdown=`"1`">`n`n"
56+
$text += "_Link issues :rocket: powered by [``awesome_bot``](https://github.com/dkhamsing/awesome_bot)_."
57+
$text += "`n`n</div>"
58+
}
59+
60+
# Loop ForEach files
61+
$env:INPUT_FILES -split $env:INPUT_SEPARATOR | ForEach {
62+
$file = $_
63+
$abr_file = $env:INPUT_AB_ROOT + "/ab-results-" + ($file -replace "[/\\]","-") + "-markdown-table.json"
64+
$json = Get-Content $abr_file | ConvertFrom-Json
65+
66+
$text += "`n`n"
67+
if ("true" -eq $json.error) {
68+
# Highlighting issues counter
69+
$SearchExp = '(?<Num>\d+)'
70+
$ReplaceExp = '**${Num}**'
71+
$text += "`:page_facing_up: File: ``" + $file + "`` (:warning: " + ($json.title -replace $SearchExp,$ReplaceExp) + ")"
72+
# removing where ab attribution lives (moved to report heading)
73+
$text += $json.message -replace "####.*?\n","`n"
74+
} else {
75+
$text += ":page_facing_up: File: ``" + $file + "`` (:ok: **No issues**)"
76+
}
77+
}
78+
79+
# HACK to single line strings (https://trstringer.com/github-actions-multiline-strings/)
80+
$text = $text -replace "`%","%25"
81+
$text = $text -replace "`n","%0A"
82+
$text = $text -replace "`r","%25"
83+
# set output
84+
echo "::set-output name=text::$text"
85+
86+
87+
- name: Write output
88+
if: ${{ fromJson(inputs.write) }}
89+
shell: bash
90+
env:
91+
INPUT_TEXT: ${{ steps.generate.outputs.text }}
92+
INPUT_WRITE: ${{ inputs.write }}
93+
run: |
94+
echo "$INPUT_TEXT" >> $GITHUB_STEP_SUMMARY

.github/workflows/check-urls.yml

+70-8
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,81 @@
11
name: Check URLs from changed files
2-
on: [push, pull_request]
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
# This allows a subsequently queued workflow run to interrupt previous runs
11+
concurrency:
12+
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref || github.run_id }}'
13+
cancel-in-progress: true
14+
315
jobs:
4-
job:
16+
check-urls:
517
runs-on: ubuntu-latest
18+
19+
outputs:
20+
changed-files: ${{ steps.changed-files.outputs.all_changed_files }}
21+
622
steps:
23+
24+
# NOTE: tj-actions/changed-files.
25+
# For push events you need to include fetch-depth: 0 | 2 depending on your use case.
26+
# 0: retrieve all history for all branches and tags
27+
# 1: retrieve current commit (by default)
28+
# 2: retrieve the preceding commit
29+
- name: Determine workflow parameters
30+
id: init-params
31+
run: |
32+
echo "::set-output name=fetch_depth::0";
33+
if [ "${{ github.event_name }}" == "pull_request" ]; then
34+
echo "::set-output name=fetch_depth::1";
35+
fi
36+
737
- uses: actions/checkout@v3
8-
- uses: trilom/[email protected]
9-
id: file_changes
1038
with:
11-
output: ''
39+
fetch-depth: ${{ steps.init-params.outputs.fetch_depth }}
40+
41+
- name: Get changed files
42+
id: changed-files
43+
uses: tj-actions/[email protected]
44+
with:
45+
separator: " "
46+
1247
- uses: ruby/setup-ruby@v1
1348
with:
1449
ruby-version: 2.6
15-
- run: gem install awesome_bot
16-
- run: for i in ${{ steps.file_changes.outputs.files_modified }}; do echo; echo "processing $i"; awesome_bot $i --allow-redirect --allow-dupe --allow-ssl || true; done
50+
51+
- run: |
52+
gem install awesome_bot
53+
54+
- name: Check each changed file
55+
run: |
56+
# Set field separator
57+
IFS=$' ';
58+
59+
# Processing loop
60+
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
61+
echo;
62+
echo "::group::Processing file... $file";
63+
awesome_bot "$file" --allow-redirect --allow-dupe --allow-ssl || true;
64+
echo "::endgroup::";
65+
done
66+
67+
# Unset field separator
68+
unset IFS;
69+
1770
- uses: actions/upload-artifact@v3
1871
with:
19-
path: ${{ github.workspace }}/*.json
72+
name: awesomebot-results
73+
path: ${{ github.workspace }}/ab-results-*.json
74+
75+
- name: Generate Summary Report using AwesomeBot results
76+
uses: ./.github/actions/awesomebot-gh-summary-action
77+
with:
78+
ab-root: ${{ github.workspace }}
79+
files: ${{ steps.changed-files.outputs.all_changed_files }}
80+
separator: " "
81+
append-heading: ${{ true }}

books/free-programming-books-ar.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
### DB & DBMS
4747

48-
* [تصميم قواعد البيانات](https://academy.hsoub.com/files/26-تصميم-قواعد-البيانات/) - Adrienne Watt & Nelson Eng، ترجمة أيمن طارق وعلا عباس (PDF)
48+
* [تصميم قواعد البيانات](https://academy.hsoub.com/files/26-تصميم-قواعد-البيانات/) - Adrienne Watt, Nelson Eng، ترجمة أيمن طارق وعلا عباس (PDF)
4949

5050

5151
### HTML and CSS
@@ -77,7 +77,7 @@
7777
* [أوبنتو ببساطة](https://www.simplyubuntu.com) - Ahmed AbouZaid&rlm; (PDF)
7878
* [دفتر مدير دبيان](https://ar.debian-handbook.info) - Raphaël Hertzog, Roland Mas, MUHAMMET SAİT Muhammet Sait&rlm; (PDF, HTML)
7979
* [دليل إدارة خواديم أوبنتو 14.04](https://academy.hsoub.com/files/10-دليل-إدارة-خواديم-أوبنتو/) - Ubuntu documentation team, Abdullatif Eymash&rlm; (PDF)
80-
* [سطر أوامر لينكس](https://itwadi.com/node/2765) - Willam E. Shotts, Jr، ترجمة عبد اللطيف ايمش (PDF)
80+
* [سطر أوامر لينكس](https://itwadi.com/node/2765) - Willam E. Shotts Jr., ترجمة عبد اللطيف ايمش (PDF)
8181

8282

8383
### Open Source Software

books/free-programming-books-cs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* [Sítě](#site)
1616
* [LaTeX](#latex)
1717
* [Linux](#linux)
18-
* [Distribuce](#distribuce)
18+
* [Distribuce](#distribuce)
1919
* [OpenSource](#opensource)
2020
* [PHP](#php)
2121
* [Python](#python)

books/free-programming-books-de.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@
5555
### Assembly Language
5656

5757
* [PC Assembly Language](http://drpaulcarter.com/pcasm) - Paul A. Carter
58-
* [Reverse Engineering für Einsteiger](https://beginners.re/RE4B-DE.pdf) - Dennis Yurichev, Dennis Siekmeier, Julius Angres,
59-
Dirk Loser, Clemens Tamme, Philipp Schweinzer (PDF)
58+
* [Reverse Engineering für Einsteiger](https://beginners.re/RE4B-DE.pdf) - Dennis Yurichev, Dennis Siekmeier, Julius Angres, Dirk Loser, Clemens Tamme, Philipp Schweinzer (PDF)
6059

6160

6261
### C
@@ -98,7 +97,7 @@ Dirk Loser, Clemens Tamme, Philipp Schweinzer (PDF)
9897
* [Effektiv Go Programmieren](http://www.bitloeffel.de/DOC/golang/effective_go_de.html) (Online)
9998
* [Eine Tour durch Go](https://github.com/michivo/go-tour-de)
10099
* [Erstelle Webanwendungen mit Go](https://astaxie.gitbooks.io/build-web-application-with-golang/content/de)
101-
* [The Little Go Book](https://github.com/Aaronmacaron/the-little-go-book-de) - Karl Seguin, Aaron Ebnöther ([HTML](https://github.com/Aaronmacaron/the-little-go-book-de/blob/master/de/go.md))
100+
* [The Little Go Book](https://github.com/Aaronmacaron/the-little-go-book-de) - Karl Seguin, `trl.:` Aaron Ebnöther ([HTML](https://github.com/Aaronmacaron/the-little-go-book-de/blob/master/de/go.md))
102101

103102

104103
### Groovy
@@ -154,7 +153,7 @@ Dirk Loser, Clemens Tamme, Philipp Schweinzer (PDF)
154153

155154
### Mathematik
156155

157-
* [Calcul mathématique avec SAGE](http://www.loria.fr/~zimmerma/sagebook/CalculDeutsch.pdf) - Paul Zimmermann et al. (PDF)
156+
* [Calcul mathématique avec SAGE](http://www.loria.fr/~zimmerma/sagebook/CalculDeutsch.pdf) - Paul Zimmermann, et al. (PDF)
158157

159158

160159
### Meta-Lists

books/free-programming-books-es.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
* [Apuntes de Base de Datos 1](http://rua.ua.es/dspace/bitstream/10045/2990/1/ApuntesBD1.pdf) (PDF)
8484
* [Base de Datos (2005)](http://www.uoc.edu/masters/oficiales/img/913.pdf) - Mercedes Marqués (PDF)
8585
* [Base de Datos (2011)](https://openlibra.com/es/book/download/bases-de-datos-2) - Mercedes Marqués (PDF)
86-
* [Base de Datos Avanzadas (2013)](https://openlibra.com/es/book/download/bases-de-datos-avanzadas) - Aramburu & Sanz Blasco (PDF)
86+
* [Base de Datos Avanzadas (2013)](https://openlibra.com/es/book/download/bases-de-datos-avanzadas) - María José Aramburu Cabo, Ismael Sanz Blasco (PDF)
8787
* [Diseño Conceptual de Bases de Datos](https://openlibra.com/es/book/download/diseno-conceptual-de-bases-de-datos) (PDF)
8888

8989

@@ -117,7 +117,7 @@
117117

118118
#### Sistemas Operativos
119119

120-
* [Fundamentos de Sistemas Operativos](http://sistop.org/pdf/sistemas_operativos.pdf) - Gunnar Wolf et al (PDF)
120+
* [Fundamentos de Sistemas Operativos](http://sistop.org/pdf/sistemas_operativos.pdf) - Gunnar Wolf, et al. (PDF)
121121
* [Sistemas Operativos](http://sistop.gwolf.org/html/biblio/Sistemas_Operativos_-_Luis_La_Red_Martinez.pdf) - Dr. David Luis la Red (PDF)
122122

123123

@@ -142,7 +142,7 @@
142142

143143
### Ensamblador
144144

145-
* [Lenguaje Ensamblador para PC](https://pacman128.github.io/static/pcasm-book-spanish.pdf) - Paul A.Carter (PDF)
145+
* [Lenguaje Ensamblador para PC](https://pacman128.github.io/static/pcasm-book-spanish.pdf) - Paul A. Carter, `trl.:` Leonardo Rodríguez Mújica (PDF)
146146

147147

148148
### Erlang
@@ -166,7 +166,7 @@
166166

167167
### Go
168168

169-
* [El pequeño libro Go](https://raulexposito.com/the-little-go-book-en-castellano.html) - Karl Seguin, Raúl Expósito (HTML, [PDF](https://raulexposito.com/assets/pdf/go.pdf), [EPUB](https://raulexposito.com/assets/epub/go.epub))
169+
* [El pequeño libro Go](https://raulexposito.com/the-little-go-book-en-castellano.html) - Karl Seguin, `trl.:` Raúl Expósito (HTML, [PDF](https://raulexposito.com/assets/pdf/go.pdf), [EPUB](https://raulexposito.com/assets/epub/go.epub))
170170
* [Go en Español](https://nachopacheco.gitbooks.io/go-es/content/doc) - Nacho Pacheco (HTML)
171171

172172

@@ -223,7 +223,7 @@
223223
224224
* [¿Cómo aprender AngularJS?](http://raulexposito.com/documentos/como-aprender-angularjs/) (HTML)
225225
* [AngularJS](https://eladrodriguez.gitbooks.io/angularjs) - Elad Rodriguez (HTML) (Gitbook)
226-
* [Guía de estilo AngularJS](https://github.com/johnpapa/angular-styleguide/blob/master/a1/i18n/es-ES.md) - John Papa et al. (HTML)
226+
* [Guía de estilo AngularJS](https://github.com/johnpapa/angular-styleguide/blob/master/a1/i18n/es-ES.md) - John Papa, et al., `trl.:` Alberto Calleja Ríos, Gilberto (HTML)
227227
* [Manual de AngularJS](https://desarrolloweb.com/manuales/manual-angularjs.html) - desarrolloweb.com (HTML, PDF, EPUB, Kindle)
228228

229229

@@ -264,7 +264,7 @@
264264

265265
### Matemáticas
266266

267-
* [Sage para Estudiantes de Pregrado](http://www.sage-para-estudiantes.com) - Gregory Bard
267+
* [Sage para Estudiantes de Pregrado](http://www.sage-para-estudiantes.com) - Gregory Bard, `trl.:` Diego Sejas Viscarra
268268

269269

270270
### .NET (C# / Visual Studio)
@@ -283,7 +283,7 @@
283283

284284
#### Redis
285285

286-
* [El pequeño libro Redis](https://raulexposito.com/the-little-redis-book-en-castellano.html) - Karl Seguin (HTML, PDF, EPUB)
286+
* [El pequeño libro Redis](https://raulexposito.com/the-little-redis-book-en-castellano.html) - Karl Seguin, `trl.:` Raúl Expósito (HTML, PDF, EPUB)
287287

288288

289289
### PHP
@@ -392,7 +392,7 @@
392392

393393
* [Aprendizaje TypeScript](https://riptutorial.com/Download/typescript-es.pdf) - riptutorial (PDF)
394394
* [Introduccion a TypeScript](https://khru.gitbooks.io/typescript/) - Emmanuel Valverde Ramos (HTML) (GitBook)
395-
* [TypeScript Deep Dive](https://github.com/melissarofman/typescript-book) - Basarat Ali Syed, Melissa Rofman (HTML) (GitBook)
395+
* [TypeScript Deep Dive](https://github.com/melissarofman/typescript-book) - Basarat Ali Syed, `trl.:` Melissa Rofman (HTML) (GitBook)
396396
* [Uso avanzado de TypeScript en un ejemplo real](https://neliosoftware.com/es/blog/uso-avanzado-de-typescript/) - Nelio Software (HTML)
397397

398398

books/free-programming-books-et.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* [Java](#java)
77
* [JavaScript](#javascript)
88
* [AngularJS](#angularjs)
9-
* [Vue](#vue)
9+
* [Vue.js](#vuejs)
1010
* [PHP](#php)
1111
* [Python](#python)
1212
* [R](#r)
@@ -45,7 +45,7 @@
4545
* [AngularJS raamistiku õppematerjal](https://www.cs.tlu.ee/teemad/get_file.php?id=400) - Sander Leetus (PDF)
4646

4747

48-
#### Vue
48+
#### Vue.js
4949

5050
* [Vue.js raamistiku õppematerjal](https://www.cs.tlu.ee/teemaderegister/get_file.php?id=715) - Fred Korts (PDF)
5151

books/free-programming-books-fa_IR.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
* [الگوهای طراحی](https://holosen.net/what-is-design-pattern/) - Hossein Badrnezhad *(نیاز به ثبت نام دارد)*
3030
* [الگوهای طراحی در برنامه‌نویسی شیء‌گرا](https://github.com/khajavi/Practical-Design-Patterns)
31-
* [ترجمه آزاد کتاب کد تمیز](https://codetamiz.vercel.app) - Robert C. Martin et al.
31+
* [ترجمه آزاد کتاب کد تمیز](https://codetamiz.vercel.app) - Robert C. Martin, et al.
3232

3333

3434
### HTML and CSS

0 commit comments

Comments
 (0)