ifixit2zim


Nameifixit2zim JSON
Version 0.3.1 PyPI version JSON
download
home_page
SummaryMake ZIM file from iFixit guides
upload_time2024-03-02 22:33:42
maintainer
docs_urlNone
author
requires_python<3.13,>=3.12
licenseGPL-3.0-or-later
keywords ifixit kiwix offline zim
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # iFixit

`ifixit2zim` is an [openZIM](https://openzim.org) scraper to create offline versions of [iFixit](https://www.ifixit.com/) website, in all its supported languages.

[![CodeFactor](https://www.codefactor.io/repository/github/openzim/ifixit/badge)](https://www.codefactor.io/repository/github/openzim/ifixit)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![codecov](https://codecov.io/gh/openzim/ifixit/branch/main/graph/badge.svg)](https://codecov.io/gh/openzim/ifixit)
[![PyPI version shields.io](https://img.shields.io/pypi/v/ifixit2zim.svg)](https://pypi.org/project/ifixit2zim/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ifixit2zim.svg)](https://pypi.org/project/ifixit2zim)

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.

## Usage

`ifixit2zim` works off a *language version* that you must provide via the `--language` argument. The list of supported languages is visible in the `--help` message.

### Docker

```bash
docker run -v my_dir:/output ghcr.io/openzim/ifixit ifixit2zim --help
```

### Python

`ifixit2zim` is a Python3 (**3.6+**) software. If you are not using the [Docker](https://docker.com) image, you are advised to use it in a virtual environment to avoid installing software dependencies on your system. In addition to Python3, you also need to have an up-to-date installation of pip, setuptools and wheel as recommanded [here](https://packaging.python.org/en/latest/tutorials/installing-packages/#id14) (wheel is important since you will have to build some dependencies).

```bash
python3 -m venv .venv
source .venv/bin/activate

# using published version
pip3 install ifixit2zim
ifixit2zim --help

# running from source
pip3 install -r requirements.pip
python3 ifixit2zim/ --help
```

Call `deactivate` to quit the virtual environment.

See `requirements.txt` for the list of python dependencies.


## Contributing

**All contributions are welcome!**

Please open an issue on Github and/or submit a Pull-request.

This project adheres to openZIM's [Contribution Guidelines](https://github.com/openzim/overview/wiki/Contributing).

This project has implemented openZIM's [Python bootstrap, conventions and policies](https://github.com/openzim/_python-bootstrap/blob/main/docs/Policy.md) **v1.0.0**.

### Guidelines

- Don't take assigned issues. Comment if those get staled.
- If your contribution is far from trivial, open an issue to discuss it first.
- Ensure your code passed [black formatting](https://pypi.org/project/black/), [isort](https://pypi.org/project/isort/) and [flake8](https://pypi.org/project/flake8/) (88 chars)

### 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 local-ifixit .
```

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 local-ifixit 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 ghcr.io/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

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "ifixit2zim",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "<3.13,>=3.12",
    "maintainer_email": "",
    "keywords": "ifixit,kiwix,offline,zim",
    "author": "",
    "author_email": "Kiwix <dev@kiwix.org>",
    "download_url": "https://files.pythonhosted.org/packages/47/1d/b18c41a8e8ba3caafeb41a6083aa288f1710c06fb2233457401587f95d5d/ifixit2zim-0.3.1.tar.gz",
    "platform": null,
    "description": "# iFixit\n\n`ifixit2zim` is an [openZIM](https://openzim.org) scraper to create offline versions of [iFixit](https://www.ifixit.com/) website, in all its supported languages.\n\n[![CodeFactor](https://www.codefactor.io/repository/github/openzim/ifixit/badge)](https://www.codefactor.io/repository/github/openzim/ifixit)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![codecov](https://codecov.io/gh/openzim/ifixit/branch/main/graph/badge.svg)](https://codecov.io/gh/openzim/ifixit)\n[![PyPI version shields.io](https://img.shields.io/pypi/v/ifixit2zim.svg)](https://pypi.org/project/ifixit2zim/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/ifixit2zim.svg)](https://pypi.org/project/ifixit2zim)\n\nThis 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.\n\n## Usage\n\n`ifixit2zim` works off a *language version* that you must provide via the `--language` argument. The list of supported languages is visible in the `--help` message.\n\n### Docker\n\n```bash\ndocker run -v my_dir:/output ghcr.io/openzim/ifixit ifixit2zim --help\n```\n\n### Python\n\n`ifixit2zim` is a Python3 (**3.6+**) software. If you are not using the [Docker](https://docker.com) image, you are advised to use it in a virtual environment to avoid installing software dependencies on your system. In addition to Python3, you also need to have an up-to-date installation of pip, setuptools and wheel as recommanded [here](https://packaging.python.org/en/latest/tutorials/installing-packages/#id14) (wheel is important since you will have to build some dependencies).\n\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate\n\n# using published version\npip3 install ifixit2zim\nifixit2zim --help\n\n# running from source\npip3 install -r requirements.pip\npython3 ifixit2zim/ --help\n```\n\nCall `deactivate` to quit the virtual environment.\n\nSee `requirements.txt` for the list of python dependencies.\n\n\n## Contributing\n\n**All contributions are welcome!**\n\nPlease open an issue on Github and/or submit a Pull-request.\n\nThis project adheres to openZIM's [Contribution Guidelines](https://github.com/openzim/overview/wiki/Contributing).\n\nThis project has implemented openZIM's [Python bootstrap, conventions and policies](https://github.com/openzim/_python-bootstrap/blob/main/docs/Policy.md) **v1.0.0**.\n\n### Guidelines\n\n- Don't take assigned issues. Comment if those get staled.\n- If your contribution is far from trivial, open an issue to discuss it first.\n- Ensure your code passed [black formatting](https://pypi.org/project/black/), [isort](https://pypi.org/project/isort/) and [flake8](https://pypi.org/project/flake8/) (88 chars)\n\n### Create an appropriate Python environment\n\nFirst time:\n```\npython3 -m venv .venv\nsource .venv/bin/activate\npip3 install -r requirements.pip\n```\n\nNext times:\n```\nsource .venv/bin/activate\n```\n\n\nNOTA : there is some limitations to the execution of the underlying libzim library on\nMacOS with some known bugs. The main issue is that the full-text index is not working,\nso this shouldn't be a problem for quick tests. In doubt, execute the scraper in a\nDocker container as explained below.\n\n### Test the scraper in a Docker container\n\nFirst, build the Docker image (to be ran in the main folder of this repo):\n```\ndocker build -t local-ifixit .\n```\n\nThen run the scraper with CLI arguments needed for your test (everything after `ifixit2zim` in the example below).\n\nFor instance, if you want to run a scrape of only the `Apple_PDA` category, including its guides,\nin French :\n```\ndocker run -it -v $(pwd)/output:/output --rm local-ifixit ifixit2zim --language fr --output /output --tmp-dir /tmp --category Apple_PDA\n```\n\nThis will produce a ZIM in the output folder of your current directory.\n\n### Test the ZIM produced\n\nTo test if the ZIM produced is OK, you should run kiwix-serve, once more with Docker.\n\nFor instance, if you produced a file named `ifixit_fr_selection_2022-04.zim` in the\n`output` subfolder, and port 1256 is unused on your machine, you might run:\n```\ndocker run -it --rm -v $(pwd)/output:/data -p 1256:80 ghcr.io/kiwix/kiwix-tools kiwix-serve /data/ifixit_fr_selection_2022-04.zim\n```\nAnd then navigate to (https://localhost:1256) on your favorite browser.\n\nOnce test are complete, you might stop the Docker container by pressing Ctrl-C\n",
    "bugtrack_url": null,
    "license": "GPL-3.0-or-later",
    "summary": "Make ZIM file from iFixit guides",
    "version": "0.3.1",
    "project_urls": {
        "Donate": "https://www.kiwix.org/en/support-us/",
        "Homepage": "https://github.com/openzim/ifixit2zim"
    },
    "split_keywords": [
        "ifixit",
        "kiwix",
        "offline",
        "zim"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5e1b56f5d43c99866844a9bb1a8b50485667e9e93a7d88bb7ab44be33ed2c180",
                "md5": "4533d7ef7fe40083f6ddf9cff9e8eb41",
                "sha256": "24350f1bc2674b642055ff3931f9666a88fef41af5e714474cda8240440cffd6"
            },
            "downloads": -1,
            "filename": "ifixit2zim-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4533d7ef7fe40083f6ddf9cff9e8eb41",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.12",
            "size": 1018711,
            "upload_time": "2024-03-02T22:33:38",
            "upload_time_iso_8601": "2024-03-02T22:33:38.995843Z",
            "url": "https://files.pythonhosted.org/packages/5e/1b/56f5d43c99866844a9bb1a8b50485667e9e93a7d88bb7ab44be33ed2c180/ifixit2zim-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "471db18c41a8e8ba3caafeb41a6083aa288f1710c06fb2233457401587f95d5d",
                "md5": "498b2dbaad6858dfe54d12851ee0bd5a",
                "sha256": "1cf5228e54a5cbfeba65b67974a3f9778cef3965b986def228c1c07c81106556"
            },
            "downloads": -1,
            "filename": "ifixit2zim-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "498b2dbaad6858dfe54d12851ee0bd5a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.12",
            "size": 998496,
            "upload_time": "2024-03-02T22:33:42",
            "upload_time_iso_8601": "2024-03-02T22:33:42.246767Z",
            "url": "https://files.pythonhosted.org/packages/47/1d/b18c41a8e8ba3caafeb41a6083aa288f1710c06fb2233457401587f95d5d/ifixit2zim-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-02 22:33:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "openzim",
    "github_project": "ifixit2zim",
    "github_not_found": true,
    "lcname": "ifixit2zim"
}
        
Elapsed time: 4.20494s