https://cleansnippets.com/ / Clean Snippets App (Mac)
Clean Snippets is a tool designed for developers looking to simplify and shorten their code snippets for more straightforward sharing, storing, or usage within prompts. It removes unnecessary components like comments, whitespace, and more based on user preferences.
- Clean and user-friendly interface for code input and viewing the cleaned code.
- Options to remove specific parts of the code, including comments, blank lines, whitespace, and others.
- Warnings about large code snippet sizes and how they might affect performance in different scenarios.
- Clipboard functionality for easy copying of the cleaned code.
- Character count for input and output to keep track of snippet sizes.
- Paste Code: Users paste their code into the input area.
- Select Preferences: Before cleaning, users can choose what elements they want to remove from their code. Options include comments, blank lines, imports, inline SVGs, whitespace, and line wrapping.
- Clean: By pressing the "Clean" button, the app processes the input, removes the selected elements and reduces the number of characters contained in the code.
- Copy or Clear: Users can immediately copy the cleaned code to their clipboard or clear the text area to start over. The application provides visual confirmation for these actions.
No installation is necessary for the web application. Users need to navigate to the hosted website URL - https://cleansnippets.com/.
To install the Mac application, follow these steps:
- Navigate to the Releases page of this GitHub repository.
- Look for the latest release and download the
.dmgfile associated with it. - Once downloaded, open the
.dmgfile. - Drag the application icon to your Applications folder to install the app.
- Open your Applications folder and double-click on the app to run it.
Note: You might need to allow the application to run in your System Preferences if you get a security warning upon the first launch. This is common for applications downloaded outside of the Mac App Store.
Developers who wish to contribute to or modify the application's source code can clone the repository to their local machine.
git clone https://github.com/scmacoll/clean-snippets.com.gitAfter cloning, developers should move into the project directory and install any dependencies before making modifications.
cd clean-snippets
npm installUpon loading, the app is ready for use. Paste your code snippet into the designated area and select the elements to remove. After setting up, click "Clean" to get the final, cleaned-up code. The character counter informs users about the size of their snippets.
To copy the code, click the "Copy" button. If you want to clean a new snippet, click "Clear" to empty the text areas and start fresh.
I encourage developers to contribute to Clean Snippets. Whether it's a bug report, new feature, or suggestion for improvement, I welcome new ideas. Please fork the repository and use a feature branch before sending a pull request.
Code for the web app is all within the first parent directory whilst code for the Mac App is inside the macApp/ folder.
Your feedback is important for the continuous improvement of the tool. Please use the issue tracker for support requests or bug reports.
Clean Snippets is available under the MIT License. See the LICENSE file in the repository for more information.
I want to thank everyone who has contributed to the development of Clean Snippets, as every contribution helps make this tool useful for developers worldwide.
