Logs for #nikola for 2017-12-18

01:31:26 <ralsina> I redid their site once. They would not bother accepting the PR :-P
13:57:26 <KwBot> [nikola] goldengrape opened issue #2935: Dr. Web warns that: two files have virus "JS.DownLoader.426" https://github.com/getnikola/nikola/issues/2935
15:51:31 <KwBot> [nikola] Kwpolska closed issue #2935: Dr. Web warns that: two files have virus "JS.DownLoader.426" https://github.com/getnikola/nikola/issues/2935
15:51:43 <ChrisWarrick> (not really)
17:15:27 <mcmic> Hello
17:16:16 <mcmic> Is there anything in nikola that would allow to pull content from gitlab repo? I would especially be interested into importing the content of a .md file from each repo.
17:30:08 <ralsina> mcmic: not really, but if you can automate the pulling of content with commands you can hook that into a "nikola deploy" profile
17:30:33 <ralsina> It would end up being something like "nikola deploy fetchfromgitlab; nikola build; nikola deploy"
17:42:31 <mcmic> ralsina: How can I include the content of a file in an other file? I did not find anything in the documentation regarding that
17:42:51 <ralsina> mcmic: markdown by default doesn't support includes
17:42:59 <ralsina> mcmic: I think it's an extension in markdown-extras
17:43:17 <ralsina> Maybe we should support includes in a portable way via shortcodes
17:45:04 <mcmic> Yes I was expecting a shortcode
17:45:38 <mcmic> Other people in the project seem to disagree with my automatic idea so we may end up copy pasting anyway
18:00:37 <ralsina> a shortcode should be pretty simple
18:01:09 <ralsina> Since shortcodes can be templates, I expect you can use jinja or mako's include functionality somehow
18:01:21 <ralsina> Otherwise it sounds like a good candidate for a builtin shortcode
21:16:38 <mcmic> What should I put in COMPILERS for markdown to work? Documentation is not very clear about that
21:27:04 <mcmic> I’ve added "markdown": ('.md'), in COMPILERS and it still says it cannot handle .md
21:34:24 <mcmic> wow, adding .mdown to the list fix this problem somehow oO
21:57:02 <ChrisWarrick> mcmic: you didn’t make it a list
21:57:08 <ChrisWarrick> (or a tuple for that matter)
21:57:19 <ChrisWarrick> "markdown": ('.md',),    ← the first comma is important
21:57:28 <ChrisWarrick> although markdown should be in the default COMPILERS set?
22:03:04 <mcmic> ChrisWarrick: It’s the conf.py from a project there was only rest in COMPILERS
22:03:11 <ChrisWarrick> oh
22:03:42 <mcmic> It’s weird that a list with only one element is not considered a list
22:03:48 <mcmic> Is that a python thing?
22:05:00 <ChrisWarrick> It’s called a tuple, and a bit of a syntax oddity
22:05:24 <ChrisWarrick> lists behave as you would expect, but because they have square brackets: [] ['foo'] ['foo', 'bar']
22:06:04 <mcmic> Oh, ok
22:06:07 <ChrisWarrick> but tuples are stranger: () ('foo',) ('foo', 'bar')  — although except for an empty tuple, it’s not the parentheses that make the tuple — it’s the commas that do.  Because ('foo') == 'foo' (unnecessary parentheses removed)
22:06:47 <mcmic> Ok
22:07:16 <mcmic> And why are compilers values tuple and not lists? There can be any number of extensions, no?
22:07:34 <ChrisWarrick> they could be lists
22:07:46 <ChrisWarrick> tuples ≈ lists that cannot be changed
22:07:51 <mcmic> ok