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.
- checksums.yaml +4 -4
- data/.dockerignore +12 -0
- data/.rubocop.yml +45 -0
- data/CHANGELOG.md +10 -4
- data/Dockerfile +11 -0
- data/LICENSE.txt +21 -0
- data/README.md +17 -31
- data/Rakefile +2 -11
- data/exe/marko +4 -22
- data/lib/basic.rb +27 -0
- data/lib/marko/chain.rb +44 -0
- data/lib/marko/cli.rb +119 -129
- data/lib/marko/config.rb +30 -20
- data/lib/marko/errors.rb +38 -0
- data/lib/marko/model/markup.rb +33 -0
- data/lib/marko/model/topic.rb +126 -0
- data/lib/marko/model/tree_node.rb +34 -0
- data/lib/marko/model.rb +10 -0
- data/lib/marko/parser/metadata.rb +28 -0
- data/lib/marko/parser/source.rb +52 -0
- data/lib/marko/parser/topic.rb +33 -0
- data/lib/marko/parser.rb +8 -19
- data/lib/marko/renderers/artifact.rb +29 -0
- data/lib/marko/renderers/content.rb +37 -0
- data/lib/marko/renderers/link.rb +19 -0
- data/lib/marko/renderers/metadata.rb +34 -0
- data/lib/marko/renderers/nested_list.rb +21 -0
- data/lib/marko/renderers/nested_tree.rb +22 -0
- data/lib/marko/renderers/renderer.rb +17 -0
- data/lib/marko/renderers/title.rb +16 -0
- data/lib/marko/renderers/topic.rb +24 -0
- data/lib/marko/renderers/url.rb +16 -0
- data/lib/marko/renderers.rb +17 -0
- data/lib/marko/scanner.rb +39 -0
- data/lib/marko/tasks/assemble.rb +52 -0
- data/lib/marko/tasks/compile.rb +19 -0
- data/lib/marko/tasks/load.rb +13 -0
- data/lib/marko/tasks/parse.rb +27 -0
- data/lib/marko/tasks/scan.rb +18 -0
- data/lib/marko/tasks/validate.rb +32 -0
- data/lib/marko/tasks.rb +13 -0
- data/lib/marko/validators/lost_index.rb +21 -0
- data/lib/marko/validators/lost_links.rb +25 -0
- data/lib/marko/validators/lost_parent.rb +21 -0
- data/lib/marko/validators/non_unique_id.rb +23 -0
- data/lib/marko/validators.rb +11 -0
- data/lib/marko/version.rb +1 -3
- data/lib/marko.rb +11 -43
- metadata +47 -85
- data/Gemfile +0 -10
- data/Gemfile.lock +0 -23
- data/STORY.md +0 -44
- data/_layouts/footer.md +0 -4
- data/_layouts/header.md +0 -3
- data/_layouts/layout.html +0 -73
- data/_layouts/robots.txt.erb +0 -4
- data/_layouts/sitemap.xml.erb +0 -20
- data/_layouts/styles.css +0 -92
- data/docs/changelog.html +0 -74
- data/docs/css/styles.css +0 -92
- data/docs/index.html +0 -297
- data/docs/readme.html +0 -297
- data/docs/robots.txt +0 -4
- data/docs/sitemap.xml +0 -30
- data/docs/story.html +0 -132
- data/lib/assets/demo/README.md +0 -13
- data/lib/assets/demo/src/fr/assemble.md +0 -27
- data/lib/assets/demo/src/fr/compile.md +0 -25
- data/lib/assets/demo/src/fr/markup.md +0 -111
- data/lib/assets/demo/src/fr/storage.md +0 -16
- data/lib/assets/demo/src/fr/treenode.md +0 -34
- data/lib/assets/demo/src/index.md +0 -34
- data/lib/assets/demo/src/intro.md +0 -98
- data/lib/assets/demo/src/ui/cli.md +0 -26
- data/lib/assets/demo/src/ui/gem.md +0 -14
- data/lib/assets/demo/src/ur/uc.create.project.md +0 -8
- data/lib/assets/demo/src/ur/uc.general.flow.md +0 -14
- data/lib/assets/init/README.md +0 -61
- data/lib/assets/init/Rakefile +0 -100
- data/lib/assets/init/tt/custom.md.tt +0 -19
- data/lib/assets/init/tt/default.md.tt +0 -4
- data/lib/assets/samples/0_index.md +0 -14
- data/lib/assets/samples/1_intro.md +0 -55
- data/lib/assets/samples/2_stakh.md +0 -21
- data/lib/assets/samples/3_actors.md +0 -10
- data/lib/assets/samples/4_cases.md +0 -53
- data/lib/assets/samples/5_entities.md +0 -18
- data/lib/assets/samples/6_concerns.md +0 -60
- data/lib/assets/samples/SRS-IEEE-830-1998.md +0 -293
- data/lib/assets/samples/SRS-RUP.md +0 -283
- data/lib/assets/samples/business-case.md +0 -116
- data/lib/assets/samples/ears.md +0 -112
- data/lib/assets/samples/gen_punch_domain.rb +0 -183
- data/lib/assets/samples/requirements.md +0 -105
- data/lib/assets/samples/stakeholders.png +0 -0
- data/lib/assets/samples/vision.md +0 -191
- data/lib/marko/artifact.rb +0 -5
- data/lib/marko/assembler.rb +0 -83
- data/lib/marko/compiler.rb +0 -16
- data/lib/marko/gadgets/pluggable.rb +0 -55
- data/lib/marko/gadgets/sentry.rb +0 -66
- data/lib/marko/gadgets/service.rb +0 -52
- data/lib/marko/gadgets.rb +0 -3
- data/lib/marko/loader.rb +0 -38
- data/lib/marko/markup/compiler.rb +0 -30
- data/lib/marko/markup/decorator.rb +0 -80
- data/lib/marko/markup/macro.rb +0 -176
- data/lib/marko/markup/parser.rb +0 -122
- data/lib/marko/markup/storage.rb +0 -118
- data/lib/marko/markup/validator.rb +0 -101
- data/lib/marko/markup.rb +0 -24
- data/lib/marko/services/assemble.rb +0 -16
- data/lib/marko/services/compile.rb +0 -30
- data/lib/marko/services.rb +0 -2
- data/lib/marko/storage.rb +0 -36
- data/lib/marko/tree_node.rb +0 -129
- data/lib/marko/validator.rb +0 -19
- data/marko.gemspec +0 -44
- 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,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
|
data/lib/marko/tasks.rb
ADDED
@@ -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
|
data/lib/marko/version.rb
CHANGED
data/lib/marko.rb
CHANGED
@@ -1,45 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require_relative
|
4
|
-
require_relative
|
5
|
-
require_relative
|
6
|
-
require_relative
|
7
|
-
require_relative
|
8
|
-
require_relative
|
9
|
-
require_relative
|
10
|
-
|
11
|
-
|
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.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
8
|
-
autorequire:
|
7
|
+
- nvoynov
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
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
|
-
-
|
26
|
-
-
|
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/
|
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/
|
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/
|
82
|
-
- lib/marko/
|
83
|
-
- lib/marko/
|
84
|
-
- lib/marko/
|
85
|
-
- lib/marko/
|
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/
|
95
|
-
- lib/marko/
|
96
|
-
- lib/marko/
|
97
|
-
- lib/marko/
|
98
|
-
- lib/marko/
|
99
|
-
- lib/marko/
|
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:
|
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.
|
126
|
-
signing_key:
|
89
|
+
rubygems_version: 3.6.9
|
127
90
|
specification_version: 4
|
128
|
-
summary: Marko is a
|
129
|
-
and compiles it into a deliverable artifact.
|
91
|
+
summary: Marko is a markdown separate sources compiler.
|
130
92
|
test_files: []
|
data/Gemfile
DELETED
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
data/_layouts/header.md
DELETED