-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
226 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
module LatexYearlyPlanner | ||
module HighLevel | ||
class Generate < Actor | ||
play Plays::InitializePlannerConfig, | ||
Plays::InitializeI18n, | ||
Plays::InitializeSectioner, | ||
Plays::InitializeIndexer, | ||
Plays::InitializeGenerator, | ||
Plays::InitializeTextDocumentsWriter, | ||
Plays::InitializeCompiler, | ||
Plays::InitializePlanner, | ||
Plays::CreatePlanner | ||
end | ||
end | ||
end |
15 changes: 0 additions & 15 deletions
15
lib/latex_yearly_planner/high_level/initialize_compiler.rb
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
lib/latex_yearly_planner/high_level/initialize_generator.rb
This file was deleted.
Oops, something went wrong.
27 changes: 0 additions & 27 deletions
27
lib/latex_yearly_planner/high_level/initialize_html_compiler.rb
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
lib/latex_yearly_planner/high_level/initialize_html_indexer.rb
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
lib/latex_yearly_planner/high_level/initialize_planner_config.rb
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
lib/latex_yearly_planner/high_level/initialize_sectioner.rb
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
lib/latex_yearly_planner/high_level/initialize_text_documents_writer.rb
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
lib/latex_yearly_planner/high_level/plays/create_planner.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
module LatexYearlyPlanner | ||
module HighLevel | ||
module Plays | ||
class CreatePlanner < Actor | ||
input :planner, allow_nil: false | ||
|
||
def call | ||
planner.create | ||
end | ||
end | ||
end | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
lib/latex_yearly_planner/high_level/plays/initialize_compiler.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
module LatexYearlyPlanner | ||
module HighLevel | ||
module Plays | ||
class InitializeCompiler < Actor | ||
input :workdir, allow_nil: false | ||
input :planner_config, allow_nil: false | ||
output :compiler | ||
|
||
def call | ||
self.compiler = Adapters::TypstCompiler.new(workdir:, planner_config:) | ||
end | ||
end | ||
end | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
lib/latex_yearly_planner/high_level/plays/initialize_generator.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
module LatexYearlyPlanner | ||
module HighLevel | ||
module Plays | ||
class InitializeGenerator < Actor | ||
input :indexer, allow_nil: false | ||
input :sectioner, allow_nil: false | ||
output :generator | ||
|
||
def call | ||
self.generator = Core::Generator.new(indexer:, sectioner:) | ||
end | ||
end | ||
end | ||
end | ||
end |
29 changes: 29 additions & 0 deletions
29
lib/latex_yearly_planner/high_level/plays/initialize_html_compiler.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# frozen_string_literal: true | ||
|
||
module LatexYearlyPlanner | ||
module HighLevel | ||
module Plays | ||
class InitializeHtmlCompiler | ||
include Interactor | ||
|
||
def call | ||
context.html_compiler = Adapters::HtmlCompiler.new(workdir:, planner_config:) | ||
end | ||
|
||
private | ||
|
||
def workdir | ||
raise DevelopmentError, 'workdir is not defined' unless context.workdir | ||
|
||
context.workdir | ||
end | ||
|
||
def planner_config | ||
raise DevelopmentError, 'planner_config is not defined' unless context.planner_config | ||
|
||
context.planner_config | ||
end | ||
end | ||
end | ||
end | ||
end |
23 changes: 23 additions & 0 deletions
23
lib/latex_yearly_planner/high_level/plays/initialize_html_indexer.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# frozen_string_literal: true | ||
|
||
module LatexYearlyPlanner | ||
module HighLevel | ||
module Plays | ||
class InitializeHtmlIndexer | ||
include Interactor | ||
|
||
def call | ||
context.html_indexer = Adapters::HtmlIndexer.new(planner_config:) | ||
end | ||
|
||
private | ||
|
||
def planner_config | ||
raise DevelopmentError, '`planner_config` is not defined' unless context.planner_config | ||
|
||
context.planner_config | ||
end | ||
end | ||
end | ||
end | ||
end |
17 changes: 17 additions & 0 deletions
17
lib/latex_yearly_planner/high_level/plays/initialize_i18n.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# frozen_string_literal: true | ||
|
||
module LatexYearlyPlanner | ||
module HighLevel | ||
module Plays | ||
class InitializeI18n < Actor | ||
input :planner_config, allow_nil: false | ||
input :locales_file_pattern, allow_nil: false | ||
|
||
def call | ||
I18n.load_path = Dir[locales_file_pattern] | ||
I18n.locale = planner_config.locale | ||
end | ||
end | ||
end | ||
end | ||
end |
16 changes: 16 additions & 0 deletions
16
lib/latex_yearly_planner/high_level/plays/initialize_indexer.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
module LatexYearlyPlanner | ||
module HighLevel | ||
module Plays | ||
class InitializeIndexer < Actor | ||
input :planner_config, allow_nil: false | ||
output :indexer | ||
|
||
def call | ||
self.indexer = Adapters::TypstIndexer.new(planner_config:) | ||
end | ||
end | ||
end | ||
end | ||
end |
Oops, something went wrong.