{"id":20945175,"url":"https://github.com/tbxark/mweb-export","last_synced_at":"2025-12-24T19:11:23.705Z","repository":{"id":57646132,"uuid":"442126327","full_name":"TBXark/mweb-export","owner":"TBXark","description":"A tool for generating directories from MWeb files.","archived":false,"fork":false,"pushed_at":"2023-03-14T03:20:57.000Z","size":61,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T21:43:24.366Z","etag":null,"topics":["golang","mweb"],"latest_commit_sha":null,"homepage":"","language":"Go","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/TBXark.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":"2021-12-27T10:26:09.000Z","updated_at":"2023-10-13T06:35:52.000Z","dependencies_parsed_at":"2024-06-20T12:01:00.970Z","dependency_job_id":"a1e3498b-2eb2-4b70-87c3-c71e0700604b","html_url":"https://github.com/TBXark/mweb-export","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TBXark%2Fmweb-export","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TBXark%2Fmweb-export/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TBXark%2Fmweb-export/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TBXark%2Fmweb-export/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TBXark","download_url":"https://codeload.github.com/TBXark/mweb-export/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243335577,"owners_count":20274938,"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":["golang","mweb"],"created_at":"2024-11-18T23:47:03.041Z","updated_at":"2025-12-24T19:11:23.678Z","avatar_url":"https://github.com/TBXark.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mweb-export\n\n[![Build Release](https://github.com/TBXark/mweb-export/actions/workflows/Release.yml/badge.svg)](https://github.com/TBXark/mweb-export/actions/workflows/Release.yml)\n\n用于生成 Mweb `git`备份 `README` 目录文件的工具, MWeb可以使用iCloud备份[https://zh.mweb.im/mweb4qa.html](https://zh.mweb.im/mweb4qa.html)，同时可以将`~/Library/Containers/com.coderforart.MWeb3/Data/Library/Application Support/MWebLibrary`使用git备份到github，但是实际使用中，备份到github之后文件夹结构没有了，文件名也变成了`UUID`。完全没有可读性。\n所以`mweb-export`就是一个解析Mweb数据库并生成一个包含整个目录结构和索引跳转的README文件。\n\n\n\n\n## Install\n\n### Go\n```shell\ngo install github.com/TBXark/mweb-export@latest\n```\n\n### Brew\n```shell\nbrew install --build-from-source tbxark/repo/mweb-export\n```\n\n\n\n## Usage\n\n```\nUsage of mweb-export:\n  -help\n    \tshow usage\n  -mode string\n    \t'file': save file, 'debug': print only (default \"debug\")\n  -path string\n    \tpath to MWebLibrary (default \"~/Library/Containers/com.coderforart.MWeb3/Data/Library/Application Support/MWebLibrary\")\n  -target string\n    \texport README.md directory (default \"$(pwd)\")\n```\n\n\n实际使用中不推荐直接在`MWebLibrary`原始文件夹中使用`git`，避免多台设备同步`git`与iCloud发生冲突，可以另外新建新建一个`git`文件夹，在`git`目录下添加下面脚本,需要同步的时候执行下面脚本，会自动将`MWebLibrary`拷贝到`git`文件夹，并生成`README.md`文件并且自动`push`。\n\n\n```shell\n#!/bin/bash\n\ngit stash --include-untracked\ngit pull\n/bin/rm -rf docs # 删除所有文件，重新拷贝，避免有已删除的文件继续留在git\n/bin/rm -f mainlib.db\n/bin/rm -rf metadata\ncp ~/Library/Containers/com.coderforart.MWeb3/Data/Library/Application\\ Support/MWebLibrary/mainlib.db mainlib.db\ncp -R ~/Library/Containers/com.coderforart.MWeb3/Data/Library/Application\\ Support/MWebLibrary/docs docs\ncp -R ~/Library/Containers/com.coderforart.MWeb3/Data/Library/Application\\ Support/MWebLibrary/metadata metadata\nmweb-export -mode=save\ngit add .\ngit commit -a -m $(date -u +%Y-%m-%dT%H:%M:%SZ)\ngit push origin master\ngit stash clear\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbxark%2Fmweb-export","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbxark%2Fmweb-export","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbxark%2Fmweb-export/lists"}