Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 Local URL checking script #26975

Merged
merged 2 commits into from
Jul 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
*
* Calibration Guides: https://reprap.org/wiki/Calibration
* https://reprap.org/wiki/Triffid_Hunter%27s_Calibration_Guide
* https://web.archive.org/web/20220907014303/https://sites.google.com/site/repraplogphase/calibration-of-your-reprap
* https://web.archive.org/web/20220907014303/sites.google.com/site/repraplogphase/calibration-of-your-reprap
* https://youtu.be/wAL9d7FgInk
* https://teachingtechyt.github.io/calibration.html
*
Expand Down Expand Up @@ -2795,7 +2795,7 @@

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

Expand Down Expand Up @@ -2861,7 +2861,7 @@

//
// Elefu RA Board Control Panel
// https://web.archive.org/web/20140823033947/http://www.elefu.com/index.php?route=product/product&product_id=53
// https://web.archive.org/web/20140823033947/www.elefu.com/index.php?route=product/product&product_id=53
//
//#define RA_CONTROL_PANEL

Expand Down Expand Up @@ -2993,7 +2993,7 @@

//
// Cartesio UI
// https://web.archive.org/web/20180605050442/http://mauk.cc/webshop/cartesio-shop/electronics/user-interface
// https://web.archive.org/web/20180605050442/mauk.cc/webshop/cartesio-shop/electronics/user-interface
//
//#define CARTESIO_UI

Expand Down
2 changes: 1 addition & 1 deletion Marlin/Configuration_adv.h
Original file line number Diff line number Diff line change
Expand Up @@ -3525,7 +3525,7 @@
//#define PHOTOGRAPH_PIN 23

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

// Optional second move with delay to trigger the camera shutter
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/HAL/AVR/fastio/fastio_AT90USB.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
*
* 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
* 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
* The logical pins 46 and 47 are not supported by Teensyduino, but are supported below as E2 and E3
* Logical pins 46-47 aren't supported by Teensyduino, but are supported below as E2 and E3
*/

#include "../fastio.h"
Expand Down
11 changes: 3 additions & 8 deletions Marlin/src/pins/lpc1769/pins_SMOOTHIEBOARD.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@

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

#include "env_validate.h"

#define BOARD_INFO_NAME "Smoothieboard"
#define BOARD_WEBSITE_URL "smoothieware.org/smoothieboard"
#define BOARD_WEBSITE_URL "smoothieware.github.io"

//
// Servos
Expand Down Expand Up @@ -131,12 +131,7 @@

/**
* The Smoothieboard supports the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER with either
* a custom cable with breakouts to the pins indicated below or the RRD GLCD Adapter board
* found at http://smoothieware.org/rrdglcdadapter
*
* Other links to information about setting up a display panel with Smoothieboard
* http://chibidibidiwah.wdfiles.com/local--files/panel/smoothieboard2sd.jpg
* http://smoothieware.org/panel
* a custom cable with breakouts to the pins indicated below or the RRD GLCD Adapter board.
*/
#if IS_RRD_FG_SC
// EXP1 Pins
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/mega/pins_CHEAPTRONICv2.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Cheaptronic v2.0 pin assignments
* Built and sold by Michal Dyntar - RRO
* www.reprapobchod.cz (DOES NOT EXIST ANYMORE)
* https://web.archive.org/web/20190306201523/http://reprapobchod.cz/
* https://web.archive.org/web/20190306201523/reprapobchod.cz
* ATmega2560
*/

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/mega/pins_CNCONTROLS_11.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* CartesioV11 pin assignments
* Comes with an Arduino Mega, see
* https://web.archive.org/web/20171024190029/http://mauk.cc/mediawiki/index.php/Electronical_assembly
* https://web.archive.org/web/20171024190029/mauk.cc/mediawiki/index.php/Electronical_assembly
* ATmega2560, ATmega1280
*/

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/mega/pins_CNCONTROLS_12.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* CartesioV12 pin assignments
* Comes with an Arduino Mega, see
* https://web.archive.org/web/20171024190029/http://mauk.cc/mediawiki/index.php/Electronical_assembly
* https://web.archive.org/web/20171024190029/mauk.cc/mediawiki/index.php/Electronical_assembly
* ATmega2560, ATmega1280
*/

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/ramps/pins_BAM_DICE_DUE.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

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

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/ramps/pins_K8800.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

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

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/ramps/pins_ULTIMAIN_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
* - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema4.SchDoc
* - https://github.com/Ultimaker/Ultimaker2/blob/master/1546%20ultimainboard%20V2.1.4/schema5.SchDoc
* Schematics (Original+):
* 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
* 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
* ATmega2560
*/

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/sam/pins_RADDS.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@

/**
* RADDS Extension Board V2 / V3
* http://doku.radds.org/dokumentation/extension-board
* https://web.archive.org/web/20210627142010/doku.radds.org/dokumentation/extension-board/
*/
//#define RADDS_EXTENSION 2
#if RADDS_EXTENSION >= 2
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/sam/pins_RURAMPS4D_11.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@

#elif ENABLED(SPARK_FULL_GRAPHICS)

//http://doku.radds.org/dokumentation/other-electronics/sparklcd/
// https://sparklab-shop.de/elektronik/40/sparklcd-adapter
#error "Oops! SPARK_FULL_GRAPHICS not supported with RURAMPS4D."
//#define LCD_PINS_D4 29 //?
//#define LCD_PINS_EN 27 //?
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/pins/sanguino/pins_ANET_10.h
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
#elif IS_RRD_FG_SC

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

#if ENABLED(CTC_A10S_A13)
Expand Down Expand Up @@ -305,8 +305,8 @@
* ====================================================================
*
* Anet V1.0 controller | ZONESTAR_LCD | ANET_FULL_ | RepRapDiscount Full | Thingiverse RepRap wiring
* physical logical alt | | GRAPHICS_LCD | Graphics Display Wiring | https://www.thingiverse
* pin pin functions | | | | .com/thing:2103748
* physical logical alt | | GRAPHICS_LCD | Graphics Display Wiring | https://www.thingiverse.com/thing:2103748
* pin pin functions | | | |
*--------------------------------------------------------------------------------------------------------------------
* ANET-J3.1 8 *** | N/A | J3_TX *** | |
* ANET-J3.2 9 *** | N/A | J3_RX *** | |
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/sanguino/pins_OMCA.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
*
* When installing select 1.0.2
*
* Installation instructions can be found at http://learn.sparkfun.com/pages/CustomBoardsArduino
* Installation instructions can be found at https://learn.sparkfun.com:443/pages/CustomBoardsArduino
* Just use the above JSON URL instead of Sparkfun's JSON.
*
* Once installed select the Sanguino board and then select the CPU.
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* Pin assignments for the RUMBA32
*
* https://aus3d.com.au/rumba32
* https://aus3d.com.au/products/rumba32-control-board
* https://github.com/Aus3D/RUMBA32
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
pins_arduino.h - Pin definition functions for Arduino
Part of Arduino - http://www.arduino.cc/
Part of Arduino - https://www.arduino.cc/

Copyright (c) 2007 David A. Mellis

