indoctrinatr-tools 0.15.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +9 -39
- data/.rubocop.yml +11 -6
- data/.ruby-version +1 -0
- data/CHANGELOG.md +14 -0
- data/LICENSE +1 -1
- data/README.md +5 -6
- data/Rakefile +5 -20
- data/cucumber.yml +1 -1
- data/exe/indoctrinatr +4 -0
- data/indoctrinatr-tools.gemspec +28 -29
- data/lib/indoctrinatr/templates/documentation/indoctrinatr-technical-documentation-content.tex.erb +4 -4
- data/lib/indoctrinatr/templates/documentation/indoctrinatr-technical-documentation.sty +0 -15
- data/lib/indoctrinatr/tools/command_autocomplete_helpers.rb +9 -0
- data/lib/indoctrinatr/tools/commands/bash_completions.rb +21 -0
- data/lib/indoctrinatr/tools/commands/check.rb +26 -0
- data/lib/indoctrinatr/tools/commands/completion_commands.rb +25 -0
- data/lib/indoctrinatr/tools/commands/demo.rb +22 -0
- data/lib/indoctrinatr/tools/commands/doc.rb +28 -0
- data/lib/indoctrinatr/tools/commands/pack.rb +26 -0
- data/lib/indoctrinatr/tools/commands/parse.rb +26 -0
- data/lib/indoctrinatr/tools/commands/pdf.rb +39 -0
- data/lib/indoctrinatr/tools/commands/pdf_with_field_names.rb +28 -0
- data/lib/indoctrinatr/tools/commands/scaffold.rb +26 -0
- data/lib/indoctrinatr/tools/commands/version.rb +13 -0
- data/lib/indoctrinatr/tools/commands/workflow.rb +38 -0
- data/lib/indoctrinatr/tools/commands/zsh_completions.rb +25 -0
- data/lib/indoctrinatr/tools/commands.rb +21 -0
- data/lib/indoctrinatr/tools/configuration_extractor.rb +11 -13
- data/lib/indoctrinatr/tools/content_for_tex_files.rb +5 -3
- data/lib/indoctrinatr/tools/default_values.rb +1 -3
- data/lib/indoctrinatr/tools/field_name_values.rb +4 -5
- data/lib/indoctrinatr/tools/pdf_generator.rb +3 -3
- data/lib/{redcloth_latex_formatter_patch/patch.rb → indoctrinatr/tools/redcloth_formatters_latex_patch.rb} +17 -19
- data/lib/indoctrinatr/tools/template_documentation_content.rb +72 -23
- data/lib/indoctrinatr/tools/template_documentation_helpers.rb +1 -1
- data/lib/indoctrinatr/tools/template_documentation_source_file.rb +9 -14
- data/lib/indoctrinatr/tools/template_pack_configuration.rb +2 -1
- data/lib/indoctrinatr/tools/transactions/template_pack_default_values_compiler.rb +67 -0
- data/lib/indoctrinatr/tools/transactions/template_pack_default_values_parser.rb +82 -0
- data/lib/indoctrinatr/tools/transactions/template_pack_demo.rb +104 -0
- data/lib/indoctrinatr/tools/transactions/template_pack_documentation.rb +223 -0
- data/lib/indoctrinatr/tools/transactions/template_pack_error_checker.rb +127 -0
- data/lib/indoctrinatr/tools/transactions/template_pack_fieldnames_creator.rb +97 -0
- data/lib/indoctrinatr/tools/transactions/template_pack_packer.rb +73 -0
- data/lib/indoctrinatr/tools/transactions/template_pack_scaffold.rb +73 -0
- data/lib/indoctrinatr/tools/version.rb +1 -1
- data/lib/indoctrinatr_tools.rb +12 -0
- metadata +106 -141
- checksums.yaml.gz.sig +0 -0
- data/.arcconfig +0 -9
- data/.coveralls.yml +0 -1
- data/.travis.yml +0 -15
- data/bin/indoctrinatr +0 -185
- data/certs/dkd-reuschling.pem +0 -22
- data/features/autocompletion_support.feature +0 -9
- data/features/demo.feature +0 -17
- data/features/doc_keepauxfiles.feature +0 -13
- data/features/documentation.feature +0 -20
- data/features/fieldnames_pdf.feature +0 -9
- data/features/fieldnames_pdf_auxfiles.feature +0 -10
- data/features/pack.feature +0 -11
- data/features/parse.feature +0 -6
- data/features/pdf.feature +0 -15
- data/features/pdf_keepauxfiles.feature +0 -11
- data/features/pdf_with_timestamp.feature +0 -8
- data/features/scaffold.feature +0 -23
- data/features/step_definitions/common.rb +0 -3
- data/features/step_definitions/indoctrinatr_cli.rb +0 -11
- data/features/support/env.rb +0 -1
- data/features/version.feature +0 -5
- data/features/workflow.feature +0 -9
- data/lib/indoctrinatr/tools/directory_helpers.rb +0 -18
- data/lib/indoctrinatr/tools/template_pack_default_values_compiler.rb +0 -47
- data/lib/indoctrinatr/tools/template_pack_default_values_parser.rb +0 -55
- data/lib/indoctrinatr/tools/template_pack_demo.rb +0 -23
- data/lib/indoctrinatr/tools/template_pack_documentation.rb +0 -132
- data/lib/indoctrinatr/tools/template_pack_error_checker.rb +0 -104
- data/lib/indoctrinatr/tools/template_pack_fieldnames_creator.rb +0 -79
- data/lib/indoctrinatr/tools/template_pack_helpers.rb +0 -68
- data/lib/indoctrinatr/tools/template_pack_packer.rb +0 -49
- data/lib/indoctrinatr/tools/template_pack_scaffold.rb +0 -57
- data/lib/indoctrinatr/tools.rb +0 -9
- data/spec/fixtures/test/configuration.yaml +0 -26
- data/spec/fixtures/test/test.tex.erb +0 -15
- data/spec/indoctrinatr/templates/configuration_file_spec.rb +0 -9
- data/spec/indoctrinatr/templates/tex_file_spec.rb +0 -9
- data/spec/indoctrinatr/tools/textile_support_spec.rb +0 -18
- data/spec/indoctrinatr/tools/version_spec.rb +0 -8
- data/spec/redcloth_latex_formatter_patch/patch_spec.rb +0 -34
- data/spec/spec_helper.rb +0 -2
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9ecf077d9fa4e157d3cab1a0a8cdbc0cfb0e78da076c3cc99248eb2d01223ac9
|
4
|
+
data.tar.gz: 24d93b0dccc5b43e4775870df136ee87d59b23f4f60de001d63f14b22ba41166
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d64e22fed3f46f3a444177d5ca0391cc383222364b7d85a15de12566fd9e551b20d439393fefd1a1615fbb074acb0d5ee6e15a5a309ae485ee7b3c9ef5482b65
|
7
|
+
data.tar.gz: f5539d4547a696df5bd03becd16cf3f672ffd4b3746c69222018bb15705543f8d9f021a333bf8ec4be6a32936f22d2e717881174e87570db9d78fb8fe40c9ffc
|
data/.gitignore
CHANGED
@@ -1,54 +1,24 @@
|
|
1
|
+
*.a
|
2
|
+
*.bundle
|
1
3
|
*.gem
|
4
|
+
*.iml
|
5
|
+
*.o
|
2
6
|
*.rbc
|
7
|
+
*.so
|
3
8
|
.bundle
|
4
9
|
.config
|
10
|
+
.idea
|
5
11
|
.yardoc
|
6
|
-
Gemfile.lock
|
7
|
-
InstalledFiles
|
8
12
|
_yardoc
|
9
13
|
coverage
|
10
14
|
doc/
|
15
|
+
Gemfile.lock
|
16
|
+
InstalledFiles
|
11
17
|
lib/bundler/man
|
18
|
+
mkmf.log
|
12
19
|
pkg
|
13
20
|
rdoc
|
14
21
|
spec/reports
|
15
22
|
test/tmp
|
16
23
|
test/version_tmp
|
17
24
|
tmp
|
18
|
-
*.bundle
|
19
|
-
*.so
|
20
|
-
*.o
|
21
|
-
*.a
|
22
|
-
mkmf.log
|
23
|
-
|
24
|
-
# Created by https://www.gitignore.io
|
25
|
-
|
26
|
-
### Intellij ###
|
27
|
-
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm
|
28
|
-
|
29
|
-
*.iml
|
30
|
-
|
31
|
-
## Directory-based project format:
|
32
|
-
.idea/
|
33
|
-
# if you remove the above rule, at least ignore the following:
|
34
|
-
|
35
|
-
# User-specific stuff:
|
36
|
-
# .idea/workspace.xml
|
37
|
-
# .idea/tasks.xml
|
38
|
-
# .idea/dictionaries
|
39
|
-
|
40
|
-
# Sensitive or high-churn files:
|
41
|
-
# .idea/dataSources.ids
|
42
|
-
# .idea/dataSources.xml
|
43
|
-
# .idea/sqlDataSources.xml
|
44
|
-
# .idea/dynamic.xml
|
45
|
-
# .idea/uiDesigner.xml
|
46
|
-
|
47
|
-
# Gradle:
|
48
|
-
# .idea/gradle.xml
|
49
|
-
# .idea/libraries
|
50
|
-
|
51
|
-
# Mongo Explorer plugin:
|
52
|
-
# .idea/mongoSettings.xml
|
53
|
-
|
54
|
-
# End gitignore.io generated block
|
data/.rubocop.yml
CHANGED
@@ -1,15 +1,20 @@
|
|
1
|
-
require:
|
1
|
+
require:
|
2
|
+
- rubocop-performance
|
3
|
+
- rubocop-rspec
|
2
4
|
|
3
5
|
AllCops:
|
4
|
-
|
5
|
-
TargetRubyVersion:
|
6
|
+
NewCops: enable
|
7
|
+
TargetRubyVersion: 3.1
|
8
|
+
ExtraDetails: true
|
9
|
+
DisplayStyleGuide: true
|
10
|
+
DisplayCopNames: true
|
6
11
|
Exclude:
|
7
12
|
- tmp/**/*
|
8
13
|
- vendor/**/*
|
9
|
-
|
14
|
+
Style/FrozenStringLiteralComment:
|
15
|
+
Enabled: false
|
16
|
+
Layout/LineLength:
|
10
17
|
Max: 240
|
11
|
-
Style/MethodDefParentheses:
|
12
|
-
EnforcedStyle: require_no_parentheses
|
13
18
|
Style/Documentation:
|
14
19
|
Enabled: false
|
15
20
|
Metrics/MethodLength:
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# indoctrinatr-tools
|
2
2
|
|
3
|
+
## v0.17.0 (2022-12-01)
|
4
|
+
|
5
|
+
### changes
|
6
|
+
|
7
|
+
* migrate to `dry-cli` and `dry-transaction`
|
8
|
+
* move to Ruby `~> 3.0` versions (3.0, 3.1)
|
9
|
+
* drop support for Ruby 2.x versions
|
10
|
+
|
11
|
+
## v0.16.0 (2020-02-14)
|
12
|
+
|
13
|
+
### changes
|
14
|
+
|
15
|
+
* updated infrastructure
|
16
|
+
|
3
17
|
## v0.15.0 (2017-04-16)
|
4
18
|
|
5
19
|
### changes
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2014-
|
3
|
+
Copyright (c) 2014-2022 Indoctrinatr Development Team, dkd Internet Service GmbH, Frankfurt am Main
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -6,12 +6,12 @@
|
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
9
|
-
[![Gem Version](https://badge.fury.io/rb/indoctrinatr-tools.svg)](http://badge.fury.io/rb/indoctrinatr-tools)
|
9
|
+
[![Gem Version](https://badge.fury.io/rb/indoctrinatr-tools.svg)](http://badge.fury.io/rb/indoctrinatr-tools)
|
10
10
|
|
11
11
|
|
12
12
|
1. Install XeTeX:
|
13
13
|
|
14
|
-
Mac OS X: [MacTeX](https://tug.org/mactex/)
|
14
|
+
Mac OS X: [MacTeX](https://tug.org/mactex/) (e.g. `brew install mactex`)
|
15
15
|
|
16
16
|
Debian/Ubuntu:
|
17
17
|
|
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
* `latexmk`
|
32
32
|
* for the template documentation
|
33
|
-
* Tested against TeX Live
|
33
|
+
* Tested against TeX Live 2022
|
34
34
|
* `dirtree`
|
35
35
|
* `datetime2`
|
36
36
|
|
@@ -49,8 +49,6 @@ Command | Description
|
|
49
49
|
`indoctrinatr pack project_name` | Creates a Template Pack from a given project folder
|
50
50
|
`indoctrinatr demo` | Creates, parses, and compiles a demo project
|
51
51
|
`indoctrinatr workflow` | Displays a suggested workflow
|
52
|
-
`indoctrinatr bashcompletion` | Displays instructions for bash completion
|
53
|
-
`indoctrinatr zshcompletion` | Displays instructions for zsh completion
|
54
52
|
|
55
53
|
The commands `pdf`, `pdf_with_field_names` and `doc` have a `keep-aux-files` option. This is helpful if you run in into LaTeX errors, want to inspect the .log file and run LaTeX for yourself again.
|
56
54
|
|
@@ -69,7 +67,7 @@ What you think of Indoctrinatr and Indoctrinatr Tools? Drop us a line (<opensour
|
|
69
67
|
We are also looking forward to your [GitHub Pull Requests](https://help.github.com/articles/using-pull-requests/).
|
70
68
|
|
71
69
|
Manual testing: After cloning the repo, run `bundle exec bin/indoctrinatr` inside the directory for testing your own development changes.
|
72
|
-
Automatic testing: run `
|
70
|
+
Automatic testing: run `rspec`
|
73
71
|
|
74
72
|
## License
|
75
73
|
|
@@ -80,5 +78,6 @@ Indoctrinatr and Indoctrinatr Tools are licensed under the terms and conditions
|
|
80
78
|
[![dkd](assets/images/dkd_logo.png)](https://dkd.de/)
|
81
79
|
|
82
80
|
* Luka Lüdicke (development)
|
81
|
+
* Eike Henrich (development)
|
83
82
|
* Nicolai Reuschling (development)
|
84
83
|
* Søren Schaffstein (idea, product management)
|
data/Rakefile
CHANGED
@@ -7,26 +7,11 @@ require 'rspec/core/rake_task'
|
|
7
7
|
RSpec::Core::RakeTask.new('spec')
|
8
8
|
task default: :spec
|
9
9
|
|
10
|
-
require 'cucumber'
|
11
|
-
require 'cucumber/rake/task'
|
12
|
-
Cucumber::Rake::Task.new(:features) do |t|
|
13
|
-
t.cucumber_opts = 'features --format pretty'
|
14
|
-
end
|
15
|
-
|
16
|
-
require 'coveralls/rake/task'
|
17
|
-
Coveralls::RakeTask.new
|
18
|
-
task test_with_coveralls: [:rubocop, :spec, :features, 'coveralls:push']
|
19
|
-
|
20
|
-
desc 'Start up IRB session with Indoctrinatr Tools loaded'
|
21
|
-
task :console do
|
22
|
-
exec 'irb -r indoctrinatr/tools -I ./lib'
|
23
|
-
end
|
24
|
-
|
25
10
|
desc 'Run demo'
|
26
11
|
task :demo do
|
27
|
-
puts `
|
28
|
-
puts `
|
29
|
-
puts `
|
30
|
-
puts `
|
31
|
-
puts `
|
12
|
+
puts `exe/indoctrinatr new demo`
|
13
|
+
puts `exe/indoctrinatr parse demo`
|
14
|
+
puts `exe/indoctrinatr pdf demo`
|
15
|
+
puts `exe/indoctrinatr doc demo`
|
16
|
+
puts `exe/indoctrinatr pack demo`
|
32
17
|
end
|
data/cucumber.yml
CHANGED
@@ -1 +1 @@
|
|
1
|
-
default: --format=progress
|
1
|
+
default: --format=progress --publish-quiet
|
data/exe/indoctrinatr
ADDED
data/indoctrinatr-tools.gemspec
CHANGED
@@ -1,44 +1,43 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
4
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
3
|
require 'indoctrinatr/tools/version'
|
6
4
|
|
7
|
-
Gem::Specification.new do |spec|
|
5
|
+
Gem::Specification.new do |spec|
|
8
6
|
spec.name = 'indoctrinatr-tools'
|
9
7
|
spec.version = Indoctrinatr::Tools::VERSION
|
10
|
-
spec.authors = ['Nicolai Reuschling', '
|
11
|
-
spec.email = ['nicolai.reuschling@dkd.de', '
|
8
|
+
spec.authors = ['Nicolai Reuschling', 'Eike Henrich']
|
9
|
+
spec.email = ['nicolai.reuschling@dkd.de', 'eike.henrich@dkd.de']
|
12
10
|
spec.summary = 'indoctrinatr-tools provides a set of command line tools for Indoctrinatr (an Open Source Software project by dkd Internet Service GmbH, Frankfurt am Main, Germany).'
|
13
|
-
|
14
|
-
spec.homepage = ''
|
11
|
+
spec.homepage = 'https://github.com/dkd/indoctrinatr'
|
15
12
|
spec.license = 'MIT'
|
16
13
|
|
17
|
-
spec.required_ruby_version = '~>
|
14
|
+
spec.required_ruby_version = '~> 3.1'
|
18
15
|
|
19
|
-
spec.files
|
20
|
-
|
21
|
-
|
16
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
17
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
end
|
19
|
+
spec.bindir = 'exe'
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
21
|
spec.require_paths = ['lib']
|
23
22
|
|
24
|
-
spec.add_development_dependency '
|
25
|
-
spec.add_development_dependency '
|
26
|
-
spec.add_development_dependency '
|
27
|
-
spec.add_development_dependency '
|
28
|
-
spec.add_development_dependency '
|
29
|
-
spec.add_development_dependency 'rubocop',
|
30
|
-
spec.add_development_dependency 'rubocop-
|
31
|
-
spec.add_development_dependency '
|
32
|
-
spec.add_development_dependency '
|
33
|
-
|
34
|
-
spec.add_dependency '
|
35
|
-
spec.add_dependency '
|
36
|
-
spec.add_dependency 'erubis',
|
37
|
-
spec.add_dependency 'to_latex', '~> 0.5'
|
23
|
+
spec.add_development_dependency 'aruba', '~> 2.1'
|
24
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
25
|
+
spec.add_development_dependency 'cucumber', '~> 8.0'
|
26
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
27
|
+
spec.add_development_dependency 'rspec', '~> 3.10'
|
28
|
+
spec.add_development_dependency 'rubocop', '~> 1.0'
|
29
|
+
spec.add_development_dependency 'rubocop-performance', '~> 1.10'
|
30
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.0'
|
31
|
+
spec.add_development_dependency 'simplecov', '~> 0.21'
|
32
|
+
|
33
|
+
spec.add_dependency 'dry-cli', '~> 1.0'
|
34
|
+
spec.add_dependency 'dry-transaction', '~> 0.13'
|
35
|
+
spec.add_dependency 'erubis', '~> 2.7'
|
38
36
|
spec.add_dependency 'RedCloth', '~> 4.3'
|
39
|
-
|
40
|
-
spec.
|
41
|
-
spec.
|
37
|
+
spec.add_dependency 'rubyzip', '~> 2'
|
38
|
+
spec.add_dependency 'to_latex', '~> 0.5'
|
39
|
+
spec.add_dependency 'zeitwerk', '~> 2.6'
|
42
40
|
|
43
41
|
spec.requirements << 'LaTeX development enviroment'
|
42
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
44
43
|
end
|
data/lib/indoctrinatr/templates/documentation/indoctrinatr-technical-documentation-content.tex.erb
CHANGED
@@ -25,10 +25,10 @@
|
|
25
25
|
\begin{landscape}
|
26
26
|
\chapter{Variables}
|
27
27
|
|
28
|
-
\begin{
|
29
|
-
\tabletoprule
|
28
|
+
\begin{longtable}{ l l l l l }
|
29
|
+
% \tabletoprule
|
30
30
|
\textbf{Variable} & \textbf{Presentation} & \textbf{Default Value} & \textbf{Required} & \textbf{Description} \\
|
31
|
-
\tabletoprule
|
31
|
+
% \tabletoprule
|
32
32
|
\endhead
|
33
33
|
<% @attributes.each do |attribute| %>
|
34
34
|
\texttt{<%= attribute['name'].to_latex -%>}
|
@@ -37,5 +37,5 @@
|
|
37
37
|
& <%= 'true' if attribute['required'] == 'true' -%> <%# empty if false or not set. Wish by Søren for better readability-%>
|
38
38
|
& <%= attribute['description'].to_latex if attribute['description'] -%>\\ <%# if condition to ignore errors on empty description field -%>
|
39
39
|
<% end %>
|
40
|
-
\end{
|
40
|
+
\end{longtable}
|
41
41
|
\end{landscape}
|
@@ -157,24 +157,9 @@
|
|
157
157
|
\MakeOuterQuote{"}
|
158
158
|
|
159
159
|
|
160
|
-
% package for better table creation
|
161
|
-
\usepackage{tabu}
|
162
160
|
% use "longtable" package to allow multi page tables
|
163
161
|
\usepackage{longtable}
|
164
162
|
|
165
|
-
|
166
|
-
% define horizontal lines for use in tables
|
167
|
-
\newcommand{\tabletoprule}{\tabucline[1pt]{-}}
|
168
|
-
\newcommand{\tablebottomrule}{\tabucline[1pt]{-}}
|
169
|
-
\newcommand{\tablemiddlerule}{\tabucline[0.5pt]{-}}
|
170
|
-
\newcommand{\tablesumrule}{\tabucline[0.5pt]{-}\tabucline[0.5pt]{-}}
|
171
|
-
|
172
|
-
% increase spacing between table rows
|
173
|
-
\tabulinesep=2mm
|
174
|
-
|
175
|
-
% have alternating row colours in tables
|
176
|
-
\rowcolors{1}{light-gray}{white}
|
177
|
-
|
178
163
|
% allow row spanning in tables
|
179
164
|
\usepackage{multirow}
|
180
165
|
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Indoctrinatr
|
2
|
+
module Tools
|
3
|
+
module Commands
|
4
|
+
class BashCompletions < Dry::CLI::Command
|
5
|
+
desc 'Print a guide how to add indoctrinatr-tools integration to .bashrc.'
|
6
|
+
|
7
|
+
def call(**)
|
8
|
+
puts <<~HEREDOC
|
9
|
+
Add this to your .bashrc (and open up a new shell):
|
10
|
+
|
11
|
+
complete -F get_indoctrinatr_targets indoctrinatr
|
12
|
+
function get_indoctrinatr_targets()
|
13
|
+
{
|
14
|
+
COMPREPLY=(`indoctrinatr completions`)
|
15
|
+
}
|
16
|
+
HEREDOC
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Indoctrinatr
|
2
|
+
module Tools
|
3
|
+
module Commands
|
4
|
+
class Check < Dry::CLI::Command
|
5
|
+
desc 'Display the suggested workflow.'
|
6
|
+
|
7
|
+
argument :template_pack_name, desc: 'Name of template pack'
|
8
|
+
|
9
|
+
def call(template_pack_name:, **)
|
10
|
+
template_pack_name = CommandAutocompleteHelpers.handle_autocomplete(template_pack_name)
|
11
|
+
|
12
|
+
Indoctrinatr::Tools::Transactions::TemplatePackErrorChecker.new.call(template_pack_name) do |result|
|
13
|
+
result.success do |message|
|
14
|
+
puts message
|
15
|
+
end
|
16
|
+
|
17
|
+
result.failure do |message|
|
18
|
+
puts message
|
19
|
+
exit 1
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Indoctrinatr
|
2
|
+
module Tools
|
3
|
+
module Commands
|
4
|
+
class CompletionCommands < Dry::CLI::Command
|
5
|
+
def call(**)
|
6
|
+
puts <<~HEREDOC
|
7
|
+
bashcompletion
|
8
|
+
check
|
9
|
+
completions
|
10
|
+
demo
|
11
|
+
doc
|
12
|
+
new
|
13
|
+
pack
|
14
|
+
parse
|
15
|
+
pdf
|
16
|
+
pdf_with_field_names
|
17
|
+
version
|
18
|
+
workflow
|
19
|
+
zshcompletion
|
20
|
+
HEREDOC
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Indoctrinatr
|
2
|
+
module Tools
|
3
|
+
module Commands
|
4
|
+
class Demo < Dry::CLI::Command
|
5
|
+
desc 'Create, compile and pack a demo project.'
|
6
|
+
|
7
|
+
def call(**)
|
8
|
+
Indoctrinatr::Tools::Transactions::TemplatePackDemo.new.call('demo') do |result|
|
9
|
+
result.success do |message|
|
10
|
+
puts message
|
11
|
+
end
|
12
|
+
|
13
|
+
result.failure do |message|
|
14
|
+
puts message
|
15
|
+
exit 1
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Indoctrinatr
|
2
|
+
module Tools
|
3
|
+
module Commands
|
4
|
+
class Doc < Dry::CLI::Command
|
5
|
+
desc 'Create a documentation from a given source folder.'
|
6
|
+
|
7
|
+
argument :template_pack_name, desc: 'Name of template pack'
|
8
|
+
option :keep_aux_files, type: :boolean, default: false, desc: 'The option to keep aux files'
|
9
|
+
|
10
|
+
def call(template_pack_name:, **options)
|
11
|
+
template_pack_name = CommandAutocompleteHelpers.handle_autocomplete(template_pack_name)
|
12
|
+
keep_aux_files = options.fetch(:keep_aux_files)
|
13
|
+
|
14
|
+
Indoctrinatr::Tools::Transactions::TemplatePackDocumentation.new.call(template_pack_name:, keep_aux_files:) do |result|
|
15
|
+
result.success do |message|
|
16
|
+
puts message
|
17
|
+
end
|
18
|
+
|
19
|
+
result.failure do |message|
|
20
|
+
puts message
|
21
|
+
exit 1
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Indoctrinatr
|
2
|
+
module Tools
|
3
|
+
module Commands
|
4
|
+
class Pack < Dry::CLI::Command
|
5
|
+
desc 'Create a Template Pack from a given source folder.'
|
6
|
+
|
7
|
+
argument :template_pack_name, desc: 'Name of template pack'
|
8
|
+
|
9
|
+
def call(template_pack_name:, **)
|
10
|
+
template_pack_name = CommandAutocompleteHelpers.handle_autocomplete(template_pack_name)
|
11
|
+
|
12
|
+
Indoctrinatr::Tools::Transactions::TemplatePackPacker.new.call(template_pack_name) do |result|
|
13
|
+
result.success do |message|
|
14
|
+
puts message
|
15
|
+
end
|
16
|
+
|
17
|
+
result.failure do |message|
|
18
|
+
puts message
|
19
|
+
exit 1
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Indoctrinatr
|
2
|
+
module Tools
|
3
|
+
module Commands
|
4
|
+
class Parse < Dry::CLI::Command
|
5
|
+
desc 'Parse XeTeX file with ERB and default values of Template Pack.'
|
6
|
+
|
7
|
+
argument :template_pack_name, desc: 'Name of template pack'
|
8
|
+
|
9
|
+
def call(template_pack_name:, **)
|
10
|
+
template_pack_name = CommandAutocompleteHelpers.handle_autocomplete(template_pack_name)
|
11
|
+
|
12
|
+
Indoctrinatr::Tools::Transactions::TemplatePackDefaultValuesParser.new.call(template_pack_name) do |result|
|
13
|
+
result.success do |message|
|
14
|
+
puts message
|
15
|
+
end
|
16
|
+
|
17
|
+
result.failure do |message|
|
18
|
+
puts message
|
19
|
+
exit 1
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Indoctrinatr
|
2
|
+
module Tools
|
3
|
+
module Commands
|
4
|
+
class Pdf < Dry::CLI::Command
|
5
|
+
desc 'Compile PDF with default values.'
|
6
|
+
|
7
|
+
argument :template_pack_name, desc: 'Name of template pack'
|
8
|
+
option :keep_aux_files, type: :boolean, default: false, desc: 'The option to keep aux files'
|
9
|
+
|
10
|
+
def call(template_pack_name:, **options)
|
11
|
+
template_pack_name = CommandAutocompleteHelpers.handle_autocomplete(template_pack_name)
|
12
|
+
keep_aux_files = options.fetch(:keep_aux_files)
|
13
|
+
|
14
|
+
Indoctrinatr::Tools::Transactions::TemplatePackDefaultValuesParser.new.call(template_pack_name) do |result|
|
15
|
+
result.success do |message|
|
16
|
+
puts message
|
17
|
+
end
|
18
|
+
|
19
|
+
result.failure do |message|
|
20
|
+
puts message
|
21
|
+
exit 1
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
Indoctrinatr::Tools::Transactions::TemplatePackDefaultValuesCompiler.new.call(template_pack_name:, keep_aux_files:) do |result|
|
26
|
+
result.success do |message|
|
27
|
+
puts message
|
28
|
+
end
|
29
|
+
|
30
|
+
result.failure do |message|
|
31
|
+
puts message
|
32
|
+
exit 1
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Indoctrinatr
|
2
|
+
module Tools
|
3
|
+
module Commands
|
4
|
+
class PdfWithFieldNames < Dry::CLI::Command
|
5
|
+
desc 'Compile PDF with Variable Names as values.'
|
6
|
+
|
7
|
+
argument :template_pack_name, desc: 'Name of template pack'
|
8
|
+
option :keep_aux_files, type: :boolean, default: false, desc: 'The option to keep aux files'
|
9
|
+
|
10
|
+
def call(template_pack_name:, **options)
|
11
|
+
template_pack_name = CommandAutocompleteHelpers.handle_autocomplete(template_pack_name)
|
12
|
+
keep_aux_files = options.fetch(:keep_aux_files)
|
13
|
+
|
14
|
+
Indoctrinatr::Tools::Transactions::TemplatePackFieldnamesCreator.new.call(template_pack_name:, keep_aux_files:) do |result|
|
15
|
+
result.success do |message|
|
16
|
+
puts message
|
17
|
+
end
|
18
|
+
|
19
|
+
result.failure do |message|
|
20
|
+
puts message
|
21
|
+
exit 1
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module Indoctrinatr
|
2
|
+
module Tools
|
3
|
+
module Commands
|
4
|
+
class Scaffold < Dry::CLI::Command
|
5
|
+
desc 'Scaffold new project.'
|
6
|
+
|
7
|
+
argument :template_pack_name, desc: 'Name of template pack'
|
8
|
+
|
9
|
+
def call(template_pack_name: '', **)
|
10
|
+
template_pack_name = CommandAutocompleteHelpers.handle_autocomplete(template_pack_name)
|
11
|
+
|
12
|
+
Indoctrinatr::Tools::Transactions::TemplatePackScaffold.new.call(template_pack_name) do |result|
|
13
|
+
result.success do |message|
|
14
|
+
puts message
|
15
|
+
end
|
16
|
+
|
17
|
+
result.failure do |message|
|
18
|
+
puts message
|
19
|
+
exit 1
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|