{"id":19316725,"url":"https://github.com/maxim/wpxml_parser","last_synced_at":"2025-06-20T21:36:54.385Z","repository":{"id":56898575,"uuid":"837443","full_name":"maxim/wpxml_parser","owner":"maxim","description":"Convenient WordPress XML dump parser.","archived":false,"fork":false,"pushed_at":"2010-08-14T18:02:53.000Z","size":92,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T00:02:19.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://github.com/maxim/wpxml_parser","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxim.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":"2010-08-14T09:58:25.000Z","updated_at":"2016-07-11T18:25:10.000Z","dependencies_parsed_at":"2022-08-20T17:40:46.062Z","dependency_job_id":null,"html_url":"https://github.com/maxim/wpxml_parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/maxim/wpxml_parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxim%2Fwpxml_parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxim%2Fwpxml_parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxim%2Fwpxml_parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxim%2Fwpxml_parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxim","download_url":"https://codeload.github.com/maxim/wpxml_parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxim%2Fwpxml_parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261021096,"owners_count":23098272,"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-11-10T01:12:24.878Z","updated_at":"2025-06-20T21:36:49.366Z","avatar_url":"https://github.com/maxim.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"wpxml_parser\n============\n\nWordPress (version 3.x and I think there's a plugin for 2.x) can export xml with all your blog posts, comments, etc. This tool can parse the xml file and give you a convenient access to all your posts, comments, categories, etc in a ruby script that _you have to write_.\n\nThe cool thing is — you don't even need to have access to your own WordPress database, all you need is to download the xml file from your admin panel.\n\n### Install\n\n    gem install wpxml_parser\n\n### Usage\n\n    require 'wpxml_parser'\n    include WpxmlParser\n    \n    # Blog\n    blog = Blog.new('dump_of_your_blog.xml')\n    blog.posts.size # =\u003e 51\n    post = blog.posts.first # =\u003e \u003cPost\u003e\n    \n    # Post\n    post.title # =\u003e \"Title of your post\"\n    post.categories # =\u003e [\"ruby\", \"rails\"]\n    post.date # =\u003e \u003cTime\u003e\n    post.slug # =\u003e \"title-of-your-post\"\n    post.body # =\u003e \"...shitload of text...\"\n    post.post_id # =\u003e 27\n    \n    # Comments\n    post.comments # =\u003e [\u003cComment\u003e, \u003cComment\u003e, ...]\n    comment = post.comments.first\n    \n    comment.author # =\u003e 'dude'\n    comment.date # =\u003e \u003cTime\u003e\n    \n    # Comments have parent and children\n    comment.parent_id # =\u003e 32\n    comment.parent # =\u003e \u003cComment\u003e\n    comment.children # =\u003e [\u003cComment\u003e, \u003cComment\u003e]\n\n    # Conveniences\n    # You can quickly find a post or a comment by post_id or comment_id respectively\n    blog.find_post(27) # =\u003e \u003cPost\u003e\n    post.find_comment(32) # =\u003e \u003cComment\u003e\n    \n    # For more info and more accessible properties check out the source code, it's pretty straightforward.\n\n### A note on posts\n\nCurrently only published posts are included. Drafts, private, etc are skipped. This was done on purpose, since I didn't really use those wordpress features.\n\n### A note on comments\n\nCurrently only approved comments are included. This was done on purpose, since I didn't need spam.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxim%2Fwpxml_parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxim%2Fwpxml_parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxim%2Fwpxml_parser/lists"}