Make ZIM files from freeCodeCamp courses
Project description
freeCodeCamp scraper
This scraper downloads selected freeCodeCamp courses and puts it in a ZIM file, a clean and user friendly format for storing content for offline usage.
Architecture
This project consists of two major components:
zimui- A Vue.JS application specially crafted to:- be embeded inside the ZIM and serve as main entry point (through compilation for offline usage with Vite)
- present FCC curriculum, including solving exercices
- be compatible with most ZIM readers
scraper- The Python tool that build FCC ZIM. It is responsible to:- fetch FCC curriculum and package it into a proper format
- embed client can read, as well as our zim builder
Dependencies
Aside Node.JS and Python dependencies which are managed, other binary dependencies comes from Python zimscraperlib
Development
This project adheres to openZIM's Contribution Guidelines.
This project has implemented openZIM's Python bootstrap, conventions and policies v1.0.3.
See CONTRIBUTING.md.
Prerequisites
- Node 20.x
- Python 3.11
Running scraper locally
You have to:
- build the
zimuifrontend which will be embededed inside the ZIM (and redo it every time you make modifications to thezimui) - run the
scraperto retrieve FCC curriculum and build the ZIM
Sample commands:
cd zimui
yarn install
yarn build
cd ../scraper
hatch run fcc2zim --language eng --course "regular-expressions,basic-javascript,basic-data-structures,debugging,functional-programming,object-oriented-programming,basic-algorithm-scripting,intermediate-algorithm-scripting,javascript-algorithms-and-data-structures-projects" --name "fcc_en_javascript" --title "freeCodeCamp Javascript" --description "FCC Javascript Courses"
Running scraper with Docker
Run from official version (published on GHCR.io) ; ZIM will be available in the output sub-folder of current working directory.
docker run --rm -it -v $(pwd)/output:/output ghcr.io/openzim/freecodecamp:latest fcc2zim --language eng --course "regular-expressions,basic-javascript,basic-data-structures,debugging,functional-programming,object-oriented-programming,basic-algorithm-scripting,intermediate-algorithm-scripting,javascript-algorithms-and-data-structures-projects" --name "fcc_en_javascript" --title "freeCodeCamp Javascript" --description "FCC Javascript Courses"
Course Options and Limitations
Currently this scraper only supports challenge types 1, 4 and 5 (challenge types can be found in the markdown file describing the challenge). This means courses from javascript-algorithms-and-data-structures, project-euler, rosetta-code and most of coding-interview-prep curriculum (frontend projects are type 3 and are not working).
A list of courses is passed to the scraper as a comma seperated list of 'course slugs'.
When you pass a course with an unsupported challenge to the scraper, the ZIM will still create but an error message will be displayed instead of the challenge with wrong type.
You can find a list of course slugs in the freeCodeCamp curriculum folder
In docker example above, see the --course argument : regular-expressions,basic-javascript,basic-data-structures,debugging,functional-programming,object-oriented-programming,basic-algorithm-scripting,intermediate-algorithm-scripting,javascript-algorithms-and-data-structures-projects
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 fcc2zim-2.0.3.tar.gz.
File metadata
- Download URL: fcc2zim-2.0.3.tar.gz
- Upload date:
- Size: 5.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83ed4b79b376a6ac9a1ca9f4a9cf70f8012739dd0bb5e1f98adb20cd0c08fad4
|
|
| MD5 |
9b016c311d79937079e4b66f49104810
|
|
| BLAKE2b-256 |
7e3bb5053e257d53dcc41aa30ed2c258648c553c57be4d043eda6911e3011db5
|
Provenance
The following attestation bundles were made for fcc2zim-2.0.3.tar.gz:
Publisher:
Publish.yaml on openzim/freecodecamp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fcc2zim-2.0.3.tar.gz -
Subject digest:
83ed4b79b376a6ac9a1ca9f4a9cf70f8012739dd0bb5e1f98adb20cd0c08fad4 - Sigstore transparency entry: 724690270
- Sigstore integration time:
-
Permalink:
openzim/freecodecamp@5c4a30c26d29ed0c90f32843ad10249879b9e7a0 -
Branch / Tag:
refs/tags/v2.0.3 - Owner: https://github.com/openzim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
Publish.yaml@5c4a30c26d29ed0c90f32843ad10249879b9e7a0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fcc2zim-2.0.3-py3-none-any.whl.
File metadata
- Download URL: fcc2zim-2.0.3-py3-none-any.whl
- Upload date:
- Size: 5.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be9d9371052d2832199086bc2e554b862239492577d47fa2071896a746d73dbe
|
|
| MD5 |
6025f47ee0a33d25b8a390779804bbe5
|
|
| BLAKE2b-256 |
6eb8c8c0544f00703cef8490e6e544160a9fd03b81261e52443f66e6f4335ef7
|
Provenance
The following attestation bundles were made for fcc2zim-2.0.3-py3-none-any.whl:
Publisher:
Publish.yaml on openzim/freecodecamp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fcc2zim-2.0.3-py3-none-any.whl -
Subject digest:
be9d9371052d2832199086bc2e554b862239492577d47fa2071896a746d73dbe - Sigstore transparency entry: 724690275
- Sigstore integration time:
-
Permalink:
openzim/freecodecamp@5c4a30c26d29ed0c90f32843ad10249879b9e7a0 -
Branch / Tag:
refs/tags/v2.0.3 - Owner: https://github.com/openzim
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
Publish.yaml@5c4a30c26d29ed0c90f32843ad10249879b9e7a0 -
Trigger Event:
release
-
Statement type: