{"id":28282878,"url":"https://github.com/msfactory1103/wp-history-logger","last_synced_at":"2026-04-28T23:33:56.816Z","repository":{"id":293768401,"uuid":"984925887","full_name":"msfactory1103/wp-history-logger","owner":"msfactory1103","description":"VSCode → WordPress Sync via REST API + Browser Auto Reload","archived":false,"fork":false,"pushed_at":"2025-05-18T06:08:06.000Z","size":3067,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-17T06:36:03.507Z","etag":null,"topics":["automation","developer-tools","rest-api","vscode","wordpress"],"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/msfactory1103.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,"zenodo":null}},"created_at":"2025-05-16T18:42:54.000Z","updated_at":"2025-05-18T06:08:10.000Z","dependencies_parsed_at":"2025-05-17T03:38:31.913Z","dependency_job_id":null,"html_url":"https://github.com/msfactory1103/wp-history-logger","commit_stats":null,"previous_names":["msfactory1103/wp-history-logger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/msfactory1103/wp-history-logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msfactory1103%2Fwp-history-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msfactory1103%2Fwp-history-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msfactory1103%2Fwp-history-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msfactory1103%2Fwp-history-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msfactory1103","download_url":"https://codeload.github.com/msfactory1103/wp-history-logger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msfactory1103%2Fwp-history-logger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32404340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"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":["automation","developer-tools","rest-api","vscode","wordpress"],"created_at":"2025-05-21T16:13:45.404Z","updated_at":"2026-04-28T23:33:56.811Z","avatar_url":"https://github.com/msfactory1103.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WordPress Auto Sync: VSCode to REST API\n\nA developer workflow for editing static HTML files in VSCode and instantly syncing them to WordPress pages via REST API — complete with browser auto-reload.  \n（VSCodeで静的HTMLを編集し、WordPress固定ページへ即時反映＆自動リロードする開発ワークフロー）\n\n---\n\n## 📦 Features / 特長\n\n- ✏️ Auto-detects changes to HTML files edited in VSCode  \n  （VSCodeで編集したHTMLを自動検知）\n- 🔃 Extracts `POST_ID` from HTML comments and updates WordPress pages via REST API  \n  （HTML内の `POST_ID` コメントから対象ページを特定して自動更新）\n- 💾 Saves each version of the HTML to a MySQL database (`wp_content_histories`)  \n  （各バージョンのHTMLをMySQLに保存し、履歴として保持）  \n- 🌐 Automatically reloads both WordPress edit screens and public views  \n  （固定ページの編集画面・表示画面どちらも自動リロード対応）\n- 🗂 Easy to launch via `.bat` or `npm run` scripts  \n  （`.bat` や `npm run` で簡易起動可能）\n- 🐳 Docker-based local WordPress development environment  \n  （Docker前提のローカル開発環境構成）\n\n---\n\n## 🚧 Status / 現在の状況\n\n**📝 This project is in an early-stage development phase.**  \n（本プロジェクトは開発初期段階です）\n\nInitial version includes manually separated scripts and multiple terminal operations.  \n（現状はスクリプト分離＋複数ターミナル起動が必要な構成です）\n\n\u003e ✅ Future updates will consolidate this workflow into a single command tool.  \n\u003e ✅ 今後は「1ファイル／1コマンド構成」への統合を予定しています。\n\nWe deliberately preserve this raw form to document the growth process.  \n（あえて“荒削りなまま”公開し、進化の過程を残しています）\n\n---\n\n## 🛠 Usage / 使い方\n\n1. Place your HTML files in the `contents/` directory (e.g. `about.html`)  \n   （HTMLファイルを `contents/` に配置）\n2. Add a comment like this at the top of the HTML:\n\n```html\n\u003c!-- POST_ID:46 --\u003e\n```\n\n3. Run the following commands (in separate terminals or via `.bat`)\n\n```bash\nnpm run watcher      # watches for changes \u0026 runs log-content.js\nnpm run dev-a        # browser-sync for live reload (edit \u0026 view screens)\n```\n\nOr use the .bat file to launch both at once.\n（または .bat ファイルで同時起動可能）\n\n## 📁 Scripts / スクリプト一覧\n\n```json\n\"scripts\": {\n  \"dev-a\": \"browser-sync start --proxy http://localhost:8081 --port 3001 --files contents/*.html\",\n  \"watcher\": \"node watcher.js\",\n  \"start-a\": \"concurrently \\\"npm run dev-a\\\" \\\"npm run watcher\\\"\"\n}\n```\n\n## 🌐 Requirements / 必要環境\n\n- Node.js (v18+ recommended)\n- Docker-based WordPress running at `http://localhost:8081`\n（Dockerで起動しているWordPress環境）\n- WordPress REST API must be enabled\n（REST APIが有効になっていること）\n- Recommended: Classic Editor for best API compatibility\n（Classic Editor推奨）\n\n## 📈 Future Plans / 今後の予定\n\n- 🔄 Merge watcher and browser-sync into a unified `dev-runner.js`\n（watcherとbrowser-syncの統合）\n- 🔘 Add CLI support: `node dev-runner --id 123`\n（CLI引数対応）\n- 🧰 Config-based multi-site support\n（複数サイト対応：設定ファイル管理）\n- 🖥️ GUI Launcher (e.g. Electron version)\n（GUI版ランチャーの構想もあり）\n- 📜 History viewer / rollback tool\n（履歴閲覧・ロールバック機能の追加）\n\n## 🤝 Contribution / コントリビューション\nPRs, issues, and discussions are very welcome!\n（プルリク、Issue、ディスカッション歓迎です！）\n\nWhether it’s code, refactoring ideas, or process improvements — let’s evolve it together.\n（コード改善・構成アイデア・リファクタ提案など、育ててくれる仲間を歓迎します）\n\n## 📜 License / ライセンス\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsfactory1103%2Fwp-history-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsfactory1103%2Fwp-history-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsfactory1103%2Fwp-history-logger/lists"}