modified: README.md
modified: c/ff modified: c/main.rb modified: m/ReadFile.rb
This commit is contained in:
4
c/ff
4
c/ff
@ -1,3 +1 @@
|
||||
www.google.fr
|
||||
www.japanimes.tk
|
||||
www.fakeadresse.com
|
||||
fdfsdjkfdjskljfldks http://www.google.fr fodfkljskljsd
|
||||
|
39
c/main.rb
39
c/main.rb
@ -2,13 +2,14 @@
|
||||
|
||||
#lib
|
||||
require 'gtk2' # lib graphique
|
||||
#require 'net-ping' #lib netwotk
|
||||
|
||||
require 'net/http' #lib netwotk
|
||||
require 'uri'
|
||||
#include
|
||||
require '../m/ReadFile'
|
||||
require '../v/Vue1'
|
||||
require '../v/VueError'
|
||||
|
||||
|
||||
Gtk.init
|
||||
v1 = Vue1.new
|
||||
|
||||
@ -18,15 +19,12 @@ v1.listenerDestroy
|
||||
v1.getWindow.show_all
|
||||
Gtk.main
|
||||
str = v1.getEntry
|
||||
#print str
|
||||
|
||||
if(File.exist?(str))
|
||||
f = ReadFile.new(str)
|
||||
tabL = f.getLines
|
||||
|
||||
for i in tabL
|
||||
puts i
|
||||
end
|
||||
url = f.getUrls
|
||||
puts url
|
||||
|
||||
else
|
||||
vd = VueError.new("Fichier inexistant")
|
||||
vd.getDialog.run
|
||||
@ -37,4 +35,29 @@ end
|
||||
|
||||
|
||||
|
||||
# def ping(host)
|
||||
# begin
|
||||
# url=URI.parse(host)
|
||||
# start_time = Time.now
|
||||
# response=Net::HTTP.get(url)
|
||||
# end_time = Time.now - start_time
|
||||
# if response==""
|
||||
# return false
|
||||
# else
|
||||
# puts "response time : #{end_time}"
|
||||
# return true
|
||||
# end
|
||||
# rescue Errno::ECONNREFUSED
|
||||
# return false
|
||||
# end
|
||||
# end
|
||||
#
|
||||
# if(ping "")
|
||||
# puts('vrai')
|
||||
# else
|
||||
# puts('faux')
|
||||
# end
|
||||
|
||||
|
||||
|
||||
print "Termine\n"
|
Reference in New Issue
Block a user