Skip to content

Instantly share code, notes, and snippets.

@153
Created April 29, 2014 12:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 153/11398621 to your computer and use it in GitHub Desktop.
Save 153/11398621 to your computer and use it in GitHub Desktop.
import random
def content():
print("""<head>
<title>4x13 :: me</title>
<link rel="stylesheet" type="text/css" href="/style.css">
</head>
<body style="width:250px">
<h1>me</h1><a href="/"><img src="/me.png"></a>
<br /><br />
<table border="1px" style="border-collapse: collapse;">
<tr>
<td>email:
<td><a href="mailto:52@4x13.net">52@4x13.net</a>&nbsp;
<tr>
<td>twittr:
<td><a href="https://twitter.com/sibimet">@sibimet</a>
<tr>
<td>steam:
<td><a href="http://steamcommunity.com/id/sicp">sabitsuki</a>
[<a href="steam://friends/add/76561198003983865">+</a>]
<tr>
<td>skype:
<td><a href="skype:natural.sun?chat">natural.sun</a>
<tr>
<td>irc:
<td><a href="/chat/">#tokiko</a>
<tr>
<td>mal:
<td><a href="http://myanimelist.net/profile/g83">g83</a>
</table><br>""")
def quote():
with open("quotes.txt", "r") as quotes:
quotes=quotes.readlines()
num_quotes=len(quotes)-1
rand_quote=random.randint(0,num_quotes)
print("<i>\n "+quotes[rand_quote]+ \
"<!-- ------------------------------- --><hr>")
print("quote #"+str(rand_quote+1).rjust(3,"0")+" / "+str(len(quotes))+"\n</i>")
def foot():
print("\n<!-- see /me/quotes.txt -->")
content()
quote()
foot()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment