muwu 3.1.0 → 3.2.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/lib/muwu/cli/help/concat +2 -4
- data/lib/muwu/controller/controller.rb +1 -1
- data/lib/muwu/project_exception/viewer_missing_home_document.rb +23 -0
- data/lib/muwu/viewer/viewer.rb +18 -11
- data/lib/muwu.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 577c99af43ab26d7d3c9bf2fb9360b1778fb1affbdbce0328b38c0650b2a688a
|
4
|
+
data.tar.gz: 8af68dc1a7130c59efdda85afc0c76876c01d2eac79fb915616557ab0800bc76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6be10f4e37e5470ad79fb598eda0bbc02bfe4e76d1dc059f17bf8f32de90576098372691e2979c3a53a8a5d275ebc430bf7be215128755fa14417eeb682fc53b
|
7
|
+
data.tar.gz: eb55d4dd1d75f943fd600f849cd333a0c8c5721dfd2c42067b911a58f3f7d52dba0e3cbb5c429ec3806ce75863fc0419b9253409e00ffe527979c27a881e365c
|
data/lib/muwu/cli/help/concat
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
- muwu concat
|
2
2
|
- Combine all source files from the outline into a single markdown
|
3
3
|
document.
|
4
|
-
|
5
|
-
* Compiling a project will overwrite any previous output files without
|
6
|
-
any warning.
|
7
4
|
|
8
|
-
*
|
5
|
+
* Compiling a project will overwrite any previous output files without
|
6
|
+
any warning.
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Muwu
|
2
|
+
module ProjectException
|
3
|
+
class ViewerMissingHomeDocument
|
4
|
+
|
5
|
+
|
6
|
+
def initialize
|
7
|
+
$stderr.puts "#{self.class}"
|
8
|
+
end
|
9
|
+
|
10
|
+
|
11
|
+
def report
|
12
|
+
"Viewer cannot find a compiled home document."
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
def type
|
17
|
+
:view
|
18
|
+
end
|
19
|
+
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/muwu/viewer/viewer.rb
CHANGED
@@ -8,23 +8,30 @@ module Muwu
|
|
8
8
|
def initialize(project)
|
9
9
|
document_home = project.manifest.find_document_html_by_index(0)
|
10
10
|
if document_home
|
11
|
-
document_home_filepath = File.join(project.path_compiled, document_home.filename)
|
12
|
-
initialize_viewer(document_home_filepath)
|
11
|
+
@document_home_filepath = File.join(project.path_compiled, document_home.filename)
|
13
12
|
else
|
14
|
-
|
13
|
+
raise ProjectExceptionHandler::Fatal.new(ProjectException::ViewerMissingHomeDocument.new)
|
15
14
|
end
|
16
15
|
end
|
17
16
|
|
18
17
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
end
|
18
|
+
public
|
19
|
+
|
20
|
+
|
21
|
+
def view
|
22
|
+
if @document_home_filepath && File.exist?(@document_home_filepath)
|
23
|
+
view_home_document
|
26
24
|
else
|
27
|
-
|
25
|
+
raise ProjectExceptionHandler::Fatal.new(ProjectException::ViewerMissingHomeDocument.new)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
|
30
|
+
def view_home_document
|
31
|
+
begin
|
32
|
+
system "lynx #{@document_home_filepath}", exception: true
|
33
|
+
rescue Errno::ENOENT
|
34
|
+
raise ProjectExceptionHandler::Fatal.new(ProjectException::LynxNotAvailable.new)
|
28
35
|
end
|
29
36
|
end
|
30
37
|
|
data/lib/muwu.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muwu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eli Harrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-12-
|
11
|
+
date: 2023-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commonmarker
|
@@ -209,6 +209,7 @@ files:
|
|
209
209
|
- lib/muwu/project_exception/subcontents_will_be_generated_automatically copy.rb
|
210
210
|
- lib/muwu/project_exception/target_project_folder_already_exists.rb
|
211
211
|
- lib/muwu/project_exception/text_source_file_not_found.rb
|
212
|
+
- lib/muwu/project_exception/viewer_missing_home_document.rb
|
212
213
|
- lib/muwu/project_exception_handler/fatal.rb
|
213
214
|
- lib/muwu/project_options/project_options.rb
|
214
215
|
- lib/muwu/project_options_builder/project_option_validator.rb
|