ivebeen 0.1.0 → 0.2.0

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 (3) hide show
  1. data/bin/ivebeen +0 -4
  2. data/lib/exif2geojson.rb +3 -2
  3. metadata +1 -1
data/bin/ivebeen CHANGED
@@ -5,11 +5,7 @@ require "exif2geojson"
5
5
 
6
6
  class IveBeenApp < Thor
7
7
  desc "generate", "Extract EXIF from photo and generate geojson file"
8
- # method_option :path, :aliases => "-p", :desc => "path of where you're storing your photos", :required => true
9
- # method_option :result, :aliases => "-f", :desc => "the result geojson file, default value is places.geojson", :default => "places.geojson"
10
8
  def generate(path, file="places.geojson")
11
- # path = options[:path]
12
- # file = options[:result] || "places.geojson"
13
9
  info = extract_image_info(path)
14
10
  File.open(file, "w") do |f|
15
11
  f.write(info)
data/lib/exif2geojson.rb CHANGED
@@ -31,7 +31,8 @@ def format_attachment_gps(file)
31
31
  { :type => "Feature",
32
32
  :geometry => geometry,
33
33
  :properties => {
34
- :altitude => altitude
34
+ :altitude => altitude,
35
+ :datetime => exif.date_time
35
36
  }
36
37
  }
37
38
  end
@@ -40,7 +41,7 @@ def extract_image_info(path)
40
41
  image_types = "*.jpg"
41
42
 
42
43
  info = []
43
- Dir.glob("#{path}/#{image_types}") do |jpg|
44
+ Dir.glob("#{File.expand_path(path)}/#{image_types}", File::FNM_CASEFOLD) do |jpg|
44
45
  begin
45
46
  info << format_attachment_gps(jpg)
46
47
  print "."
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ivebeen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: