Skip to content

Commit 4a5d8ba

Browse files
authored
👷 Local URL checking script (#26975)
1 parent 7a5d849 commit 4a5d8ba

22 files changed

+126
-62
lines changed

Marlin/Configuration.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
*
5151
* Calibration Guides: https://reprap.org/wiki/Calibration
5252
* https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
53-
* https://web.archive.org/web/20220907014303/https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
53+
* https://web.archive.org/web/20220907014303/sites.google.com/site/repraplogphase/calibration-of-your-reprap
5454
* https://youtu.be/wAL9d7FgInk
5555
* https://teachingtechyt.github.io/calibration.html
5656
*
@@ -2795,7 +2795,7 @@
27952795

27962796
//
27972797
// Original RADDS LCD Display+Encoder+SDCardReader
2798-
// https://web.archive.org/web/20200719145306/http://doku.radds.org/dokumentation/lcd-display/
2798+
// https://web.archive.org/web/20200719145306/doku.radds.org/dokumentation/lcd-display/
27992799
//
28002800
//#define RADDS_DISPLAY
28012801

@@ -2861,7 +2861,7 @@
28612861

28622862
//
28632863
// Elefu RA Board Control Panel
2864-
// https://web.archive.org/web/20140823033947/http://www.elefu.com/index.php?route=product/product&product_id=53
2864+
// https://web.archive.org/web/20140823033947/www.elefu.com/index.php?route=product/product&product_id=53
28652865
//
28662866
//#define RA_CONTROL_PANEL
28672867

@@ -2993,7 +2993,7 @@
29932993

29942994
//
29952995
// Cartesio UI
2996-
// https://web.archive.org/web/20180605050442/http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
2996+
// https://web.archive.org/web/20180605050442/mauk.cc/webshop/cartesio-shop/electronics/user-interface
29972997
//
29982998
//#define CARTESIO_UI
29992999

Marlin/Configuration_adv.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -3525,7 +3525,7 @@
35253525
//#define PHOTOGRAPH_PIN 23
35263526

35273527
// Canon Hack Development Kit
3528-
// https://web.archive.org/web/20200920094805/https://captain-slow.dk/2014/03/09/3d-printing-timelapses/
3528+
// https://web.archive.org/web/20200920094805/captain-slow.dk/2014/03/09/3d-printing-timelapses/
35293529
//#define CHDK_PIN 4
35303530

35313531
// Optional second move with delay to trigger the camera shutter

Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
* Logical Pin: 28 29 30 31 32 33 34 35 20 21 22 23 24 25 26 27 10 11 12 13 14 15 16 17 00 01 02 03 04 05 06 07 08 09(46*47)36 37 18 19 38 39 40 41 42 43 44 45
2828
* Port: A0 A1 A2 A3 A4 A5 A6 A7 B0 B1 B2 B3 B4 B5 B6 B7 C0 C1 C2 C3 C4 C5 C6 C7 D0 D1 D2 D3 D4 D5 D6 D7 E0 E1 E2 E3 E4 E5 E6 E7 F0 F1 F2 F3 F4 F5 F6 F7
29-
* The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
29+
* Logical pins 46-47 aren't supported by Teensyduino, but are supported below as E2 and E3
3030
*/
3131

3232
#include "../fastio.h"

Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h

+3-8
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@
2323

2424
/**
2525
* Smoothieware Smoothieboard pin assignments
26-
* Schematic: http://smoothieware.org/_media///external/http.i.imgur.com.oj4zqs3.png
26+
* See https://smoothieware.github.io/Webif-pack/documentation/web/html/smoothieboard.html
2727
*/
2828

2929
#include "env_validate.h"
3030

3131
#define BOARD_INFO_NAME "Smoothieboard"
32-
#define BOARD_WEBSITE_URL "smoothieware.org/smoothieboard"
32+
#define BOARD_WEBSITE_URL "smoothieware.github.io"
3333

3434
//
3535
// Servos
@@ -131,12 +131,7 @@
131131

132132
/**
133133
* The Smoothieboard supports the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with either
134-
* a custom cable with breakouts to the pins indicated below or the RRD GLCD Adapter board
135-
* found at http://smoothieware.org/rrdglcdadapter
136-
*
137-
* Other links to information about setting up a display panel with Smoothieboard
138-
* http://chibidibidiwah.wdfiles.com/local--files/panel/smoothieboard2sd.jpg
139-
* http://smoothieware.org/panel
134+
* a custom cable with breakouts to the pins indicated below or the RRD GLCD Adapter board.
140135
*/
141136
#if IS_RRD_FG_SC
142137
// EXP1 Pins

Marlin/src/pins/mega/pins_CHEAPTRONICv2.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
* Cheaptronic v2.0 pin assignments
2626
* Built and sold by Michal Dyntar - RRO
2727
* www.reprapobchod.cz (DOES NOT EXIST ANYMORE)
28-
* https://web.archive.org/web/20190306201523/http://reprapobchod.cz/
28+
* https://web.archive.org/web/20190306201523/reprapobchod.cz
2929
* ATmega2560
3030
*/
3131

Marlin/src/pins/mega/pins_CNCONTROLS_11.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/**
2525
* CartesioV11 pin assignments
2626
* Comes with an Arduino Mega, see
27-
* https://web.archive.org/web/20171024190029/http://mauk.cc/mediawiki/index.php/Electronical_assembly
27+
* https://web.archive.org/web/20171024190029/mauk.cc/mediawiki/index.php/Electronical_assembly
2828
* ATmega2560, ATmega1280
2929
*/
3030

Marlin/src/pins/mega/pins_CNCONTROLS_12.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/**
2525
* CartesioV12 pin assignments
2626
* Comes with an Arduino Mega, see
27-
* https://web.archive.org/web/20171024190029/http://mauk.cc/mediawiki/index.php/Electronical_assembly
27+
* https://web.archive.org/web/20171024190029/mauk.cc/mediawiki/index.php/Electronical_assembly
2828
* ATmega2560, ATmega1280
2929
*/
3030

Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/**
2525
* BAM&DICE Due (Arduino Mega) pin assignments
26-
* Schematic: http://www.2printbeta.de/download/2PRINTBETA-BAM&DICE-DUE-V1.1-sch.pdf
26+
* Schematic: http://www.2printbeta.de/de/download/2PRINTBETA-BAM&DICE-DUE-V1.1-sch.pdf
2727
* ATmega2560, ATmega1280
2828
*/
2929

Marlin/src/pins/ramps/pins_K8800.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/**
2525
* Velleman K8800 (Vertex)
26-
* Schematic: https://www.velleman.eu/downloads/files/vertex-delta/schematics/K8800-schematic-V1.4.pdf
26+
* Schematic: https://cdn.velleman.eu/downloads/files/vertex-delta/schematics/K8800-schematic-V1.4.pdf
2727
* ATmega2560, ATmega1280
2828
*/
2929

Marlin/src/pins/ramps/pins_ULTIMAIN_2.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
* - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema4.SchDoc
3232
* - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema5.SchDoc
3333
* Schematics (Original+):
34-
* Schematic (Original+): https://github.com/Ultimaker/Ultimaker-Original-Plus/blob/master/1091_Main_board_v2.1.1_(x1)/Ultimainboard%20rev.%202.1.1%20altium.zip
34+
* Schematic (Original+): https://github.com/Ultimaker/Ultimaker-Original-Plus/blob/master/1091_Main_board_v2.1.1_%28x1%29/Ultimainboard%20rev.%202.1.1%20altium.zip
3535
* ATmega2560
3636
*/
3737

Marlin/src/pins/sam/pins_RADDS.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111

112112
/**
113113
* RADDS Extension Board V2 / V3
114-
* http://doku.radds.org/dokumentation/extension-board
114+
* https://web.archive.org/web/20210627142010/doku.radds.org/dokumentation/extension-board/
115115
*/
116116
//#define RADDS_EXTENSION 2
117117
#if RADDS_EXTENSION >= 2

Marlin/src/pins/sam/pins_RURAMPS4D_11.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@
271271

272272
#elif ENABLED(SPARK_FULL_GRAPHICS)
273273

274-
//http://doku.radds.org/dokumentation/other-electronics/sparklcd/
274+
// https://sparklab-shop.de/elektronik/40/sparklcd-adapter
275275
#error "Oops! SPARK_FULL_GRAPHICS not supported with RURAMPS4D."
276276
//#define LCD_PINS_D4 29 //?
277277
//#define LCD_PINS_EN 27 //?

Marlin/src/pins/sanguino/pins_ANET_10.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
#elif IS_RRD_FG_SC
207207

208208
// Pin definitions for the Anet A6 Full Graphics display and the RepRapDiscount Full Graphics
209-
// display using an adapter board. See https://go.aisler.net/benlye/anet-lcd-adapter/pcb
209+
// display using an adapter board. See https://aisler.net/benlye/anet-lcd-adapter/pcb
210210
// See below for alternative pin definitions for use with https://www.thingiverse.com/thing:2103748
211211

212212
#if ENABLED(CTC_A10S_A13)
@@ -305,8 +305,8 @@
305305
* ====================================================================
306306
*
307307
* Anet V1.0 controller | ZONESTAR_LCD | ANET_FULL_ | RepRapDiscount Full | Thingiverse RepRap wiring
308-
* physical logical alt | | GRAPHICS_LCD | Graphics Display Wiring | https://www.thingiverse
309-
* pin pin functions | | | | .com/thing:2103748
308+
* physical logical alt | | GRAPHICS_LCD | Graphics Display Wiring | https://www.thingiverse.com/thing:2103748
309+
* pin pin functions | | | |
310310
*--------------------------------------------------------------------------------------------------------------------
311311
* ANET-J3.1 8 *** | N/A | J3_TX *** | |
312312
* ANET-J3.2 9 *** | N/A | J3_RX *** | |

Marlin/src/pins/sanguino/pins_OMCA.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
*
7070
* When installing select 1.0.2
7171
*
72-
* Installation instructions can be found at http://learn.sparkfun.com/pages/CustomBoardsArduino
72+
* Installation instructions can be found at https://learn.sparkfun.com:443/pages/CustomBoardsArduino
7373
* Just use the above JSON URL instead of Sparkfun's JSON.
7474
*
7575
* Once installed select the Sanguino board and then select the CPU.

Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
/**
2525
* Pin assignments for the RUMBA32
2626
*
27-
* https://aus3d.com.au/rumba32
27+
* https://aus3d.com.au/products/rumba32-control-board
2828
* https://github.com/Aus3D/RUMBA32
2929
*/
3030

buildroot/share/PlatformIO/variants/MARLIN_MEGA_EXTENDED/pins_arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
pins_arduino.h - Pin definition functions for Arduino
3-
Part of Arduino - http://www.arduino.cc/
3+
Part of Arduino - https://www.arduino.cc/
44
55
Copyright (c) 2007 David A. Mellis
66

buildroot/share/fonts/bdf2u8g/bdf2u8g.c

+30-30
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,69 @@
11
/*
22
general font collections
3-
http://www.smashingmagazine.com/2007/11/08/40-excellent-freefonts-for-professional-design/
4-
http://techmagazine.ws/most-popular-free-quality-fonts/
5-
http://openfontlibrary.org/
3+
https://www.smashingmagazine.com/2007/11/08/40-excellent-freefonts-for-professional-design/
4+
https://techmagazine.ws/most-popular-free-quality-fonts/
5+
https://openfontlibrary.org/
66
bitmap font collections
7-
http://www.orgdot.com/aliasfonts/ (includes links)
8-
http://www.04.jp.org/
9-
http://www.miniml.com
10-
http://www.fontspace.com/010bus
7+
https://www.orgdot.com/aliasfonts/ (includes links)
8+
https://www.04.jp.org/
9+
https://www.miniml.com
10+
https://www.fontspace.com/010bus
1111
12-
http://en.wikipedia.org/wiki/Unicode_typeface
12+
https://en.wikipedia.org/wiki/Unicode_typeface
1313
da könnten auch ein paar fonts dabei sein, die die m2tklib sonderzeichen beinhalten:
14-
Caslon Roman http://en.wikipedia.org/wiki/Caslon_Roman
15-
Charis Sil http://en.wikipedia.org/wiki/Charis_SIL
16-
DejaVu Sans http://en.wikipedia.org/wiki/DejaVu_fonts
17-
Doulos http://en.wikipedia.org/wiki/Doulos_SIL
18-
Free Serif http://en.wikipedia.org/wiki/FreeSerif http://ftp.gnu.org/gnu/freefont/
14+
Caslon Roman https://en.wikipedia.org/wiki/Caslon_Roman
15+
Charis Sil https://en.wikipedia.org/wiki/Charis_SIL
16+
DejaVu Sans https://en.wikipedia.org/wiki/DejaVu_fonts
17+
Doulos https://en.wikipedia.org/wiki/Doulos_SIL
18+
Free Serif https://en.wikipedia.org/wiki/FreeSerif https://ftp.gnu.org/gnu/freefont/
1919
--> keine box, aber es gibt pfeile/invertierte pfeile und kreise für m2tklib
20-
Gentium Plus ???? http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=Gentium_download#02b091ae
20+
Gentium Plus ???? https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=Gentium_download#02b091ae
2121
--> keine graphic
22-
GNU Unifont http://en.wikipedia.org/wiki/GNU_Unifont, http://unifoundry.com/unifont.html
22+
GNU Unifont https://en.wikipedia.org/wiki/GNU_Unifont, https://unifoundry.com/unifont.html
2323
24-
Titus cyberbit Basic http://en.wikipedia.org/wiki/TITUS_Cyberbit_Basic
24+
Titus cyberbit Basic https://en.wikipedia.org/wiki/TITUS_Cyberbit_Basic
2525
2626
fonts
2727
Gentium
28-
http://openfontlibrary.org/font/gentium
28+
https://openfontlibrary.org/font/gentium
2929
license: OFL
3030
Old-Standard
31-
http://openfontlibrary.org/font/old-standard
31+
https://openfontlibrary.org/font/old-standard
3232
license: OFL
3333
Hanuman
34-
http://openfontlibrary.org/font/hanumanb
34+
https://openfontlibrary.org/font/hanumanb
3535
license: OFL
3636
FreeUniversal
37-
http://openfontlibrary.org/font/freeuniversal
37+
https://openfontlibrary.org/font/freeuniversal
3838
license: OFL
3939
FriendShip-Code <--- nicht so sicher...
40-
http://openfontlibrary.org/font/friendship-code
40+
https://openfontlibrary.org/font/friendship-code
4141
license: CC-BY-SA
4242
LinuxLibertine
43-
http://de.wikipedia.org/wiki/Linux_Libertine
44-
http://sourceforge.net/projects/linuxlibertine/files/linuxlibertine/5.1.3-2/
43+
https://de.wikipedia.org/wiki/Linux_Libertine
44+
https://sourceforge.net/projects/linuxlibertine/files/linuxlibertine/5.1.3-2/
4545
license: OFL
4646
DidactGothic
47-
source: http://openfontlibrary.org/
47+
source: https://openfontlibrary.org/
4848
judson
49-
source: http://openfontlibrary.org/
49+
source: https://openfontlibrary.org/
5050
unicons
51-
source: http://openfontlibrary.org/
51+
source: https://openfontlibrary.org/
5252
license: OFL
5353
suggested pt: 26, 30
5454
org_V01, fixed_V0
55-
source: http://www.orgdot.com/aliasfonts/
55+
source: https://www.orgdot.com/aliasfonts/
5656
license: open source, individual, cite required
5757
suggested pt: 8
5858
04b_03b.zip 04b_03.zip 04b_09.zip 04b_11.zip 04b_19.zip 04b_21.zip 04b_25.zip 04b_30.zip
59-
source: http://www.04.jp.org/
59+
source: https://www.04.jp.org/
6060
license: "Freeware: You may use them as you like"
6161
7px4bus
62-
source: http://www.fontspace.com/010bus
62+
source: https://www.fontspace.com/010bus
6363
license: Licensed as: Freeware, Commercial use allowed!
6464
suggested 7pt
6565
8pxbus
66-
source: http://www.fontspace.com/010bus
66+
source: https://www.fontspace.com/010bus
6767
license: Licensed as: Freeware, Commercial use allowed!
6868
suggested 8pt
6969

buildroot/share/fonts/uxggenpages.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ At this time, the font file `marlin-6x12-3.bdf` is used to generate the font dat
103103

104104
Documents related to the old version of the language engine:
105105

106-
- [Marlin Fonts Documentation](https://www.marlinfw.org/docs/development/fonts.html)
106+
- [Marlin Fonts Documentation](https://marlinfw.org/docs/development/fonts.html)
107107
- [Marlin LCD Language](https://marlinfw.org/docs/development/lcd_language.html)
108108
- [U8GLIB](https://github.com/olikraus/u8glib.git)
109109
- [UTF-8 for U8GLIB](https://github.com/yhfudev/u8glib-fontutf8.git)

buildroot/share/scripts/check-urls.sh

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Check for broken URLs in Marlin files
4+
#
5+
[ -d "Marlin/src" ] || { echo "Run this script from the Marlin project folder!" ; exit 1 ; }
6+
7+
UA="Mozilla/5.0 (Linux; Android 10; SM-G996U Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Mobile Safari/537.36"
8+
UTMP=$(mktemp)
9+
#echo "[debug 1] UTMP = ${UTMP}"
10+
echo "Gathering URLs. Please wait..."
11+
grep -R -E "https?:\/\/[^ \"''\(\)\<\>]+" . 2>/dev/null \
12+
| grep -v "Binary file" \
13+
| sed -E "s/\/https?:\/\//\//" \
14+
| sed -E 's/.*\((https?:\/\/[^ ]+)\).*$/\1/' \
15+
| sed -E 's/.*\[(https?:\/\/[^ ]+)\].*$/\1/' \
16+
| sed -E 's/.*(https?:\/\/[^ \"''()<>]+).*/\1/' \
17+
| grep -vE "(127\.0\.0\.1|localhost|myserver|doc\.qt\.io|docs\.google\.com|raw\.githubusercontent\.com|[\${}])" \
18+
| sed -E 's/]$//' | sed -E "s/'$//" | sed -E "s/[#.',]+$//" \
19+
| sed -E 's/youtu\.be\/(.+)/www.youtube.com\/watch?v=\1/' \
20+
| sort -u -R \
21+
>"$UTMP"
22+
23+
#echo "[debug 2] link count = $(wc -l $UTMP)"
24+
ISERR=
25+
declare -a BADURLS
26+
while IFS= read -r URL
27+
do
28+
#echo -n "Checking ${URL} ... "
29+
HEAD=$(curl -s -I -A "${UA}" --request GET "${URL}" 2>/dev/null) ; HERR=$?
30+
if [[ $HERR > 0 ]]; then
31+
# Error 92 may be domain blocking curl / wget
32+
[[ $HERR == 92 ]] || { ISERR=1 ; BADURLS+=($URL) ; }
33+
echo "[FAIL ($HERR)]"
34+
else
35+
HEAD1=$(echo $HEAD | head -n1)
36+
EMSG=
37+
WHERE=
38+
case "$HEAD1" in
39+
*" 301"*) EMSG="[Moved Permanently]" ; WHERE=1 ;;
40+
*" 302"*) EMSG="[Moved Temporarily]" ; WHERE=1 ;;
41+
*" 303"*) echo "[See Other]" ;;
42+
*" 400"*) EMSG="[Invalid Request]" ;;
43+
*" 403"*) EMSG="[Forbidden]" ;;
44+
*" 404"*) EMSG="[Not Found]" ;;
45+
*" 503"*) EMSG="[Unavailable]" ;;
46+
*" 200"*) echo "[ OK ]" ;;
47+
*) EMSG="[Other Err]" ;;
48+
esac
49+
if [[ -n $EMSG ]]; then
50+
if [[ -n $WHERE ]]; then
51+
[[ ${HEAD,,} =~ "location: " ]] && EMSG+=" to $(echo "$HEAD" | grep -i "location: " | sed -E 's/location: (.*)/\1/')"
52+
else
53+
ISERR=1 ; BADURLS+=($URL)
54+
fi
55+
echo $EMSG
56+
fi
57+
fi
58+
done <"$UTMP"
59+
60+
#echo "[debug 3]"
61+
if [[ -n $ISERR ]]; then
62+
# Join bad URLs into a bulleted markdown list
63+
printf -v BADSTR -- "- %s\n" "${BADURLS[@]}"
64+
echo -e "\nURL Checker reports one or more URLs could not be reached:\n${BADSTR}"
65+
exit 1
66+
fi
67+
68+
echo -e "\nURL Check Passed."
69+
exit 0

buildroot/share/vscode/avrdude.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
# section avr061.zip which accompanies the application note
185185
# AVR061 available from:
186186
#
187-
# http://www.atmel.com/atmel/acrobat/doc2525.pdf
187+
# https://www.microchip.com/en-us/application-notes/an2525
188188
#
189189

190190
#define ATTINY10 0x10 /* the _old_ one that never existed! */

buildroot/share/vscode/avrdude_linux.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
# section avr061.zip which accompanies the application note
185185
# AVR061 available from:
186186
#
187-
# http://www.atmel.com/atmel/acrobat/doc2525.pdf
187+
# https://www.microchip.com/en-us/application-notes/an2525
188188
#
189189

190190
#define ATTINY10 0x10 /* the _old_ one that never existed! */

0 commit comments

Comments
 (0)