marko 0.3.0 → 0.4.0

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.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/.dockerignore +12 -0
  3. data/.rubocop.yml +45 -0
  4. data/CHANGELOG.md +10 -4
  5. data/Dockerfile +11 -0
  6. data/LICENSE.txt +21 -0
  7. data/README.md +17 -31
  8. data/Rakefile +2 -11
  9. data/exe/marko +4 -22
  10. data/lib/basic.rb +27 -0
  11. data/lib/marko/chain.rb +44 -0
  12. data/lib/marko/cli.rb +119 -129
  13. data/lib/marko/config.rb +30 -20
  14. data/lib/marko/errors.rb +38 -0
  15. data/lib/marko/model/markup.rb +33 -0
  16. data/lib/marko/model/topic.rb +126 -0
  17. data/lib/marko/model/tree_node.rb +34 -0
  18. data/lib/marko/model.rb +10 -0
  19. data/lib/marko/parser/metadata.rb +28 -0
  20. data/lib/marko/parser/source.rb +52 -0
  21. data/lib/marko/parser/topic.rb +33 -0
  22. data/lib/marko/parser.rb +8 -19
  23. data/lib/marko/renderers/artifact.rb +29 -0
  24. data/lib/marko/renderers/content.rb +37 -0
  25. data/lib/marko/renderers/link.rb +19 -0
  26. data/lib/marko/renderers/metadata.rb +34 -0
  27. data/lib/marko/renderers/nested_list.rb +21 -0
  28. data/lib/marko/renderers/nested_tree.rb +22 -0
  29. data/lib/marko/renderers/renderer.rb +17 -0
  30. data/lib/marko/renderers/title.rb +16 -0
  31. data/lib/marko/renderers/topic.rb +24 -0
  32. data/lib/marko/renderers/url.rb +16 -0
  33. data/lib/marko/renderers.rb +17 -0
  34. data/lib/marko/scanner.rb +39 -0
  35. data/lib/marko/tasks/assemble.rb +52 -0
  36. data/lib/marko/tasks/compile.rb +19 -0
  37. data/lib/marko/tasks/load.rb +13 -0
  38. data/lib/marko/tasks/parse.rb +27 -0
  39. data/lib/marko/tasks/scan.rb +18 -0
  40. data/lib/marko/tasks/validate.rb +32 -0
  41. data/lib/marko/tasks.rb +13 -0
  42. data/lib/marko/validators/lost_index.rb +21 -0
  43. data/lib/marko/validators/lost_links.rb +25 -0
  44. data/lib/marko/validators/lost_parent.rb +21 -0
  45. data/lib/marko/validators/non_unique_id.rb +23 -0
  46. data/lib/marko/validators.rb +11 -0
  47. data/lib/marko/version.rb +1 -3
  48. data/lib/marko.rb +11 -43
  49. metadata +47 -85
  50. data/Gemfile +0 -10
  51. data/Gemfile.lock +0 -23
  52. data/STORY.md +0 -44
  53. data/_layouts/footer.md +0 -4
  54. data/_layouts/header.md +0 -3
  55. data/_layouts/layout.html +0 -73
  56. data/_layouts/robots.txt.erb +0 -4
  57. data/_layouts/sitemap.xml.erb +0 -20
  58. data/_layouts/styles.css +0 -92
  59. data/docs/changelog.html +0 -74
  60. data/docs/css/styles.css +0 -92
  61. data/docs/index.html +0 -297
  62. data/docs/readme.html +0 -297
  63. data/docs/robots.txt +0 -4
  64. data/docs/sitemap.xml +0 -30
  65. data/docs/story.html +0 -132
  66. data/lib/assets/demo/README.md +0 -13
  67. data/lib/assets/demo/src/fr/assemble.md +0 -27
  68. data/lib/assets/demo/src/fr/compile.md +0 -25
  69. data/lib/assets/demo/src/fr/markup.md +0 -111
  70. data/lib/assets/demo/src/fr/storage.md +0 -16
  71. data/lib/assets/demo/src/fr/treenode.md +0 -34
  72. data/lib/assets/demo/src/index.md +0 -34
  73. data/lib/assets/demo/src/intro.md +0 -98
  74. data/lib/assets/demo/src/ui/cli.md +0 -26
  75. data/lib/assets/demo/src/ui/gem.md +0 -14
  76. data/lib/assets/demo/src/ur/uc.create.project.md +0 -8
  77. data/lib/assets/demo/src/ur/uc.general.flow.md +0 -14
  78. data/lib/assets/init/README.md +0 -61
  79. data/lib/assets/init/Rakefile +0 -100
  80. data/lib/assets/init/tt/custom.md.tt +0 -19
  81. data/lib/assets/init/tt/default.md.tt +0 -4
  82. data/lib/assets/samples/0_index.md +0 -14
  83. data/lib/assets/samples/1_intro.md +0 -55
  84. data/lib/assets/samples/2_stakh.md +0 -21
  85. data/lib/assets/samples/3_actors.md +0 -10
  86. data/lib/assets/samples/4_cases.md +0 -53
  87. data/lib/assets/samples/5_entities.md +0 -18
  88. data/lib/assets/samples/6_concerns.md +0 -60
  89. data/lib/assets/samples/SRS-IEEE-830-1998.md +0 -293
  90. data/lib/assets/samples/SRS-RUP.md +0 -283
  91. data/lib/assets/samples/business-case.md +0 -116
  92. data/lib/assets/samples/ears.md +0 -112
  93. data/lib/assets/samples/gen_punch_domain.rb +0 -183
  94. data/lib/assets/samples/requirements.md +0 -105
  95. data/lib/assets/samples/stakeholders.png +0 -0
  96. data/lib/assets/samples/vision.md +0 -191
  97. data/lib/marko/artifact.rb +0 -5
  98. data/lib/marko/assembler.rb +0 -83
  99. data/lib/marko/compiler.rb +0 -16
  100. data/lib/marko/gadgets/pluggable.rb +0 -55
  101. data/lib/marko/gadgets/sentry.rb +0 -66
  102. data/lib/marko/gadgets/service.rb +0 -52
  103. data/lib/marko/gadgets.rb +0 -3
  104. data/lib/marko/loader.rb +0 -38
  105. data/lib/marko/markup/compiler.rb +0 -30
  106. data/lib/marko/markup/decorator.rb +0 -80
  107. data/lib/marko/markup/macro.rb +0 -176
  108. data/lib/marko/markup/parser.rb +0 -122
  109. data/lib/marko/markup/storage.rb +0 -118
  110. data/lib/marko/markup/validator.rb +0 -101
  111. data/lib/marko/markup.rb +0 -24
  112. data/lib/marko/services/assemble.rb +0 -16
  113. data/lib/marko/services/compile.rb +0 -30
  114. data/lib/marko/services.rb +0 -2
  115. data/lib/marko/storage.rb +0 -36
  116. data/lib/marko/tree_node.rb +0 -129
  117. data/lib/marko/validator.rb +0 -19
  118. data/marko.gemspec +0 -44
  119. data/sancho.yml +0 -6
