lncs 0.0.3 → 0.0.4
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +64 -30
- data/lib/lncs/cli.rb +2 -1
- data/lib/lncs/paper.rb +37 -1
- data/lib/lncs/proceedings.rb +7 -0
- data/lib/lncs/section.rb +4 -0
- data/lib/lncs/version.rb +1 -1
- data/templates/manifest.json +1 -16
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3de00673d581c89be60c43b8ff473d954a03935
|
4
|
+
data.tar.gz: eb50c91da8b17f4ad38c2dd009f16fa2196d3071
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa15a05e0d61eea59b172140a96c70d8af319af01d0718d1d06bc0f5c3173de414e7568d6f536b1398556c8d92a8538ddd5ccf82f2ec1d566149ce4b66fcf4f9
|
7
|
+
data.tar.gz: 5dd0289c441d75899fb187a07bf26f63bc3cc1c9f2e1976bc8008c32d10e80b1ad159664114115a078e2b44d110d21a676327bbc7a2786236a4424b0df946252
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -10,20 +10,22 @@ You'll need to install Ruby 1.9 or later. I recommend doing so via [rvm](https:/
|
|
10
10
|
|
11
11
|
You can then install `lncs` via Ruby gems: `gem install lncs`
|
12
12
|
|
13
|
-
Get started with the `lncs` executable: `lncs help`
|
14
|
-
|
15
13
|
Recommended workflow
|
16
14
|
--------------------
|
15
|
+
Creating a Springer LNCS proceedings with `lncs` involves two activities: ensuring that `lncs` has sufficient information about your proceedings and submissions (steps 1-5, below), and using `lncs` to generate all of the artefacts that Springer require for an LNCS proceedings (steps 7-11).
|
17
16
|
|
18
|
-
1. Download the submissions for your
|
17
|
+
1. Download the submissions for your proceedings (e.g., from EasyChair). Please note that:
|
18
|
+
* `lncs` works best for submissions that are packaged as a single ZIP file that contains both the LaTeX source and a compiled PDF.
|
19
|
+
* `lncs` can also be used for submissions that do not include LaTeX source files, or that are packaged as a single PDF file. For submissions that do not include LaTeX source files, you will need to specify some extra information in the manifest (more details below).
|
20
|
+
* `lncs` does not work with submissions packages as MS Word files.
|
19
21
|
|
20
|
-
2.
|
22
|
+
2. Create a new working directory:
|
21
23
|
|
22
24
|
> mkdir ecmfa2013
|
23
25
|
> cd ecmfa2013
|
24
26
|
> lncs init
|
25
27
|
|
26
|
-
3.
|
28
|
+
3. Setup the manifest (e.g., set the path to the submissions, the volume number, ...)
|
27
29
|
|
28
30
|
> vi manifest.json
|
29
31
|
> cat manifest.json
|
@@ -42,24 +44,43 @@ Recommended workflow
|
|
42
44
|
]
|
43
45
|
}
|
44
46
|
|
45
|
-
4.
|
47
|
+
4. Use `lncs inspect` to decompress any submissions packaged as ZIP files, and to locate compiled PDF files:
|
46
48
|
|
47
49
|
> lncs inspect
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
50
|
+
Inspecting paper 7 at submissions/ecmfa2013_submission_07/*
|
51
|
+
Inspecting paper 11 submissions/ecmfa2013_submission_11/*
|
52
|
+
...
|
53
|
+
Updating manifest.json
|
54
|
+
|
55
|
+
> cat manifest.json
|
56
|
+
{
|
57
|
+
"volume_number": 7949,
|
58
|
+
"sources": "/Users/louis/Downloads/submissions",
|
59
|
+
"sections": [
|
60
|
+
{
|
61
|
+
"title": "Foundations",
|
62
|
+
"papers": [7,11,14,18,20,24,35,46,63]
|
63
|
+
},
|
64
|
+
{
|
65
|
+
"title": "Applications",
|
66
|
+
"papers": [2,6,22,29,58,68]
|
67
|
+
}
|
68
|
+
],
|
69
|
+
"papers": {
|
70
|
+
"7" : {
|
71
|
+
"pdf": "7/paper.pdf"
|
72
|
+
},
|
73
|
+
"24" : {
|
74
|
+
"pdf": ["ECMFA2013-cameraready.pdf", "figure1.pdf"]
|
75
|
+
"FIXME": "Reduce the PDF key from an array to a single value which corresponds to the compiled PDF."
|
76
|
+
}
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
5. Your manifest will now contain a `papers` key for each submission that is distributed as a ZIP file. Search for any "FIXME" keys that have been inserted by `lncs inspect` and correct any erroneous `pdf` key values. (Each submission should have a single value for the `pdf` key).
|
81
|
+
|
62
82
|
> vi manifest.json
|
83
|
+
# Deleted the line: "pdf": "figure1.pdf"
|
63
84
|
> cat manifest.json
|
64
85
|
{
|
65
86
|
"volume_number": 7949,
|
@@ -79,12 +100,14 @@ Recommended workflow
|
|
79
100
|
"pdf": "7/paper.pdf"
|
80
101
|
},
|
81
102
|
"24" : {
|
82
|
-
"pdf": "ECMFA2013-cameraready.pdf"
|
103
|
+
"pdf": "ECMFA2013-cameraready.pdf",
|
83
104
|
}
|
84
105
|
}
|
85
106
|
}
|
107
|
+
|
108
|
+
Note that the `pdf` key should contain the relative path to the PDF file in any submission packaged as a ZIP file.
|
86
109
|
|
87
|
-
6.
|
110
|
+
6. Once your manifest has been finalised. All of the other `lncs` subcommand will work. Start by checking the status of the submissions:
|
88
111
|
|
89
112
|
> lncs report
|
90
113
|
Foundations
|
@@ -105,9 +128,9 @@ Recommended workflow
|
|
105
128
|
058 -- 13pgs zip
|
106
129
|
068 -- 11pgs zip
|
107
130
|
|
108
|
-
If a submission exceeds your page limit, you may wish to contact the authors. If a submission is a PDF rather than a ZIP file, you may wish to do the same as you will need to send to Springer the sources and a signed copyright form
|
131
|
+
If a submission exceeds your page limit, you may wish to contact the authors. If a submission is a PDF rather than a ZIP file, you may wish to do the same as you will need to send to Springer the LaTeX sources (and a signed copyright form).
|
109
132
|
|
110
|
-
7. Generate the set of directories required by Springer for the body of the proceedings
|
133
|
+
7. Generate the set of directories required by Springer for the body of the proceedings:
|
111
134
|
|
112
135
|
> lncs body
|
113
136
|
> ls body
|
@@ -120,21 +143,26 @@ Recommended workflow
|
|
120
143
|
body/79490001/7:
|
121
144
|
paper7.tex paper7.pdf copyright.pdf
|
122
145
|
|
123
|
-
8. Generate the title pages used to construct the table of contents and author index
|
146
|
+
8. Generate the title pages used to construct the table of contents and author index:
|
124
147
|
|
125
148
|
> lncs titles
|
126
149
|
> ls titles
|
127
150
|
0001.tex 0020.tex 0054.tex 0086.tex 0119.tex 0152.tex 0178.tex 0204.tex index.tex
|
128
151
|
0003.tex 0037.tex 0070.tex 0102.tex 0135.tex 0165.tex 0191.tex 0217.tex
|
129
152
|
|
130
|
-
9. Run LaTeX to produce your PDF
|
153
|
+
9. Run LaTeX to produce your PDF:
|
131
154
|
|
132
|
-
> latex2pdf main.tex
|
155
|
+
> latex2pdf main.tex > main.pdf
|
133
156
|
> open main.pdf
|
134
157
|
|
135
|
-
10.
|
158
|
+
10. Inspect your PDF to ensure that all of the titles and names of authors are correct in the table of contents. Note that:
|
159
|
+
|
160
|
+
* `lncs titles` works best for submissions that include LaTeX source files.
|
161
|
+
* `lncs titles` extracts the contents of the \title and \author LaTeX tags verbatim. If an author has used non-standard or custom LaTeX commands in their \title and \author declarations, you may need to manually specify the title and authors of this submission in the `lncs` manifest (as described below).
|
162
|
+
* `lncs titles` cannot extract title page information from MS Word or PDF files. You must manually specify the title and authors of submissions containing no LaTeX source in the `lncs` manifest (as described below).
|
163
|
+
|
164
|
+
You can override any titles or names of authors in the manifest file. For example:
|
136
165
|
|
137
|
-
> vi manifest.json
|
138
166
|
> cat manifest.json
|
139
167
|
{
|
140
168
|
"volume_number": 7949,
|
@@ -155,16 +183,22 @@ Recommended workflow
|
|
155
183
|
"title": "MOCQL: A Declarative Language for Ad-Hoc Model Querying",
|
156
184
|
"authors": ["Harald St\\\"orrle"]
|
157
185
|
},
|
186
|
+
"20" : {
|
187
|
+
"title" : "Model-based Generation of Run-time Monitors for AUTOSAR",
|
188
|
+
"authors" : ["Lars Patzina", "Sven Patzina", "Thorsten Piper", "Paul Manns"]
|
189
|
+
},
|
158
190
|
"24" : {
|
159
191
|
"pdf": "ECMFA2013-cameraready.pdf"
|
160
192
|
}
|
161
193
|
}
|
162
194
|
}
|
195
|
+
|
196
|
+
If a title or author must contain a LaTeX command, ensure that your JSON is properly escaped. For example, the LaTeX command `\"` becomes `\\\"` in the manifest as backslashes and quotes are escaped in JSON.
|
163
197
|
|
164
198
|
11. Regenerate your titles and PDF.
|
165
199
|
|
166
200
|
> lncs titles
|
167
|
-
> latex2pdf main.tex
|
201
|
+
> latex2pdf main.tex > main.pdf
|
168
202
|
> open main.pdf
|
169
203
|
|
170
204
|
|
data/lib/lncs/cli.rb
CHANGED
@@ -17,10 +17,11 @@ module LNCS
|
|
17
17
|
create_file 'titles/index.tex'
|
18
18
|
end
|
19
19
|
|
20
|
-
desc "inspect", "
|
20
|
+
desc "inspect", "Inspect the submissions and prepare manifest for the lncs report, body and titles subcommands."
|
21
21
|
def inspect
|
22
22
|
remake_directory("submissions")
|
23
23
|
proceedings.copy_to("submissions")
|
24
|
+
proceedings.add_papers_to_manifest
|
24
25
|
end
|
25
26
|
|
26
27
|
desc "body", "Generate the set of directories containing the body of the report, in the format required by Springer LNCS"
|
data/lib/lncs/paper.rb
CHANGED
@@ -32,7 +32,6 @@ module LNCS
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def generate_title_to(dst, start_page)
|
35
|
-
raise "Error: Cannot generate title from PDF for paper ##{id}" if type == "pdf"
|
36
35
|
check_pdf_exists
|
37
36
|
|
38
37
|
captured = title_page_from_manifest_or_latex
|
@@ -61,6 +60,29 @@ module LNCS
|
|
61
60
|
actions.copy_file(path, File.join(dst, name))
|
62
61
|
end
|
63
62
|
end
|
63
|
+
|
64
|
+
def data_for_manifest(existing_data)
|
65
|
+
if existing_data.key?(id)
|
66
|
+
{ id => existing_data[id] }
|
67
|
+
|
68
|
+
elsif type == "zip"
|
69
|
+
data = { pdf: paths_to_pdfs }
|
70
|
+
|
71
|
+
case data[:pdf].size
|
72
|
+
when 1
|
73
|
+
data[:pdf] = data[:pdf].first
|
74
|
+
when 0
|
75
|
+
data[:FIXME] = "Change the PDF key to the path (relative, within the ZIP) of the compiled PDF."
|
76
|
+
else
|
77
|
+
data[:FIXME] = "Reduce the PDF key from an array to a single value which corresponds to the compiled PDF."
|
78
|
+
end
|
79
|
+
|
80
|
+
{ id => data }
|
81
|
+
|
82
|
+
else
|
83
|
+
{}
|
84
|
+
end
|
85
|
+
end
|
64
86
|
|
65
87
|
def page_count
|
66
88
|
check_pdf_exists
|
@@ -78,6 +100,19 @@ module LNCS
|
|
78
100
|
end
|
79
101
|
end
|
80
102
|
|
103
|
+
# Locate all PDF files within the ZIP
|
104
|
+
def paths_to_pdfs
|
105
|
+
paths = []
|
106
|
+
|
107
|
+
Zip::ZipFile.open(path) do |zipfile|
|
108
|
+
zipfile.select { |file| zipfile.get_entry(file).file? }.each do |file|
|
109
|
+
paths << file.name if file.name.end_with? ".pdf"
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
paths
|
114
|
+
end
|
115
|
+
|
81
116
|
def open_pdf
|
82
117
|
if type == "zip"
|
83
118
|
extracted_pdf = File.join(Dir.tmpdir, pdf)
|
@@ -129,6 +164,7 @@ module LNCS
|
|
129
164
|
\\author{#{authors_from_manifest_or_latex.join(" \\and ")}}\n
|
130
165
|
"""
|
131
166
|
else
|
167
|
+
raise "Error: lncs cannot extract title and authors from a PDF file. Please specify the title and authors in the manifest for paper ##{id})" if type == "pdf"
|
132
168
|
captured = ""
|
133
169
|
each_tex do |tex|
|
134
170
|
capturing = false
|
data/lib/lncs/proceedings.rb
CHANGED
@@ -46,6 +46,13 @@ module LNCS
|
|
46
46
|
def copy_to(dst)
|
47
47
|
sections.each { |section| section.copy_to(dst) }
|
48
48
|
end
|
49
|
+
|
50
|
+
def add_papers_to_manifest
|
51
|
+
new_papers = sections.reduce({}) { |data, section| data.merge(section.paper_data_for_manifest(papers)) }
|
52
|
+
new_manifest = manifest.dup
|
53
|
+
new_manifest["papers"] = new_papers
|
54
|
+
actions.create_file("manifest.json", JSON.pretty_generate(new_manifest))
|
55
|
+
end
|
49
56
|
|
50
57
|
def generate_body_to(dst)
|
51
58
|
start_page = 1
|
data/lib/lncs/section.rb
CHANGED
@@ -21,6 +21,10 @@ module LNCS
|
|
21
21
|
def copy_to(dst)
|
22
22
|
papers.each { |paper| paper.copy_to("#{dst}/#{paper.id}") }
|
23
23
|
end
|
24
|
+
|
25
|
+
def paper_data_for_manifest(existing_data)
|
26
|
+
papers.reduce({}) { |data, paper| data.merge(paper.data_for_manifest(existing_data)) }
|
27
|
+
end
|
24
28
|
|
25
29
|
def generate_body_to(dst, volume_number, start_page)
|
26
30
|
papers.each do |paper|
|
data/lib/lncs/version.rb
CHANGED
data/templates/manifest.json
CHANGED
@@ -17,20 +17,5 @@
|
|
17
17
|
"title": "Applications",
|
18
18
|
"papers": [2,6,22,29,58,68]
|
19
19
|
}
|
20
|
-
]
|
21
|
-
|
22
|
-
// Include the papers key to indicate the location of the PDF file for each submission
|
23
|
-
"papers": {
|
24
|
-
"7" : {
|
25
|
-
"pdf": "7/paper7.pdf",
|
26
|
-
// You can optionally override the title and list of authors for any paper too
|
27
|
-
"title": "MOCQL: A Declarative Language for Ad-Hoc Model Querying",
|
28
|
-
// You can use LaTeX in the names of authors (and titles), but be sure to escape
|
29
|
-
// any backslashes (for the JSON parser)
|
30
|
-
"authors": ["Harald St\\\"orrle"]
|
31
|
-
},
|
32
|
-
"24" : {
|
33
|
-
"pdf": "ECMFA2013-cameraready.pdf"
|
34
|
-
}
|
35
|
-
}
|
20
|
+
]
|
36
21
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lncs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Louis M. Rose
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|