{"id":26660633,"url":"https://github.com/codevideo/codevideo-exporters","last_synced_at":"2025-04-11T16:13:22.658Z","repository":{"id":278933953,"uuid":"936901722","full_name":"codevideo/codevideo-exporters","owner":"codevideo","description":"Generates various markdown, PDF, or HTML tutorials for professional quality educational tutorials, walkthroughs, and blog posts.","archived":false,"fork":false,"pushed_at":"2025-03-09T18:12:56.000Z","size":982,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T03:32:58.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/codevideo.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":"2025-02-21T22:25:58.000Z","updated_at":"2025-03-09T18:12:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"7ce17ed1-0a24-47ef-98de-e3d522e5dbab","html_url":"https://github.com/codevideo/codevideo-exporters","commit_stats":null,"previous_names":["codevideo/codevideo-doc-gen","codevideo/codevideo-exporters"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codevideo%2Fcodevideo-exporters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codevideo%2Fcodevideo-exporters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codevideo%2Fcodevideo-exporters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codevideo%2Fcodevideo-exporters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codevideo","download_url":"https://codeload.github.com/codevideo/codevideo-exporters/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248438513,"owners_count":21103410,"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":"2025-03-25T12:18:50.723Z","updated_at":"2025-04-11T16:13:22.639Z","avatar_url":"https://github.com/codevideo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @fullstackcraftllc/codevideo-exporters\n\n![NPM Version](https://img.shields.io/npm/v/@fullstackcraftllc/codevideo-exporters)\n\n`codevideo-exporters` includes a series of browser-compatible TypeScript functions that can export a step by step software course into markdown, pdf, or html. This library is part of the [CodeVideo](https://codevideo.io) project.\n\nThis library heavily relies on the types from [@fullstackcraftllc/codevideo-types](https://github.com/codevideo/codevideo-types)\n\n## Installation\n\n```shell\nnpm install @fullstackcraftllc/codevideo-exporters\n```\n\nInstall peer dependencies:\n\n```shell\nnpm install highlight.js marked marked-highlight jszip html-to-png react-dom/server.browser\n```\nThese dependencies are required for:\n- `marked`: Markdown parsing\n- `marked-highlight`: Markdown code block highlighting\n- `highlight.js`: Code syntax highlighting (used with `marked-highlight`)\n- `jszip`: For making .zip exports of files, also for the pngs .zip export\n- `html-to-image`: For png exports\n- `pptxgenjs`: For pptx exports\n\n\n## Usage\n\nGenerate markdown from just an array of `IAction`s:\n\n```typescript\nimport { generateMarkdownFromActions } from '@fullstackcraftllc/codevideo-exporters';\nimport { IAction } from '@fullstackcraftllc/codevideo-types';\n\nconst actions: Array\u003cIAction\u003e = [\n  {\n    \"name\": \"author-speak-before\",\n    \"value\": \"To showcase how codevideo works, we're just going to do a super basic hello world example here in src.\"\n  },\n  {\n    \"name\": \"editor-type\",\n    \"value\": \"console.log('Hello World!');\"\n  },\n  {\n    \"name\": \"author-speak-before\",\n    \"value\": \"Nice, that looks pretty good! Pretty cool tool, right?!\"\n  }\n]\n\nconst markdown = generateMarkdownFromActions(actions);\nconsole.log(markdown);\n// Output:\n// To showcase how codevideo works, we're just going to do a super basic hello world example here in src.\n//\n// ```javascript\n// console.log('Hello World!');\n// ```\n//\n// Nice, that looks pretty good! Pretty cool tool, right?!\n```\n\nGenerate markdown from an `ILesson`:\n\n```typescript\nimport { generateMarkdownFromLesson } from '@fullstackcraft/codevideo-exporters';\nimport { ILesson } from '@fullstackcraft/codevideo-types';\n\nconst lesson: ILesson = {\n  \"title\": \"Hello World\",\n  \"description\": \"In this lesson, we're going to do a simple hello world example.\",\n  \"actions\": [\n    {\n      \"name\": \"author-speak-before\",\n      \"value\": \"To showcase how codevideo works, we're just going to do a super basic hello world example here in src.\"\n    },\n    {\n      \"name\": \"editor-type\",\n      \"value\": \"console.log('Hello World!');\"\n    },\n    {\n      \"name\": \"author-speak-before\",\n      \"value\": \"Nice, that looks pretty good! Pretty cool tool, right?!\"\n    }\n  ]\n}\n\nconst markdown = generateMarkdownFromLesson(lesson);\nconsole.log(markdown);\n// Output:\n// # Hello World\n//\n// In this lesson, we're going to do a simple hello world example.\n//\n// To showcase how codevideo works, we're just going to do a super basic hello world example here in src.\n//\n// ```javascript\n// console.log('Hello World!');\n// ```\n//\n// Nice, that looks pretty good! Pretty cool tool, right?!\n```\n\nGenerate markdown from an `ICourse`, which includes one or more `ILesson`s:\n\n```typescript\nimport { generateMarkdownFromCourse } from '@fullstackcraft/codevideo-exporters';\nimport { ICourse } from '@fullstackcraft/codevideo-types';\n\nconst course: ICourse = {\n  \"title\": \"Hello World Course\",\n  \"description\": \"This course has just one lesson, which is building a hello world example.\",\n  \"lessons\": [\n    {\n      \"title\": \"Hello World\",\n      \"description\": \"In this lesson, we're going to do a simple hello world example.\",\n      \"actions\": [\n        {\n          \"name\": \"author-speak-before\",\n          \"value\": \"To showcase how codevideo works, we're just going to do a super basic hello world example here in src.\"\n        },\n        {\n          \"name\": \"editor-type\",\n          \"value\": \"console.log('Hello World!');\"\n        },\n        {\n          \"name\": \"author-speak-before\",\n          \"value\": \"Nice, that looks pretty good! Pretty cool tool, right?!\"\n        }\n      ]\n    }\n  ]\n}\n\nconst markdown = generateMarkdownFromCourse(course);\nconsole.log(markdown);\n// Output:\n// # Hello World Course\n//\n// This course has just one lesson, which is building a hello world example.\n//\n// ## Hello World\n//\n// In this lesson, we're going to do a simple hello world example.\n//\n// To showcase how codevideo works, we're just going to do a super basic hello world example here in src.\n//\n// ```javascript\n// console.log('Hello World!');\n// ```\n//\n// Nice, that looks pretty good! Pretty cool tool, right?!\n```\n\n## Why?\n\nImagine you've defined all your steps of an awesome software course in a JSON file. You want to render this JSON file into a video, as a markdown blog post, or a sellable PDF. This is exactly what the CodeVideo library does. It takes in a JSON file and renders it into a video, markdown, or PDF.\n\nSee more at [codevideo.io](https://codevideo.io)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodevideo%2Fcodevideo-exporters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodevideo%2Fcodevideo-exporters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodevideo%2Fcodevideo-exporters/lists"}