@@ -0,0 +1,52 @@
1
+ require_relative '../model'
2
+ require_relative '../errors'
3
+
4
+ module Marko
5
+ module Tasks
6
+
7
+ # Assemble tree
8
+ class Assemble
9
+ def initialize(config)
10
+ @config = config
11
+ @metadata = { id: '0' }
12
+ .merge(config.to_h.slice(:order_index, :author))
13
+ end
14
+
15
+ # @param topics [Array<Model::Topic>]
16
+ # @return [Model::Topic]
17
+ def call(topics)
18
+ @artifact = Model::Topic.new(
19
+ @config.title, '', **@metadata)
20
+
21
+ topics.each{ @artifact.add(it) }
22
+ @artifact.each{ maybe_move(it) }
23
+ inject_ids
24
+ @artifact
25
+ end
26
+
27
+ protected
28
+
29
+ def maybe_move(node)
30
+ return unless node[:parent]
31
+
32
+ parent = @artifact.find{ it.id == node[:parent] }
33
+ return unless parent
34
+
35
+ parent.add(node)
36
+ @artifact.delete(node)
37
+ end
38
+
39
+ def inject_ids
40
+ counter = {}
41
+ no_id = @artifact.select {|node| node.id.empty?}
42
+ no_id.each do
43
+ index = counter[it.parent] || 1
44
+ counter[it.parent] = index + 1
45
+ id = index.to_s.rjust(2, '0')
46
+ id = '.' + id unless it.parent == @artifact
47
+ it.id = id
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -0,0 +1,19 @@
1
+ require_relative '../model'
2
+ require_relative '../errors'
3
+ require_relative '../renderers'
4
+
5
+ module Marko
6
+ module Tasks
7
+
8
+ # Compile tree into markup
9
+ class Compile
10
+
11
+ # @param topic [Model::Topic]
12
+ # @return [String]
13
+ def call(topic)
14
+ Renderers::Artifact.new.render(topic)
15
+ end
16
+
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,13 @@
1
+ module Marko
2
+ module Tasks
3
+
4
+ # Load source files
5
+ class Load
6
+ # @param pattern [String]
7
+ # @return [Array<String>]
8
+ def call(pattern)
9
+ Dir.glob(pattern)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,27 @@
1
+ require_relative '../model'
2
+ require_relative '../errors'
3
+ require_relative '../parser'
4
+
5
+ module Marko
6
+ module Tasks
7
+
8
+ # Parse source files
9
+ class Parse
10
+ # @param payload [Array< Array<Model::Markup> >]
11
+ # @return [Array<Model::Topic>]
12
+ def call(payload)
13
+ parser = Parser::Source.new
14
+
15
+ topics = payload
16
+ .map{ parser.parse(it) }
17
+ .flatten
18
+
19
+ errors = topics.reject{ it.is_a?(Model::Topic) }
20
+ fail Marko::StageError.new('Load stage failed', errors) \
21
+ if errors.any?
22
+
23
+ topics
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,18 @@
1
+ require_relative '../model'
2
+ require_relative '../errors'
3
+ require_relative '../scanner'
4
+
5
+ module Marko
6
+ module Tasks
7
+
8
+ # Scan source files
9
+ class Scan
10
+ # @param payload [Array<String>] filenames
11
+ # @return [Array<Array<Model::Markup>>] each scanned source must be parsed separately
12
+ def call(payload)
13
+ scanner = Scanner.new
14
+ payload.map{ scanner.scan(it) }
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,32 @@
1
+ require_relative '../model'
2
+ require_relative '../errors'
3
+ require_relative '../validators'
4
+
5
+ module Marko
6
+ module Tasks
7
+
8
+ # Validate tree
9
+ class Validate
10
+
11
+ # @param topic [Model::Topic]
12
+ def call(topic)
13
+ validators =
14
+ [ Validators::NonUniqueId,
15
+ Validators::LostParent,
16
+ Validators::LostIndex,
17
+ Validators::LostLinks
18
+ ].map(&:new)
19
+
20
+ errors = validators
21
+ .inject([]){|errors, validator| errors << validator.call(topic) }
22
+ .flatten
23
+
24
+ fail Marko::StageError.new('Check stage failed', errors) \
25
+ if errors.any?
26
+
27
+ topic
28
+ end
29
+
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,13 @@
1
+ require_relative 'tasks/load'
2
+ require_relative 'tasks/scan'
3
+ require_relative 'tasks/parse'
4
+ require_relative 'tasks/assemble'
5
+ require_relative 'tasks/validate'
6
+ require_relative 'tasks/compile'
7
+
8
+ module Marko
9
+
10
+ # Tasks
11
+ module Tasks
12
+ end
13
+ end
@@ -0,0 +1,21 @@
1
+ require_relative '../errors'
2
+
3
+ module Marko
4
+ module Validators
5
+
6
+ # Lost parent validator
7
+ class LostIndex
8
+ # @param tree [Enumerable]
9
+ def call(tree)
10
+ faulty = tree.drop(1)
11
+ .select{ it.lost_order_index.any? }
12
+
13
+ faulty.map do |e|
14
+ message = "lost order_index #{e.lost_order_index.join(', ')} in #{e.markup}"
15
+ Marko::ValidatorError.new(message)
16
+ end
17
+ end
18
+ end
19
+
20
+ end
21
+ end
@@ -0,0 +1,25 @@
1
+ require_relative '../errors'
2
+
3
+ module Marko
4
+ module Validators
5
+
6
+ # Lost links validator
7
+ class LostLinks
8
+
9
+ # @param tree [Enumerable]
10
+ def call(tree)
11
+ lost_links = tree.inject([]) do |memo, topic|
12
+ lost = topic.links.reject{ topic.find_by_id(it) }
13
+ memo << [topic, lost] if lost.any?
14
+ memo
15
+ end
16
+
17
+ lost_links.map do |e, lost|
18
+ message = "lost link #{lost.join(', ')} in #{e.markup}"
19
+ Marko::ValidatorError.new(message)
20
+ end
21
+ end
22
+ end
23
+
24
+ end
25
+ end
@@ -0,0 +1,21 @@
1
+ require_relative '../errors'
2
+
3
+ module Marko
4
+ module Validators
5
+
6
+ # Lost parent validator
7
+ class LostParent
8
+ # @param tree [Enumerable]
9
+ def call(tree)
10
+ faulty = tree
11
+ .select{ it[:parent] && it&.parent&.id != it[:parent] }
12
+
13
+ faulty.map do
14
+ message = "lost parent [#{it[:parent]}] in #{it.markup}"
15
+ Marko::ValidatorError.new(message)
16
+ end
17
+ end
18
+ end
19
+
20
+ end
21
+ end
@@ -0,0 +1,23 @@
1
+ require_relative '../errors'
2
+
3
+ module Marko
4
+ module Validators
5
+
6
+ # Non unique id validator
7
+ class NonUniqueId
8
+ # @param tree [Enumerable]
9
+ def call(tree)
10
+ topics = tree
11
+ .group_by(&:id)
12
+ .select{|_, items| items.size > 1 }
13
+
14
+ topics.map do |id, items|
15
+ sources = items.map{" #{it.markup}"}.join(?\n)
16
+ message = "the same id [#{id}] found in\n#{sources}"
17
+ Marko::ValidatorError.new(message)
18
+ end
19
+ end
20
+ end
21
+
22
+ end
23
+ end
@@ -0,0 +1,11 @@
1
+ require_relative 'validators/non_unique_id'
2
+ require_relative 'validators/lost_parent'
3
+ require_relative 'validators/lost_index'
4
+ require_relative 'validators/lost_links'
5
+
6
+ module Marko
7
+
8
+ # Validators namespace
9
+ module Validators
10
+ end
11
+ end
data/lib/marko/version.rb CHANGED
@@ -1,5 +1,3 @@
1
- # frozen_string_literal: true
2
-
3
1
  module Marko
