{"id":15984911,"url":"https://github.com/divineomega/web-article-formatter","last_synced_at":"2025-03-18T01:30:21.802Z","repository":{"id":56969727,"uuid":"126647242","full_name":"DivineOmega/web-article-formatter","owner":"DivineOmega","description":"🌐🔀📰 Converts a webpage article into other formats, like PDF, markdown, JSON, plain text...","archived":false,"fork":false,"pushed_at":"2018-04-12T21:42:54.000Z","size":17,"stargazers_count":9,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-28T06:04:37.147Z","etag":null,"topics":["html","json","markdown","pdf","php","php-library","scraper","webpage","webpage-scraper"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DivineOmega.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-24T23:01:34.000Z","updated_at":"2024-06-08T03:35:25.000Z","dependencies_parsed_at":"2022-08-21T06:40:19.156Z","dependency_job_id":null,"html_url":"https://github.com/DivineOmega/web-article-formatter","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2Fweb-article-formatter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2Fweb-article-formatter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2Fweb-article-formatter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineOmega%2Fweb-article-formatter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DivineOmega","download_url":"https://codeload.github.com/DivineOmega/web-article-formatter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243893855,"owners_count":20364918,"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":["html","json","markdown","pdf","php","php-library","scraper","webpage","webpage-scraper"],"created_at":"2024-10-08T02:11:16.299Z","updated_at":"2025-03-18T01:30:21.564Z","avatar_url":"https://github.com/DivineOmega.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌐🔀📰 Web Article Formatter\n\n[![StyleCI](https://styleci.io/repos/126647242/shield?branch=master)](https://styleci.io/repos/126647242)\n\nThe web article formatter can extract and convert an article from a webpage into a number of other formats, \nincluding PDF, markdown, JSON, plain text and more.\n\n## Installation\n\nYou can install Web Article Formatter via Composer. Just run the following command.\n\n```\ncomposer require divineomega/web-article-formatter\n```\n\n## Usage\n\nTo retrieve a web page article and convert it into a different format, first create a new `WebArticleFormatter`\npassing it the URL of the web page. Then, simply call the formatter's `get` method, passing it a valid format constant.\n\nA list of all format constants can be found in the [`Format` class](src/Format.php).\n\n```php\n$formatter = new WebArticleFormatter($url);\n\necho $formatter-\u003eget(Format::PLAINTEXT);\necho $formatter-\u003eget(Format::MARKDOWN);\necho $formatter-\u003eget(Format::HTML);\necho $formatter-\u003eget(Format::JSON);\n\nfile_put_contents('article.pdf', $formatter-\u003eget(Format::PDF));\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivineomega%2Fweb-article-formatter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivineomega%2Fweb-article-formatter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivineomega%2Fweb-article-formatter/lists"}