asciisourcerer 0.4.0 → 0.6.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/BILL_OF_MATERIALS.adoc +17 -0
- data/README.adoc +111 -11
- data/lib/sourcerer/_docs/partials/liquid-filters-by-kind.adoc +3227 -0
- data/lib/sourcerer/_docs/partials/liquid-filters-by-source.adoc +3155 -0
- data/lib/sourcerer/asciidoc.rb +10 -3
- data/lib/sourcerer/builder.rb +1 -1
- data/lib/sourcerer/jekyll/bootstrapper.rb +1 -2
- data/lib/sourcerer/jekyll/liquid/filters.rb +295 -0
- data/lib/sourcerer/jekyll/liquid/preserve_missing_variables.rb +148 -0
- data/lib/sourcerer/jekyll/liquid/tags.rb +31 -3
- data/lib/sourcerer/jekyll.rb +8 -2
- data/lib/sourcerer/mark_down_grade.rb +181 -28
- data/lib/sourcerer/rendering.rb +70 -41
- data/lib/sourcerer/source_skim/config.rb +8 -2
- data/lib/sourcerer/source_skim/ruby_skimmer.rb +83 -0
- data/lib/sourcerer/source_skim/skimmer.rb +95 -3
- data/lib/sourcerer/source_skim.rb +11 -2
- data/lib/sourcerer/util/gem_uri.rb +34 -0
- data/lib/sourcerer/version.rb +1 -1
- data/lib/sourcerer.rb +0 -1
- data/specs/data/liquid-filters.yml +1314 -0
- metadata +22 -2
- data/specs/docs/frontmatter-reader_prd.adoc +0 -47
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: asciisourcerer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- DocOps Lab
|
|
@@ -107,6 +107,20 @@ dependencies:
|
|
|
107
107
|
- - "~>"
|
|
108
108
|
- !ruby/object:Gem::Version
|
|
109
109
|
version: '2.1'
|
|
110
|
+
- !ruby/object:Gem::Dependency
|
|
111
|
+
name: yard
|
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
|
113
|
+
requirements:
|
|
114
|
+
- - "~>"
|
|
115
|
+
- !ruby/object:Gem::Version
|
|
116
|
+
version: '0.9'
|
|
117
|
+
type: :runtime
|
|
118
|
+
prerelease: false
|
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
120
|
+
requirements:
|
|
121
|
+
- - "~>"
|
|
122
|
+
- !ruby/object:Gem::Version
|
|
123
|
+
version: '0.9'
|
|
110
124
|
description: AsciiSourcerer provides APIs for specialized use of AsciiDoc (attribute
|
|
111
125
|
extraction, special conversions), YAML (tag handling), and Liquid (Jekyll-based
|
|
112
126
|
rendering, custom tags, etc).
|
|
@@ -116,17 +130,21 @@ executables: []
|
|
|
116
130
|
extensions: []
|
|
117
131
|
extra_rdoc_files: []
|
|
118
132
|
files:
|
|
133
|
+
- BILL_OF_MATERIALS.adoc
|
|
119
134
|
- LICENSE
|
|
120
135
|
- README.adoc
|
|
121
136
|
- lib/asciidoctor/extensions/source-skim-tree-processor/extension.rb
|
|
122
137
|
- lib/asciisourcerer.rb
|
|
123
138
|
- lib/sourcerer.rb
|
|
139
|
+
- lib/sourcerer/_docs/partials/liquid-filters-by-kind.adoc
|
|
140
|
+
- lib/sourcerer/_docs/partials/liquid-filters-by-source.adoc
|
|
124
141
|
- lib/sourcerer/asciidoc.rb
|
|
125
142
|
- lib/sourcerer/builder.rb
|
|
126
143
|
- lib/sourcerer/jekyll.rb
|
|
127
144
|
- lib/sourcerer/jekyll/bootstrapper.rb
|
|
128
145
|
- lib/sourcerer/jekyll/liquid/file_system.rb
|
|
129
146
|
- lib/sourcerer/jekyll/liquid/filters.rb
|
|
147
|
+
- lib/sourcerer/jekyll/liquid/preserve_missing_variables.rb
|
|
130
148
|
- lib/sourcerer/jekyll/liquid/tags.rb
|
|
131
149
|
- lib/sourcerer/jekyll/monkeypatches.rb
|
|
132
150
|
- lib/sourcerer/mark_down_grade.rb
|
|
@@ -135,17 +153,19 @@ files:
|
|
|
135
153
|
- lib/sourcerer/source_skim.rb
|
|
136
154
|
- lib/sourcerer/source_skim/config.rb
|
|
137
155
|
- lib/sourcerer/source_skim/markdown_skimmer.rb
|
|
156
|
+
- lib/sourcerer/source_skim/ruby_skimmer.rb
|
|
138
157
|
- lib/sourcerer/source_skim/skimmer.rb
|
|
139
158
|
- lib/sourcerer/sync.rb
|
|
140
159
|
- lib/sourcerer/sync/block_parser.rb
|
|
141
160
|
- lib/sourcerer/sync/cast.rb
|
|
142
161
|
- lib/sourcerer/templating.rb
|
|
162
|
+
- lib/sourcerer/util/gem_uri.rb
|
|
143
163
|
- lib/sourcerer/util/list_amend.rb
|
|
144
164
|
- lib/sourcerer/util/pathifier.rb
|
|
145
165
|
- lib/sourcerer/version.rb
|
|
146
166
|
- lib/sourcerer/yaml.rb
|
|
147
167
|
- lib/sourcerer/yaml_frontmatter.rb
|
|
148
|
-
- specs/
|
|
168
|
+
- specs/data/liquid-filters.yml
|
|
149
169
|
homepage: https://github.com/DocOps/asciisourcerer
|
|
150
170
|
licenses:
|
|
151
171
|
- MIT
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
= FrontmatterReader: PRD
|
|
2
|
-
:status: implemented
|
|
3
|
-
:version: 0.3.0
|
|
4
|
-
|
|
5
|
-
== Overview
|
|
6
|
-
|
|
7
|
-
`Sourcerer::SourceSkim` needs to incorporate a simpler Skim object that derives data/content from frontmatter YAML and section headings.
|
|
8
|
-
|
|
9
|
-
`SourceSkim` currently generates structured, semantic metadata and content outline about AsciiDoc source files.
|
|
10
|
-
But many use cases (Jekyll site pipelines, documentation indexers, cross-repo search tools) need to work with Markdown files, as well:
|
|
11
|
-
|
|
12
|
-
* Frontmatter data (layout, title, navigation hints, etc.)
|
|
13
|
-
* Section headings and their levels:
|
|
14
|
-
** a flat list of section headings and their line numbers, and/or
|
|
15
|
-
** a nested hierarchy of sections and subsections.
|
|
16
|
-
|
|
17
|
-
== Output Shape
|
|
18
|
-
|
|
19
|
-
The core operation yields a skim in one of the following configurations:
|
|
20
|
-
|
|
21
|
-
[source,ruby]
|
|
22
|
-
----
|
|
23
|
-
{
|
|
24
|
-
title: 'Introduction', # String — from first # heading
|
|
25
|
-
frontmatter: { 'layout' => 'docs', 'title' => 'Guide', ... }, # Hash
|
|
26
|
-
sections_flat: [ # Array
|
|
27
|
-
{ text: 'Getting Started', level: 1, starts_at: 13 },
|
|
28
|
-
{ text: 'Prerequisites', level: 2, starts_at: 17 },
|
|
29
|
-
...
|
|
30
|
-
]
|
|
31
|
-
}
|
|
32
|
-
----
|
|
33
|
-
|
|
34
|
-
[source,ruby]
|
|
35
|
-
----
|
|
36
|
-
{
|
|
37
|
-
title: 'Introduction', # String
|
|
38
|
-
frontmatter: { 'layout' => 'docs', 'title' => 'Guide', ... }, # Hash
|
|
39
|
-
sections_tree: [ # Array (same shape as AsciiDoc)
|
|
40
|
-
{ text: 'Getting Started', level: 1, starts_at: 13, sections: [
|
|
41
|
-
{ text: 'Prerequisites', level: 2, starts_at: 17, sections: [] }
|
|
42
|
-
] },
|
|
43
|
-
{ text: 'Advanced Usage', level: 1, starts_at: 22, sections: [] },
|
|
44
|
-
...
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
----
|