Skip to content

Instantly share code, notes, and snippets.

@sokratis12GR
Last active May 28, 2016 13:08
Show Gist options
  • Save sokratis12GR/5d3654b0ff86b6f30e9c9d1988080f81 to your computer and use it in GitHub Desktop.
Save sokratis12GR/5d3654b0ff86b6f30e9c9d1988080f81 to your computer and use it in GitHub Desktop.
require 'term/ansicolor'
class Color
extend Term::ANSIColor
end
print Color.red, Color.bold,"########################################", Color.clear, "\n"
print Color.red, Color.bold,"# #", Color.clear, "\n"
print Color.red, Color.bold,"# This Program is made by sokratis12GR #", Color.clear, "\n"
print Color.red, Color.bold,"# #", Color.clear, "\n"
print Color.red, Color.bold,"########################################", Color.clear, "\n"
print Color.green, Color.bold,"Your Names: \n", Color.clear
names = gets.chomp
puts Color.red,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", Color.clear
print Color.green, Color.bold,"Your Email: \n", Color.clear, "\n"
email = gets.chomp
puts Color.red,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", Color.clear
print Color.green, Color.bold,"Your Gender: \n", Color.clear
print Color.green, Color.bold,"Male | Female | Other \n", Color.clear
gender = gets.chomp
puts Color.red,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", Color.clear
print Color.green, Color.bold,"Your Age: \n", Color.clear, "\n"
age = gets.chomp
puts Color.red,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", Color.clear
print Color.green, Color.bold,"Your Country: \n", Color.clear, "\n"
country = gets.chomp
puts Color.red,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", Color.clear
print Color.green, Color.bold,"Your City: \n", Color.clear, "\n"
city = gets.chomp
puts Color.red,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", Color.clear
print Color.green, Color.bold,"Spoken Languages: \n", Color.clear, "\n"
lang = gets.chomp
puts Color.red,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", Color.clear
print Color.green, Color.bold,"Telephone Number: \n", Color.clear, "\n"
telnumb = gets.chomp
puts Color.red,"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", Color.clear
handle = open("About.txt", "w")
printf(handle, "This File has been generated with the program \"CVGenerator\" by sokratis12GR\n\n" + "Name: #{names} \nEmail: #{email} \nGender: #{gender} \nAge: #{age} \nCountry: #{country} \nCity: #{city} \nLanguages: #{lang} \nTelephone Number: #{telnumb}")
handle.close
handle = open("About.html", "w")
printf(handle, "<!DOCTYPE html>\n<html> \n <head><title>#{names}</title></head>\n <body>
<h5 style=\"color:navy;\">This File has been generated with the program \"CVGenerator\" by <a href=\"http://twitter.com/sokratis12GR\" style=\"color:green;text-decoration:none;\">sokratis12GR</a></h5>
<h3><div style=\"color:navy;\">Name:</div> #{names}</h3>
<h3><div style=\"color:navy;\">Email:</div> #{email}</h3>
<h3><div style=\"color:navy;\">Gender:</div> #{gender}</h3>
<h3><div style=\"color:navy;\">Age:</div> #{age}</h3>
<h3><div style=\"color:navy;\">Country:</div> #{country}</h3>
<h3><div style=\"color:navy;\">City:</div> #{city}</h3>
<h3><div style=\"color:navy;\">Languages:</div> #{lang}</h3>
<h3><div style=\"color:navy;\">Telephone Number:</div> #{telnumb}</h3>
</body> \n</html>")
print Color.white, Color.bold,"Press enter to close the program..."
close = gets.chomp
puts "Thank You"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment