A README.md generation tool
Project description
Overview
readme-ation
automates the generation of a README.md
file with setup and run instructions tailored for your Python project. By analyzing your project’s Python files, it identifies imported packages, determines their versions, and updates your README with precise environment setup instructions. Additionally, it allows you to seamlessly add comprehensive project descriptions.
Features
- Automated README Generation: Scans Python files to identify imported packages and their versions, generating environment setup instructions for a Mamba environment.
- Project Description Section: Enhances your README with detailed project information, including an overview, motivation, technologies used, approach, challenges, key takeaways, and acknowledgments.
Functions
find_all_py_files(directory)
: Recursively finds all Python files in the specified directory and its subdirectories.open_or_create_readme(readme_path)
: Opens an existing README file or prompts the creation of a new one if it doesn’t exist.add_setup_with_versions(file_paths, readme_path)
: Analyzes the specified Python files, identifies package dependencies and their versions, and updates the README with setup and run instructions.add_project_description(readme_path, project_details)
: Appends a detailed project description to the README file, including sections such as overview, motivation, technologies used, approach, challenges, key takeaways, and acknowledgments.
Installation
To install readme-ation
, use pip:
pip install readme-ation
Usage
-
Generate Setup Instructions:
from readme_ation import find_all_py_files, add_setup_with_versions file_paths = find_all_py_files('your_project_directory') add_setup_with_versions(file_paths, 'README.md')
-
Add Project Description:
from readme_ation import add_project_description project_details = { 'overview': 'Your project overview here.', 'motivation': 'The motivation behind your project.', 'technologies': 'Technologies and tools used in your project.', 'approach': 'Your approach to solving the problem.', 'challenges': 'Challenges faced during the project.', 'key_takeaways': 'Key takeaways and learnings from the project.', 'acknowledgments': 'Acknowledgments and credits.' } add_project_description('README.md', project_details)
Example
Here is a sample usage demonstrating how to automate the README generation process:
from readme_ation import find_all_py_files, open_or_create_readme, add_setup_with_versions, add_project_description
directory = 'your_project_directory'
readme_path = 'README.md'
file_paths = find_all_py_files(directory)
open_or_create_readme(readme_path)
add_setup_with_versions(file_paths, readme_path)
project_details = {
'overview': 'This is an example project that demonstrates the usage of readme-ation.',
'motivation': 'Automating README generation saves time and ensures consistency.',
'technologies': 'Python, Mamba, and other dependencies.',
'approach': 'Scanning files for imports and creating setup instructions automatically.',
'challenges': 'Handling various edge cases in dependency detection.',
'key_takeaways': 'Using readme-ation can significantly improve your project documentation workflow.',
'acknowledgments': 'Thanks to all contributors and the open-source community.'
}
add_project_description(readme_path, project_details)
Contributing
Please email me at chuckfinca@gmail.com if you would like to contribute.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file readme_ation-0.1.13.tar.gz
.
File metadata
- Download URL: readme_ation-0.1.13.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c9c506fce541bc2e133ca5a8027db25619097680a1b373c66dafe40a3c6db8a |
|
MD5 | 109e78966b41c956eb9e39b53d552e4d |
|
BLAKE2b-256 | 9a4c53a01d017ae00b1f985f30cf779efb0b9af1a856102d3674c527bda0d8f1 |
File details
Details for the file readme_ation-0.1.13-py3-none-any.whl
.
File metadata
- Download URL: readme_ation-0.1.13-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 804b77edc2c1f0879f13fe63690f81b4431bff518c63d5e25d35adfad064b85a |
|
MD5 | 342ac61f8933e39681b43387e2d23a25 |
|
BLAKE2b-256 | 6341802ef7112320736f27ed4675e6b693d2dd4b048e5d86f943e81170adf67b |