coursegen 0.9.4 → 0.9.10
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/Gemfile.lock +6 -6
- data/lib/coursegen.rb +3 -0
- data/lib/coursegen/course/helpers/content_helpers.rb +14 -9
- data/lib/coursegen/course/helpers/visual_helpers.rb +8 -0
- data/lib/coursegen/course/lib/helpers_.rb +2 -1
- data/lib/coursegen/course/lib/nanoc_filters.rb +19 -0
- data/lib/coursegen/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e08a52cfed6836872be228d0a7c6dec8bfa087ee286cf079a76f6db3674a122b
|
4
|
+
data.tar.gz: a8d62798dcb08f373f10b9d632101db57b3a191819b1856e53b1dfe4769744f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3246fa9423de19c68223214da7ffc24a3c10c5b6384a1baf5b8fbeb2504362a7835598103549dbaf74c4c0dc09e409b1d439d19936039baadf15ad9283f32bce
|
7
|
+
data.tar.gz: d018679f27b6895ea70f2692fee9136450a040485fb1e6feaaabea5f567239fff9ade2c9892c1caec1bf906ce9c34f58495f24fd1c0776e1d7e0c2231498cad3
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
coursegen (0.9.
|
4
|
+
coursegen (0.9.10)
|
5
5
|
activesupport
|
6
6
|
adsf
|
7
7
|
byebug
|
@@ -19,7 +19,7 @@ PATH
|
|
19
19
|
GEM
|
20
20
|
remote: https://rubygems.org/
|
21
21
|
specs:
|
22
|
-
activesupport (6.1.
|
22
|
+
activesupport (6.1.3)
|
23
23
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
24
24
|
i18n (>= 1.6, < 2)
|
25
25
|
minitest (>= 5.1)
|
@@ -57,12 +57,12 @@ GEM
|
|
57
57
|
guard-compat (~> 1.0)
|
58
58
|
hamster (3.0.0)
|
59
59
|
concurrent-ruby (~> 1.0)
|
60
|
-
i18n (1.8.
|
60
|
+
i18n (1.8.9)
|
61
61
|
concurrent-ruby (~> 1.0)
|
62
62
|
icalendar (2.7.0)
|
63
63
|
ice_cube (~> 0.16)
|
64
64
|
ice_cube (0.16.3)
|
65
|
-
json (2.
|
65
|
+
json (2.3.0)
|
66
66
|
json_schema (0.20.9)
|
67
67
|
kramdown (2.3.0)
|
68
68
|
rexml
|
@@ -71,7 +71,7 @@ GEM
|
|
71
71
|
rb-inotify (~> 0.9, >= 0.9.10)
|
72
72
|
lumberjack (1.2.8)
|
73
73
|
method_source (1.0.0)
|
74
|
-
minitest (5.14.
|
74
|
+
minitest (5.14.4)
|
75
75
|
nanoc (4.11.23)
|
76
76
|
addressable (~> 2.5)
|
77
77
|
colored (~> 1.2)
|
@@ -125,7 +125,7 @@ GEM
|
|
125
125
|
rb-inotify (0.10.1)
|
126
126
|
ffi (~> 1.0)
|
127
127
|
ref (2.0.0)
|
128
|
-
rexml (3.2.
|
128
|
+
rexml (3.2.3)
|
129
129
|
rspec (3.10.0)
|
130
130
|
rspec-core (~> 3.10.0)
|
131
131
|
rspec-expectations (~> 3.10.0)
|
data/lib/coursegen.rb
CHANGED
@@ -4,6 +4,7 @@ require 'nokogiri'
|
|
4
4
|
|
5
5
|
require 'coursegen/version'
|
6
6
|
require 'coursegen/course/helpers/sidebar_helpers'
|
7
|
+
require 'coursegen/course/helpers/visual_helpers'
|
7
8
|
require 'coursegen/course/helpers/lecture_helpers'
|
8
9
|
require 'coursegen/course/helpers/content_helpers'
|
9
10
|
require 'coursegen/course/helpers/logging_helpers'
|
@@ -26,6 +27,8 @@ require 'coursegen/course/lib/ical_adaptor'
|
|
26
27
|
require 'coursegen/course/helpers/list_of'
|
27
28
|
require 'coursegen/course/helpers/ical_feed_helpers'
|
28
29
|
require 'coursegen/course/lib/helpers_'
|
30
|
+
require 'coursegen/course/lib/nanoc_filters.rb'
|
31
|
+
|
29
32
|
|
30
33
|
# Coursegen is a course curriculum site generator based on nanoc, with
|
31
34
|
# support for sections, lectures, code examples, homeworks, course
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# ContentHelpers is used to annotate content.
|
2
2
|
module ContentHelpers
|
3
|
+
|
3
4
|
def include_topic(item_symbol)
|
4
5
|
incorporated_topic = lookup_nitem('topics', item_symbol.to_s)
|
5
6
|
items[incorporated_topic.identifier.to_s].compiled_content
|
@@ -86,8 +87,12 @@ module ContentHelpers
|
|
86
87
|
%(<img src="/bootstrap/bootstrap-icons-1.0.0/#{icon}.svg" title="#{tooltip}" class="iconbadge">)
|
87
88
|
end
|
88
89
|
|
89
|
-
def
|
90
|
-
%(<svg class="bi
|
90
|
+
def iconbadge3(icon, tooltip, shorttext="")
|
91
|
+
%(<svg class="iconbadge bi" title="#{tooltip}" data-placement="top" data-title="#{tooltip}" data-toggle="tooltip" fill="blue"><use xlink:href="/bootstrap/bootstrap-icons-1.0.0/bootstrap-icons.svg##{icon}"/></svg>#{shorttext})
|
92
|
+
end
|
93
|
+
|
94
|
+
def iconbadge(icon, tooltip, shorttext="")
|
95
|
+
%(<svg class="iconbadge bi" title="#{tooltip}" data-placement="top" data-title="#{tooltip}" data-toggle="tooltip" fill="blue"><use xlink:href="/bootstrap/bootstrap-icons-1.0.0/bootstrap-icons.svg##{icon}"/></svg><span class="icontext" >#{shorttext}</span>)
|
91
96
|
end
|
92
97
|
|
93
98
|
def textbadge(text, tooltip)
|
@@ -99,31 +104,31 @@ module ContentHelpers
|
|
99
104
|
end
|
100
105
|
|
101
106
|
def pdfbadge
|
102
|
-
iconbadge('file-earmark-richtext-fill', 'Submit a pdf file')
|
107
|
+
iconbadge('file-earmark-richtext-fill', 'Submit a pdf file', "pdf")
|
103
108
|
end
|
104
109
|
|
105
110
|
def codebadge
|
106
|
-
iconbadge('file-code-fill', 'Work on code in your portfolio')
|
111
|
+
iconbadge('file-code-fill', 'Work on code in your portfolio', "portfolio")
|
107
112
|
end
|
108
113
|
|
109
114
|
def cloudbadge
|
110
|
-
iconbadge('cloud-fill', 'Work on code in your portfolio')
|
115
|
+
iconbadge('cloud-fill', 'Work on code in your portfolio', 'portfolio')
|
111
116
|
end
|
112
117
|
|
113
118
|
def zipbadge
|
114
|
-
iconbadge('file-earmark-zip-fill', 'Submit work
|
119
|
+
iconbadge('file-earmark-zip-fill', 'Submit work in a zipfile', 'zip')
|
115
120
|
end
|
116
121
|
|
117
122
|
def partbadge
|
118
|
-
iconbadge('heart-half', 'Graded for participation only - pass/fail')
|
123
|
+
iconbadge('heart-half', 'Graded for participation only - pass/fail', 'participation')
|
119
124
|
end
|
120
125
|
|
121
126
|
def timebadge
|
122
|
-
iconbadge('alarm-fill', 'Must be submitted first thing on day of class')
|
127
|
+
iconbadge('alarm-fill', 'Must be submitted first thing on day of class', 'early submit')
|
123
128
|
end
|
124
129
|
|
125
130
|
def teambadge
|
126
|
-
iconbadge('people-fill', 'Team Deliverable')
|
131
|
+
iconbadge('people-fill', 'Team Deliverable', 'team deliverable')
|
127
132
|
end
|
128
133
|
|
129
134
|
def include_image_old(filename_string, extra_class: nil)
|
@@ -0,0 +1,19 @@
|
|
1
|
+
include VisualHelpers
|
2
|
+
|
3
|
+
Nanoc::Filter.define(:handle_shortcodes) do |content, _params = {}|
|
4
|
+
prefix = /:/
|
5
|
+
content
|
6
|
+
.gsub(/^\$\$TOPIC_INCLUDE :(\w+)$/) { "<%= include_topic( :#{Regexp.last_match(1)}) %>" }
|
7
|
+
.gsub(/\$\$TOPIC_LINK :(\w+)$/) { "<%= link_to_topic( :#{Regexp.last_match(1)}) %>" }
|
8
|
+
.gsub(/\$\$SLIDE_TITLE (.+)$/) { "<slide_break></slide_break>\n\n### #{Regexp.last_match(1)}" }
|
9
|
+
.gsub(/\$\$SLIDE_BREAK$/) { "<slide_break></slide_break>" }
|
10
|
+
.gsub(/\$\$LECTURE_END$/) { end_of_lecture }
|
11
|
+
.gsub(/\$\$LECTURE_BEGIN (.+)$/) { "## #{Regexp.last_match(1)} "}
|
12
|
+
.gsub(Regexp.new(prefix.source + /h1 (.+)$/.source), "# \\1 ")
|
13
|
+
.gsub(Regexp.new(prefix.source + /h2 (.+)$/.source), "## \\1 ")
|
14
|
+
.gsub(Regexp.new(prefix.source + /h3 (.+)$/.source), "### \\1 ")
|
15
|
+
.gsub(Regexp.new(prefix.source + /topic_include :(\w+)$/.source), "<%= include_topic( :\\1) %>")
|
16
|
+
.gsub(Regexp.new(prefix.source + /topic_link :(\w+)$/.source), "<%= link_to_topic( :\\1) %>")
|
17
|
+
.gsub(Regexp.new(prefix.source + /slide_title (.+)$/.source), "<slide_break></slide_break>\n\n### \\1")
|
18
|
+
.gsub(Regexp.new(prefix.source + /lecture_end/.source), end_of_lecture)
|
19
|
+
end
|
data/lib/coursegen/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coursegen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pito Salas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -270,8 +270,10 @@ files:
|
|
270
270
|
- lib/coursegen/course/helpers/navigation_helpers.rb
|
271
271
|
- lib/coursegen/course/helpers/sidebar_helpers.rb
|
272
272
|
- lib/coursegen/course/helpers/table_helpers.rb
|
273
|
+
- lib/coursegen/course/helpers/visual_helpers.rb
|
273
274
|
- lib/coursegen/course/lib/helpers_.rb
|
274
275
|
- lib/coursegen/course/lib/ical_adaptor.rb
|
276
|
+
- lib/coursegen/course/lib/nanoc_filters.rb
|
275
277
|
- lib/coursegen/course/lib/search_data_generator.rb
|
276
278
|
- lib/coursegen/course/schedule/schedule_def.rb
|
277
279
|
- lib/coursegen/course/schedule/schedule_feed.rb
|