class SafeDb::Copy
The copy use case copies one or more chapters, one or more verses and one or more lines to the clipboard so Ctrl-v can be used outside the safe to paste data in (like complex passwords).
Use
{Drag} and {Drop} to move data between books, chapters, verses and lines.
Visit
documentation at www.safedb.net/docs/copy-paste
Attributes
line[W]
this entity can point to a book, chapter, verse or line. If no parameter entity is provided, the –all switch must be present to avoid an error message.
Public Instance Methods
cannot_copy_line()
click to toggle source
# File lib/controller/query/copy.rb, line 51 def cannot_copy_line() puts "" puts "No parameter line to copy was given." puts "Also this verse does not have a @password line." puts "" end
line_copied()
click to toggle source
# File lib/controller/query/copy.rb, line 39 def line_copied() puts "" puts "The value for line \"#{@line}\" has been copied to the clipboard." puts "You can use either Ctrl-v or a mouse middle click to paste it." puts "" puts "Wipe it from the clipboard with $ safe wipe" puts "" end
query_verse()
click to toggle source
The copy use case copies one or more chapters, one or more verses and one or more lines to the clipboard so Ctrl-v can be used outside the safe to paste data in (like complex passwords).
# File lib/controller/query/copy.rb, line 23 def query_verse() @line = "@password" if @line.nil? unless ( @verse.has_key?( @line ) ) cannot_copy_line() return end system "printf \"#{@verse[ @line ]}\" | xclip" system "printf \"#{@verse[ @line ]}\" | xclip -selection clipbaord" line_copied() end