{"id":21145334,"url":"https://github.com/jsa2/wpupdatemvpid","last_synced_at":"2025-03-14T13:42:31.505Z","repository":{"id":103264655,"uuid":"587636687","full_name":"jsa2/wpupdatemvpid","owner":"jsa2","description":"MvpId updater for wordpress posts","archived":false,"fork":false,"pushed_at":"2023-01-11T09:16:56.000Z","size":189,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-21T07:27:10.855Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/jsa2.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":"2023-01-11T08:13:48.000Z","updated_at":"2023-01-11T08:16:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"de29f7e1-fd06-4df0-b59a-400dc2d51549","html_url":"https://github.com/jsa2/wpupdatemvpid","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsa2%2Fwpupdatemvpid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsa2%2Fwpupdatemvpid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsa2%2Fwpupdatemvpid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsa2%2Fwpupdatemvpid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsa2","download_url":"https://codeload.github.com/jsa2/wpupdatemvpid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243589255,"owners_count":20315467,"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-20T08:39:36.272Z","updated_at":"2025-03-14T13:42:31.487Z","avatar_url":"https://github.com/jsa2.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Intro\n\nA short project to automatically update MVPID in Wordpress posts.\n\n\n\n## WP Updater for docs creatorID\n- Updates single post: ``node ./main.js --postId=6794 --mvpId=AZ-MVP-5003833`` \n- MVPID is something you get from your MVP program manager, in my case it is our fantastic Community Program Manager [Tina Stenderup-Larsen](https://twitter.com/TinaStenderup)\n-  You can find the postId by viewing the post draft\n  \n![](20230111095408.png)  \n\n## Disclaimer \n- Test this project on draft posts first!\n- The WP API will always change the blog format to \"classic\" (although no visual changes were found, the editing mode changes) - you can change it back to \"blocks\" from the WP editing UI.\n- The initial code for this project was written a long time ago (in 2020) and some parts have been refactored. There are some redundant parts, but it still works as intended.\n- The code and instructions provided in this project are \"AS IS\" with no dependencies and do not confer any rights.\n\n\n### Limitations\n- Due the API design of the automatic update of the converts the post to 'classic' WP.\n- The tool works correctly only on posts that dont contain MVP ID's. I was too lazy, to first exclude the matched content with MVPIDs\n\n#### before doing anything \n- Have NodeJS installed\n  \n- Have draft blogs to test the functionality\n\n\n- get the API key, and blog ID from https://developer.wordpress.com/apps/ \n\n\n- [access apps in worpress.com](https://developer.wordpress.com/apps/)\n\n\n![img](/readmepics/api.png)\n![img](/readmepics/api2.png)\n\n## how-to\nsetup config.js in [config](config/_config.js) by renaming it config.js (previously _config.js)\n- update secret and client_id, and \"blog:\"\n\n```javascript \nmodule.exports={\n        client_id:\"70557\",\n        redirect_uri:\"http://localhost:3000/token\",\n        blog:\"securecloud\",\n        client_secret: \"\",\n}\n```\n\n\n\n## Usage\n\n\n### First time\n```sh\nnpm install\n```\n\n### Store the access token (open the browser link)\n```\nnode app.js\n```\n\n![](20230111094556.png)  \n\n\n### Run \n\nRun the command  ``node ./main.js --postId=6794 --mvpId=AZ-MVP-5003833``\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsa2%2Fwpupdatemvpid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsa2%2Fwpupdatemvpid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsa2%2Fwpupdatemvpid/lists"}