Skip to main content

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.

CodeFactor License: GPL v3 codecov PyPI version shields.io PyPI - Python Version Docker

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

See CONTRIBUTING.md.

Prerequisites

  • Node 20.x
  • Python 3.11

Running scraper locally

You have to:

  • build the zimui frontend which will be embededed inside the ZIM (and redo it every time you make modifications to the zimui)
  • run the scraper to 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 --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 Javascript challenges. A list of courses is passed to the scraper as a comma seperated list of 'course slugs'.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fcc2zim-1.1.0.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

fcc2zim-1.1.0-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file fcc2zim-1.1.0.tar.gz.

File metadata

  • Download URL: fcc2zim-1.1.0.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for fcc2zim-1.1.0.tar.gz
Algorithm Hash digest
SHA256 595fc3acd7ad35363fca34a7e90d33384dc5157b2632958377aaa02c69826b7f
MD5 d9eef1afc7b667da35addae0f5f03f8e
BLAKE2b-256 1f1d1cfdc352cba6f18c9d97ef1d558b84a95313fca641d3e64f060ce92e2538

See more details on using hashes here.

File details

Details for the file fcc2zim-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: fcc2zim-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for fcc2zim-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 71854dfb4224fae86b3e720c5c7de6ea00f152c606df75e8de9815d16a7ffa31
MD5 2a8e61b5041c9bd1c91b323433c1c80a
BLAKE2b-256 e7f25e7d9f55479ee245d6af439cfa81d400c2866a103f634ea66873eda30dfb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page