[2025-04-13] Add The Hobbit chapters
This commit is contained in:
parent
282698f9ac
commit
cb3bcc0e01
1 changed files with 43 additions and 5 deletions
|
@ -115,8 +115,46 @@ def abbeyRoad(yearPercent):
|
||||||
else:
|
else:
|
||||||
return "Her Majesty"
|
return "Her Majesty"
|
||||||
|
|
||||||
def theHobbit():
|
def theHobbit(yearPercent):
|
||||||
pass
|
hobbitPage = math.floor(yearPercent * 273)
|
||||||
|
if hobbitPage < 24:
|
||||||
|
return "having an unexpected party"
|
||||||
|
elif hobbitPage < 40:
|
||||||
|
return "roasting mutton"
|
||||||
|
elif hobbitPage < 49:
|
||||||
|
return "having a short rest"
|
||||||
|
elif hobbitPage < 62:
|
||||||
|
return "going over hill and under hill"
|
||||||
|
elif hobbitPage < 82:
|
||||||
|
return "performing riddles in the dark"
|
||||||
|
elif hobbitPage < 102:
|
||||||
|
return "out of the frying pan, but into the fire"
|
||||||
|
elif hobbitPage < 127:
|
||||||
|
return "in some queer lodgings"
|
||||||
|
elif hobbitPage < 157:
|
||||||
|
return "fighting flies and spiders"
|
||||||
|
elif hobbitPage < 171:
|
||||||
|
return "taking barrels out of bond"
|
||||||
|
elif hobbitPage < 183:
|
||||||
|
return "getting a warm welcome"
|
||||||
|
elif hobbitPage < 192:
|
||||||
|
return "on the doorstep"
|
||||||
|
elif hobbitPage < 211:
|
||||||
|
return "getting inside information"
|
||||||
|
elif hobbitPage < 222:
|
||||||
|
return "not at home"
|
||||||
|
elif hobbitPage < 231:
|
||||||
|
return "oblivious to fire hitting water"
|
||||||
|
elif hobbitPage < 241:
|
||||||
|
return "watching the gathering of the clouds"
|
||||||
|
elif hobbitPage < 247:
|
||||||
|
return "a thief in the night"
|
||||||
|
elif hobbitPage < 258:
|
||||||
|
return "oblivious to the clouds bursting"
|
||||||
|
elif hobbitPage < 266:
|
||||||
|
return "on the return journey"
|
||||||
|
else:
|
||||||
|
return "at the last stage"
|
||||||
|
|
||||||
def transatlanticFlight(yearPercent):
|
def transatlanticFlight(yearPercent):
|
||||||
lat1 = 51.470020
|
lat1 = 51.470020
|
||||||
|
@ -132,9 +170,9 @@ def getHomoSapiens(yearPercent):
|
||||||
totalYears = 4.3e9
|
totalYears = 4.3e9
|
||||||
yearsUntilHumans = totalYears*(1-yearPercent) - 300e3
|
yearsUntilHumans = totalYears*(1-yearPercent) - 300e3
|
||||||
if yearsUntilHumans >= 0:
|
if yearsUntilHumans >= 0:
|
||||||
return f"Homo Sapiens would evolve in ~{math.floor(yearsUntilHumans)} years."
|
return f"Homo Sapiens would evolve in ~{math.floor(yearsUntilHumans)} years"
|
||||||
else:
|
else:
|
||||||
return f"Homo Sapiens have been around for ~{-math.floor(yearsUntilHumans)} years."
|
return f"Homo Sapiens have been around for ~{-math.floor(yearsUntilHumans)} years"
|
||||||
|
|
||||||
def getTemplate(timestamp):
|
def getTemplate(timestamp):
|
||||||
now = datetime.datetime.fromtimestamp(timestamp)
|
now = datetime.datetime.fromtimestamp(timestamp)
|
||||||
|
@ -149,7 +187,7 @@ def getTemplate(timestamp):
|
||||||
workDay, workTime = workWeek(yearPercent)
|
workDay, workTime = workWeek(yearPercent)
|
||||||
marathonMile = round(26.2 - math.floor(yearPercent*26.2),2)
|
marathonMile = round(26.2 - math.floor(yearPercent*26.2),2)
|
||||||
abbeyRoadSong = abbeyRoad(yearPercent)
|
abbeyRoadSong = abbeyRoad(yearPercent)
|
||||||
hobbitChapter = "having an unexpected party"
|
hobbitChapter = theHobbit(yearPercent)
|
||||||
lat, long = transatlanticFlight(yearPercent)
|
lat, long = transatlanticFlight(yearPercent)
|
||||||
homoSapiens = getHomoSapiens(yearPercent)
|
homoSapiens = getHomoSapiens(yearPercent)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue