From baeafd50f6e65e6a1c9ac2ee45ba7db50bd16d36 Mon Sep 17 00:00:00 2001 From: Thibault YOU Date: Mon, 30 Sep 2024 19:05:21 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(readme):=20Remove=20extra=20?= =?UTF-8?q?newlines=20and=20trim=20whitespace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/scripts/update_views.py | 7 +++++- .github/templates/readme_template.md | 10 ++++---- README.md | 35 ---------------------------- 3 files changed, 10 insertions(+), 42 deletions(-) diff --git a/.github/scripts/update_views.py b/.github/scripts/update_views.py index b040415..0faa023 100644 --- a/.github/scripts/update_views.py +++ b/.github/scripts/update_views.py @@ -1,4 +1,5 @@ import os +import re import yaml import logging from jinja2 import Environment, FileSystemLoader @@ -87,9 +88,13 @@ def update_views(): # Generate README content using the template and write to file logger.info("Generating README content") readme_content = readme_template.render(categories=sorted_categories, format_category=format_category) + + # Remove multiple consecutive newlines + readme_content = re.sub(r'\n{3,}', '\n\n', readme_content) + readme_path = 'README.md' with open(readme_path, 'w') as f: - f.write(readme_content) + f.write(readme_content.strip()) # Use strip() to remove leading/trailing whitespace logger.info(f"Wrote README content to {readme_path}") logger.info("update_views process completed") diff --git a/.github/templates/readme_template.md b/.github/templates/readme_template.md index dffe510..24eaffe 100644 --- a/.github/templates/readme_template.md +++ b/.github/templates/readme_template.md @@ -4,14 +4,12 @@ Welcome to the **Prompt Library**. This repository contains a collection of AI p ## 🗂️ Categories -{% for category, prompts in categories.items() %} - +{%- for category, prompts in categories.items() %} ### {{ format_category(category) }} - -{% for prompt in prompts %} +{%- for prompt in prompts %} - [{{ prompt.title }}]({{ prompt.path }}) - {{ prompt.description }} -{% endfor %} -{% endfor %} +{%- endfor %} +{%- endfor %} ## 🚀 Getting Started diff --git a/README.md b/README.md index e6bf9b4..7195e2a 100644 --- a/README.md +++ b/README.md @@ -3,57 +3,22 @@ Welcome to the **Prompt Library**. This repository contains a collection of AI prompts categorized for easy navigation and reuse. ## 🗂️ Categories - - - ### Artificial Intelligence - - - [God Tier Assistant Generator](prompts/god_tier_assistant_generator/view.md) - Generates innovative ideas for specialized AI assistants based on given topics - - [AI Topic Idea Generator](prompts/ai_topic_idea_generator/view.md) - Generates diverse and innovative AI application ideas for specific domains - - - ### Documentation - - - [AI-Powered Code Repository Documentation Generator](prompts/ai_code_repository_documentation_generator/view.md) - Analyzes code repositories and generates comprehensive documentation autonomously - - - ### Full Stack Development - - - [Advanced Software Development AI Assistant](prompts/advanced_software_development_ai_assistant/view.md) - Provides expert guidance and support throughout the entire software development lifecycle - - - ### Project Management - - - [Software Specification Generator](prompts/software_specification_generator/view.md) - Creates comprehensive software specifications based on user requirements - - [GitHub Issue Creator Assistant](prompts/github_issue_creator_assistant/view.md) - Creates well-structured GitHub Issues from various types of input - - - ### Refactoring - - - [Code Refactoring AI Assistant](prompts/code_refactoring_ai_assistant/view.md) - Analyzes, refactors, and tests code to improve quality, readability, and performance - - - ### Version Control - - - [Git Commit Message Writer](prompts/git_commit_message_writer/view.md) - Generates concise, informative git commit messages following Conventional Commits with emojis - - [GitHub Pull Request Generator](prompts/github_pull_request_generator/view.md) - Generates comprehensive and well-structured GitHub pull requests - - ## 🚀 Getting Started This repository is designed to be easily forked and customized for your own use. Follow these steps to get started: