Skip to content

πŸ’­ GetQuotes is a simple cli tool to get quotes in your terminal using WikiQuotes, Written In RustπŸ¦€

License

Notifications You must be signed in to change notification settings

MuntasirSZN/getquotes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“œ GetQuotes - Fetch Inspirational Quotes from the Command Line πŸš€

License GitHub issues GitHub stars Last commit

GetQuotes is a powerful command-line tool written in Rust that fetches and displays inspirational quotes directly from Wikiquote. Whether you're looking for motivation, wisdom, or just a quick pick-me-up, GetQuotes has got you covered. 🌟


πŸ“₯ Installation

Repository Command To Install Version
Crates.io cargo install getquotes Crates.io
AUR yay -S getquotes AUR
AUR (Git) yay -S getquotes-git AUR

Note

If you are on Arch Linux, you can install GetQuotes from the AUR using yay or paru.

Manual Installation

You can clone the repository and build it from source:

git clone https://github.com/MuntasirSZN/getquotes.git
cd getquotes
cargo build --release

Then, copy the binary to your PATH:

cp target/release/getquotes /usr/local/bin

Manpages are included in the repository and can be installed using:

sudo cp man/getquotes.1 /usr/share/man/man1
sudo mandb # To update the manpage database

If you are on windows, you can use the ps1xml file, which is a like a manpage for windows powershell. Use the Get-Help command to view the manpage.

copy .\man\getquotes.ps1xml $env:PSModulePath\getquotes.ps1xml
Get-Help getquotes

Important

If you are building for android from source, you need the Android NDK installed and the ANDROID_NDK_HOME environment variable set to the NDK path.


πŸ› οΈ Configuration

GetQuotes can be configured using a JSON configuration file. The configuration file should adhere to the schema defined in config.schema.json. Here's an example of a configuration file:

{
  "authors": ["Albert Einstein", "Isaac Newton"],
  "theme_color": "#FF5733",
  "max_tries": 50,
  "log_file": "custom_getquotes.log"
}

Properties

  • authors: An array of author names to fetch quotes from. At least one author must be specified.
  • theme_color: A hex color code (with or without a leading #) for theming the output.
  • max_tries: The maximum number of attempts to find a quote (between 1 and 100, default is 30).
  • log_file: The path to the log file (default is "getquotes.log").

πŸ› οΈ Usage

Basic Usage

To fetch and display a random quote, simply run:

getquotes

Customizing Quotes

You can specify authors to fetch quotes from:

getquotes --authors "Albert Einstein,Mahatma Gandhi"

Theme Color

Set the theme color using the configuration file or environment variables. Command-line options for theme color are not available.

Log File

Specify the log file path in the configuration file or use the default "getquotes.log".

Rainbow Mode 🌈

Enable rainbow mode for a colorful display:

getquotes --rainbow-mode

Offline Mode

Run in offline mode using cached quotes:

getquotes --offline

Initialize Cache

Initialize the quote cache for offline mode:

getquotes --init-cache

Configuration File

Specify the path to the configuration file using the --config option:

getquotes --config /path/to/config.json

Help

Display help information:

getquotes --help

πŸš€ Features

  • Fetch Quotes: Get random quotes from Wikiquote. πŸ“œ
  • Custom Authors: Specify authors to fetch quotes from. πŸ–‹οΈ
  • Rainbow Mode: Display quotes in random colors. 🌈
  • Offline Mode: Use cached quotes when offline. πŸ“΄
  • Configurable: Customize theme color, log file, and more via a JSON configuration file. πŸ› οΈ
  • Lightweight: Fast and efficient, written in Rust. ⚑

🀝 Contributing

We welcome contributions from the community! If you'd like to contribute, please follow these steps:

  1. Fork the repository. 🍴
  2. Create a new branch. 🌿
  3. Make your changes. ✏️
  4. Submit a pull request. πŸš€

Please make sure to follow our Code of Conduct and Contribution Guidelines.

Configuration Schema

The configuration schema is defined in config.schema.json. Any contributions affecting the configuration should update this schema accordingly.


πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Wikiquote: For providing the quotes. πŸ“–
  • Rust Community: For the amazing ecosystem and tools. πŸ¦€
  • Inspiration: This project was inspired by the need for a simple, daily dose of inspiration. 🌟

πŸ“¬ Contact

If you have any questions, feel free to reach out:


🌟 Show Your Support

If you find this project useful, please give it a ⭐️ on GitHub!


Happy quoting! πŸŽ‰

About

πŸ’­ GetQuotes is a simple cli tool to get quotes in your terminal using WikiQuotes, Written In RustπŸ¦€

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published