Last active
December 15, 2015 22:39
-
-
Save sapslaj/5334332 to your computer and use it in GitHub Desktop.
Quickly make Chrome Apps from URLs! (Now with ICONS!)
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
# written by sapslaj | |
print "Quick Chrome URL App Generator Thingy\n" | |
print "=====================================\n" | |
print "Name:\n" | |
name = gets | |
print "App URL: \n" | |
appurl = gets | |
print "Icon File:\n" | |
iconfile = gets | |
print "Icon Size? (in DIPs)\n" | |
iconsize = gets | |
print "Generating...\n" | |
final = <<EOF | |
{ | |
"app": { | |
"launch": { | |
"web_url": "#{appurl.chomp}" | |
}, | |
"urls": [ "#{appurl.chomp}" ] | |
}, | |
"icons": { | |
"#{iconsize.chomp}": "#{iconfile.chomp}" | |
}, | |
"manifest_version": 2, | |
"name": "#{name.chomp}", | |
"version": "1" | |
} | |
EOF | |
print "Finished Generating. Enter manifest file name: \n" | |
manifest = gets | |
print "Writing to file...\n" | |
out = File.new(manifest.chomp, 'w') | |
out.puts final | |
out.close | |
print "Done. File saved as #{manifest}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
what language is this? I'm guessing Python?