Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
source 'https://rubygems.org'

# TUI dependencies
gem 'tty-prompt'
gem 'tty-table'
gem 'tty-box'
gem 'tty-reader'
gem 'tty-spinner'
gem 'pastel'

group :test do
gem 'rspec'
end
85 changes: 85 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
GEM
remote: https://rubygems.org/
specs:
diff-lcs (1.6.2)
pastel (0.8.0)
tty-color (~> 0.5)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.6)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.8)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.7)
strings (0.2.1)
strings-ansi (~> 0.2)
unicode-display_width (>= 1.5, < 3.0)
unicode_utils (~> 1.4)
strings-ansi (0.2.0)
tty-box (0.7.0)
pastel (~> 0.8)
strings (~> 0.2.0)
tty-cursor (~> 0.7)
tty-color (0.6.0)
tty-cursor (0.7.1)
tty-prompt (0.23.1)
pastel (~> 0.8)
tty-reader (~> 0.8)
tty-reader (0.9.0)
tty-cursor (~> 0.7)
tty-screen (~> 0.8)
wisper (~> 2.0)
tty-screen (0.8.2)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
tty-table (0.12.0)
pastel (~> 0.8)
strings (~> 0.2.0)
tty-screen (~> 0.8)
unicode-display_width (2.6.0)
unicode_utils (1.4.0)
wisper (2.0.1)

PLATFORMS
ruby
x86_64-linux

DEPENDENCIES
pastel
rspec
tty-box
tty-prompt
tty-reader
tty-spinner
tty-table

CHECKSUMS
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
pastel (0.8.0) sha256=481da9fb7d2f6e6b1a08faf11fa10363172dc40fd47848f096ae21209f805a75
rspec (3.13.2) sha256=206284a08ad798e61f86d7ca3e376718d52c0bc944626b2349266f239f820587
rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d
rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
strings (0.2.1) sha256=933293b3c95cf85b81eb44b3cf673e3087661ba739bbadfeadf442083158d6fb
strings-ansi (0.2.0) sha256=90262d760ea4a94cc2ae8d58205277a343409c288cbe7c29416b1826bd511c88
tty-box (0.7.0) sha256=17f453a0c1df43871fdb6de461ee797b78574dacc652372fa2ae98a00785df8b
tty-color (0.6.0) sha256=6f9c37ca3a4e2367fb2e6d09722762647d6f455c111f05b59f35730eeb24332a
tty-cursor (0.7.1) sha256=79534185e6a777888d88628b14b6a1fdf5154a603f285f80b1753e1908e0bf48
tty-prompt (0.23.1) sha256=fcdbce905238993f27eecfdf67597a636bc839d92192f6a0eef22b8166449ec8
tty-reader (0.9.0) sha256=c62972c985c0b1566f0e56743b6a7882f979d3dc32ff491ed490a076f899c2b1
tty-screen (0.8.2) sha256=c090652115beae764336c28802d633f204fb84da93c6a968aa5d8e319e819b50
tty-spinner (0.9.3) sha256=0e036f047b4ffb61f2aa45f5a770ec00b4d04130531558a94bfc5b192b570542
tty-table (0.12.0) sha256=fdc27a4750835c1a16efe19a0b857e3ced3652cc7aceafe6dca94908965b9939
unicode-display_width (2.6.0) sha256=12279874bba6d5e4d2728cef814b19197dbb10d7a7837a869bab65da943b7f5a
unicode_utils (1.4.0) sha256=b922d0cf2313b6b7136ada6645ce7154ffc86418ca07d53b058efe9eb72f2a40
wisper (2.0.1) sha256=ce17bc5c3a166f241a2e6613848b025c8146fce2defba505920c1d1f3f88fae6

BUNDLED WITH
4.0.3
47 changes: 47 additions & 0 deletions bin/rubyripper_tui
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/env ruby
# Rubyripper - A secure ripper for Linux/BSD/OSX
# Copyright (C) 2007 - 2011 Bouke Woudstra (boukewoudstra@gmail.com)
#
# This file is part of Rubyripper. Rubyripper is free software: you can
# redistribute it and/or modify it under the terms of the GNU General
# Public License as published by the Free Software Foundation, either
# version 3 of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>

