Author: Bocaletto Luca
GitHub: bocaletto-luca
License: GNU GPL v3
Random Advice Generator is a single‑page web application that fetches random advice using the Advice Slip JSON API. In addition to fetching advice, the app allows users to save their favorite advice messages in a list and export this list in various formats (JSON, CSV, and SQL). Built with HTML5, CSS3, and vanilla JavaScript, this app is lightweight, responsive, and easy to use.
- Random Advice Fetching: Retrieve a new piece of advice instantly by clicking the "Get Advice" button.
- Save Advice: Add the displayed advice to a saved list with the "Add to List" button.
- Export Options: Export your saved advice list as:
- JSON: For data interchange.
- CSV: Compatible with spreadsheets and data analysis tools.
- SQL: Generates SQL
INSERT
statements for database integration.
- Responsive Design: A modern, responsive UI that works seamlessly across devices.
- Fetch Advice: The app sends a request to the Advice Slip JSON API (
https://api.adviceslip.com/advice
) to retrieve a random piece of advice. - Display and Save: The advice is displayed on the screen. Users can then click "Add to List" to save a copy to an internal list.
- Export Data: Export buttons allow users to download the saved advice list in JSON, CSV, or SQL format. The exported data is generated dynamically using JavaScript and delivered via a download prompt.
- Advice Slip JSON API: Provides random advice slips in JSON format.
Visit API Documentation
- Frontend: HTML5, CSS3, JavaScript
- API: Advice Slip JSON API
- Open the Web App: Simply open the
index.html
file in your preferred web browser. - Get Advice: Click the "Get Advice" button to fetch a new advice message.
- Save Your Favorite Advice: If you like the advice, press "Add to List" to store it.
- Export Your Saved Advices: Use the export buttons to download your saved advice in JSON, CSV, or SQL format.
Contributions are welcome! If you'd like to improve the project, please fork the repository and submit a pull request. For issues or feature requests, please use the GitHub Issues page.
This repository documents the Random Advice Generator app, a single‑page solution integrating dynamic advice retrieval and data export features using free APIs. Enjoy and happy coding!