Expand Down
60 changes: 30 additions & 30 deletions buildroot/share/fonts/bdf2u8g/bdf2u8g.c
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
/*
general font collections
http://www.smashingmagazine.com/2007/11/08/40-excellent-freefonts-for-professional-design/
http://techmagazine.ws/most-popular-free-quality-fonts/
http://openfontlibrary.org/
https://www.smashingmagazine.com/2007/11/08/40-excellent-freefonts-for-professional-design/
https://techmagazine.ws/most-popular-free-quality-fonts/
https://openfontlibrary.org/
bitmap font collections
http://www.orgdot.com/aliasfonts/ (includes links)
http://www.04.jp.org/
http://www.miniml.com
http://www.fontspace.com/010bus
https://www.orgdot.com/aliasfonts/ (includes links)
https://www.04.jp.org/
https://www.miniml.com
https://www.fontspace.com/010bus

http://en.wikipedia.org/wiki/Unicode_typeface
https://en.wikipedia.org/wiki/Unicode_typeface
da könnten auch ein paar fonts dabei sein, die die m2tklib sonderzeichen beinhalten:
Caslon Roman http://en.wikipedia.org/wiki/Caslon_Roman
Charis Sil http://en.wikipedia.org/wiki/Charis_SIL
DejaVu Sans http://en.wikipedia.org/wiki/DejaVu_fonts
Doulos http://en.wikipedia.org/wiki/Doulos_SIL
Free Serif http://en.wikipedia.org/wiki/FreeSerif http://ftp.gnu.org/gnu/freefont/
Caslon Roman https://en.wikipedia.org/wiki/Caslon_Roman
Charis Sil https://en.wikipedia.org/wiki/Charis_SIL
DejaVu Sans https://en.wikipedia.org/wiki/DejaVu_fonts
Doulos https://en.wikipedia.org/wiki/Doulos_SIL
Free Serif https://en.wikipedia.org/wiki/FreeSerif https://ftp.gnu.org/gnu/freefont/
--> keine box, aber es gibt pfeile/invertierte pfeile und kreise für m2tklib
Gentium Plus ???? http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=Gentium_download#02b091ae
Gentium Plus ???? https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=Gentium_download#02b091ae
--> keine graphic
GNU Unifont http://en.wikipedia.org/wiki/GNU_Unifont, http://unifoundry.com/unifont.html
GNU Unifont https://en.wikipedia.org/wiki/GNU_Unifont, https://unifoundry.com/unifont.html

Titus cyberbit Basic http://en.wikipedia.org/wiki/TITUS_Cyberbit_Basic
Titus cyberbit Basic https://en.wikipedia.org/wiki/TITUS_Cyberbit_Basic

fonts
Gentium
http://openfontlibrary.org/font/gentium
https://openfontlibrary.org/font/gentium
license: OFL
Old-Standard
http://openfontlibrary.org/font/old-standard
https://openfontlibrary.org/font/old-standard
license: OFL
Hanuman
http://openfontlibrary.org/font/hanumanb
https://openfontlibrary.org/font/hanumanb
license: OFL
FreeUniversal
http://openfontlibrary.org/font/freeuniversal
https://openfontlibrary.org/font/freeuniversal
license: OFL
FriendShip-Code <--- nicht so sicher...
http://openfontlibrary.org/font/friendship-code
https://openfontlibrary.org/font/friendship-code
license: CC-BY-SA
LinuxLibertine
http://de.wikipedia.org/wiki/Linux_Libertine
http://sourceforge.net/projects/linuxlibertine/files/linuxlibertine/5.1.3-2/
https://de.wikipedia.org/wiki/Linux_Libertine
https://sourceforge.net/projects/linuxlibertine/files/linuxlibertine/5.1.3-2/
license: OFL
DidactGothic
source: http://openfontlibrary.org/
source: https://openfontlibrary.org/
judson
source: http://openfontlibrary.org/
source: https://openfontlibrary.org/
unicons
source: http://openfontlibrary.org/
source: https://openfontlibrary.org/
license: OFL
suggested pt: 26, 30
org_V01, fixed_V0
source: http://www.orgdot.com/aliasfonts/
source: https://www.orgdot.com/aliasfonts/
license: open source, individual, cite required
suggested pt: 8
04b_03b.zip 04b_03.zip 04b_09.zip 04b_11.zip 04b_19.zip 04b_21.zip 04b_25.zip 04b_30.zip
source: http://www.04.jp.org/
source: https://www.04.jp.org/
license: "Freeware: You may use them as you like"
7px4bus
source: http://www.fontspace.com/010bus
source: https://www.fontspace.com/010bus
license: Licensed as: Freeware, Commercial use allowed!
suggested 7pt
8pxbus
source: http://www.fontspace.com/010bus
source: https://www.fontspace.com/010bus
license: Licensed as: Freeware, Commercial use allowed!
suggested 8pt

Expand Down
2 changes: 1 addition & 1 deletion buildroot/share/fonts/uxggenpages.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ At this time, the font file `marlin-6x12-3.bdf` is used to generate the font dat

Documents related to the old version of the language engine:

- [Marlin Fonts Documentation](https://www.marlinfw.org/docs/development/fonts.html)
- [Marlin Fonts Documentation](https://marlinfw.org/docs/development/fonts.html)
- [Marlin LCD Language](https://marlinfw.org/docs/development/lcd_language.html)
- [U8GLIB](https://github.com/olikraus/u8glib.git)
- [UTF-8 for U8GLIB](https://github.com/yhfudev/u8glib-fontutf8.git)
Expand Down
69 changes: 69 additions & 0 deletions buildroot/share/scripts/check-urls.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/usr/bin/env bash
#
# Check for broken URLs in Marlin files
#
[ -d "Marlin/src" ] || { echo "Run this script from the Marlin project folder!" ; exit 1 ; }

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"
UTMP=$(mktemp)
#echo "[debug 1] UTMP = ${UTMP}"
echo "Gathering URLs. Please wait..."
grep -R -E "https?:\/\/[^ \"''\(\)\<\>]+" . 2>/dev/null \
| grep -v "Binary file" \
| sed -E "s/\/https?:\/\//\//" \
| sed -E 's/.*\((https?:\/\/[^ ]+)\).*$/\1/' \
| sed -E 's/.*\[(https?:\/\/[^ ]+)\].*$/\1/' \
| sed -E 's/.*(https?:\/\/[^ \"''()<>]+).*/\1/' \
| grep -vE "(127\.0\.0\.1|localhost|myserver|doc\.qt\.io|docs\.google\.com|raw\.githubusercontent\.com|[\${}])" \
| sed -E 's/]$//' | sed -E "s/'$//" | sed -E "s/[#.',]+$//" \
| sed -E 's/youtu\.be\/(.+)/www.youtube.com\/watch?v=\1/' \
| sort -u -R \
>"$UTMP"