4
- VERSION = "0.3.0"
2
+ VERSION = '0.4.0'
5
3
  end
data/lib/marko.rb CHANGED
@@ -1,45 +1,13 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative "marko/version"
4
- require_relative "marko/gadgets"
5
- require_relative "marko/tree_node"
6
- require_relative "marko/storage"
7
- require_relative "marko/parser"
8
- require_relative "marko/validator"
9
- require_relative "marko/assembler"
10
- require_relative "marko/compiler"
11
- require_relative "marko/config"
12
- require_relative "marko/markup"
13
- require_relative "marko/services"
14
- require_relative "marko/loader"
15
- require_relative "marko/cli"
16
-
1
+ require_relative 'marko/errors'
2
+ require_relative 'marko/model'
3
+ require_relative 'marko/renderers'
4
+ require_relative 'marko/parser'
5
+ require_relative 'marko/validators'
6
+ require_relative 'marko/tasks'
7
+ require_relative 'marko/config'
8
+ require_relative 'marko/chain'
9
+ require_relative 'marko/cli'
10
+
11
+ # Marko marckup generator namespace
17
12
  module Marko
18
-
19
- class << self
20
- def root
21
- File.dirname __dir__
22
- end
23
-
24
- def demo
25
- File.join(root, 'lib', 'assets', 'demo')
26
- end
27
-
28
- def samples
29
- File.join(root, 'lib', 'assets', 'samples')
30
- end
31
-
32
- # helper method for assemblage
33
- # @see Marko::Services::Assemble
34
- def assemble(&block)
35
- Services::Assemble.(&block)
36
- end
37
-
38
- # helper method for compilation
39
- # @see Marko::Services::Compile
40
- def compile(tree: nil, template: '', filename: '', &block)
41
- Services::Compile.(
42
- tree: tree, template: template, filename: filename, &block)
43
- end
44
- end
45
13
  end
