Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Typos fixed

  • Loading branch information...
commit 71cd1a21430fba823db96ffcfa8f84af9c2f802e 1 parent 5597f32
Jan Friedrich authored
Showing with 21 additions and 21 deletions.
  1. +1 −1  README
  2. +2 −2 Tutorial
  3. +17 −17 lib/mini_exiftool.rb
  4. +1 −1  mini_exiftool.spec
View
2  README
@@ -1,7 +1,7 @@
= MiniExiftool
This library is wrapper for the Exiftool command-line application
-(http://www.sno.phy.queensu.ca/~phil/exiftool/) written by Phil Harvay.
+(http://www.sno.phy.queensu.ca/~phil/exiftool/) written by Phil Harvey.
Read and write access is done in a clean OO manner.
== Requirements
View
4 Tutorial
@@ -3,7 +3,7 @@
== Installation
-* Installing the Exiftool command-line application from Phil Harvay
+* Installing the Exiftool command-line application from Phil Harvey
(see http://www.sno.phy.queensu.ca/~phil/exiftool/install.html)
* Installing the Ruby library (<code>gem install mini_exiftool</code>)
@@ -57,7 +57,7 @@ combining with calling <code>reload</code>.
Let's make an example:
# standard: numerical is false
photo = MiniExiftool.new 'photo.jpg'
- photo.exposure_time # => '1/16' (String)
+ photo.exposure_time # => '1/60' (String)
# now with numerical is true
photo.numerical = true
photo.reload
View
34 lib/mini_exiftool.rb
@@ -3,7 +3,7 @@
#
# This library is wrapper for the Exiftool command-line
# application (http://www.sno.phy.queensu.ca/~phil/exiftool/)
-# written by Phil Harvay.
+# written by Phil Harvey.
# Read and write access is done in a clean OO manner.
#
# Author: Jan Friedrich
@@ -25,7 +25,7 @@ class MiniExiftool
attr_reader :filename
attr_accessor :numerical, :composite, :errors
- VERSION = '0.3.0'
+ VERSION = '0.3.1'
# opts support at the moment
# * <code>:numerical</code> for numerical values, default is +false+
@@ -43,7 +43,7 @@ def initialize filename, opts={}
load filename
end
- # Load the tags of filename
+ # Load the tags of filename.
def load filename
if filename.nil? || !File.exists?(filename)
raise MiniExiftool::Error.new("File '#{filename}' does not exist.")
@@ -66,23 +66,23 @@ def load filename
self
end
- # Reload the tags of an already readed file
+ # Reload the tags of an already readed file.
def reload
load @filename
end
- # Returns the value of a tag
+ # Returns the value of a tag.
def [] tag
@changed_values[tag] || @values[tag]
end
- # Set the value of a tag
+ # Set the value of a tag.
def []=(tag, val)
@changed_values[tag] = val
end
- # Return true if any tag value is changed or if the value of a
- # given tag is changed
+ # Returns true if any tag value is changed or if the value of a
+ # given tag is changed.
def changed? tag=false
if tag
@changed_values.include? tag
@@ -91,7 +91,7 @@ def changed? tag=false
end
end
- # Revert all changes or the change of a given tag
+ # Revert all changes or the change of a given tag.
def revert tag=nil
if tag
val = @changed_values.delete(tag)
@@ -103,17 +103,17 @@ def revert tag=nil
res
end
- # Returns an array of the tags (original tag names) of the readed file
+ # Returns an array of the tags (original tag names) of the readed file.
def tags
@values.keys.map { |key| @tag_names[key] }
end
- # Returns an array of all changed tags
+ # Returns an array of all changed tags.
def changed_tags
@changed_values.keys.map { |key| @tag_names[key] }
end
- # Save the changes to the file
+ # Save the changes to the file.
def save
return false if @changed_values.empty?
@errors.clear
@@ -140,19 +140,19 @@ def save
all_ok
end
- # Returns the command name of the called Exiftool application
+ # Returns the command name of the called Exiftool application.
def self.command
@@cmd
end
- # Setting the command name of the called Exiftool application
+ # Setting the command name of the called Exiftool application.
def self.command= cmd
@@cmd = cmd
end
@@writable_tags = Set.new
- # Returns a set of all possible writable tags of Exiftool
+ # Returns a set of all possible writable tags of Exiftool.
def self.writable_tags
if @@writable_tags.empty?
lines = `#{@@cmd} -listw`
@@ -165,7 +165,7 @@ def self.writable_tags
@@writable_tags
end
- # Returns the version of the Exiftool command-line application
+ # Returns the version of the Exiftool command-line application.
def self.exiftool_version
output = `#{MiniExiftool.command} -ver 2>&1`
unless $?.exitstatus == 0
@@ -249,7 +249,7 @@ def temp_filename
# Hash with indifferent access:
# DateTimeOriginal == datetimeoriginal == date_time_original
- class TagHash < Hash
+ class TagHash < Hash # :nodoc:
def[] k
super(unify(k))
end
View
2  mini_exiftool.spec
@@ -8,7 +8,7 @@ spec = Gem::Specification.new do |spec|
spec.version = MiniExiftool::Version
spec.summary = 'A library for nice OO access to the Exiftool command-line application written by Phil Harvey.'
spec.description = <<END
-This library is wrapper for the Exiftool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool/) written by Phil Harvay.
+This library is wrapper for the Exiftool command-line application (http://www.sno.phy.queensu.ca/~phil/exiftool/) written by Phil Harvey.
Read and write access is done in a clean OO manner.
END
spec.author = 'Jan Friedrich'
Please sign in to comment.
Something went wrong with that request. Please try again.