From b3f0cb799acd093962af145cf8413e42dd9e79e1 Mon Sep 17 00:00:00 2001 From: Maccesch Date: Sat, 10 Jun 2023 04:41:24 +0100 Subject: [PATCH] updated readme --- README.md | 11 +++++++---- docs/generate_count_badge.py | 26 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 docs/generate_count_badge.py diff --git a/README.md b/README.md index 8fbfbe1..ebf43ea 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,17 @@

Inspired by React-Use / VueUse / SolidJS-USE

- Guide • - Docs.rs • - Crates.io + Crates.io + Docs & Demos + 23 Functions

+
+
+
+ ----- -[![Crates.io](https://img.shields.io/crates/v/leptos-use.svg)](https://crates.io/crates/leptos-use) [![Docs](https://docs.rs/leptos-use/badge.svg)](https://docs.rs/leptos-use/) [![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/synphonyte/leptos-use#license) [![Build Status](https://github.com/synphonyte/leptos-use/actions/workflows/ci.yml/badge.svg)](https://github.com/synphonyte/leptos-use/actions/workflows/ci.yml) diff --git a/docs/generate_count_badge.py b/docs/generate_count_badge.py new file mode 100644 index 0000000..cf69e47 --- /dev/null +++ b/docs/generate_count_badge.py @@ -0,0 +1,26 @@ +import os +import re + +def main(): + count = 0 + for dir in os.listdir("docs/book/src/"): + dir_path = os.path.join("docs/book/src/", dir) + if os.path.isdir(dir_path): + for file in os.listdir(dir_path): + if file.endswith(".md"): + count += 1 + + print(f"Found {count} functions") + + with open("README.md", "r") as f: + text = re.sub( + r'