lncs 0.0.2 → 0.0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c4de73f4103f8ecb1206cae128af24cae2d29d6
4
- data.tar.gz: 3b433305a12f26689a13f7a5937f2fa10cf9ac5f
3
+ metadata.gz: 63fbbffcc26dbaacb60e48a62ab1a77eac72866f
4
+ data.tar.gz: ef1cb06fccdbbca36ce241eaeb801bd1f2feb5f1
5
5
  SHA512:
6
- metadata.gz: 9a6922019c0ec565ff2ac636023e007c1406e47800b6d5311e4f7b87f1fc08d62b8f88d05cf45b9104b7e364076e9afa7d3620675df5d34962ab2703d1ab3f0a
7
- data.tar.gz: 42fe71851969af9e916bf6b9e6980fc6f23069a30bbd9faadc03b95f533beb03d59db38cd4069c97c626683ab348747edd02b702efa018686cf7d766bbc687cc
6
+ metadata.gz: a1c1e4870fd5f088bfee642d8bd84470b23b3b2de741f36460ede4508eadc2bdec7f6b72a5b63509ed79e8be03e8e8772c2ec26e9241e6b420b21f44e0b85ebd
7
+ data.tar.gz: f23fc26134fc393200ed20b2ce3bffa4b3b1a5a18bf5a2ea9d997cdd87c9ac5fc73ec7f4031d9cb4f03ac7bf28f4ca8666564d732a4e830c992f1dea9c409361
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lncs (0.0.2)
4
+ lncs (0.0.3)
5
5
  json (~> 1.7)
6
6
  pdf-reader (~> 1.3)
7
7
  thor (~> 0.18)
data/README.md CHANGED
@@ -66,12 +66,12 @@ Recommended workflow
66
66
  "sources": "/Users/louis/Downloads/submissions",
67
67
  "sections": [
68
68
  {
69
- title: "Foundations",
70
- papers: [7,11,14,18,20,24,35,46,63]
69
+ "title": "Foundations",
70
+ "papers": [7,11,14,18,20,24,35,46,63]
71
71
  },
72
72
  {
73
- title: "Applications",
74
- papers: [2,6,22,29,58,68]
73
+ "title": "Applications",
74
+ "papers": [2,6,22,29,58,68]
75
75
  }
76
76
  ],
77
77
  "papers": {
@@ -141,22 +141,22 @@ Recommended workflow
141
141
  "sources": "/Users/louis/Downloads/submissions",
142
142
  "sections": [
143
143
  {
144
- title: "Foundations",
145
- papers: [7,11,14,18,20,24,35,46,63]
144
+ "title": "Foundations",
145
+ "papers": [7,11,14,18,20,24,35,46,63]
146
146
  },
147
147
  {
148
- title: "Applications",
149
- papers: [2,6,22,29,58,68]
148
+ "title": "Applications",
149
+ "papers": [2,6,22,29,58,68]
150
150
  }
151
151
  ],
152
152
  papers: {
153
153
  "7" : {
154
- pdf: "7/paper.pdf",
155
- title: "MOCQL: A Declarative Language for Ad-Hoc Model Querying",
156
- authors: ["Harald St\\\"orrle"]
154
+ "pdf": "7/paper.pdf",
155
+ "title": "MOCQL: A Declarative Language for Ad-Hoc Model Querying",
156
+ "authors": ["Harald St\\\"orrle"]
157
157
  },
158
158
  "24" : {
159
- pdf: "ECMFA2013-cameraready.pdf"
159
+ "pdf": "ECMFA2013-cameraready.pdf"
160
160
  }
161
161
  }
162
162
  }
@@ -174,3 +174,7 @@ I'm afraid that this code is not well tested, factored or documented. It was qui
174
174
 
175
175
  Todo list:
176
176
  * Better error reporting when the titles key is specified but not authors and vice versa
177
+
178
+ Acknowledgements
179
+ ----------------
180
+ My thanks to Abel Gómez and Jordi Cabot for helping to improve LNCS, and for being courageous enough to be the first users of the tool other than myself!
data/lib/lncs/actions.rb CHANGED
@@ -3,5 +3,16 @@ require "thor"
3
3
  module LNCS
4
4
  class Actions < Thor
5
5
  include Thor::Actions
6
+
7
+ def initialize(sources, args = [], options = {}, config = {})
8
+ super(args, options, config)
9
+ @source_paths = [sources]
10
+ end
11
+
12
+ no_commands do
13
+ def source_paths
14
+ @source_paths
15
+ end
16
+ end
6
17
  end
7
18
  end
data/lib/lncs/paper.rb CHANGED
@@ -5,7 +5,7 @@ require 'lncs/actions'
5
5
 
6
6
  module LNCS
7
7
  class Paper
8
- attr_accessor :manifest, :path
8
+ attr_accessor :manifest, :path, :proceedings
9
9
 
10
10
  def pdf
11
11
  manifest["pdf"]
@@ -158,7 +158,7 @@ module LNCS
158
158
  end
159
159
 
160
160
  def actions
161
- Actions.new
161
+ Actions.new(proceedings.source_directory)
162
162
  end
163
163
  end
164
164
  end
@@ -69,7 +69,7 @@ module LNCS
69
69
 
70
70
  private
71
71
  def actions
72
- Actions.new
72
+ Actions.new(source_directory)
73
73
  end
74
74
  end
75
75
  end
data/lib/lncs/section.rb CHANGED
@@ -5,10 +5,11 @@ module LNCS
5
5
  attr_accessor :manifest, :proceedings
6
6
 
7
7
  def papers
8
- manifest["papers"].map do |paper_id|
8
+ manifest["papers"].map do |paper_id|
9
9
  Paper.new.tap do |p|
10
10
  p.manifest = proceedings.paper_manifest_for(paper_id)
11
11
  p.path = proceedings.paper_path_for(paper_id)
12
+ p.proceedings = proceedings
12
13
  end
13
14
  end
14
15
  end
@@ -52,9 +53,10 @@ module LNCS
52
53
  papers.each { |paper| puts "#{"%03d" % paper.id} -- #{paper.page_count}pgs #{paper.type}" }
53
54
  end
54
55
 
55
- private
56
+ private
57
+
56
58
  def actions
57
- Actions.new
59
+ Actions.new(proceedings.source_directory)
58
60
  end
59
61
  end
60
62
  end
data/lib/lncs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module LNCS
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lncs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Louis M. Rose