{"id":26452454,"url":"https://github.com/pdone/autoupdateconfig","last_synced_at":"2026-04-09T01:31:21.164Z","repository":{"id":244750029,"uuid":"816160311","full_name":"pdone/AutoUpdateConfig","owner":"pdone","description":"从网络地址下载YAML格式的配置文件，并新增自定义项或修改某些项的值。Download a configuration file in YAML format from a network address and add custom items or modify the values of some items.","archived":false,"fork":false,"pushed_at":"2024-06-17T09:30:55.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-03T16:32:03.965Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","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/pdone.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-06-17T06:50:27.000Z","updated_at":"2025-04-20T07:56:00.000Z","dependencies_parsed_at":"2024-06-17T07:46:00.385Z","dependency_job_id":"b90d5e2c-0599-42a0-a150-604ec6af2e86","html_url":"https://github.com/pdone/AutoUpdateConfig","commit_stats":null,"previous_names":["pdone/autoupdateconfig"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pdone/AutoUpdateConfig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdone%2FAutoUpdateConfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdone%2FAutoUpdateConfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdone%2FAutoUpdateConfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdone%2FAutoUpdateConfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdone","download_url":"https://codeload.github.com/pdone/AutoUpdateConfig/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdone%2FAutoUpdateConfig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31581864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2025-03-18T17:54:25.625Z","updated_at":"2026-04-09T01:31:21.139Z","avatar_url":"https://github.com/pdone.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿# Auto Update Config\n\n## 简介\n\n从网络地址下载YAML格式的配置文件，并新增自定义项或修改某些项的值。\n\n- [x] 获取最新配置文件\n- [x] 保留自定义设置\n\n### TODO\n\n- [ ] 程序内定时更新\n- [ ] issues\n\n## 运行环境\n\n本程序基于 `.NET8`，运行前需要有 `.NET8` 运行时。`Windows` 直接下载安装包安装即可。`Linux` 需要下载运行时二进制文件，放在容易找到的位置，如 `$HOME/net8/`，后续通过该路径执行 `dotnet` 命令。\n\n\u003e 下载地址 https://dotnet.microsoft.com/zh-cn/download/dotnet/8.0\n\n## 示例场景\n\n假设要下载的配置文件网络链接为 `https://abc.com/test.yaml`。\n\n假设 `test.yaml` 中原始内容如下\n\n```\nport: 3000\nauthentication:\n  - \"admin:123456\"\nothers: something\n```\n\n想要新增 `secret` 参数，并设置值为 `123qwe`，同时将 `port` 的值改为 `7000`，应该如何操作呢？\n\n### Step 1\n\n复制 `app.example.json` 并改名为 `app.json`。\n\n### Step 2\n\n打开 `app.json` 修改程序配置。\n\n修改后内容如下\n\n```\n{\n  \"downloadLink\": \"http://abc.com/test.yaml\",\n  \"saveName\": \"config.yml\",\n  \"custom\": {\n    \"port\": 7000,\n    \"secret\": \"123qwe\"\n  }\n}\n```\n\n字段|说明\n-:|:-\n`downloadLink` | **配置文件下载链接**\n`saveName` | **文件保存路径** - 若只写文件名，则保存在本程序运行目录。也可写为 `/tmp/test.yaml`，这样就同时指定路径和文件名。\n`custom` | **自定义的选项** - 可为空，为空时不重写任何项；原始配置文件中没有的配置项，则会新增；原始配置文件中存在的配置项，则为修改值\n\n### Step 3\n\n#### Windows\n\n双击 `AutoUpdateConfig.exe`\n\nor\n\n```\n# 打开Windows终端 进入程序目录\nd:\ncd AutoUpdateConfig\n\n# 使用dotnet命令执行\ndotnet AutoUpdateConfig.dll\n```\n\n#### Linux\n\n```\n# 进入程序目录\ncd $HOME/AutoUpdateConfig\n\n# 使用dotnet命令 执行\n$HOME/net8/dotnet AutoUpdateConfig.dll\n```\n\n### Step 4\n\n执行成功后，控制台会输出以下内容\n\n```\n2024-06-17T10:14:54 [INFO] Get response from https://abc.com/test.yaml\n2024-06-17T10:14:56 [INFO] Get response complete\n2024-06-17T10:14:56 [INFO] Results of the merger \"config.yml\"\n2024-06-17T10:14:56 [INFO] Exit in 3 seconds\n```\n\n打开 `config.yml` 查看最终内容\n\n```\nport: 7000\nsecret: 123qwe\nauthentication:\n  - \"admin:123456\"\nothers: something\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdone%2Fautoupdateconfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdone%2Fautoupdateconfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdone%2Fautoupdateconfig/lists"}