This project is a simple Python-based code snippet manager that allows you to organize and store code snippets for easy access and retrieval.
- Add Snippets: Add new code snippets with a name and corresponding code.
- Delete Snippets: Delete existing code snippets by name.
- Get Snippets: Retrieve code snippets by name.
- List Snippets: List all available code snippets.
-
Clone the repository:
git clone https://github.com/anesu398/code-snippet-manager.git
-
Navigate to the project directory:
cd code-snippet-manager
-
Run the script:
python code_snippet_manager.py
-
Initialize the
CodeSnippetManager
:snippet_manager = CodeSnippetManager("snippets.json")
-
Add new snippets:
snippet_manager.add_snippet("Snippet Name", "Your code snippet here")
-
Delete snippets:
snippet_manager.delete_snippet("Snippet Name")
-
Get a specific snippet:
snippet_code = snippet_manager.get_snippet("Snippet Name")
-
List all snippets:
snippet_names = snippet_manager.list_snippets()
Contributions are welcome! If you have any suggestions, feature requests, or find any issues, please open an issue or submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.