metadata CHANGED
@@ -1,19 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: marko
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
- - Nikolay Voynov
8
- autorequire:
7
+ - nvoynov
9
8
  bindir: exe
10
9
  cert_chain: []
11
- date: 2023-11-22 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies: []
13
- description: |
14
- Marko supplies a "docs-as-code" approach for compiling bulky software artifacts by providing source storage, original plain text markup, compiler templates, command-line and Gem interfaces.
15
-
16
- Having the assembled artifact, it can be analyzed, enriched by extra data, served as a source for deriving subdued artifacts, etc.
12
+ description: Marko assembles separated markup sources into one artifact tree.
17
13
  email:
18
14
  - nvoynov@gmail.com
19
15
  executables:
@@ -21,93 +17,61 @@ executables:
21
17
  extensions: []
22
18
  extra_rdoc_files: []
23
19
  files:
20
+ - ".dockerignore"
21
+ - ".rubocop.yml"
24
22
  - CHANGELOG.md
25
- - Gemfile
26
- - Gemfile.lock
23
+ - Dockerfile
24
+ - LICENSE.txt
27
25
  - README.md
28
26
  - Rakefile
29
- - STORY.md
30
- - _layouts/footer.md
31
- - _layouts/header.md
32
- - _layouts/layout.html
33
- - _layouts/robots.txt.erb
34
- - _layouts/sitemap.xml.erb
35
- - _layouts/styles.css
36
- - docs/changelog.html
37
- - docs/css/styles.css
38
- - docs/index.html
39
- - docs/readme.html
40
- - docs/robots.txt
41
- - docs/sitemap.xml
42
- - docs/story.html
43
27
  - exe/marko
