Skip to content

Instantly share code, notes, and snippets.

@Krewn
Created July 11, 2015 18:02
Show Gist options
  • Save Krewn/143bf611158a7f11a217 to your computer and use it in GitHub Desktop.
Save Krewn/143bf611158a7f11a217 to your computer and use it in GitHub Desktop.
Takes 2 arguments, a name and a link then creates an HTML document locally which redirects to a given link for Icon based book marking.
import sys
name = sys.argv[1]
link = sys.argv[2]
op=''
op+='<!DOCTYPE html>\n'
op+='<html>\n'
op+='<head>\n'
op+='<meta http-equiv="Refresh" content="0;'+link+'">\n'
op+='</head>\n'
op+='<body>\n'
op+='<p>Redirecting to the address.</p>\n'
op+='<p>If you see this message for more than 3 seconds, please click on the link above!</p>\n'
op+='</body>\n'
op+='</html>\n'
output=open(name+'.html',"w")
output.write(op)
output.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment