From 00f5a4d7a7d0ef42d514b632d2ee5f65828aaae1 Mon Sep 17 00:00:00 2001 From: Aaron Dill Date: Sat, 7 Dec 2024 04:57:52 -0600 Subject: [PATCH] feat: add lines of code to readme --- .github/workflows/gen-readme.yml | 31 +++++++++++++++++++++++++++++++ README.tmpl.md | 21 +++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/gen-readme.yml create mode 100644 README.tmpl.md diff --git a/.github/workflows/gen-readme.yml b/.github/workflows/gen-readme.yml new file mode 100644 index 0000000..cd9a061 --- /dev/null +++ b/.github/workflows/gen-readme.yml @@ -0,0 +1,31 @@ +name: Generate README +on: + push: + pull_request: + paths: + - "README.md" # This isn't needed, but it's a good sanity check + - "README.tmpl.md" + workflow_dispatch: +jobs: + generate-readme: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@master + - run: | + printf '%s\n' "" > README.md + cat README.tmpl.md >> README.md + - name: CLOC + uses: djdefi/cloc-action@6 + with: + options: --md --report-file=cloc.md --hide-rate + # Note: initial newline is required because files don't end with one + - run: | + printf '\n%s\n' '### Lines of code' >> README.md + cat cloc.md >> README.md + rm cloc.md + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "chore: Generate README" + file_pattern: README.md diff --git a/README.tmpl.md b/README.tmpl.md new file mode 100644 index 0000000..3600a1f --- /dev/null +++ b/README.tmpl.md @@ -0,0 +1,21 @@ +# NeoVim config + +> ``` +> In the realm of code, where minds ignite, +> NeoVim shines with its digital light. +> Commands whispered, keystrokes dance, +> Efficiency's ally, in every chance. +> +> Customized canvas, plugins adorn, +> Syntax and style, beautifully worn. +> Through the lines of text, journeys unfold, +> In NeoVim's embrace, stories untold. +> - ChatGPT +> ``` + +Feel free to take snippets with or without credit.\ +No guarantees are made as to their functionality.\ +Or lack therein.\ +It works on my machine ¯\\\_(ツ)\_\/¯ + +> Please open an issue if something doesn't work. I'd love to make these dotfiles more universal.