From 4cabc25ec53f83462a58249f72c9ea756bf09f6f Mon Sep 17 00:00:00 2001 From: Maccesch Date: Sat, 10 Jun 2023 04:49:34 +0100 Subject: [PATCH] added stylisher badges --- .github/workflows/ci.yml | 2 ++ README.md | 2 +- docs/generate_count_badge.py | 13 ++++++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d90664f..8966397 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,6 +26,8 @@ jobs: components: rustfmt - name: Cache uses: Swatinem/rust-cache@v2 + - name: Check function count badge + run: python3 docs/generate_count_badge.py --check - name: Check formatting run: cargo fmt --check # - name: Check if the README is up to date. diff --git a/README.md b/README.md index ebf43ea..4d20418 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@

Crates.io Docs & Demos - 23 Functions + 23 Functions


diff --git a/docs/generate_count_badge.py b/docs/generate_count_badge.py index cf69e47..bbe1e25 100644 --- a/docs/generate_count_badge.py +++ b/docs/generate_count_badge.py @@ -1,5 +1,6 @@ import os import re +import sys def main(): count = 0 @@ -13,12 +14,22 @@ def main(): print(f"Found {count} functions") with open("README.md", "r") as f: + original_text = f.read() text = re.sub( r'