44
- - lib/assets/demo/README.md
45
- - lib/assets/demo/src/fr/assemble.md
46
- - lib/assets/demo/src/fr/compile.md
47
- - lib/assets/demo/src/fr/markup.md
48
- - lib/assets/demo/src/fr/storage.md
49
- - lib/assets/demo/src/fr/treenode.md
50
- - lib/assets/demo/src/index.md
51
- - lib/assets/demo/src/intro.md
52
- - lib/assets/demo/src/ui/cli.md
53
- - lib/assets/demo/src/ui/gem.md
54
- - lib/assets/demo/src/ur/uc.create.project.md
55
- - lib/assets/demo/src/ur/uc.general.flow.md
56
- - lib/assets/init/README.md
57
- - lib/assets/init/Rakefile
58
- - lib/assets/init/tt/custom.md.tt
59
- - lib/assets/init/tt/default.md.tt
60
- - lib/assets/samples/0_index.md
61
- - lib/assets/samples/1_intro.md
62
- - lib/assets/samples/2_stakh.md
63
- - lib/assets/samples/3_actors.md
64
- - lib/assets/samples/4_cases.md
65
- - lib/assets/samples/5_entities.md
66
- - lib/assets/samples/6_concerns.md
67
- - lib/assets/samples/SRS-IEEE-830-1998.md
68
- - lib/assets/samples/SRS-RUP.md
69
- - lib/assets/samples/business-case.md
70
- - lib/assets/samples/ears.md
71
- - lib/assets/samples/gen_punch_domain.rb
72
- - lib/assets/samples/requirements.md
73
- - lib/assets/samples/stakeholders.png
74
- - lib/assets/samples/vision.md
28
+ - lib/basic.rb
75
29
  - lib/marko.rb
76
- - lib/marko/artifact.rb
77
- - lib/marko/assembler.rb
30
+ - lib/marko/chain.rb
78
31
  - lib/marko/cli.rb
79
- - lib/marko/compiler.rb
80
32
  - lib/marko/config.rb
81
- - lib/marko/gadgets.rb
82
- - lib/marko/gadgets/pluggable.rb
83
- - lib/marko/gadgets/sentry.rb
84
- - lib/marko/gadgets/service.rb
85
- - lib/marko/loader.rb
86
- - lib/marko/markup.rb
87
- - lib/marko/markup/compiler.rb
88
- - lib/marko/markup/decorator.rb
89
- - lib/marko/markup/macro.rb
90
- - lib/marko/markup/parser.rb
91
- - lib/marko/markup/storage.rb
92
- - lib/marko/markup/validator.rb
33
+ - lib/marko/errors.rb
34
+ - lib/marko/model.rb
35
+ - lib/marko/model/markup.rb
36
+ - lib/marko/model/topic.rb
37
+ - lib/marko/model/tree_node.rb
93
38
  - lib/marko/parser.rb
