{"id":20389313,"url":"https://github.com/positiondev/offset","last_synced_at":"2026-03-11T10:32:39.632Z","repository":{"id":20618699,"uuid":"23900044","full_name":"positiondev/offset","owner":"positiondev","description":"A haskell library that communicates with wordpress over its api.","archived":false,"fork":false,"pushed_at":"2024-08-01T19:45:42.000Z","size":14351,"stargazers_count":3,"open_issues_count":13,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-12-13T01:38:41.081Z","etag":null,"topics":["haskell","wordpress-api"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/positiondev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2014-09-11T01:55:06.000Z","updated_at":"2024-08-01T19:45:46.000Z","dependencies_parsed_at":"2025-04-11T22:06:21.214Z","dependency_job_id":null,"html_url":"https://github.com/positiondev/offset","commit_stats":null,"previous_names":["dbp/snaplet-wordpress"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/positiondev/offset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiondev%2Foffset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiondev%2Foffset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiondev%2Foffset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiondev%2Foffset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/positiondev","download_url":"https://codeload.github.com/positiondev/offset/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/positiondev%2Foffset/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30378091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T06:09:32.197Z","status":"ssl_error","status_checked_at":"2026-03-11T06:09:17.086Z","response_time":84,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["haskell","wordpress-api"],"created_at":"2024-11-15T03:17:19.261Z","updated_at":"2026-03-11T10:32:39.601Z","avatar_url":"https://github.com/positiondev.png","language":"PHP","readme":"# Development setup\n\nFor testing, you should install the `wp-cli`, which allows us to have\na development version of a wordpress server running.\n\nYou need to have php installed to do this.\n\n```\ncurl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar\n```\n\nMove it to somewhere in your PATH and make it executable.\n\nNext, create a database and user with access to it. The names should\nbe the following, or else you'll have to change the config file within\nthe `wp` directory.\n\n```\n$ mysql -u root -p\n[enter password]\nmysql\u003e CREATE DATABASE offset_test;\nmysql\u003e CREATE USER 'offset'@'localhost' IDENTIFIED by '111';\nmysql\u003e GRANT ALL PRIVILEGES ON *.* TO 'offset'@'localhost' WITH GRANT OPTION;\n```\n\nNow change into the `wp` directory and finish the install and start the server with:\n\n```\n$ wp core config --dbname=offset_test --dbuser=offset --dbpass=111\n$ wp core install --admin_user=offset --admin_password=111 --url=localhost --title=\"Offset Test\" --admin_email=\"dbp@positiondev.com\"\n$ wp server --port=5555\n```\n\nSet the permalink structure, activate the plugins, set the name of the admin, and set the application password:\n\n```\nwp option update permalink_structure '/%year%/%monthnum%/%postname%/'\nwp plugin activate --all\nwp user update 1 --display_name=\"Ira Rubel\" --first_name=\"Ira\" --last_name=\"Rubel\"\nwp eval-file create_password.php\n```\n\nTo test that it is working,\nrun the following command (requires the `jq` utility, which you can\ninstall on macs with `brew install jq`):\n\n```\ncurl http://localhost:5555/wp-json/ | jq\n```\n\nWhich should print out a bunch of json.\n\n\nNow clear the default and insert the needed test posts, as well as adding tags:\n\n```\npython setup_posts.py\n```\n\n## Requirements\n\n(TODO: Explain the WordPress plugins that are needed to make this work)\n\n## Documentation\n\n`\u003cwpPosts\u003e` - This tag accepts the following attributes:\n\n`num` - should be an integer. the number of posts per page. Defaults to 20.\n\n`page` - should be an integer. This is the current page (`1` is the first one) worth of posts.\n\n`limit` - should be an integer, and this restricts the number of posts\nthat come back in the current page. Note that if you haven't set\n`page`, changing this is equivalent to changing `num`. If you have set\n`page`, then the first `page` full pages (each of size `num`) are\nskipped, and then the first `limit` posts are returned. Defaults to\n20.\n\n`offset` - should be an integer, and this affects how many posts are\nskipped in the current page. If you don't set the `page`, then this is\njust the number of posts that are skipped before the first `limit`\nposts are returned, but if you have set `page`, the first `page` full\npages of posts (each of size `num`) will be skipped, then an\nadditional `offset` posts will be skipped, and finally, `limit` posts\nwill be returned.\n\n`\u003cwpPostByPermalink\u003e` - This tag expects to have the url be `/YYYY/MM/SLUG`, and finds\nthe post accordingly.\n\n`\u003cwpNoPostDuplicates/\u003e` - This is a side-effect only tag, that causes, from this point\nin the page forward, no duplicate posts to be returned from `\u003cwpPosts/\u003e`. This can make\ncertain layouts easier to express, rather than figuring out exactly how to combine the\nvarious numeric arguments to avoid duplication.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpositiondev%2Foffset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpositiondev%2Foffset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpositiondev%2Foffset/lists"}