Make ZIM file from iFixit articles
Project description
iFixit
ifixit2zim is an openZIM scraper to create offline versions of iFixit website, in all its supported languages.
This scraper downloads the iFixit resources (categories, guides, ...) and puts them in a ZIM file, a clean and user friendly format for storing content for offline usage.
For now, this tool is still under active development. Most recent version of the tool is located in the develop branch or any of its sub-branches.
Develop
If you want to help us by enhancing this scraper with some additional / better code, feel free to choose an open issue without assignee and work on it. If you are not used to Kiwix scrapper development, you will find some guidance below.
Create an appropriate Python environment
First time:
python3 -m venv .venv
source .venv/bin/activate
pip3 install -r requirements.pip
Next times:
source .venv/bin/activate
NOTA : there is some limitations to the execution of the underlying libzim library on MacOS with some known bugs. The main issue is that the full-text index is not working, so this shouldn't be a problem for quick tests. In doubt, execute the scraper in a Docker container as explained below.
Test the scraper in a Docker container
First, build the Docker image (to be ran in the main folder of this repo):
docker build -t openzim/fixit:local .
Then run the scraper with CLI arguments needed for your test (everything after ifixit2zim in the example below).
For instance, if you want to run a scrape of only the Apple_PDA category, including its guides,
in French :
docker run -it -v $(pwd)/output:/output --rm openzim/fixit:local ifixit2zim --language fr --output /output --tmp-dir /tmp --category Apple_PDA
This will produce a ZIM in the output folder of your current directory.
Test the ZIM produced
To test if the ZIM produced is OK, you should run kiwix-serve, once more with Docker.
For instance, if you produced a file named ifixit_fr_selection_2022-04.zim in the
output subfolder, and port 1256 is unused on your machine, you might run:
docker run -it --rm -v $(pwd)/output:/data -p 1256:80 kiwix/kiwix-tools kiwix-serve /data/ifixit_fr_selection_2022-04.zim
And then navigate to (https://localhost:1256) on your favorite browser.
Once test are complete, you might stop the Docker container by pressing Ctrl-C
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ifixit2zim-0.1.0.tar.gz.
File metadata
- Download URL: ifixit2zim-0.1.0.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec77d12104f57df889627af7a4b78a6a84044503b7bc74f80d30e2bb6a4c5cb9
|
|
| MD5 |
58d30a806d20fedc9fcbd79cd292f563
|
|
| BLAKE2b-256 |
e5012fd4feaefce8658def20aa1fea34b2bfd79b513e5231e3324e2cb7f265da
|
File details
Details for the file ifixit2zim-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ifixit2zim-0.1.0-py3-none-any.whl
- Upload date:
- Size: 1.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f36e71d00efc798d43d02951863ffb0e0ef302885892446babf54e558dca321
|
|
| MD5 |
26bbc99a762d74c0f7c7d8aefae394d2
|
|
| BLAKE2b-256 |
fb4ba56afa77f003f6cbd550fecae456c96000d0e7dea903c9750e7f3fcbaf12
|