MagPiDownloader
Rund um das Raspberry Pi gibt es es das MagPi Magazin, welches man sich als freie pdf Version herunterladen kann. Um smir den Download zu vereinfachen, habe ich mir ein kleines python Skript geschrieben, welches mir die PDF Dokumente herunterlädt.
Dabei holt sich das Skript den Index vom Server unter 'https://www.raspberrypi.org/magpi-issues/', vergleicht die dort aufgeführten Dokumente mit meinem lokalen Ordner und lädt nur die neuen Dokumente herunter.
Kurz gesagt mein Ordner wird mit dem Server synchronisiert.
Example output:
# download new file
./getMagpi.py
> Found new file: Essentials_Bash_v1.pdf
> [==================================================] 2.35MB:2.35MB
# there is no new file
./getMagpi.py
> No new files found
Quelle
Das Skript befindet sich auf github unter folgendem Repository https://github.com/f0xd3v1lsw1ld/MagPiDownloader.git
Installation
- install beautifulsoup
sh
$ sudo pip install beautifulsoup4
- create folder to store the MagPi editions
sh
$ mkdir --parents ~/Dokumente/books/MagPi
- go in the new directory and clone the repository
sh
$ cd ~/Dokumente/books/MagPi
$ git clone https://github.com/f0xd3v1lsw
Usage
go in the MagPi directory and run the script
sh
$ cd ~/Dokumente/books/MagPi
$ ./getMagpi.py