diff --git a/Brewfile b/Brewfile new file mode 100644 index 00000000..18fede61 --- /dev/null +++ b/Brewfile @@ -0,0 +1 @@ +brew "exiftool" diff --git a/Brewfile.lock.json b/Brewfile.lock.json new file mode 100644 index 00000000..c4dcb624 --- /dev/null +++ b/Brewfile.lock.json @@ -0,0 +1,62 @@ +{ + "entries": { + "brew": { + "exiftool": { + "version": "12.76", + "bottle": { + "rebuild": 0, + "root_url": "https://ghcr.io/v2/homebrew/core", + "files": { + "arm64_sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/exiftool/blobs/sha256:eaefac7e07b3e99c42d2aa0a99c8e78355c6d6a874245445de60d45c846febd7", + "sha256": "eaefac7e07b3e99c42d2aa0a99c8e78355c6d6a874245445de60d45c846febd7" + }, + "arm64_ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/exiftool/blobs/sha256:c98ed3b14a4d1c66cdb7c19b21fab826ce4c53df12e7a02a51f093f342e7c3b3", + "sha256": "c98ed3b14a4d1c66cdb7c19b21fab826ce4c53df12e7a02a51f093f342e7c3b3" + }, + "arm64_monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/exiftool/blobs/sha256:c98ed3b14a4d1c66cdb7c19b21fab826ce4c53df12e7a02a51f093f342e7c3b3", + "sha256": "c98ed3b14a4d1c66cdb7c19b21fab826ce4c53df12e7a02a51f093f342e7c3b3" + }, + "sonoma": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/exiftool/blobs/sha256:d7518674545b5024eb61598e5597c0a42a3eec16bebe249c5ac00de773a45169", + "sha256": "d7518674545b5024eb61598e5597c0a42a3eec16bebe249c5ac00de773a45169" + }, + "ventura": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/exiftool/blobs/sha256:3a9703e2864c0e897286d4bb8d77d63612ca50fcec2c61e809c19838acb60474", + "sha256": "3a9703e2864c0e897286d4bb8d77d63612ca50fcec2c61e809c19838acb60474" + }, + "monterey": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/exiftool/blobs/sha256:3a9703e2864c0e897286d4bb8d77d63612ca50fcec2c61e809c19838acb60474", + "sha256": "3a9703e2864c0e897286d4bb8d77d63612ca50fcec2c61e809c19838acb60474" + }, + "x86_64_linux": { + "cellar": ":any_skip_relocation", + "url": "https://ghcr.io/v2/homebrew/core/exiftool/blobs/sha256:01ef54fe0dfd9c6b794a61a269cd1599b58a79851f74c4369fbb33f1737f813c", + "sha256": "01ef54fe0dfd9c6b794a61a269cd1599b58a79851f74c4369fbb33f1737f813c" + } + } + } + } + } + }, + "system": { + "macos": { + "sonoma": { + "HOMEBREW_VERSION": "4.2.21", + "HOMEBREW_PREFIX": "/opt/homebrew", + "Homebrew/homebrew-core": "api", + "CLT": "15.3.0.0.1.1708646388", + "Xcode": "15.3", + "macOS": "14.4.1" + } + } + } +} diff --git a/Gemfile b/Gemfile index 8c646e8f..1473b336 100644 --- a/Gemfile +++ b/Gemfile @@ -2,4 +2,5 @@ source "https://rubygems.org" gem "erb" gem "exiftool" +gem "i18n" gem "pry" diff --git a/Gemfile.lock b/Gemfile.lock index deed72d7..0bff2d2b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -3,10 +3,13 @@ GEM specs: cgi (0.4.1) coderay (1.1.3) + concurrent-ruby (1.2.3) erb (4.0.4) cgi (>= 0.3.3) exiftool (1.2.5) json + i18n (1.14.5) + concurrent-ruby (~> 1.0) json (2.7.2) method_source (1.1.0) pry (0.14.2) @@ -20,6 +23,7 @@ PLATFORMS DEPENDENCIES erb exiftool + i18n pry BUNDLED WITH diff --git a/bin/create_photo b/bin/create_photo index 49b69dc8..ba5f306d 100755 --- a/bin/create_photo +++ b/bin/create_photo @@ -19,7 +19,7 @@ date = Date.today.iso8601 template = ERB.new(File.read("archetypes/photos/index.md.erb")) -post_dir = "content/photos/#{date}-#{parameterize(photo[:title])}" +post_dir = "content/photos/#{date}-#{parameterize(photo[:title] || photo[:file_name])}" if !Dir.exist?(post_dir) Dir.mkdir(post_dir)