Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Please sign up or log in to edit the wiki.

Create the functionality to cycle through quotes on a daily/weekly/monthly basis automatically.

Do this by:

  1. Creating a function which takes the day of the year, and finds the remainder upon division by 7.
  2. The result is then used to select quotes from any of the 7 pages listed here (excluding "The Lord of the Rings/Quotations", since quotes for each book are contained in pages for each individual book). The 7 pages making up the "quote bank" are:
 * J.R.R. Tolkien/Quotations
 * The Hobbit/Quotations
 * The Fellowship of the Ring/Quotations
 * The Two Towers/Quotations
 * The Return of the King/Quotations
 * The Lord of the Rings Appendices/Quotations
 * The Silmarillion/Quotations

The end result of this should be that on day 0 (whatever day January 1st is - assume Wednesday as an example), a random quote by J.R.R. Tolkien will be shown (first in the list above). Then on Thursday, a random quote from The Hobbit (second in the list above) will be shown, and so on, until Tuesday, when a random quote from The Silmarillion (last in the list above) will be shown. Once we get back to Wednesday, the process will repeat, but with a randomly selected quote from each page each day. This can be modified to be weekly, but currently testing it as a daily change.







163

2


https://tolkiengateway.net/wiki/The_Fellowship_of_the_Ring/Quotations


One Ring to rule them all, One Ring to find them, One ring to bring them all and in the darkness bind them.

Gandalf was shorter in stature than the other two; but his long white hair, his sweeping beard, and his broad shoulders, made him look like some wise king of ancient legend. In his aged face under great snowy brows his eyes were set like coals that could suddenly burst into fire.

Do not meddle in the affairs of Wizards, for they are subtle and quick to anger.

Go not to the Elves for counsel, for they will say both no and yes.

Faithless is he that says farewell when the road darkens.

Deserves it! I dare say he does. Many that live deserve death and some that die deserve life. Can you give it to them? Then do not be so eager to deal out death in judgement. For even the wise cannot see all ends.

Radagast the Brown! Radagast the Bird-tamer! Radagast the Simple! Radagast the Fool! Yet he had just the wit to play the part I set him. For you have come, and that was the purpose of my message. And here you shall stay, Gandalf the Grey, and rest from your journeys. For I am Saruman the Wise, Saruman the Ring-maker, Saruman of Many Colours!

And he who breaks a thing to find out what it is has left the path of wisdom.

Seek for the Sword that was broken:
In Imladris it dwells:
There shall be counsels taken
Stronger than Morgul-spells.
There shall be shown a token
That Doom is near at hand,
For Isildur's Bane shall waken,
And the Halfling forth shall stand.

Cold be hand and heart and bone,
and cold be sleep under stone:
never more to wake on stony bed,
never, till the sun fails and Moon is dead.
in the black wind stars shall die,
and still on gold here let them lie,
till the dark lord lifts his hand
over dead sea and withered land.


Length of The Silmarillion/Quotations page is 1728 characters.