#echo "[debug 2] link count = $(wc -l $UTMP)"
ISERR=
declare -a BADURLS
while IFS= read -r URL
do
#echo -n "Checking ${URL} ... "
HEAD=$(curl -s -I -A "${UA}" --request GET "${URL}" 2>/dev/null) ; HERR=$?
if [[ $HERR > 0 ]]; then
# Error 92 may be domain blocking curl / wget
[[ $HERR == 92 ]] || { ISERR=1 ; BADURLS+=($URL) ; }
echo "[FAIL ($HERR)]"
else
HEAD1=$(echo $HEAD | head -n1)
EMSG=
WHERE=
case "$HEAD1" in
*" 301"*) EMSG="[Moved Permanently]" ; WHERE=1 ;;
*" 302"*) EMSG="[Moved Temporarily]" ; WHERE=1 ;;
*" 303"*) echo "[See Other]" ;;
*" 400"*) EMSG="[Invalid Request]" ;;
*" 403"*) EMSG="[Forbidden]" ;;
*" 404"*) EMSG="[Not Found]" ;;
*" 503"*) EMSG="[Unavailable]" ;;
*" 200"*) echo "[ OK ]" ;;
*) EMSG="[Other Err]" ;;
esac
if [[ -n $EMSG ]]; then
if [[ -n $WHERE ]]; then
[[ ${HEAD,,} =~ "location: " ]] && EMSG+=" to $(echo "$HEAD" | grep -i "location: " | sed -E 's/location: (.*)/\1/')"
else
ISERR=1 ; BADURLS+=($URL)
fi
echo $EMSG
fi
fi
done <"$UTMP"

#echo "[debug 3]"
if [[ -n $ISERR ]]; then
# Join bad URLs into a bulleted markdown list
printf -v BADSTR -- "- %s\n" "${BADURLS[@]}"
echo -e "\nURL Checker reports one or more URLs could not be reached:\n${BADSTR}"
exit 1
fi

echo -e "\nURL Check Passed."
exit 0
2 changes: 1 addition & 1 deletion buildroot/share/vscode/avrdude.conf
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
# section avr061.zip which accompanies the application note
# AVR061 available from:
#
# http://www.atmel.com/atmel/acrobat/doc2525.pdf
# https://www.microchip.com/en-us/application-notes/an2525
#

#define ATTINY10 0x10 /* the _old_ one that never existed! */
Expand Down
2 changes: 1 addition & 1 deletion buildroot/share/vscode/avrdude_linux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
# section avr061.zip which accompanies the application note
# AVR061 available from:
#
# http://www.atmel.com/atmel/acrobat/doc2525.pdf
# https://www.microchip.com/en-us/application-notes/an2525
#

#define ATTINY10 0x10 /* the _old_ one that never existed! */
Expand Down
Loading
Loading