{"id":18156220,"url":"https://github.com/foskym/wordpress-to-mxspace","last_synced_at":"2026-05-02T04:35:13.702Z","repository":{"id":258063190,"uuid":"869055438","full_name":"FoskyM/wordpress-to-mxspace","owner":"FoskyM","description":"用于将 Wordpress 的数据迁移到 Mix Space。","archived":false,"fork":false,"pushed_at":"2024-11-24T10:32:58.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T07:19:03.104Z","etag":null,"topics":["mxspace","wordpress"],"latest_commit_sha":null,"homepage":"","language":"Python","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/FoskyM.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":"2024-10-07T16:35:07.000Z","updated_at":"2024-11-24T10:33:02.000Z","dependencies_parsed_at":"2024-12-20T14:13:17.469Z","dependency_job_id":"172e39d9-96a4-4fd7-967c-db098dbb3288","html_url":"https://github.com/FoskyM/wordpress-to-mxspace","commit_stats":null,"previous_names":["foskym/wordpress-to-mxspace"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FoskyM%2Fwordpress-to-mxspace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FoskyM%2Fwordpress-to-mxspace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FoskyM%2Fwordpress-to-mxspace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FoskyM%2Fwordpress-to-mxspace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FoskyM","download_url":"https://codeload.github.com/FoskyM/wordpress-to-mxspace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247578618,"owners_count":20961270,"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":["mxspace","wordpress"],"created_at":"2024-11-02T05:05:45.906Z","updated_at":"2026-05-02T04:35:13.674Z","avatar_url":"https://github.com/FoskyM.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wordpress-to-mxspace\n\n用于将 Wordpress 的数据迁移到 Mix Space。\n\n由于 WordPress 导出文件中并无链接项目数据，故目前还在研究迁移友情链接的办法。\n\n## 使用方法\n1. 下载本仓库\n2. 使用 `pip install -r requirements.txt` 安装依赖\n3. 修改 `main.py` 中的 `file_path` 为你的 wordpress 导出数据 xml 文件路径\n4. 修改 `main.py` 中的 `migrate_to_notes_func` `migrate_pic_func` `rename_pic_file_func` 中的逻辑\n5. 运行 `main.py`，获得 bson 文件，同时输出 `output.json` 可用于检查结构是否正确\n6. 在 Mix Space 后台-维护-备份 中导出数据\n7. 打开压缩包，使用 `output` 中的 bson 文件覆盖 `mx-space` 目录下的同名文件，将 `files` 文件夹中的图片复制到 `backup_data/static/file`，关闭压缩包\n8. 使用 [上传恢复] 功能将修改后的数据压缩包\n\n## 目录结构\n```\nwordpress-to-mxspace\n│  .gitignore\n│  main.py            # 入口\n│  output.json        # 用于校验的文件，运行后生成\n│  README.md\n│  requirements.txt   # 依赖描述\n│\n├─files               # 图片文件重命名放置地\n├─output              # 输出 bson 文件放置地\n│      categories.bson\n│      comments.bson\n│      notes.bson\n│      pages.bson\n│      posts.bson\n│      \n├─uploads             # WordPress 的原始图片文件\n└─wpmigration         # 核心代码\n   │  wpconvert.py\n   │  wpfile.py\n   │  wpparser.py\n   │  __init__.py\n   │  \n   └─__pycache__\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoskym%2Fwordpress-to-mxspace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoskym%2Fwordpress-to-mxspace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoskym%2Fwordpress-to-mxspace/lists"}