Skip to content
Snippets Groups Projects
Commit 90b894da authored by Greg Wilson's avatar Greg Wilson
Browse files

Refreshing from example

parent 718220df
Branches
Tags
No related merge requests found
......@@ -7,7 +7,7 @@
{% unless episode.break %}
<tr>
<td class="col-md-3">
<a href="{{ site.root }}/{{ episode.url }}">{{ episode.title }}</a>
<a href="{{ site.root }}{{ episode.url }}">{{ episode.title }}</a>
</td>
<td class="col-md-9">
<ul>
......
......@@ -14,13 +14,13 @@
{% endfor %}
<div class="row">
<div class="col-md-1">
<h3>{% if prev_episode %}<a href="{{ site.root }}/{{ prev_episode.url }}"><span class="glyphicon glyphicon-menu-left"></span></a>{% endif %}</h3>
<h3>{% if prev_episode %}<a href="{{ site.root }}{{ prev_episode.url }}"><span class="glyphicon glyphicon-menu-left"></span></a>{% endif %}</h3>
</div>
<div class="col-md-10">
<h3 class="maintitle"><a href="{{ site.root }}/">{{ site.title }}</a></h3>
<h1 class="maintitle">{{ page.title }}</h1>
</div>
<div class="col-md-1">
<h3>{% if next_episode %}<a href="{{ site.root }}/{{ next_episode.url }}"><span class="glyphicon glyphicon-menu-right"></span></a>{% endif %}</h3>
<h3>{% if next_episode %}<a href="{{ site.root }}{{ next_episode.url }}"><span class="glyphicon glyphicon-menu-right"></span></a>{% endif %}</h3>
</div>
</div>
......@@ -34,7 +34,7 @@
{% if multiday %}<td class="col-md-1">{% if episode.start %}Day {{ day }}{% endif %}</td>{% endif %}
<td class="col-md-1">{% if hours < 10 %}0{% endif %}{{ hours }}:{% if minutes < 10 %}0{% endif %}{{ minutes }}</td>
<td class="col-md-3">
<a href="{{ site.root }}/{{ episode.url }}">{{ episode.title }}</a>
<a href="{{ site.root }}{{ episode.url }}">{{ episode.title }}</a>
</td>
<td class="col-md-7">
{% if episode.break %}
......
......@@ -71,7 +71,7 @@ $codeblock-padding: 5px !default;
.callout{ @include bkSetup(#31708f, "\e146"); }
.challenge{ @include bkSetup(#3c763d, "\270f"); }
.getready{ @include bkSetup(#D4C30B, "\e067"); }
.checklist{ @include bkSetup(#D4C30B, "\e067"); }
.keypoints{ @include bkSetup(#0B80F0, "\e101"); }
.objectives{ @include bkSetup(#D4C30B, "\e124"); }
.prereq{ @include bkSetup(#D4C30B, "\e240"); }
......
......@@ -15,8 +15,8 @@ from bs4 import BeautifulSoup
from lxml import etree
# Default configuration.
DEFAULT_CONFIG = '''\
# Default lesson configuration.
LESSON_CONFIG = '''\
patterns:
'*.html':
- has_title_in_head
......@@ -66,6 +66,11 @@ def parse_args():
default=None,
dest='config_file',
help='configuration file')
parser.add_option('-l', '--lesson',
default=False,
action='store_true',
dest='check_lesson',
help='check a lesson')
parser.add_option('-s', '--source',
default='_site',
dest='source_dir',
......@@ -75,10 +80,16 @@ def parse_args():
action='count',
dest='verbose',
help='report actions')
parser.add_option('-w', '--workshop',
default=False,
action='store_true',
dest='check_workshop',
help='check a workshop')
args, extras = parser.parse_args()
_require(not extras, 'Unexpected trailing command-line arguments "{0}"'.format(extras))
_require(args.check_lesson != args.check_workshop, 'Must have exactly one of -l/-w')
return args
......@@ -91,8 +102,10 @@ def read_config(args):
if args.config_file:
with open(args.config_file, 'r') as reader:
args.config = yaml.load(reader)
elif args.check_lesson:
args.config = yaml.load(LESSON_CONFIG)
else:
args.config = yaml.load(DEFAULT_CONFIG)
assert False, 'Do not know what configuration to load'
args.patterns = args.config['patterns']
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment