{"id":17912733,"url":"https://github.com/stypox/codelabs-extractor","last_synced_at":"2025-04-03T07:14:06.588Z","repository":{"id":128743846,"uuid":"257904763","full_name":"Stypox/codelabs-extractor","owner":"Stypox","description":"Parse a Google Codelab course and export it into many formats (ebooks, pandoc, markdown, ...) ","archived":false,"fork":false,"pushed_at":"2020-04-23T20:49:21.000Z","size":65,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-08T20:47:33.781Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Stypox.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2020-04-22T13:09:00.000Z","updated_at":"2024-03-27T18:14:01.000Z","dependencies_parsed_at":"2023-04-11T11:01:25.854Z","dependency_job_id":null,"html_url":"https://github.com/Stypox/codelabs-extractor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stypox%2Fcodelabs-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stypox%2Fcodelabs-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stypox%2Fcodelabs-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stypox%2Fcodelabs-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stypox","download_url":"https://codeload.github.com/Stypox/codelabs-extractor/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246952278,"owners_count":20859812,"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":[],"created_at":"2024-10-28T19:46:45.537Z","updated_at":"2025-04-03T07:14:06.565Z","avatar_url":"https://github.com/Stypox.png","language":"Python","readme":"# Google Codelabs course extractor\n\nThis tool extracts data from a Google Codelab course (e.g. [this one](https://codelabs.developers.google.com/codelabs/kotlin-android-training-welcome/index.html?index=..%2F..android-kotlin-fundamentals#0)) and exports it into various offline formats (currently html, markdown and pandoc-markdown). This enables to build an ebook in many formats (using for example [pandoc](https://pandoc.org/)) that can then be used on any device, without internet connection and without formatting issues.\n\n## Usage\n\nThis tools requires [Python 3.7+](https://www.python.org/downloads/). To convert the generated markdown files into ebooks [pandoc](https://pandoc.org/installing.html) is also required.\n\u003cbr\u003eUsing `cd` head over to the root directory of this project and type `python3 -m codelabs_extractor` to run it. By appending `--help` to the previous command you will get this help screen:\n```man\nusage: __main__.py [-h] -c URL -o DIR -f FMT [-l LANG]\n\nExtracts data from a Google Codelab course and save it into various formats\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -c URL, --course URL  Url to the first Codelab of the course\n  -o DIR, --output-directory DIR\n                        Output directory in which to save all generated files\n  -f FMT, --format FMT  The format of the output. Supported FMT values: repr,\n                        md, html, pandoc\n  -l LANG, --language LANG\n                        The programming language used in the course, to use\n                        with code blocks whose language could not be\n                        automatically detected. Supported LANG values: java,\n                        kotlin (and the others supported by Markdown).\n                        Defaults to an empty string (i.e. no syntax\n                        highlighting).\n```\n\nExample usage for [this](https://codelabs.developers.google.com/codelabs/kotlin-android-training-welcome) codelab:\n```\npython3 -m codelabs_extractor --course https://codelabs.developers.google.com/codelabs/kotlin-android-training-welcome/index.html#0 --output-directory AndroidKotlinFundamentals --format pandoc --language kotlin\n```\nIf the provided output format was `pandoc`, when the script has done downloading, extracting and exporting, it provides the pandoc command to use in order to create an ebook (or other things supported by pandoc). This is an example for the above command:\n```\npandoc --verbose -o OUTPUT_FILE KotlinAndroidFundamentals/title.txt KotlinAndroidFundamentals/0.md KotlinAndroidFundamentals/1.md KotlinAndroidFundamentals/2.md KotlinAndroidFundamentals/3.md KotlinAndroidFundamentals/4.md KotlinAndroidFundamentals/5.md KotlinAndroidFundamentals/6.md KotlinAndroidFundamentals/7.md KotlinAndroidFundamentals/8.md KotlinAndroidFundamentals/9.md KotlinAndroidFundamentals/10.md KotlinAndroidFundamentals/11.md KotlinAndroidFundamentals/12.md KotlinAndroidFundamentals/13.md KotlinAndroidFundamentals/14.md KotlinAndroidFundamentals/15.md KotlinAndroidFundamentals/16.md KotlinAndroidFundamentals/17.md KotlinAndroidFundamentals/18.md KotlinAndroidFundamentals/19.md KotlinAndroidFundamentals/20.md KotlinAndroidFundamentals/21.md KotlinAndroidFundamentals/22.md KotlinAndroidFundamentals/23.md KotlinAndroidFundamentals/24.md KotlinAndroidFundamentals/25.md KotlinAndroidFundamentals/26.md KotlinAndroidFundamentals/27.md KotlinAndroidFundamentals/28.md KotlinAndroidFundamentals/29.md KotlinAndroidFundamentals/30.md KotlinAndroidFundamentals/31.md KotlinAndroidFundamentals/32.md KotlinAndroidFundamentals/33.md KotlinAndroidFundamentals/34.md\n```\nJust replace `OUTPUT_FILE` with the name of the ebook you want to produce (e.g. `AndroidKotlinFundamentals.epub`) and pandoc will take care of the rest of the work!","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstypox%2Fcodelabs-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstypox%2Fcodelabs-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstypox%2Fcodelabs-extractor/lists"}