publishr 0.7.2 → 0.7.3

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.
data/.gitignore CHANGED
@@ -3,3 +3,4 @@
3
3
  Gemfile.lock
4
4
  pkg/*
5
5
  *~
6
+ *.swp
data/bin/publishr CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- # PublishR -- Fast publishing for ebooks and paper
3
+ # PublishR -- Fast publishing for ebooks, paper and the web
4
4
  # Copyright (C) 2012 Michael Franzl
5
5
  #
6
6
  # This program is free software: you can redistribute it and/or modify
@@ -26,15 +26,18 @@ if ARGV[0].nil?
26
26
  puts 'PublishR -- Fast publishing for ebooks and paper'
27
27
  puts 'Copyright (C) 2012 Michael Franzl'
28
28
  puts ''
29
+ puts 'This program harnesses the publishing powers of Kramdown and Webgen and adds excellent ebook compilation algorithms to the mix.'
29
30
  puts ''
30
31
  puts "USAGE: publishr [name] [path_to_source_dir] [format] [path_to_converters]"
31
32
  puts ''
32
33
  puts " [name] is an unique string that identifies your project. Rendered files will be named after this."
33
- puts " [path_to_source_dir] directory must minimally contain: [cover.jpg, covertext.txt, frontmatter.txt, toc.txt, metadata.yml]"
34
- puts " [format] must be {kindle, pdf}"
35
- puts " [path_to_converters] directory must contain `kindlegen` and `jpg2ps`. They cannot be shipped with this program due to legal reasons."
34
+ puts " [path_to_source_dir] directory must minimally contain: [cover.jpg, covertext.txt, frontmatter.txt, toc.txt, metadata.yml]. An skeleton directory containing examples is shipped with this library in lib/document_skeleton."
35
+ puts " [format] must be {kindle, pdf, web}"
36
+ puts " [path_to_converters] directory must contain the proprietary binary `kindlegen` (Google for it on Amazon) and the Free Software binary `jpg2ps`. They cannot be shipped with this program due to legal reasons."
36
37
  puts ''
37
- puts 'EXAMPLE: publishr mybook1 my/files/mybook epub path/to/converters'
38
+ puts 'EXAMPLE: publishr kindle my/files/mybook epub path/to/converters'
39
+ puts ''
40
+ puts 'This library is still in it\'s Beta phase. I know that the documentation is not complete and you might run into errors. Please contact office@michaelfranzl.com if you need support.'
38
41
  puts ''
39
42
  puts 'This program is free software: you can redistribute it and/or modify'
40
43
  puts 'it under the terms of the GNU Affero General Public License as'
@@ -50,6 +53,7 @@ project = Publishr::Project.new(ARGV[0], File.join(Dir.pwd,ARGV[1]), File.join(D
50
53
  case ARGV[2]
51
54
  when 'kindle' then project.make_kindle
52
55
  when 'pdf' then project.make_pdf
56
+ when 'web' then project.make_web
53
57
  end
54
58
 
55
59
  #project.make_images_local("abc ![alt](http://www.sott.net/image/image/s1/33868/medium/sott_6percent_sm.jpg) \n ;lkjsdflk \n xxx ![alt](http://billgastro.com/images/header-en.png)")
@@ -50,11 +50,14 @@ module Publishr
50
50
  @line.gsub! /title\((.*?)\)/, '\book{\1}'
51
51
  @line.gsub! /{\\tt (.*?)}/, '\object{\1}'
52
52
 
53
- # covert kramdown css attributes to LaTeX environments
53
+ # set special attributes to quotation like environments
54
54
  @line.gsub! /{quot(.*?)} % class="(.*?)"/, '{quot\1\2}'
55
55
  @line.gsub! /{quote}/, '{quotenormal}'
56
56
  @line.gsub! /{quotation}/, '{quotationnormal}'
57
57
 
58
+ # set placement attributes to figure environment
59
+ @line.gsub! /begin{figure} % class="(.*?)"/,'begin{figure}[\1]'
60
+
58
61
  # transform special kramdown comments to latex commands
59
62
  @line.gsub! /% (\\.*)/, '\1'
60
63
 
@@ -1,3 +1,3 @@
1
1
  module Publishr
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: publishr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-24 00:00:00.000000000Z
12
+ date: 2012-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: webgen
16
- requirement: &14558020 !ruby/object:Gem::Requirement
16
+ requirement: &4824100 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *14558020
24
+ version_requirements: *4824100
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: webgen
27
- requirement: &14557560 !ruby/object:Gem::Requirement
27
+ requirement: &4823060 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *14557560
35
+ version_requirements: *4823060
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: kramdown
38
- requirement: &14544560 !ruby/object:Gem::Requirement
38
+ requirement: &4822000 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *14544560
46
+ version_requirements: *4822000
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: kramdown
49
- requirement: &14544140 !ruby/object:Gem::Requirement
49
+ requirement: &4820280 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *14544140
57
+ version_requirements: *4820280
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: sanitize
60
- requirement: &14543680 !ruby/object:Gem::Requirement
60
+ requirement: &4815180 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *14543680
68
+ version_requirements: *4815180
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sanitize
71
- requirement: &14543220 !ruby/object:Gem::Requirement
71
+ requirement: &4813280 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *14543220
79
+ version_requirements: *4813280
80
80
  description: Fast publishing for ebooks and paper
81
81
  email:
82
82
  - michael@billgastro.com
@@ -136,7 +136,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
136
136
  version: '0'
137
137
  requirements: []
138
138
  rubyforge_project: publishr
139
- rubygems_version: 1.8.10
139
+ rubygems_version: 1.8.15
140
140
  signing_key:
141
141
  specification_version: 3
142
142
  summary: Fast publishing for ebooks and paper