{"id":19794172,"url":"https://github.com/openzim/phet","last_synced_at":"2025-05-01T02:30:58.744Z","repository":{"id":38455220,"uuid":"61482978","full_name":"openzim/phet","owner":"openzim","description":"Scraper for PhET Science \u0026 Math Interactive Simulations","archived":false,"fork":false,"pushed_at":"2025-04-17T12:07:42.000Z","size":19654,"stargazers_count":9,"open_issues_count":14,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-18T02:42:29.662Z","etag":null,"topics":["scraper","zim"],"latest_commit_sha":null,"homepage":"https://download.kiwix.org/zim/phet","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openzim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"kiwix","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2016-06-19T14:02:46.000Z","updated_at":"2025-04-02T05:51:49.000Z","dependencies_parsed_at":"2023-02-18T22:31:21.905Z","dependency_job_id":"8565b334-0c27-485e-952c-440e37c9ecb3","html_url":"https://github.com/openzim/phet","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openzim%2Fphet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openzim%2Fphet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openzim%2Fphet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openzim%2Fphet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openzim","download_url":"https://codeload.github.com/openzim/phet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251812306,"owners_count":21647884,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["scraper","zim"],"created_at":"2024-11-12T07:12:25.184Z","updated_at":"2025-05-01T02:30:58.730Z","avatar_url":"https://github.com/openzim.png","language":"JavaScript","funding_links":["https://github.com/sponsors/kiwix"],"categories":[],"sub_categories":[],"readme":"# PhET Simulations scraper\n\nThis scraper creates offline versions in [ZIM\nformat](https://openzim.org) of [PhET science\nsimulations for Science and Math](https://phet.colorado.edu).\n\n\u003ca href=\"https://play.google.com/store/apps/details?id=org.kiwix.kiwixcustomphet\" target=\"_blank\" align=\"left\"\u003e\n  \u003cimg src=\"https://play.google.com/intl/en/badges/images/badge_new.png\" alt=\"Get it on Google Play\" height=\"30\" /\u003e\n\u003c/a\u003e\n\n[![npm](https://nodei.co/npm/phetscraper.png)](https://www.npmjs.com/package/phetscraper)\n\n[![npm](https://img.shields.io/npm/v/phetscraper.svg)](https://www.npmjs.com/package/phetscraper)\n[![Docker](https://ghcr-badge.egpl.dev/openzim/phet/latest_tag?label=docker)](https://ghcr.io/openzim/phet)\n[![CI](https://github.com/openzim/phet/actions/workflows/ci.yml/badge.svg)](https://github.com/openzim/phet/actions/workflows/ci.yml)\n[![CodeFactor](https://www.codefactor.io/repository/github/openzim/phet/badge)](https://www.codefactor.io/repository/github/openzim/phet)\n[![Latest ZIM releases](https://img.shields.io/badge/latest-ZIM-%23ff4365)](https://download.kiwix.org/zim/phet/)\n[![License](https://img.shields.io/npm/l/phetscraper.svg)](LICENSE)\n\n## Requirements\n\nIt requires Node.js version 16 or higher.\n\n## Quick Start\n\n```bash\nnpm i \u0026\u0026 phet2zim\n```\n\nThe above will eventually output a ZIM file to ```output/```\n\n## Command line arguments\n\nSee `phet2zim --help` for details.\n\n`phet2zim --output` generates ZIM files in a specific folder.\n```bash\nphet2zim --output myFolder\n```\n\n`--withoutLanguageVariants` uses to exclude languages with Country variant. For example `en_CA` will not be present in zim with this argument.\n\n`--subjects` is used to pass specific subjects to download. Pass values as csv. Sample of valid subjects : \n```\nphysics, biology, earth-science, motion, sound-and-waves, work-energy-and-power, heat-and-thermodynamics, quantum-phenomena\n```\n\nAvailable only on GET step:\n```bash\n--withoutLanguageVariants ...\n```\n\nAvailable on GET and EXPORT steps only:\n```bash\n--includeLanguages 'lang_1,lang_2,lang_3' ...\n--excludeLanguages 'lang_1,lang_2,lang_3' ...\n--subjects 'math,physics' ...\n```\n\nAvailable on EXPORT step only:\n```bash\n# Skip ZIM files for individual languages\n--mulOnly\n\n# Create a ZIM file with all languages\n--createMul\n```\n\nExample:\n```bash\nphet2zim --includeLanguages en ru fr\n```\n\n## Config\n\nAnother way to configure behaviour is through environment variables. Sample `.env` file (with default values):\n```bash\n# request per second, affects GET step only\nPHET_RPS=8\n# async workers on TRANSFORM step (keep it equal to number of CPU cores)\nPHET_WORKERS=10\n# number of retries on GET step (delay grow with exponential backoff)\nPHET_RETRIES=5\n# display verbose errors\nPHET_VERBOSE_ERRORS=false\n```\n\n## About\n\nThis project achieves multiple things:\n* Download PhET content\n* Generate an Index for said content\n* Generate ZIM file(s) containing content and index\n\nThings this project does not yet do, but should:\n* Generate Android APK\n\n## Usage\n\nThe functionality is split into 5 ```npm scripts```:\n* ```npm run setup``` - deletes state from previous runs\n* ```npm run get``` - downloads PhET simulations in specified languages\n* ```npm run transform``` - prepare the content and media files\n* ```npm run export``` - generates ZIM file(s)\n* ```npm start``` - runs all of the above in sequence\n\nThe steps get, transform and export have their own output directories:\n* ```get``` outputs HTML and PNG files to ```state/get```\n* ```transform``` outputs intermediate files to ```state/transform```\n* ```export``` outputs HTML and PNG files to ```state/export``` AND a ZIM file(s) to ```output/``` (by default, unless customized with `--output`)\n\nLicense\n-------\n\n[Apache](https://www.apache.org/licenses/LICENSE-2.0) or later, see\n[LICENSE](LICENSE) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenzim%2Fphet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenzim%2Fphet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenzim%2Fphet/lists"}