Skip to content

markstanl/github-readme-philosophical-quotes

Repository files navigation

Title Card

Icon

Pull Requests Issues Last Commit License Stars

Demo Site

Overview

The philosophical quotes generator is an API that allows you to add a philosophical quote image to your GitHub README. It is important to note that just because a quote is included in the generator, doesn't necessarily mean that I agree wholeheartedly with the position the philosopher is taking. In fact, many of the quotes here are contradictory and take positions against other quoted philosophers. The purpose of philosophy is to work together to try and find the truth, those who disagree with you are not your enemy, but rather your ally.

This API is built using express, hosted on vercel, and inspired by the GitHub Readme Stats project by Anurag Hazra.

Philosophical Quote

Usage

It is highly encouraged for everyone to use this API in their ReadMes. The following is how you use it. This is an express function, hosted on Vercel, and you can access it by using the following URL:

![](https://github-readme-philosophical-quotes.vercel.app/api/generate-image)

You can use the query parameters in the next section to customize the quote image that is generated. Check out the demo site for help on getting your request parameters The only thing I request is to star this repository, and add the following comment to your README:

<!-- Generated by Github Readme Philosophical Quotes https://github.com/markstanl/github-readme-philosophical-quotes -->

Query Parameters

Parameter Description
author This parameter allows you to filter the quotes by the name of the philosopher who said the quote. It is case-insensitive.
theme This parameter allows you to filter the quotes by the theme, i.e., the color scheme. It is case-insensitive.
daily-quote If you would rather only have the quote generated daily, you can use this parameter. It will only generate a new quote once per day. Any value makes this work.
daily-seed If you don't like your friends to have the same quote as you, use a random seed.
quote This parameter allows you to generate a specific quote. Simply put in the quote you would like to generate. It is case-insensitive and must start with a quotation mark.
include-ids This parameter allows you to restrict generation to only include certain ID values.
exclude-ids This parameter allows you to restrict certain ID values from the generation.

Author

You can filter by the name of the one of our 39 philosophers who said the quote. The author parameter is case-insensitive. Here is a list of the authors you can filter by:

Authors Authors Authors
Albert Camus Albert Einstein Alastair Norcross
Anaxagoras Anaximenes of Miletus Aristotle
Bertrand Russell Daniel Quinn David Hume
Empedocles Friedrich Nietzsche Gorgias
Harry Frankfurt Heraclitus Immanuel Kant
Jean-Jacques Rousseau Jean-Paul Sartre Jeremy Bentham
John Rawls Ludwig Wittgenstein Martin Heidegger
Martha Nussbaum Melissus of Samos Oliver Goldsmith
Parmenides of Elea Peter Gelderloos Peter Singer
Philolaus of Croton Plato Protagoras
Pythagoras René Descartes Richard Dawkins
Sam Harris Simone de Beauvoir Slavoj Žižek
Socrates Thales of Miletus Voltaire

Theme

You can filter by the theme of the quote, i.e., the color scheme. The theme parameter is case-insensitive. Refer here to see all the themes: Themes

Daily Quote & Daily Seed

If you would rather only have the quote generated daily, you can use the daily-quote parameter. This will only generate a new quote once per day. The daily-quote parameter is boolean, any value works for an input. The daily-seed parameter is used to add randomness to the daily quote (as the daily quote is based on the date). This also shuffles the array, you can check the algorithm that does this in the shuffle.mjs file.

Specific Quote

If you would like to generate a specific quote, you can use the quote parameter. Simply put in the quote you would like to generate. The quote parameter is case-insensitive and will find a match if you type in the start of the quote, and it is unique, but must start with a quotation mark.

Request Status Description
/generate-image?quote="I think, therefore I am." ✔️ This is the most clear and will be successful
/generate-image?quote="I think, therefore I am ✔️ This will also be successful, as it completes the quote as long as the start is unique
/generate-image?quote="I think ⚠️ This will likely not be successful, as it is not unique enough. Though it may be successful, future updates may provide other quotes that start with "I think"
/generate-image?quote=I think, therefore I am. This will not be successful, as it does not start with a quotation mark

Include and Exclude IDs

If you would like to limit or exclude certain ids from the generation, you can use the exclude-ids or include-ids parameter. This will limit the ids you provide from the generation. exclude-ids will remove the quotes with the listed ids from generations, include-ids will restrict the generation to only include the quotes with the listed ids. To use this, find the id values of the quotes you wish to exclude, and put them in a comma-separated list. It is recommended not to add spaces between numbers

Request Status Description
/generate-image?exclude-ids=1,2,3 ✔️ This will exclude the first three quotes from the generation
/generate-image?exclude-ids=1 ✔️ This will exclude the first quote from the generation
/generate-image?exclude-ids=1, 18, 6 ⚠️ This will exclude the first, sixth, and eighteenth quotes from the generation, but the spaces after the commas are not necessary and may cause issues
/generate-image?exclude-ids=1, 1 1, 10000 This will not be successful, the second value is not a number, and there is not a quote with id value 10000

Releases

No releases published

Packages

No packages published

Languages