{"id":20987371,"url":"https://github.com/ryojerryyu/memos-webhook-py","last_synced_at":"2026-02-24T16:41:30.963Z","repository":{"id":242628628,"uuid":"810063220","full_name":"RyoJerryYu/memos-webhook-py","owner":"RyoJerryYu","description":"A simple webhook implementation in Python, allowing download resources attached to an URL that you-get support.","archived":false,"fork":false,"pushed_at":"2024-06-15T16:14:30.000Z","size":139,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-12T04:20:25.897Z","etag":null,"topics":["memo","memos","usememos","webhook"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/RyoJerryYu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-06-04T01:22:32.000Z","updated_at":"2024-06-15T16:14:33.000Z","dependencies_parsed_at":"2024-06-15T14:42:54.593Z","dependency_job_id":null,"html_url":"https://github.com/RyoJerryYu/memos-webhook-py","commit_stats":null,"previous_names":["ryojerryyu/memos-webhook-py"],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyoJerryYu%2Fmemos-webhook-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyoJerryYu%2Fmemos-webhook-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyoJerryYu%2Fmemos-webhook-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RyoJerryYu%2Fmemos-webhook-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RyoJerryYu","download_url":"https://codeload.github.com/RyoJerryYu/memos-webhook-py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246905831,"owners_count":20852818,"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":["memo","memos","usememos","webhook"],"created_at":"2024-11-19T06:16:46.783Z","updated_at":"2026-02-24T16:41:25.939Z","avatar_url":"https://github.com/RyoJerryYu.png","language":"Python","readme":"# Memos Webhook Python Implementation\n\nThis is a simple webhook implementation in Python.\n\nIt implements a simple URL resource download feature. All url [you-get](https://github.com/soimort/you-get) support for command `you-get https://xxxxx` can be configured to download. \n\n## Quick Feel It\n\n1. Create a `docker_compose.yaml` with following contents. Replace `xxxxxxxx` with your memos token.\n\n    ```yaml\n    version: \"3.0\"\n    services:\n    memos:\n        networks:\n        - memos\n        image: neosmemo/memos:0.22.1\n        container_name: memos\n        ports:\n        - 5230:5230\n    webhook:\n        image: ghcr.io/ryojerryyu/memos-webhook-py:0.3.0\n        networks:\n        - memos\n        container_name: webhook\n        environment:\n        - LOG_LEVEL=debug\n        - WEBHOOK_PORT=8000\n        - MEMOS_HOST=memos\n        - MEMOS_PORT=5230\n        - MEMOS_TOKEN=xxxxxxxx\n        volumes:\n        - ./.download:/app/download\n\n    networks:\n    memos:\n    ```\n\n2. Run `docker-compose up -d` to start the services.\n\n3. Access `localhost:5230` , login and make sure the Memos server work. Create a webhook to `http://webhook:8000/webhook` . (It's for Memos server after 0.22.2. For before 0.22.1, use `http://webhook:8000/webhook_old`)\n\n4. Post a memo with contents containing a twitter url. If that tweet was attached with some image, the webhook will download them and upload to the Memo server automatically.\n\nYou can use a config file to configure what url you want to download. The default config file is [config.yaml](example/config.yaml).\n\n\n## Config\n\nYou can use a config file by setting the environment variable `CONFIG_PATH`. Here is a docker_compose.yaml example:\n\n```yaml\nversion: \"3.0\"\nservices:\n  memos:\n    networks:\n      - memos\n    image: neosmemo/memos:0.22.1\n    container_name: memos\n    ports:\n      - 5230:5230\n  webhook:\n    image: ghcr.io/ryojerryyu/memos-webhook-py:0.3.0\n    networks:\n      - memos\n    container_name: webhook\n    environment:\n      - CONFIG_PATH=/app/config.yaml\n    volumes:\n      - ./.download:/app/download\n      - ./path/to/your/local/config/file.yaml:/app/config.yaml\n\nnetworks:\n  memos:\n```\n\nYou should place your config file in `./path/to/your/local/config/file.yaml` and the webhook will read the config from it.\n\nHere is an example of the configuration file: [config.yaml](example/config.yaml)\n\n```yaml\nwebhook:\n  host: localhost\n  port: 11100\n\nmemos:\n  host: localhost\n  port: 5230\n  token: xxxxxxx\n\nplugins:\n  - name: download\n    tag: webhook/download\n    you_get_plugin:\n      patterns:\n        - https://twitter.com/\\w+/status/\\d+\n        - https://x.com/\\w+/status/\\d+\n  - name: fix_typos\n    tag: task/fix_typos\n    zhipu_plugin:\n      api_key: xxxxxxx\n      prompt: |\n        You are a fix typos plugin.\n        Please fix the typos in the text.\n\n        The text is:\n        ```\n        {content}\n        ```\n```\n\nAnd config definitionn is in [config.py](src/dependencies/config.py)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryojerryyu%2Fmemos-webhook-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryojerryyu%2Fmemos-webhook-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryojerryyu%2Fmemos-webhook-py/lists"}