# Put the local lib directory on top of the ruby default lib search path
# Try to resolve isolated path relative to the script, or fallback to standard locations
script_dir = File.dirname(File.expand_path(__FILE__))
possible_paths = [
File.expand_path('../lib/rubyripperremix/lib', script_dir), # /usr/bin -> /usr/lib/rubyripperremix/lib
File.expand_path('../../lib/rubyripperremix/lib', script_dir), # /usr/local/bin -> /usr/local/lib/rubyripperremix/lib
File.expand_path('../lib', script_dir) # Source fallback
]

possible_paths.each do |path|
if File.directory?(path)
$:.insert(0, path)
break
end
end

# Try to find the rubyripper lib files
begin
require 'rubyripper/base'
require 'rubyripper/tui/tuiApp'
rescue LoadError
puts 'The RubyRipperRemix lib files can\'t be found!'
puts 'Perhaps you need to add the directory to the RUBYLIB variable?'
exit()
end

if __FILE__ == $0
app = TUIApp.new
app.start
end
15 changes: 14 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ end

$GTK3 = false
$CLI = false
$TUI = false
$LANG = []
$LANG_SUPPORT = ["nl", "de", "fr", "hu", "ru", "es", "se", "bg", "it", "da"]

Expand Down Expand Up @@ -79,6 +80,7 @@ if ARGV.include?('--help') || ARGV.include?('-h') || ARGV.length == 0
puts ""
puts "--enable-gtk3 (install the gtk3 frontend)"
puts "--enable-cli (install the cli frontend)"
puts "--enable-tui (install the terminal ui frontend)"
puts "--enable-lang-all (install all locale files)"
puts "--enable-lang=<xx> (install specific locale file, separate with a comma)"
puts ""
Expand Down Expand Up @@ -134,6 +136,8 @@ ARGV.each do |argument|
$GTK3 = true
elsif argument == '--enable-cli'
$CLI = true
elsif argument == '--enable-tui'
$TUI = true
elsif argument == '--enable-lang-all'
$LANG=$LANG_SUPPORT
elsif argument[0,14] == '--enable-lang='
Expand All @@ -145,7 +149,7 @@ ARGV.each do |argument|
end
end

unless ($GTK3 || $CLI)
unless ($GTK3 || $CLI || $TUI)
puts "You have to choose at least one frontend you want to install!"
puts ""
exit()
Expand Down Expand Up @@ -179,6 +183,10 @@ if $CLI
makefile.puts "\t#{$INSTALL} -m 755 -D bin/rubyripper_cli $(prefix)$(DESTDIR)$(BINDIR)/rrr"
end

if $TUI
makefile.puts "\t#{$INSTALL} -m 755 -D bin/rubyripper_tui $(prefix)$(DESTDIR)$(BINDIR)/rrr_tui"
end

$LANG.each do |lang|
makefile.puts "\t#{$INSTALL} -m 644 locale/#{lang}/LC_MESSAGES/rubyripper.mo $(prefix)$(DESTDIR)#{$PREFIX}#{$LOCALE}/#{lang}/LC_MESSAGES/rubyripper.mo"
end
Expand All @@ -198,6 +206,10 @@ if $CLI
makefile.puts "\trm -f $(prefix)$(DESTDIR)$(BINDIR)/rrr"
end

if $TUI
makefile.puts "\trm -f $(prefix)$(DESTDIR)$(BINDIR)/rrr_tui"
end

$LANG.each do |lang|
makefile.puts "\trm -f $(prefix)$(DESTDIR)$(LOCALE)/#{lang}/LC_MESSAGES/rubyripper.mo"
end
Expand Down Expand Up @@ -226,6 +238,7 @@ puts ""

if $GTK3 == true; puts "Gtk3 frontend will be installed" end
if $CLI == true; puts "Cli frontend will be installed" end
if $TUI == true; puts "TUI frontend will be installed" end
unless $LANG.empty?; puts "Languages to be installed: #{$LANG.join(', ')}" end

puts ""
Expand Down
3 changes: 3 additions & 0 deletions lib/rubyripper/preferences/data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ def setActiveCodecs
# Debug modus
attr_accessor :debug

# User interface type: 'tui' || 'cli'
attr_accessor :uiType

# TEST DATA
attr_accessor :testdisc
end
Expand Down
1 change: 1 addition & 0 deletions lib/rubyripper/preferences/setDefaults.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def setOtherDefaults
@data.browser = @deps.browser
@data.verbose = false
@data.debug = false
@data.uiType = 'tui'
end
end
end
Loading