94
- - lib/marko/services.rb
95
- - lib/marko/services/assemble.rb
96
- - lib/marko/services/compile.rb
97
- - lib/marko/storage.rb
98
- - lib/marko/tree_node.rb
99
- - lib/marko/validator.rb
39
+ - lib/marko/parser/metadata.rb
40
+ - lib/marko/parser/source.rb
41
+ - lib/marko/parser/topic.rb
42
+ - lib/marko/renderers.rb
43
+ - lib/marko/renderers/artifact.rb
44
+ - lib/marko/renderers/content.rb
45
+ - lib/marko/renderers/link.rb
46
+ - lib/marko/renderers/metadata.rb
47
+ - lib/marko/renderers/nested_list.rb
48
+ - lib/marko/renderers/nested_tree.rb
49
+ - lib/marko/renderers/renderer.rb
50
+ - lib/marko/renderers/title.rb
51
+ - lib/marko/renderers/topic.rb
52
+ - lib/marko/renderers/url.rb
53
+ - lib/marko/scanner.rb
54
+ - lib/marko/tasks.rb
55
+ - lib/marko/tasks/assemble.rb
56
+ - lib/marko/tasks/compile.rb
57
+ - lib/marko/tasks/load.rb
58
+ - lib/marko/tasks/parse.rb
59
+ - lib/marko/tasks/scan.rb
60
+ - lib/marko/tasks/validate.rb
61
+ - lib/marko/validators.rb
62
+ - lib/marko/validators/lost_index.rb
63
+ - lib/marko/validators/lost_links.rb
64
+ - lib/marko/validators/lost_parent.rb
65
+ - lib/marko/validators/non_unique_id.rb
100
66
  - lib/marko/version.rb
101
- - marko.gemspec
102
- - sancho.yml
103
67
  homepage: https://github.com/nvoynov/marko
104
- licenses: []
68
+ licenses:
69
+ - MIT
105
70
  metadata:
106
71
  allowed_push_host: https://rubygems.org
107
72
  homepage_uri: https://github.com/nvoynov/marko
108
73
  source_code_uri: https://github.com/nvoynov/marko
109
74
  changelog_uri: https://github.com/nvoynov/marko/CHANGELOG.md
110
- post_install_message:
111
75
  rdoc_options: []
112
76
  require_paths:
113
77
  - lib
@@ -115,16 +79,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
115
79
  requirements:
116
80
  - - ">="
117
81
  - !ruby/object:Gem::Version
118
- version: 2.6.0
82
+ version: '3.4'
119
83
  required_rubygems_version: !ruby/object:Gem::Requirement
120
84
  requirements:
121
85
  - - ">="
122
86
  - !ruby/object:Gem::Version
123
87
  version: '0'
124
88
  requirements: []
125
- rubygems_version: 3.4.19
126
- signing_key:
89
+ rubygems_version: 3.6.9
127
90
  specification_version: 4
128
- summary: Marko is a markup compiler that builds a tree from separated markup sources
129
- and compiles it into a deliverable artifact.
91
+ summary: Marko is a markdown separate sources compiler.
130
92
  test_files: []
data/Gemfile DELETED
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "https://rubygems.org"
4
-
5
- # Specify your gem's dependencies in marko.gemspec
6
- gemspec
7
-
8
- gem "rake", "~> 13.0"
9
-
10
- gem "minitest", "~> 5.0"
data/Gemfile.lock DELETED
@@ -1,23 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- marko (0.3.0)
5
-
6
- GEM
7
- remote: https://rubygems.org/
8
- specs:
9
- minitest (5.16.3)
10
- rake (13.0.6)
11
-
12
- PLATFORMS
13
- x64-mingw-ucrt
14
- x64-mingw32
15
- x86_64-linux
16
-
17
- DEPENDENCIES
18
- marko!
19
- minitest (~> 5.0)
20
- rake (~> 13.0)
21
-
22
- BUNDLED WITH
23
- 2.4.5
data/STORY.md DELETED
@@ -1,44 +0,0 @@
1
- ---
2
- title: Marko Story
3
- date: 2023-01-26
4
- ...
5
-
6
- [Marko](https://github.com/nvoynov/marko) is the result of my ten-year journey with Ruby playing the Business Analyst role.
7
-
8
- ## Childhood, 2012
9
-
10
- Somewhere in between 2011 and 2014 I was playing Software Engineer role in some BigKnownCo where my first and foremost working tool was Microsoft Word 2007. Requirements specifications and Architecture design documents Artifacts that I was mainly working on often consisted of one and more hundreds of pages and it was such a pain to deal with in MS Word which was the corporate standard.
11
-
12
- In simple words it just gone crazy on large documents, the program consumed all my RAM, document navigation was slow, the program simply stopped responding, which entailed restarting the process with a loss of changes; or even worse, the loss of style formatting that is invisible to the eye when you simply cannot see it that the formatting was lost somewhere on the 225th page.
13
-
14
- > So problem was clear "__The problem of__ the lack of simple reliable tools and approaches for writing software artifacts __affects__ technical writers who develop and manage the artifacts __the impact of which is__ they tend to choose.."
15
-
16
- And I come up with the idea to create something light, simple and reliable to eliminate the MS Word from my work experience once and for all. This time I was curious about using YAML for storing requirements just inside file system. And I regularly done some estimations and prioritization for requirements, so I decided that FPA, PERT, and Risk-Value prioritization will be valuable features here.
17
-
18
- It was my first serious diving into Ruby for few weeks. I succeeded in reading / writing YAML and even provided estimations algorithms. I fall in love with Ruby. But from user perspective (I was the user) it was complete failure. Writing YAML manually was just unforgivable but that time I was obsessed with the format.
19
-
20
- > YAML was chosen just because this days I dramatically reduced time for load configuration of my target service provisioning system, that stored its configuration tree in RDBMS that causes ~5 000 000 selects for reading and about the same number insert/update for writing. It just reduced to 20 000 instead of 5 000 000.
21
-
22
- ## Adolescence, 2014 - 2015
23
-
24
- It took two years to return to the subject, I left that job in 2014 and got haft year off. This time I discovered Markdown and static site generators, and I decided on Markdown as my primary markup format, where each source is just a plain markdown file with some metadata excerpt.
25
-
26
- Things were going well and in a few months, I got something quite usable. Estimations algorithms were thrown out; markup sources were assembled in one artifact that was translated into HTML by Kramdown. I named it "Creq" for "console requirements" and since then I assembled all software artifacts in my own tool.
27
-
28
- ## Youth, since 2015
29
-
30
- Using my tool daily on a regular basis I discovered Pandoc and then can translate my artifact into any supported format; provided more advanced artifact templates, and provided a few templates for different purposes (draft, customer deliverable, etc.), added macros for tree node body.
31
-
32
- This time I named my tool Clerq because it just was my regular tool - I started my day from `$ git checkout -b new_feature` and finished with merging the branch, assembling new requirements increment, and pushing into git for my development team.
33
-
34
- In 2018 I have read The Clean Architecture I took my first clumsy attempts to apply it for Clerq.
35
-
36
- ## Marko, 2022
37
-
38
- The last time I used Clerq for two months in July 2022. I noticed that time that I use only "create a new project" and "build the artifact" commands. And I realized that there is nothing about requirements - just about artifact assembling.
39
-
40
- So I took two weeks and finished 2022 with a git commit on Dec 31, 2022 :)
41
-
42
- The Marko purpose is assembling markup artifact from separated markup sources. Its interfaces are simple and clear. It could be naturally extended through Rakefile for any specific purpose related to visiting artifacts tree nodes.
43
-
44
- This is the first time I feel for a product that there are nothing I want to take or change. Just "Right Product, Done Right, Managed Messy"
data/_layouts/footer.md DELETED
@@ -1,4 +0,0 @@
1
- <div id="footer">
2
- ***
3
- © 2022-2023 <a href="http://nvoynov.github.io/">nvoynov</a>
4
- </div>
data/_layouts/header.md DELETED
@@ -1,3 +0,0 @@
1
- <p class="navbar">
2
- [ = **"Marko" Markup Compiler** = [Readme](readme.html) ~ [Changelog](changelog.html) ~ [Story](story.html) ~ [Github](https://github.com/nvoynov/sancho)]{.smallcaps}
3
- </p>