Last active
February 13, 2026 23:44
-
-
Save omarowns/5711849 to your computer and use it in GitHub Desktop.
Bash script to download all issues of The MagPi.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| MAGPPI_URL="https://www.raspberrypi.org/magpi-issues/" | |
| function get_issues() { | |
| curl $MAGPI_URL | grep "\"MagPi\d\d\.pdf\"" | grep -o "MagPi\d\d.pdf" | uniq > /tmp/magpi_issues.list | |
| } | |
| function download() { | |
| cat issues.list | xargs printf "https://www.raspberrypi.org/magpi-issues/%s\n" $1 | xargs wget | |
| } | |
| get_issues | |
| download |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunately, they put their .pdf downloads behind a POST prompt now, so you can't simply "wget" them.
Also, the URL changed to this format: "
https://magazine.raspberrypi.com/issues/###/pdf/download"Also, from Issue 151 and above, they changed the file names from "
MagPi###.pdf" to "RPOM-###.pdf".I'm a sucker for shitty ChatGPT-generated PowerShell scripts. Here's one I modified that allows you to specify which issues you want to download: