🌟 flerp 🌟
Flerp Text Analysis - Uncover content & insights from your text files! 🕵️♂️
Flerp is a command-line tool written in Rust that provides structural analysis, keyword extraction, and text search functionalities for your documents.
✨ Features
- Structural Analysis: Get counts of lines, words, and stanzas.
- Keyword Extraction: Identify the most frequent keywords in your text.
- Text Search: Search for specific queries within your files, with case-sensitive and case-insensitive options.
- Cool ASCII Art Welcome: Because why not?
🚀 Installation
- Clone the repository (if you haven't already):
- Build and install using Cargo:
Ensure you have Rust and Cargo installed. If not, visit rustup.rs.
This will compileflerpand place the executable in your Cargo binary directory (usually~/.cargo/bin/). Make sure this directory is in your system'sPATH.
🛠️ Usage
Once installed, you can run flerp from your terminal:
Arguments:
<query>: The text string you want to search for in the file.<filename>: The path to the text file you want to analyze.
Options:
- Case-sensitive search (default):
- Case-insensitive search:
Set the
CASE_INSENSITIVEenvironment variable to any value (e.g.,trueor1).
Alternatively, on Windows:CASE_INSENSITIVE=true
Or for a single command across platforms:$env:CASE_INSENSITIVE="true" flerp "hello" myfile.txtCASE_INSENSITIVE=1
Example Output:
When you run flerp, you'll first see a friendly welcome message:
.--.
/ _ \
| o o |
\ ^ /
`--'
||
_________________________
/ //
/ Flerp Text Analysis //
/ Content & Insights //
/________________________//
(________________________(/
\ \
\ Keywords, Stats, \
\ Search Results... \
\______________________\
Followed by the analysis:
Structural Analysis:
Lines: 150
Words: 2500
Stanzas: 30
Keywords (Top 5):
rust: 25
code: 18
analysis: 15
text: 12
flerp: 10
This is a line that contains your search query.
Another line matching the query.
...
🤝 Contributing
Contributions are welcome! If you have ideas for new features, improvements, or bug fixes, please feel free to:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name). - Make your changes.
- Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin feature/your-feature-name). - Create a new Pull Request.
📜 License
This project is licensed under the MIT License - see the LICENSE file for details (if you choose to add one).
Happy Flerping! 🎉