{"id":16243247,"url":"https://github.com/svrooij/dotnet-feeder","last_synced_at":"2025-03-19T17:32:09.391Z","repository":{"id":38820020,"uuid":"498726011","full_name":"svrooij/dotnet-feeder","owner":"svrooij","description":"A dotnet tool for parsing rss feeds and modifying a markdown file","archived":false,"fork":false,"pushed_at":"2024-08-24T06:48:55.000Z","size":71,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-11T14:14:01.091Z","etag":null,"topics":["automation","blog","hacktoberfest","readme-profile"],"latest_commit_sha":null,"homepage":"https://svrooij.io/2022/06/09/building-github-action-in-net/#post","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/svrooij.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"svrooij"}},"created_at":"2022-06-01T12:25:28.000Z","updated_at":"2024-08-24T06:48:59.000Z","dependencies_parsed_at":"2023-02-15T14:46:09.153Z","dependency_job_id":"92a02a5b-aeae-49cd-bfe3-f10dec8acf0b","html_url":"https://github.com/svrooij/dotnet-feeder","commit_stats":{"total_commits":21,"total_committers":2,"mean_commits":10.5,"dds":"0.23809523809523814","last_synced_commit":"4d9ddaeaccbbbb7c0252e3fe764da07e9517f36f"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svrooij%2Fdotnet-feeder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svrooij%2Fdotnet-feeder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svrooij%2Fdotnet-feeder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/svrooij%2Fdotnet-feeder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/svrooij","download_url":"https://codeload.github.com/svrooij/dotnet-feeder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221729515,"owners_count":16871034,"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":["automation","blog","hacktoberfest","readme-profile"],"created_at":"2024-10-10T14:14:17.913Z","updated_at":"2024-10-27T20:27:41.968Z","avatar_url":"https://github.com/svrooij.png","language":"C#","funding_links":["https://github.com/sponsors/svrooij"],"categories":[],"sub_categories":[],"readme":"# dotnet-feeder\n\nDotnet Feeder is a collection of handy tools to do stuff with markdown files. It's all build in .NET 6 and available as a [dotnet-tool](https://docs.microsoft.com/en-us/dotnet/core/tools/global-tools). Some features can also be used as a Github Action.\n\n[![github issues][badge_issues]][link_issues]\n[![License][badge_license]](link_license)\n[![Support me on Github][badge_sponsor]][link_sponsor]\n\n## Feed command\n\nUse this command to read a json post feed and to replace the text between the tags with a list of posts.\nYou can use this command to automatically update any markdown with the latest posts.\nI developed this to update my [Github profile readme](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme) every day.\n\nBe sure to add at least one file that has both the start tag `\u003c!-- start {tag} --\u003e` and the end tag `\u003c!-- end {tag} --\u003e`.\n\n```plain\nFeeder v1.0.0\n\nUSAGE\n  dotnet-feeder feed \u003curl\u003e \u003cfiles...\u003e [options]\n\nDESCRIPTION\n  Read a feed and write markdown\n\nPARAMETERS\n* url               Url of the feed to parse \n* files             File(s) to write posts to \n\nOPTIONS\n  --count           Number of items to use Default: \"10\".\n  --tag             Tag to look for, \u003c!-- start {tag} --\u003e / \u003c!-- end {tag} --\u003e Default: \"posts\".\n  --template        Item template when writing markdown Default: \"- [{title}]({url})\".\n  --ci              Running in CI env, creates github logging Environment variable: CI. Default: \"False\".\n  --wordpress       Wordpress api has a different format Default: \"False\".\n  -h|--help         Shows help text. \n```\n\n### Feed command - Github actions\n\nTo use this action for your own README file, do the following:\n\n1. Add a header to your README (posts need their own header right?) `## Recent posts`\n2. Skip a line and add `\u003c!-- start posts --\u003e\u003c!-- end posts --\u003e` to it.\n3. Create a workflow like the one below\n4. Change the feed parameter (or leave it if you want to promote my posts)\n\n```yaml\non:\n  schedule:\n    - cron: '45 6 * * *'\n  workflow_dispatch:\n\njobs:\n  update-readme:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n\n    steps:\n      - uses: actions/checkout@v3\n      - name: Dotnet-feeder\n        uses: svrooij/dotnet-feeder@main\n        with:\n          feed: https://svrooij.io/feed.json\n          files: ./README.md\n      - uses: stefanzweifel/git-auto-commit-action@v4\n        with:\n          commit_message: Posts refreshed\n          file_pattern: README.md\n```\n\nThis workflow will trigger daily at 6:45 and can be triggered from the actions screen (or other repositories :wink:)\n\n### Support for wordpress blogs\n\nEach wordpress website has (be default) a json api enabled. This feed is available at `https://{your-wordpress-site}/wp-json/wp/v2/posts?_fields=id,title,link` but this uses a different format. For wordpress sites we created a separate action. In the github action you should add it like this:\n\n```yaml\n      - name: Dotnet-feeder\n        uses: svrooij/dotnet-feeder/wordpress@main\n        with:\n          site: https://svrooij.io\n          files: ./README.md\n          extra_args: --wordpress\n```\n\n## Sample posts from my blog\n\nBy running `dotnet-feeder feed https://svrooij.io/feed.json ./README.md --count 5 --tag s_posts` your can generate the section below.\n\n\u003c!-- start s_posts --\u003e\r\n- [Kiota serializing](https://svrooij.io/2024/08/20/kiota-serializing/)\n- [Hyper-V template for Intune](https://svrooij.io/2024/08/02/hyper-v-template-intune/)\n- [Integration tests on protected API](https://svrooij.io/2024/07/10/integration-tests-protected-api/)\n- [Kiota with dependency injection](https://svrooij.io/2024/07/03/kiota-dependency-injection/)\n- [Authentication using certificate - Entra ID](https://svrooij.io/2024/06/05/authentication-certificate-key-vault/)\n\u003c!-- end s_posts --\u003e\n\n## Developer stuff\n\n[![github issues][badge_issues]][link_issues]\n[![Support me on Github][badge_sponsor]][link_sponsor]\n\nThis repository contains of the following files:\n\n| Path | Name | Description |\n|------|------|-------------|\n| `action.yml` | Action configuration | Action file for this action to be executable from other repositories. |\n| `.github/workflows/build.yml` | Build workflow | Workflow for running the tests and creating the [docker image](https://github.com/svrooij/dotnet-feeder/pkgs/container/dotnet-feeder) |\n| `.github/workflows/refresh.yml` | Sample workflow | Sample workflow to refresh the posts in the readme. |\n| `src/*` | dotnet-feeder source | The actual .NET application running this stuff, using [CliFx](https://github.com/Tyrrrz/CliFx) (it's awesome) |\n| `tests/*` | tests | Some tests that are mandatory in the build/release pipeline |\n\nIf you want to create your own github action in .NET code, this repository is a great place to start. Let me know what you think!\n\n[badge_issues]: https://img.shields.io/github/issues/svrooij/dotnet-feeder?style=flat-square\n[badge_license]: https://img.shields.io/github/license/svrooij/dotnet-feeder?style=flat-square\n[badge_sponsor]: https://img.shields.io/badge/Sponsor-at%20Github-red?style=flat-square\n\n[link_issues]: https://github.com/svrooij/dotnet-feeder/issues\n[link_license]: https://github.com/svrooij/dotnet-feeder/blob/main/LICENSE\n[link_sponsor]: https://github.com/sponsors/svrooij\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvrooij%2Fdotnet-feeder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsvrooij%2Fdotnet-feeder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsvrooij%2Fdotnet-feeder/lists"}