embulk 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.travis.yml +16 -0
- data/Gemfile +0 -1
- data/README.md +37 -19
- data/Rakefile +5 -37
- data/bin/embulk +1 -1
- data/build.gradle +178 -95
- data/embulk-core/build.gradle +1 -1
- data/embulk-core/src/main/java/org/embulk/command/Runner.java +11 -10
- data/embulk-core/src/main/java/org/embulk/config/ConfigDiff.java +26 -0
- data/embulk-core/src/main/java/org/embulk/config/ConfigInject.java +14 -0
- data/embulk-core/src/main/java/org/embulk/config/DataSourceImpl.java +2 -2
- data/embulk-core/src/main/java/org/embulk/config/DataSourceSerDe.java +4 -3
- data/embulk-core/src/main/java/org/embulk/config/TaskSerDe.java +5 -3
- data/embulk-core/src/main/java/org/embulk/config/TaskValidationException.java +1 -0
- data/embulk-core/src/main/java/org/embulk/exec/ExecutionResult.java +6 -6
- data/embulk-core/src/main/java/org/embulk/exec/GuessExecutor.java +19 -19
- data/embulk-core/src/main/java/org/embulk/exec/LocalExecutor.java +61 -36
- data/embulk-core/src/main/java/org/embulk/plugin/InjectedPluginSource.java +4 -0
- data/embulk-core/src/main/java/org/embulk/plugin/PluginManager.java +16 -1
- data/embulk-core/src/main/java/org/embulk/spi/Column.java +1 -1
- data/embulk-core/src/main/java/org/embulk/spi/{SchemaVisitor.java → ColumnVisitor.java} +1 -1
- data/embulk-core/src/main/java/org/embulk/spi/Exec.java +3 -3
- data/embulk-core/src/main/java/org/embulk/spi/ExecSession.java +2 -2
- data/embulk-core/src/main/java/org/embulk/spi/FileInputPlugin.java +3 -3
- data/embulk-core/src/main/java/org/embulk/spi/FileInputRunner.java +3 -3
- data/embulk-core/src/main/java/org/embulk/spi/FileOutputPlugin.java +3 -3
- data/embulk-core/src/main/java/org/embulk/spi/FileOutputRunner.java +3 -3
- data/embulk-core/src/main/java/org/embulk/spi/FilterPlugin.java +1 -1
- data/embulk-core/src/main/java/org/embulk/spi/GuessPlugin.java +2 -2
- data/embulk-core/src/main/java/org/embulk/spi/InputPlugin.java +3 -3
- data/embulk-core/src/main/java/org/embulk/spi/OutputPlugin.java +3 -3
- data/embulk-core/src/main/java/org/embulk/spi/PluginClassLoader.java +80 -0
- data/embulk-core/src/main/java/org/embulk/spi/Schema.java +1 -1
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampFormatter.java +2 -2
- data/embulk-core/src/main/java/org/embulk/spi/time/TimestampParser.java +2 -2
- data/embulk-core/src/main/java/org/embulk/spi/util/Filters.java +1 -1
- data/embulk-core/src/main/java/org/embulk/spi/util/LineEncoder.java +2 -2
- data/embulk-core/src/main/java/org/embulk/spi/util/PagePrinter.java +6 -6
- data/embulk-core/src/main/java/org/embulk/spi/util/Pages.java +6 -6
- data/embulk-core/src/test/java/org/embulk/GuiceBinder.java +1 -1
- data/embulk-core/src/test/java/org/embulk/plugin/MockPluginSource.java +1 -0
- data/embulk-core/src/test/java/org/embulk/spi/MockFormatterPlugin.java +2 -2
- data/embulk-core/src/test/java/org/embulk/spi/PageTestUtils.java +1 -1
- data/embulk-core/src/test/java/org/embulk/spi/TestFileInputRunner.java +3 -3
- data/embulk-core/src/test/java/org/embulk/spi/TestFileOutputRunner.java +4 -4
- data/embulk-docs/Makefile +178 -0
- data/embulk-docs/build.gradle +20 -0
- data/embulk-docs/make.bat +243 -0
- data/embulk-docs/push-gh-pages.sh +29 -0
- data/embulk-docs/src/conf.py +260 -0
- data/embulk-docs/src/index.rst +19 -0
- data/embulk-docs/src/release.rst +14 -0
- data/embulk-docs/src/release/release-0.1.0.rst +8 -0
- data/embulk-docs/src/release/release-0.2.0.rst +16 -0
- data/embulk-docs/src/release/release-0.2.1.rst +19 -0
- data/embulk-docs/src/release/release-0.3.0.rst +34 -0
- data/embulk-docs/src/release/release-0.3.1.rst +11 -0
- data/embulk-docs/src/release/release-0.3.2.rst +15 -0
- data/embulk-docs/src/release/release-0.4.0.rst +74 -0
- data/embulk-standards/build.gradle +0 -1
- data/embulk-standards/src/main/java/org/embulk/standards/CsvFormatterPlugin.java +2 -2
- data/embulk-standards/src/main/java/org/embulk/standards/CsvParserPlugin.java +12 -3
- data/embulk-standards/src/main/java/org/embulk/standards/GzipFileDecoderPlugin.java +2 -2
- data/embulk-standards/src/main/java/org/embulk/standards/LocalFileInputPlugin.java +49 -26
- data/embulk-standards/src/main/java/org/embulk/standards/LocalFileOutputPlugin.java +16 -17
- data/embulk-standards/src/main/java/org/embulk/standards/NullOutputPlugin.java +4 -4
- data/embulk-standards/src/main/java/org/embulk/standards/StandardPluginModule.java +0 -1
- data/embulk-standards/src/main/java/org/embulk/standards/StdoutOutputPlugin.java +5 -5
- data/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/gradle/wrapper/gradle-wrapper.properties +2 -2
- data/lib/embulk/buffer.rb +2 -2
- data/lib/embulk/column.rb +6 -6
- data/lib/embulk/command/embulk_example.rb +1 -1
- data/lib/embulk/command/embulk_new_plugin.rb +87 -0
- data/lib/embulk/command/embulk_run.rb +84 -26
- data/lib/embulk/data/bundle/Gemfile +12 -20
- data/lib/embulk/data/bundle/embulk/{filter_example.rb → filter/example.rb} +3 -3
- data/lib/embulk/data/bundle/embulk/{input_example.rb → input/example.rb} +3 -3
- data/lib/embulk/data/bundle/embulk/{output_example.rb → output/example.rb} +3 -3
- data/lib/embulk/data/new/LICENSE.txt +21 -0
- data/lib/embulk/data/new/README.md.erb +75 -0
- data/lib/embulk/data/new/gitignore.erb +12 -0
- data/lib/embulk/data/new/java/build.gradle.erb +57 -0
- data/lib/embulk/data/new/java/decoder.java.erb +40 -0
- data/lib/embulk/data/new/java/encoder.java.erb +40 -0
- data/lib/embulk/data/new/java/file_input.java.erb +64 -0
- data/lib/embulk/data/new/java/file_output.java.erb +66 -0
- data/lib/embulk/data/new/java/filter.java.erb +47 -0
- data/lib/embulk/data/new/java/formatter.java.erb +45 -0
- data/lib/embulk/data/new/java/gradle/wrapper/gradle-wrapper.jar +0 -0
- data/lib/embulk/data/new/java/gradle/wrapper/gradle-wrapper.properties +6 -0
- data/lib/embulk/data/new/java/gradlew +164 -0
- data/lib/embulk/data/new/java/gradlew.bat +90 -0
- data/lib/embulk/data/new/java/input.java.erb +69 -0
- data/lib/embulk/data/new/java/output.java.erb +65 -0
- data/lib/embulk/data/new/java/parser.java.erb +51 -0
- data/lib/embulk/data/new/java/plugin_loader.rb.erb +3 -0
- data/lib/embulk/data/new/java/test.java.erb +5 -0
- data/lib/embulk/data/new/ruby/Gemfile +2 -0
- data/lib/embulk/data/new/ruby/Rakefile +1 -0
- data/lib/embulk/data/new/ruby/filter.rb.erb +39 -0
- data/lib/embulk/data/new/ruby/gemspec.erb +19 -0
- data/lib/embulk/data/new/ruby/input.rb.erb +47 -0
- data/lib/embulk/data/new/ruby/output.rb.erb +59 -0
- data/lib/embulk/data/package_data.rb +64 -0
- data/lib/embulk/data_source.rb +2 -2
- data/lib/embulk/decoder_plugin.rb +27 -0
- data/lib/embulk/encoder_plugin.rb +27 -0
- data/lib/embulk/error.rb +3 -0
- data/lib/embulk/file_input_plugin.rb +27 -0
- data/lib/embulk/file_output_plugin.rb +27 -0
- data/lib/embulk/filter_plugin.rb +28 -9
- data/lib/embulk/formatter_plugin.rb +105 -0
- data/lib/embulk/guess_csv.rb +10 -1
- data/lib/embulk/guess_plugin.rb +22 -27
- data/lib/embulk/input_plugin.rb +34 -20
- data/lib/embulk/java/bootstrap.rb +5 -0
- data/lib/embulk/java/imports.rb +7 -0
- data/lib/embulk/java_plugin.rb +84 -0
- data/lib/embulk/output_plugin.rb +35 -19
- data/lib/embulk/page.rb +1 -1
- data/lib/embulk/page_builder.rb +1 -1
- data/lib/embulk/parser_plugin.rb +76 -0
- data/lib/embulk/plugin.rb +130 -65
- data/lib/embulk/plugin_registry.rb +19 -8
- data/lib/embulk/schema.rb +4 -4
- data/lib/embulk/version.rb +1 -1
- data/settings.gradle +1 -0
- metadata +123 -90
- data/ChangeLog +0 -46
- data/embulk-cli/pom.xml +0 -94
- data/embulk-core/pom.xml +0 -148
- data/embulk-core/src/main/java/org/embulk/config/NextConfig.java +0 -26
- data/embulk-standards/pom.xml +0 -68
- data/embulk-standards/src/main/java/org/embulk/standards/S3FileInputPlugin.java +0 -250
- data/embulk-standards/src/test/java/org/embulk/standards/TestS3FileInputPlugin.java +0 -43
- data/pom.xml +0 -541
@@ -7,7 +7,7 @@ import org.embulk.spi.time.TimestampFormatter;
|
|
7
7
|
import org.embulk.spi.Schema;
|
8
8
|
import org.embulk.spi.Column;
|
9
9
|
import org.embulk.spi.PageReader;
|
10
|
-
import org.embulk.spi.
|
10
|
+
import org.embulk.spi.ColumnVisitor;
|
11
11
|
import org.embulk.spi.type.TimestampType;
|
12
12
|
|
13
13
|
public class PagePrinter
|
@@ -27,7 +27,7 @@ public class PagePrinter
|
|
27
27
|
}
|
28
28
|
}
|
29
29
|
|
30
|
-
this.record = new ArrayList(schema.getColumnCount());
|
30
|
+
this.record = new ArrayList<String>(schema.getColumnCount());
|
31
31
|
for (int i=0; i < schema.getColumnCount(); i++) {
|
32
32
|
record.add("");
|
33
33
|
}
|
@@ -58,18 +58,18 @@ public class PagePrinter
|
|
58
58
|
if (reader.isNull(column)) {
|
59
59
|
return "";
|
60
60
|
}
|
61
|
-
|
61
|
+
ToStringColumnVisitor visitor = new ToStringColumnVisitor(reader);
|
62
62
|
column.visit(visitor);
|
63
63
|
return visitor.string;
|
64
64
|
}
|
65
65
|
|
66
|
-
private class
|
67
|
-
implements
|
66
|
+
private class ToStringColumnVisitor
|
67
|
+
implements ColumnVisitor
|
68
68
|
{
|
69
69
|
private final PageReader reader;
|
70
70
|
String string = "";
|
71
71
|
|
72
|
-
public
|
72
|
+
public ToStringColumnVisitor(PageReader reader)
|
73
73
|
{
|
74
74
|
this.reader = reader;
|
75
75
|
}
|
@@ -5,7 +5,7 @@ import java.util.Iterator;
|
|
5
5
|
import com.google.common.collect.ImmutableList;
|
6
6
|
import org.embulk.spi.time.Timestamp;
|
7
7
|
import org.embulk.spi.Schema;
|
8
|
-
import org.embulk.spi.
|
8
|
+
import org.embulk.spi.ColumnVisitor;
|
9
9
|
import org.embulk.spi.Column;
|
10
10
|
import org.embulk.spi.Page;
|
11
11
|
import org.embulk.spi.PageReader;
|
@@ -36,7 +36,7 @@ public class Pages
|
|
36
36
|
public static Object[] toObjects(final PageReader record)
|
37
37
|
{
|
38
38
|
final Object[] values = new Object[record.getSchema().getColumns().size()];
|
39
|
-
record.getSchema().visitColumns(new
|
39
|
+
record.getSchema().visitColumns(new ObjectColumnVisitor(record) {
|
40
40
|
@Override
|
41
41
|
public void visit(Column column, Object object)
|
42
42
|
{
|
@@ -46,12 +46,12 @@ public class Pages
|
|
46
46
|
return values;
|
47
47
|
}
|
48
48
|
|
49
|
-
public static abstract class
|
50
|
-
implements
|
49
|
+
public static abstract class ObjectColumnVisitor
|
50
|
+
implements ColumnVisitor
|
51
51
|
{
|
52
52
|
private final PageReader record;
|
53
53
|
|
54
|
-
public
|
54
|
+
public ObjectColumnVisitor(PageReader record)
|
55
55
|
{
|
56
56
|
this.record = record;
|
57
57
|
}
|
@@ -117,7 +117,7 @@ public class Pages
|
|
117
117
|
}
|
118
118
|
|
119
119
|
private static class GetObjectColumnVisitor
|
120
|
-
extends
|
120
|
+
extends ObjectColumnVisitor
|
121
121
|
{
|
122
122
|
private Object object;
|
123
123
|
|
@@ -41,7 +41,7 @@ public class GuiceBinder
|
|
41
41
|
public synchronized Injector getInjector()
|
42
42
|
{
|
43
43
|
if (injector == null) {
|
44
|
-
ImmutableList.Builder modules = ImmutableList.builder();
|
44
|
+
ImmutableList.Builder<Module> modules = ImmutableList.builder();
|
45
45
|
modules.addAll(baseModules);
|
46
46
|
modules.addAll(extraModules);
|
47
47
|
injector = Guice.createInjector(modules.build());
|
@@ -8,7 +8,7 @@ import org.embulk.config.Task;
|
|
8
8
|
import org.embulk.config.TaskSource;
|
9
9
|
import org.embulk.spi.Column;
|
10
10
|
import org.embulk.spi.Schema;
|
11
|
-
import org.embulk.spi.
|
11
|
+
import org.embulk.spi.ColumnVisitor;
|
12
12
|
|
13
13
|
public class MockFormatterPlugin implements FormatterPlugin
|
14
14
|
{
|
@@ -56,7 +56,7 @@ public class MockFormatterPlugin implements FormatterPlugin
|
|
56
56
|
pageReader.setPage(page);
|
57
57
|
while (pageReader.nextRecord()) {
|
58
58
|
final List<Object> record = new ArrayList<>();
|
59
|
-
schema.visitColumns(new
|
59
|
+
schema.visitColumns(new ColumnVisitor()
|
60
60
|
{
|
61
61
|
public void booleanColumn(Column column)
|
62
62
|
{
|
@@ -9,7 +9,7 @@ import org.embulk.spi.Column;
|
|
9
9
|
import org.embulk.spi.ColumnConfig;
|
10
10
|
import org.embulk.spi.Schema;
|
11
11
|
import org.embulk.spi.SchemaConfig;
|
12
|
-
import org.embulk.spi.
|
12
|
+
import org.embulk.spi.ColumnVisitor;
|
13
13
|
import org.embulk.spi.type.Type;
|
14
14
|
|
15
15
|
import com.google.common.collect.ImmutableList;
|
@@ -15,7 +15,7 @@ import com.google.common.collect.ImmutableMap;
|
|
15
15
|
import org.embulk.EmbulkTestRuntime;
|
16
16
|
import org.embulk.config.CommitReport;
|
17
17
|
import org.embulk.config.ConfigSource;
|
18
|
-
import org.embulk.config.
|
18
|
+
import org.embulk.config.ConfigDiff;
|
19
19
|
import org.embulk.config.TaskSource;
|
20
20
|
import org.embulk.spi.time.Timestamp;
|
21
21
|
import org.embulk.spi.TestPageBuilderReader.MockPageOutput;
|
@@ -44,7 +44,7 @@ public class TestFileInputRunner
|
|
44
44
|
}
|
45
45
|
|
46
46
|
@Override
|
47
|
-
public
|
47
|
+
public ConfigDiff transaction(ConfigSource config,
|
48
48
|
FileInputPlugin.Control control)
|
49
49
|
{
|
50
50
|
control.run(Exec.newTaskSource(), 1);
|
@@ -52,7 +52,7 @@ public class TestFileInputRunner
|
|
52
52
|
}
|
53
53
|
|
54
54
|
@Override
|
55
|
-
public
|
55
|
+
public ConfigDiff resume(TaskSource taskSource,
|
56
56
|
int processorCount,
|
57
57
|
FileInputPlugin.Control control)
|
58
58
|
{
|
@@ -8,7 +8,7 @@ import java.util.List;
|
|
8
8
|
import org.embulk.EmbulkTestRuntime;
|
9
9
|
import org.embulk.config.CommitReport;
|
10
10
|
import org.embulk.config.ConfigSource;
|
11
|
-
import org.embulk.config.
|
11
|
+
import org.embulk.config.ConfigDiff;
|
12
12
|
import org.embulk.config.Task;
|
13
13
|
import org.embulk.config.TaskSource;
|
14
14
|
import org.embulk.spi.time.Timestamp;
|
@@ -33,16 +33,16 @@ public class TestFileOutputRunner
|
|
33
33
|
Boolean transactionCompleted = null;
|
34
34
|
|
35
35
|
@Override
|
36
|
-
public
|
36
|
+
public ConfigDiff transaction(ConfigSource config, int processorCount,
|
37
37
|
FileOutputPlugin.Control control)
|
38
38
|
{
|
39
39
|
PluginTask task = config.loadConfig(PluginTask.class);
|
40
40
|
control.run(task.dump());
|
41
|
-
return Exec.
|
41
|
+
return Exec.newConfigDiff();
|
42
42
|
}
|
43
43
|
|
44
44
|
@Override
|
45
|
-
public
|
45
|
+
public ConfigDiff resume(TaskSource taskSource,
|
46
46
|
int processorCount,
|
47
47
|
FileOutputPlugin.Control control)
|
48
48
|
{
|
@@ -0,0 +1,178 @@
|
|
1
|
+
# Makefile for Sphinx documentation
|
2
|
+
#
|
3
|
+
|
4
|
+
# You can set these variables from the command line.
|
5
|
+
SPHINXOPTS =
|
6
|
+
SPHINXBUILD = sphinx-build
|
7
|
+
PAPER =
|
8
|
+
BUILDDIR = build
|
9
|
+
SOURCEDIR = src
|
10
|
+
|
11
|
+
# User-friendly check for sphinx-build
|
12
|
+
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
|
13
|
+
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
|
14
|
+
endif
|
15
|
+
|
16
|
+
# Internal variables.
|
17
|
+
PAPEROPT_a4 = -D latex_paper_size=a4
|
18
|
+
PAPEROPT_letter = -D latex_paper_size=letter
|
19
|
+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCEDIR)
|
20
|
+
# the i18n builder cannot share the environment and doctrees with the others
|
21
|
+
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(SOURCEDIR)
|
22
|
+
|
23
|
+
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
|
24
|
+
|
25
|
+
help:
|
26
|
+
@echo "Please use \`make <target>' where <target> is one of"
|
27
|
+
@echo " html to make standalone HTML files"
|
28
|
+
@echo " dirhtml to make HTML files named index.html in directories"
|
29
|
+
@echo " singlehtml to make a single large HTML file"
|
30
|
+
@echo " pickle to make pickle files"
|
31
|
+
@echo " json to make JSON files"
|
32
|
+
@echo " htmlhelp to make HTML files and a HTML help project"
|
33
|
+
@echo " qthelp to make HTML files and a qthelp project"
|
34
|
+
@echo " devhelp to make HTML files and a Devhelp project"
|
35
|
+
@echo " epub to make an epub"
|
36
|
+
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
|
37
|
+
@echo " latexpdf to make LaTeX files and run them through pdflatex"
|
38
|
+
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
|
39
|
+
@echo " text to make text files"
|
40
|
+
@echo " man to make manual pages"
|
41
|
+
@echo " texinfo to make Texinfo files"
|
42
|
+
@echo " info to make Texinfo files and run them through makeinfo"
|
43
|
+
@echo " gettext to make PO message catalogs"
|
44
|
+
@echo " changes to make an overview of all changed/added/deprecated items"
|
45
|
+
@echo " xml to make Docutils-native XML files"
|
46
|
+
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
47
|
+
@echo " linkcheck to check all external links for integrity"
|
48
|
+
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
49
|
+
|
50
|
+
clean:
|
51
|
+
rm -rf $(BUILDDIR)/*
|
52
|
+
|
53
|
+
html:
|
54
|
+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
55
|
+
@echo
|
56
|
+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
57
|
+
|
58
|
+
dirhtml:
|
59
|
+
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
60
|
+
@echo
|
61
|
+
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
62
|
+
|
63
|
+
singlehtml:
|
64
|
+
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
65
|
+
@echo
|
66
|
+
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
67
|
+
|
68
|
+
pickle:
|
69
|
+
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
70
|
+
@echo
|
71
|
+
@echo "Build finished; now you can process the pickle files."
|
72
|
+
|
73
|
+
json:
|
74
|
+
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
75
|
+
@echo
|
76
|
+
@echo "Build finished; now you can process the JSON files."
|
77
|
+
|
78
|
+
htmlhelp:
|
79
|
+
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
80
|
+
@echo
|
81
|
+
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
82
|
+
".hhp project file in $(BUILDDIR)/htmlhelp."
|
83
|
+
|
84
|
+
qthelp:
|
85
|
+
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
86
|
+
@echo
|
87
|
+
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
88
|
+
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
|
89
|
+
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Embulk.qhcp"
|
90
|
+
@echo "To view the help file:"
|
91
|
+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Embulk.qhc"
|
92
|
+
|
93
|
+
devhelp:
|
94
|
+
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
95
|
+
@echo
|
96
|
+
@echo "Build finished."
|
97
|
+
@echo "To view the help file:"
|
98
|
+
@echo "# mkdir -p $$HOME/.local/share/devhelp/Embulk"
|
99
|
+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Embulk"
|
100
|
+
@echo "# devhelp"
|
101
|
+
|
102
|
+
epub:
|
103
|
+
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
104
|
+
@echo
|
105
|
+
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
106
|
+
|
107
|
+
latex:
|
108
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
109
|
+
@echo
|
110
|
+
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
111
|
+
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
112
|
+
"(use \`make latexpdf' here to do that automatically)."
|
113
|
+
|
114
|
+
latexpdf:
|
115
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
116
|
+
@echo "Running LaTeX files through pdflatex..."
|
117
|
+
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
118
|
+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
119
|
+
|
120
|
+
latexpdfja:
|
121
|
+
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
122
|
+
@echo "Running LaTeX files through platex and dvipdfmx..."
|
123
|
+
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
124
|
+
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
125
|
+
|
126
|
+
text:
|
127
|
+
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
128
|
+
@echo
|
129
|
+
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
130
|
+
|
131
|
+
man:
|
132
|
+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
133
|
+
@echo
|
134
|
+
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
135
|
+
|
136
|
+
texinfo:
|
137
|
+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
138
|
+
@echo
|
139
|
+
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
140
|
+
@echo "Run \`make' in that directory to run these through makeinfo" \
|
141
|
+
"(use \`make info' here to do that automatically)."
|
142
|
+
|
143
|
+
info:
|
144
|
+
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
145
|
+
@echo "Running Texinfo files through makeinfo..."
|
146
|
+
make -C $(BUILDDIR)/texinfo info
|
147
|
+
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
148
|
+
|
149
|
+
gettext:
|
150
|
+
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
151
|
+
@echo
|
152
|
+
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
153
|
+
|
154
|
+
changes:
|
155
|
+
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
156
|
+
@echo
|
157
|
+
@echo "The overview file is in $(BUILDDIR)/changes."
|
158
|
+
|
159
|
+
linkcheck:
|
160
|
+
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
161
|
+
@echo
|
162
|
+
@echo "Link check complete; look for any errors in the above output " \
|
163
|
+
"or in $(BUILDDIR)/linkcheck/output.txt."
|
164
|
+
|
165
|
+
doctest:
|
166
|
+
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
167
|
+
@echo "Testing of doctests in the sources finished, look at the " \
|
168
|
+
"results in $(BUILDDIR)/doctest/output.txt."
|
169
|
+
|
170
|
+
xml:
|
171
|
+
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
172
|
+
@echo
|
173
|
+
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
174
|
+
|
175
|
+
pseudoxml:
|
176
|
+
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
177
|
+
@echo
|
178
|
+
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|
@@ -0,0 +1,20 @@
|
|
1
|
+
task sphinx_html(type: Exec) {
|
2
|
+
workingDir '.'
|
3
|
+
commandLine 'make'
|
4
|
+
args 'html'
|
5
|
+
}
|
6
|
+
|
7
|
+
task javadoc_html(type: Copy, dependsOn: [':embulk-core:javadoc']) {
|
8
|
+
doFirst { file('build/html/javadoc').mkdirs() }
|
9
|
+
from project(':embulk-core').javadoc.destinationDir
|
10
|
+
into 'build/html/javadoc'
|
11
|
+
}
|
12
|
+
|
13
|
+
task rdoc_html(type: Exec) {
|
14
|
+
workingDir '..'
|
15
|
+
commandLine 'yardoc'
|
16
|
+
args '-o', 'embulk-docs/build/html/rdoc', 'lib'
|
17
|
+
}
|
18
|
+
|
19
|
+
task site(type: Copy, dependsOn: ['sphinx_html', 'rdoc_html', 'javadoc_html']) {
|
20
|
+
}
|
@@ -0,0 +1,243 @@
|
|
1
|
+
@ECHO OFF
|
2
|
+
|
3
|
+
REM Command file for Sphinx documentation
|
4
|
+
|
5
|
+
if "%SPHINXBUILD%" == "" (
|
6
|
+
set SPHINXBUILD=sphinx-build
|
7
|
+
)
|
8
|
+
set BUILDDIR=build
|
9
|
+
set SOURCEDIR=src
|
10
|
+
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% %SOURCEDIR%
|
11
|
+
set I18NSPHINXOPTS=%SPHINXOPTS% %SOURCEDIR%
|
12
|
+
if NOT "%PAPER%" == "" (
|
13
|
+
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
|
14
|
+
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
|
15
|
+
)
|
16
|
+
|
17
|
+
if "%1" == "" goto help
|
18
|
+
|
19
|
+
if "%1" == "help" (
|
20
|
+
:help
|
21
|
+
echo.Please use `make ^<target^>` where ^<target^> is one of
|
22
|
+
echo. html to make standalone HTML files
|
23
|
+
echo. dirhtml to make HTML files named index.html in directories
|
24
|
+
echo. singlehtml to make a single large HTML file
|
25
|
+
echo. pickle to make pickle files
|
26
|
+
echo. json to make JSON files
|
27
|
+
echo. htmlhelp to make HTML files and a HTML help project
|
28
|
+
echo. qthelp to make HTML files and a qthelp project
|
29
|
+
echo. devhelp to make HTML files and a Devhelp project
|
30
|
+
echo. epub to make an epub
|
31
|
+
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
|
32
|
+
echo. text to make text files
|
33
|
+
echo. man to make manual pages
|
34
|
+
echo. texinfo to make Texinfo files
|
35
|
+
echo. gettext to make PO message catalogs
|
36
|
+
echo. changes to make an overview over all changed/added/deprecated items
|
37
|
+
echo. xml to make Docutils-native XML files
|
38
|
+
echo. pseudoxml to make pseudoxml-XML files for display purposes
|
39
|
+
echo. linkcheck to check all external links for integrity
|
40
|
+
echo. doctest to run all doctests embedded in the documentation if enabled
|
41
|
+
goto end
|
42
|
+
)
|
43
|
+
|
44
|
+
if "%1" == "clean" (
|
45
|
+
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
|
46
|
+
del /q /s %BUILDDIR%\*
|
47
|
+
goto end
|
48
|
+
)
|
49
|
+
|
50
|
+
|
51
|
+
%SPHINXBUILD% 2> nul
|
52
|
+
if errorlevel 9009 (
|
53
|
+
echo.
|
54
|
+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
55
|
+
echo.installed, then set the SPHINXBUILD environment variable to point
|
56
|
+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
57
|
+
echo.may add the Sphinx directory to PATH.
|
58
|
+
echo.
|
59
|
+
echo.If you don't have Sphinx installed, grab it from
|
60
|
+
echo.http://sphinx-doc.org/
|
61
|
+
exit /b 1
|
62
|
+
)
|
63
|
+
|
64
|
+
if "%1" == "html" (
|
65
|
+
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
|
66
|
+
if errorlevel 1 exit /b 1
|
67
|
+
echo.
|
68
|
+
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
|
69
|
+
goto end
|
70
|
+
)
|
71
|
+
|
72
|
+
if "%1" == "dirhtml" (
|
73
|
+
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
|
74
|
+
if errorlevel 1 exit /b 1
|
75
|
+
echo.
|
76
|
+
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
|
77
|
+
goto end
|
78
|
+
)
|
79
|
+
|
80
|
+
if "%1" == "singlehtml" (
|
81
|
+
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
|
82
|
+
if errorlevel 1 exit /b 1
|
83
|
+
echo.
|
84
|
+
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
|
85
|
+
goto end
|
86
|
+
)
|
87
|
+
|
88
|
+
if "%1" == "pickle" (
|
89
|
+
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
|
90
|
+
if errorlevel 1 exit /b 1
|
91
|
+
echo.
|
92
|
+
echo.Build finished; now you can process the pickle files.
|
93
|
+
goto end
|
94
|
+
)
|
95
|
+
|
96
|
+
if "%1" == "json" (
|
97
|
+
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
|
98
|
+
if errorlevel 1 exit /b 1
|
99
|
+
echo.
|
100
|
+
echo.Build finished; now you can process the JSON files.
|
101
|
+
goto end
|
102
|
+
)
|
103
|
+
|
104
|
+
if "%1" == "htmlhelp" (
|
105
|
+
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
|
106
|
+
if errorlevel 1 exit /b 1
|
107
|
+
echo.
|
108
|
+
echo.Build finished; now you can run HTML Help Workshop with the ^
|
109
|
+
.hhp project file in %BUILDDIR%/htmlhelp.
|
110
|
+
goto end
|
111
|
+
)
|
112
|
+
|
113
|
+
if "%1" == "qthelp" (
|
114
|
+
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
|
115
|
+
if errorlevel 1 exit /b 1
|
116
|
+
echo.
|
117
|
+
echo.Build finished; now you can run "qcollectiongenerator" with the ^
|
118
|
+
.qhcp project file in %BUILDDIR%/qthelp, like this:
|
119
|
+
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\Embulk.qhcp
|
120
|
+
echo.To view the help file:
|
121
|
+
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\Embulk.ghc
|
122
|
+
goto end
|
123
|
+
)
|
124
|
+
|
125
|
+
if "%1" == "devhelp" (
|
126
|
+
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
|
127
|
+
if errorlevel 1 exit /b 1
|
128
|
+
echo.
|
129
|
+
echo.Build finished.
|
130
|
+
goto end
|
131
|
+
)
|
132
|
+
|
133
|
+
if "%1" == "epub" (
|
134
|
+
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
|
135
|
+
if errorlevel 1 exit /b 1
|
136
|
+
echo.
|
137
|
+
echo.Build finished. The epub file is in %BUILDDIR%/epub.
|
138
|
+
goto end
|
139
|
+
)
|
140
|
+
|
141
|
+
if "%1" == "latex" (
|
142
|
+
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
143
|
+
if errorlevel 1 exit /b 1
|
144
|
+
echo.
|
145
|
+
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
|
146
|
+
goto end
|
147
|
+
)
|
148
|
+
|
149
|
+
if "%1" == "latexpdf" (
|
150
|
+
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
151
|
+
cd %BUILDDIR%/latex
|
152
|
+
make all-pdf
|
153
|
+
cd %BUILDDIR%/..
|
154
|
+
echo.
|
155
|
+
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
|
156
|
+
goto end
|
157
|
+
)
|
158
|
+
|
159
|
+
if "%1" == "latexpdfja" (
|
160
|
+
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
|
161
|
+
cd %BUILDDIR%/latex
|
162
|
+
make all-pdf-ja
|
163
|
+
cd %BUILDDIR%/..
|
164
|
+
echo.
|
165
|
+
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
|
166
|
+
goto end
|
167
|
+
)
|
168
|
+
|
169
|
+
if "%1" == "text" (
|
170
|
+
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
|
171
|
+
if errorlevel 1 exit /b 1
|
172
|
+
echo.
|
173
|
+
echo.Build finished. The text files are in %BUILDDIR%/text.
|
174
|
+
goto end
|
175
|
+
)
|
176
|
+
|
177
|
+
if "%1" == "man" (
|
178
|
+
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
|
179
|
+
if errorlevel 1 exit /b 1
|
180
|
+
echo.
|
181
|
+
echo.Build finished. The manual pages are in %BUILDDIR%/man.
|
182
|
+
goto end
|
183
|
+
)
|
184
|
+
|
185
|
+
if "%1" == "texinfo" (
|
186
|
+
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
|
187
|
+
if errorlevel 1 exit /b 1
|
188
|
+
echo.
|
189
|
+
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
|
190
|
+
goto end
|
191
|
+
)
|
192
|
+
|
193
|
+
if "%1" == "gettext" (
|
194
|
+
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
|
195
|
+
if errorlevel 1 exit /b 1
|
196
|
+
echo.
|
197
|
+
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
|
198
|
+
goto end
|
199
|
+
)
|
200
|
+
|
201
|
+
if "%1" == "changes" (
|
202
|
+
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
|
203
|
+
if errorlevel 1 exit /b 1
|
204
|
+
echo.
|
205
|
+
echo.The overview file is in %BUILDDIR%/changes.
|
206
|
+
goto end
|
207
|
+
)
|
208
|
+
|
209
|
+
if "%1" == "linkcheck" (
|
210
|
+
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
|
211
|
+
if errorlevel 1 exit /b 1
|
212
|
+
echo.
|
213
|
+
echo.Link check complete; look for any errors in the above output ^
|
214
|
+
or in %BUILDDIR%/linkcheck/output.txt.
|
215
|
+
goto end
|
216
|
+
)
|
217
|
+
|
218
|
+
if "%1" == "doctest" (
|
219
|
+
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
|
220
|
+
if errorlevel 1 exit /b 1
|
221
|
+
echo.
|
222
|
+
echo.Testing of doctests in the sources finished, look at the ^
|
223
|
+
results in %BUILDDIR%/doctest/output.txt.
|
224
|
+
goto end
|
225
|
+
)
|
226
|
+
|
227
|
+
if "%1" == "xml" (
|
228
|
+
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
|
229
|
+
if errorlevel 1 exit /b 1
|
230
|
+
echo.
|
231
|
+
echo.Build finished. The XML files are in %BUILDDIR%/xml.
|
232
|
+
goto end
|
233
|
+
)
|
234
|
+
|
235
|
+
if "%1" == "pseudoxml" (
|
236
|
+
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
|
237
|
+
if errorlevel 1 exit /b 1
|
238
|
+
echo.
|
239
|
+
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
|
240
|
+
goto end
|
241
|
+
)
|
242
|
+
|
243
|
+
:end
|