Module: ShowText
- Defined in:
- lib/show_text.rb
Instance Method Summary collapse
- #auto_text ⇒ Object
- #bar_both ⇒ Object
- #bar_low ⇒ Object
- #bar_top ⇒ Object
- #batchy_text ⇒ Object
- #help_text ⇒ Object
- #lpadmin_puts(printerdata) ⇒ Object
- #printer_puts(printerdata) ⇒ Object
- #prov_text(store) ⇒ Object
- #welcome_text ⇒ Object
- #work_dir_text ⇒ Object
Instance Method Details
#auto_text ⇒ Object
3 4 5 6 7 |
# File 'lib/show_text.rb', line 3 def auto_text puts #format puts "Auto provision".yellow + " means provisioning is done immediately with no" puts "confirmation dialogue." end |
#bar_both ⇒ Object
9 10 11 12 13 14 |
# File 'lib/show_text.rb', line 9 def puts # format puts .yellow puts .yellow puts # format end |
#bar_low ⇒ Object
16 17 18 |
# File 'lib/show_text.rb', line 16 def "-"*78 end |
#bar_top ⇒ Object
20 21 22 |
# File 'lib/show_text.rb', line 20 def "_"*34 + " " + "Printsly" + " " + "_"*34 end |
#batchy_text ⇒ Object
24 25 26 27 |
# File 'lib/show_text.rb', line 24 def batchy_text puts #format puts "Batch mode".yellow + " means all spreadsheets in the " + "working directory".yellow + " will be processed." end |
#help_text ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/show_text.rb', line 29 def help_text puts # format puts "Please pass the FULL PATH for two directories separated by a space!".red puts "Pending files in the first directory and done in the second.".red puts # format puts "EXAMPLE: printsly /u01/app/cups/pending /u01/app/cups/done".green puts # format end |
#lpadmin_puts(printerdata) ⇒ Object
38 39 40 |
# File 'lib/show_text.rb', line 38 def lpadmin_puts printerdata '/usr/sbin/lpadmin -p ' + printerdata[0] + " -L \"" + printerdata[3] + "\" -D \"" + printerdata[2] + "\" -E -v socket://" + printerdata[1] + ":9100 -m raw" end |
#printer_puts(printerdata) ⇒ Object
46 47 48 |
# File 'lib/show_text.rb', line 46 def printer_puts printerdata "Name: ".yellow + printerdata[0] + " " + "Type: ".yellow + printerdata[2] + " " + "IP: ".yellow + printerdata[1] + " " + "Desc: ".yellow + printerdata[3] end |
#prov_text(store) ⇒ Object
42 43 44 |
# File 'lib/show_text.rb', line 42 def prov_text store "This is what I am planning on provisioning for store " + store + ":" end |
#welcome_text ⇒ Object
50 51 52 53 54 |
# File 'lib/show_text.rb', line 50 def welcome_text puts "If this is the first time to run Printsly, please choose " + "[3]".yellow + " and configure." puts #format puts "The configuration file is stored in your home directory by default." end |
#work_dir_text ⇒ Object
56 57 58 59 60 |
# File 'lib/show_text.rb', line 56 def work_dir_text puts #format puts "The " + "working directory".yellow + " is the location " + "Printsly".yellow + " will look for" puts "spreadsheets containing printers to add to " + "CUPS".yellow + "." end |