Created
July 11, 2015 18:02
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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