galgen 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/galgen +3 -3
  2. metadata +4 -4
data/bin/galgen CHANGED
@@ -204,7 +204,7 @@ class GalGen
204
204
  gallery_title = g_title
205
205
  end
206
206
  if desc_text =~ /\n\n/
207
- gallery_description = RedCloth.new(desc_text.gsub(/^.*?(\n\n)/,"")).to_html
207
+ gallery_description = RedCloth.new(desc_text.sub(/^.*?(\n\n)/,"")).to_html
208
208
  end
209
209
  end
210
210
  gallery_vars = { :gallery_title => gallery_title, :gallery_url => './', :gallery_description => gallery_description, :root => (gallery_path.length == 0 ? "." : ([".."] * gallery_path.length).join("/")), :gallery_path => gallery_path }
@@ -216,11 +216,11 @@ class GalGen
216
216
  clean_images = images.map {|i| i.gsub(/^\d+_/,"").gsub(/\.\w+$/,"")}
217
217
  images.each do |image_name|
218
218
  full_image_name = [directory, "images", image_name].join("/")
219
- description_file = [directory, "descriptions", image_name + ".textile"].join("/")
220
219
  clean_image_name = image_name.gsub(/^\d+_/,"")
221
220
  base_image_name = clean_image_name.gsub(/\.\w+$/,"")
222
221
  description = ""
223
222
  title = base_image_name
223
+ description_file = [directory, "descriptions", clean_image_name + ".textile"].join("/")
224
224
  if File.readable?(description_file)
225
225
  desc_text = File.read(description_file)
226
226
  i_title = desc_text.scan(/^(.*?)(\n\n|$)/)[0][0]
@@ -228,7 +228,7 @@ class GalGen
228
228
  title = i_title
229
229
  end
230
230
  if desc_text =~ /\n\n/
231
- description = RedCloth.new(desc_text.gsub(/^.*?(\n\n)/,"")).to_html
231
+ description = RedCloth.new(desc_text.sub(/^.*?(\n\n)/,"")).to_html
232
232
  end
233
233
  end
234
234
  image_vars = { :image_title => title, :image_description => description, :image_page_url => base_image_name + ".html", :image_url => (([".."] * gallery_path.length) + ["images", "full"] + gallery_path + [clean_image_name]).join("/"), :image_thumb_url => (([".."] * gallery_path.length) + ["images", "thumb"] + gallery_path + [clean_image_name]).join("/"), :image_minithumb_url => (([".."] * gallery_path.length) + ["images", "minithumb"] + gallery_path + [clean_image_name]).join("/"), :image_name => clean_image_name, :modified => File.mtime(full_image_name), :original_name => image_name}
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: galgen
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Voker57
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-28 00:00:00 +03:00
18
+ date: 2011-04-09 00:00:00 +04:00
19
19
  default_executable: galgen
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency