{"id":13456782,"url":"https://github.com/chancelyg/syncmemo","last_synced_at":"2025-03-24T11:31:22.746Z","repository":{"id":177246568,"uuid":"334885394","full_name":"chancelyg/syncmemo","owner":"chancelyg","description":"支持跨平台访问的文本/图片便签的Web服务","archived":false,"fork":false,"pushed_at":"2024-12-05T03:58:07.000Z","size":3018,"stargazers_count":48,"open_issues_count":0,"forks_count":7,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-05T04:27:05.021Z","etag":null,"topics":["flask","mdui","python","web"],"latest_commit_sha":null,"homepage":"https://memo.chancel.me/","language":"CSS","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/chancelyg.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-02-01T08:47:18.000Z","updated_at":"2024-12-05T03:58:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"98db9325-caba-4036-93e6-d4c3008dc1bc","html_url":"https://github.com/chancelyg/syncmemo","commit_stats":null,"previous_names":["chancelyg/syncmemo"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chancelyg%2Fsyncmemo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chancelyg%2Fsyncmemo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chancelyg%2Fsyncmemo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chancelyg%2Fsyncmemo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chancelyg","download_url":"https://codeload.github.com/chancelyg/syncmemo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245260855,"owners_count":20586484,"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":["flask","mdui","python","web"],"created_at":"2024-07-31T08:01:27.668Z","updated_at":"2025-03-24T11:31:22.741Z","avatar_url":"https://github.com/chancelyg.png","language":"CSS","funding_links":[],"categories":["CSS"],"sub_categories":[],"readme":"用于同步文本图片的便签式 Web 服务，方便在 PC 和 移动设备之间同步文字图片信息\n\nDemo：[memo.chancel.me](https://memo.chancel.me)\n\n# 1. 使用\n\n使用方法\n1. 访问本站会分配一个随机数，例如 1234 ，点击确认开始编辑内容\n2. 编辑完成后，在任意设备上访问本站并输入相同ID，即可查看相同的便签内容\n\n功能\n* 富文本编辑（图片/文字）\n* 二维码分享\n* 纯文本分享（不可编辑）\n* 服务端支持配置文件自定义便签长度、大小、存储时间等\n\n# 2. 部署\n\n推荐 Docker 部署\n\n## 2.1. Docker部署(推荐)\n\n克隆本仓库到本地后，使用 docker 生成镜像\n\n```bash\ngit clone https://github.com/chancelyg/syncmemo.git \u0026\u0026 cd syncmemo\nsudo docker build -t syncmemo:latest . --no-cache\n```\n\n复制一份配置文件，根据需要自行修改 `./config.yaml` 的值\n\n```bash\ncp .config.yaml config.yaml\n```\n\n运行镜像\n\n```bash\ndocker run -v ./config.yaml:/app/config.yaml -p 8000:80 syncmemo:latest\n```\n\n访问 http://localhost:8000 查看效果\n\n\n## 2.2. 源码部署（gunicorn）\n\n源码运行需要安装Python环境，以下部署基于`Python 3.8.6`，请在部署前确认已安装 Python 环境\n\n克隆仓库，并切换到仓库路径下\n\n```bash\ngit clone https://github.com/chancelyg/syncmemo.git \u0026\u0026 cd syncmemo\n```\n\n安装依赖\n\n``` shell\npip3 install -r requirements.txt -i https://pypi.doubanio.com/simple\n```\n\n复制一份配置文件，根据需要自行修改 `./config.yaml` 的值\n\n```bash\ncp .config.yaml config.yaml\n```\n\n运行程序\n\n```bash\ngunicorn --env CONFIG=config.yaml flaskr:app\n```\n\n访问 http://localhost:8000 查看效果\n\n# 3. 数据保存\n\n数据的保存有效期取决于 `config.yaml` 文件中的 `memo/expire` 值（单位为秒），设该值为 `0` 时，数据将永不过期\n\n便签保存于 `config.yaml` 配置中的 `system/cache` 中\n\n如 Docker 部署需要持久化数据，则将 `config.yaml` 中的 `system/cache` 映射出来，如：\n\n```bash\ndocker run -v ./config.yaml:/app/config.yaml -v ./cache:/app/cache -p 8000:80 syncmemo:latest\n```\n\n# 4. SyncMemo开发环境\n\nPython 版本 3.8.6 ，并安装依赖：\n\n``` Shell\npip3 install -r requirements.txt -i https://pypi.doubanio.com/simple\n```\n\n开发工具使用**Visual Studio Code（VSCode）**\n\n参考启动的配置文件 `.vscode/launch.json`如下\n\n``` Json\n{\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n        {\n            \"name\": \"Python: Flask\",\n            \"type\": \"python\",\n            \"request\": \"launch\",\n            \"module\": \"flask\",\n            \"console\": \"internalConsole\",\n            \"python\": \"/home/chancel/codes/python/SyncMemo/venv/bin/python\",\n            \"env\": {\n                \"FLASK_APP\": \"${workspaceRoot}/flaskr\",\n                \"FLASK_ENV\": \"development\",\n                \"FLASK_DEBUG\": \"1\",\n                \"CONFIG\": \"${workspaceRoot}/conf/.config.yam;\"\n            },\n            \"args\": [\n                \"run\",\n                \"--host=127.0.0.1\",\n                \"--port=8000\",\n            ],\n            \"jinja\": true\n        }\n    ]\n}\n```\n\n按下 `F5` 启动项目，并访问 http://127.0.0.1:8000 查看效果\n\n# 5. 感谢\n\n项目技术依赖来源：\n* [quilljs - Your powerful rich text editor.](https://quilljs.com/)\n* [Flask - Flask is a lightweight WSGI web application framework](https://github.com/pallets/flask)\n* [Mdui - MDUI 漂亮、轻量且好用，它能让你更轻松地开发 Material Design 网页应用](https://www.mdui.org)\n* [Vuejs - The Progressive JavaScript Framework](https://vuejs.org/)\n\n项目基于以上的开源项目进行开发","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchancelyg%2Fsyncmemo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchancelyg%2Fsyncmemo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchancelyg%2Fsyncmemo/lists"}