nerdEd-visage 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (7) hide show
  1. data/.gitignore +1 -0
  2. data/README +12 -0
  3. data/Rakefile +12 -0
  4. data/VERSION.yml +1 -1
  5. data/Visage.gemspec +44 -0
  6. data/visage.rb +59 -0
  7. metadata +13 -10
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ pkg/
data/README ADDED
@@ -0,0 +1,12 @@
1
+ Visage is a simple utility to convert .cdr and .dvdmedia files into .iso files. Visage is dependent on the OS X hdiutil command.
2
+
3
+ USAGE: ./visage.rb [options] [path_to_dir]
4
+
5
+ OPTIONS:
6
+ -s -S -source Specifies the directory in which Visage will look for source files, or the filename of a specific source file.
7
+ If not specified visage will assume the current working directory is its source.
8
+
9
+ -t -T -target Specifies the directory into which Visage will deposit the generates iso(s). If not specifies Visage will use
10
+ the current working directory.
11
+
12
+ -h -H -help Displays help information/examples
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ begin
2
+ require 'jeweler'
3
+ Jeweler::Tasks.new do |gemspec|
4
+ gemspec.name = "visage"
5
+ gemspec.summary = "Utility for converting .cdr and .dvdmedia files to .iso files"
6
+ gemspec.email = "Jonas714@gmail.com"
7
+ gemspec.homepage = "http://github.com/nerdEd/visage"
8
+ gemspec.authors = ["Ed Schmalzle", "Aaron Kuehler"]
9
+ end
10
+ rescue LoadError
11
+ puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
12
+ end
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
- :patch: 2
2
+ :patch: 3
3
3
  :major: 0
4
4
  :minor: 1
data/Visage.gemspec ADDED
@@ -0,0 +1,44 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{visage}
5
+ s.version = "0.1.3"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Ed Schmalzle", "Aaron Kuehler"]
9
+ s.date = %q{2009-06-13}
10
+ s.default_executable = %q{visage}
11
+ s.email = %q{Jonas714@gmail.com}
12
+ s.executables = ["visage"]
13
+ s.extra_rdoc_files = [
14
+ "README"
15
+ ]
16
+ s.files = [
17
+ ".gitignore",
18
+ "README",
19
+ "Rakefile",
20
+ "VERSION.yml",
21
+ "Visage.gemspec",
22
+ "bin/visage",
23
+ "lib/visage.rb",
24
+ "lib/visage/converter.rb",
25
+ "lib/visage/iso.rb",
26
+ "visage.rb"
27
+ ]
28
+ s.has_rdoc = true
29
+ s.homepage = %q{http://github.com/nerdEd/visage}
30
+ s.rdoc_options = ["--charset=UTF-8"]
31
+ s.require_paths = ["lib"]
32
+ s.rubygems_version = %q{1.3.2}
33
+ s.summary = %q{Utility for converting .cdr and .dvdmedia files to .iso files}
34
+
35
+ if s.respond_to? :specification_version then
36
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
37
+ s.specification_version = 3
38
+
39
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
40
+ else
41
+ end
42
+ else
43
+ end
44
+ end
data/visage.rb ADDED
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ require 'optiflag'
4
+
5
+ #####################################################
6
+ # Setup Command Line Options #
7
+ #####################################################
8
+ module VisageOptions extend OptiFlagSet
9
+ optional_flag "source" do
10
+ alternate_forms "s", "S"
11
+ end
12
+ optional_switch_flag "usage" do
13
+ alternate_forms "u", "U"
14
+ end
15
+ and_process!
16
+ end
17
+
18
+ #####################################################
19
+ # Define Visage Helper Class #
20
+ #####################################################
21
+ class Visage
22
+ def Visage.display_help()
23
+ puts "Visage is a simple utility to convert CD/DVD master images created from OS X's disk utility (.cdr) into .iso format.\n\n"
24
+ puts "usage: ./visage.rb | Converts all .cdr images within the current directory to iso format."
25
+ puts "usage: ./visage.rb [-s|-S|-source-dir] [path_to_dir] | Converts all .cdr images within the input source directory to iso format."
26
+ end
27
+ def Visage.cdr_to_iso( file )
28
+ if( file.include? '.cdr' ) then
29
+ file_name = file.chomp '.cdr'
30
+ puts file + "--> " + file_name
31
+ result = `hdiutil makehybrid -udf -udf-volume-name #{file_name} -o #{file_name} #{file}`
32
+ end
33
+ end
34
+ def Visage.convert_all_in_dir( dir=Dir.open( Dir.pwd ) )
35
+ puts "Converting in Directory: #{dir.path}"
36
+ dir.entries.each do |file|
37
+ cdr_to_iso( file )
38
+ end
39
+ end
40
+ end
41
+
42
+ #####################################################
43
+ # Start Main Script Body #
44
+ #####################################################
45
+ if( ARGV.empty? )
46
+ Visage.convert_all_in_dir()
47
+ elsif( ARGV.flags.usage? )
48
+ Visage.display_help()
49
+ elsif( ARGV.flags.source? )
50
+ start_dir = Dir.pwd
51
+ target_dir = Dir.new( ARGV.flags.source )
52
+ Dir.chdir( target_dir.path )
53
+ Visage.convert_all_in_dir( target_dir )
54
+ Dir.chdir( start_dir )
55
+ end
56
+
57
+
58
+
59
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nerdEd-visage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ed Schmalzle
@@ -10,30 +10,33 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-06-12 00:00:00 -07:00
14
- default_executable:
13
+ date: 2009-06-13 00:00:00 -07:00
14
+ default_executable: visage
15
15
  dependencies: []
16
16
 
17
17
  description:
18
18
  email: Jonas714@gmail.com
19
- executables: []
20
-
19
+ executables:
20
+ - visage
21
21
  extensions: []
22
22
 
23
- extra_rdoc_files: []
24
-
23
+ extra_rdoc_files:
24
+ - README
25
25
  files:
26
+ - .gitignore
27
+ - README
28
+ - Rakefile
26
29
  - VERSION.yml
30
+ - Visage.gemspec
27
31
  - bin/visage
28
- - lib/visage
32
+ - lib/visage.rb
29
33
  - lib/visage/converter.rb
30
34
  - lib/visage/iso.rb
31
- - lib/visage.rb
35
+ - visage.rb
32
36
  has_rdoc: true
33
37
  homepage: http://github.com/nerdEd/visage
34
38
  post_install_message:
35
39
  rdoc_options:
36
- - --inline-source
37
40
  - --charset=UTF-8
38
41
  require_paths:
39
42
  - lib