{"id":23383053,"url":"https://github.com/paulgrammer/ppt-to-json","last_synced_at":"2025-04-11T01:10:56.907Z","repository":{"id":57329258,"uuid":"426563289","full_name":"paulgrammer/ppt-to-json","owner":"paulgrammer","description":"Convert power point presentations to json","archived":false,"fork":false,"pushed_at":"2023-05-20T10:41:19.000Z","size":4,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T18:08:36.969Z","etag":null,"topics":["json","nodejs","office","powerpoint"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/paulgrammer.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":"2021-11-10T09:38:14.000Z","updated_at":"2024-11-25T16:22:44.000Z","dependencies_parsed_at":"2024-10-19T02:13:31.279Z","dependency_job_id":"bb8b0868-38c9-4ef7-b622-b59eb57d28d0","html_url":"https://github.com/paulgrammer/ppt-to-json","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"23767e7e2cb5c1af5a9022cf0fb8998077a508da"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgrammer%2Fppt-to-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgrammer%2Fppt-to-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgrammer%2Fppt-to-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulgrammer%2Fppt-to-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulgrammer","download_url":"https://codeload.github.com/paulgrammer/ppt-to-json/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322600,"owners_count":21084337,"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":["json","nodejs","office","powerpoint"],"created_at":"2024-12-21T22:16:59.061Z","updated_at":"2025-04-11T01:10:56.891Z","avatar_url":"https://github.com/paulgrammer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PPT to JSON\n\nThis library provides a simple and convenient way to convert PowerPoint (.ppt) files into JSON format. This allows for easy parsing, manipulation, and analysis of slide content.\n\n## Installation\n\nTo install the `ppt-to-json` library, use npm:\n\n```bash\nnpm install ppt-to-json\n```\n\n## Usage\n\nFirst, import the `PPTtoJSON` from `ppt-to-json`.\n\n```javascript\nconst PPTtoJSON = require(\"ppt-to-json\");\n```\n\nThen, call the `readPath` function with the path to your PowerPoint file.\n\n```javascript\nPPTtoJSON.readPath(\"./sample.ppt\")\n  .then((json) =\u003e console.log(json))\n  .catch((error) =\u003e console.error(error.message));\n```\n\nThis function will return a Promise that resolves to a JSON object representing the content of the PowerPoint file. If an error occurs while reading the file or converting it to JSON, the Promise will be rejected with an error message.\n\n## Resulting JSON structure\n\nThe resulting JSON object has a structure that represents the content of the PowerPoint file. Each slide in the file is converted into an object in the JSON array. Each object includes the content of the slide, formatted as a string, along with any additional metadata about the slide.\n\n```json\n[\n  {\n    \"slideNumber\": 1,\n    \"title\": \"Slide 1\",\n    \"content\": \"This is the content of slide 1.\"\n  },\n  {\n    \"slideNumber\": 2,\n    \"title\": \"Slide 2\",\n    \"content\": \"This is the content of slide 2.\"\n  },\n  // More slides...\n]\n```\n\n## Error Handling\n\nIf an error occurs while reading the PowerPoint file or converting it to JSON, the Promise will be rejected with an Error. You can handle this using the `.catch()` method:\n\n```javascript\nPPTtoJSON.readPath(\"./non_existent.ppt\")\n  .then((json) =\u003e console.log(json))\n  .catch((error) =\u003e console.error(error.message)); // Will print: Error: File not found: ./non_existent.ppt\n```\n\n## Contributing\n\nIf you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.\n\n## Licensing\n\nThe code in this project is licensed under MIT license. See the [LICENSE](LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulgrammer%2Fppt-to-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulgrammer%2Fppt-to-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulgrammer%2Fppt-to-json/lists"}