Skip to content

Commit

Permalink
Documentation updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Friedrich committed Jan 31, 2008
1 parent 1df0b94 commit abdc871
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
4 changes: 3 additions & 1 deletion TODO
@@ -1 +1,3 @@
Tests for managing tags with pstore
* Tests for managing tags with pstore
* Update Tutorial
* Describing the options :composite and :timestamps
8 changes: 5 additions & 3 deletions Tutorial
Expand Up @@ -54,7 +54,7 @@ the <code>:numerical</code> option to +true+ while generating a new
instance with new or using the <code>numerical=</code>-method
combining with calling <code>reload</code>.

Let's make an example:
Let's look at an example:
# standard: numerical is false
photo = MiniExiftool.new 'photo.jpg'
photo.exposure_time # => '1/60' (String)
Expand All @@ -66,13 +66,14 @@ This behaviour can be useful if you want to do calculations on the
value, if you only want to show the value the standard behaviour is
maybe better.


=== Further Example

For understanding reading access to meta data also have a look at the
example file <code>print_portraits.rb</code> in the +examples+
directory.

<b>TODO:</b> Describing the options <code>:composite</code> and
<code>:timestamps</code>!

== Lesson 2: Writing Meta Data

Expand Down Expand Up @@ -104,7 +105,8 @@ value of a specific tag is changed or a changing in general is
done. In the same way the +revert+-method reverts the value of a
specific tag or in general all changes.

You should also look at the rdoc information of MiniExiftool.

=== Further Example

See <code>shift_time.rb</code> in the +examples+ directory.
See <code>shift_time.rb</code> in the +examples+ directory.
8 changes: 6 additions & 2 deletions lib/mini_exiftool.rb
Expand Up @@ -29,12 +29,16 @@ class MiniExiftool

VERSION = '0.4.1'

# opts support at the moment
# +opts+ support at the moment
# * <code>:numerical</code> for numerical values, default is +false+
# * <code>:composite</code> for including composite tags while loading,
# default is +false+
# * <code>:timestamps</code> generating DateTime objects instead of
# Time objects if set to <code>DateTime</code>, standard is +Time+
# Time objects if set to <code>DateTime</code>, default is +Time+
#
# <b>ATTENTION:</b> Time objects are created using <code>Time.local</code>
# therefore they use <em>your local timezone</em>, DateTime objects instead
# are created <em>without timezone</em>!
def initialize filename, opts={}
std_opts = {:numerical => false, :composite => false, :timestamps => Time}
opts = std_opts.update opts
Expand Down

0 comments on commit abdc871

Please sign in to comment.