Nikola for my performance subsite

95 views
Skip to first unread message

Kay Hayen

unread,
Apr 12, 2014, 1:26:29 PM4/12/14
to nikola-...@googlegroups.com
Hello,

I was just attempting to setup Nikola to render my performance graphs as a
separate site. So I did "new_site", and I couldn't observe any effect. Probably
this explains:

[~/repos]> mkdir t
[~/repos]> cd t/
[~/repos/t]> ../nikola/scripts/nikola new_site
[2014-04-12T17:04:38Z] WARNING: Nikola: Could not guess locale for language en, using locale C
[2014-04-12T17:04:38Z] ERROR: Nikola: This command needs to run inside an existing Nikola site.

I am not updated for a while, so maybe that's fixed already.

Then next up, I wanted to disable archive, and rss feed generation, as it's not going to have any
posts (yet). I put this:

DISABLED_PLUGINS = [ "render_mustache", "local_search", "render_archive", "generate_rss" ]

At render time, it got me this:

TaskError - taskid:render_indexes:output/index.html
PythonAction Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/doit/action.py", line 360, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "../nikola/scripts/../nikola/nikola.py", line 603, in render_template
    template_name, None, local_context)
  File "/data/home/hayen/repos/nikola/nikola/plugins/template/mako.py", line 88, in render_template
    data = template.render_unicode(**context)
  File "/usr/lib/python2.7/dist-packages/mako/template.py", line 452, in render_unicode
    as_unicode=True)
  File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 807, in _render
    **_kwargs_for_callable(callable_, data))
  File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 839, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 865, in _exec_template
    callable_(context, *args, **kwargs)
  File "/data/home/hayen/repos/nikola-perf/cache/.mako.tmp/base.tmpl.py", line 89, in render_body
    __M_writer(unicode(bootstrap.html_head()))
  File "/data/home/hayen/repos/nikola-perf/cache/.mako.tmp/bootstrap_helper.tmpl.py", line 182, in render_html_head
    __M_writer(unicode(_link('rss', None)))
  File "../nikola/scripts/../nikola/nikola.py", line 767, in link
    return self.path(*args, is_link=True)
  File "../nikola/scripts/../nikola/nikola.py", line 731, in path
    path = self.path_handlers[kind](name, lang)
KeyError: 'rss'

Not sure, means, I am to disable indexes as well, seems it won't work without the other. Also "render_tags" is affected.

So with this all disabled, how do you recommend to get author "index.html" from that, I didn't find anything that suggested, and this didn't do anything: PAGES = (
    ( "index.rst", "", "story.tmpl" ),

Nor did:

    ( "*.rst", ".", "story.tmpl" ),

while having an "index.rst" in the site root directory. Only when I changed this to:



but still got me:

PythonAction Error
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/doit/action.py", line 360, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "../nikola/scripts/../nikola/nikola.py", line 603, in render_template
    template_name, None, local_context)
  File "/data/home/hayen/repos/nikola/nikola/plugins/template/mako.py", line 88, in render_template
    data = template.render_unicode(**context)
  File "/usr/lib/python2.7/dist-packages/mako/template.py", line 452, in render_unicode
    as_unicode=True)
  File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 807, in _render
    **_kwargs_for_callable(callable_, data))
  File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 839, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/usr/lib/python2.7/dist-packages/mako/runtime.py", line 865, in _exec_template
    callable_(context, *args, **kwargs)
  File "/data/home/hayen/repos/nikola-perf/cache/.mako.tmp/base.tmpl.py", line 89, in render_body
    __M_writer(unicode(bootstrap.html_head()))
  File "/data/home/hayen/repos/nikola-perf/cache/.mako.tmp/bootstrap_helper.tmpl.py", line 182, in render_html_head
    __M_writer(unicode(_link('rss', None)))
  File "../nikola/scripts/../nikola/nikola.py", line 767, in link
    return self.path(*args, is_link=True)
  File "../nikola/scripts/../nikola/nikola.py", line 731, in path
    path = self.path_handlers[kind](name, lang)
KeyError: 'rss'

I figure, I am attempting to do something very unsupported. :/

I don't want to change the theme, as it should be the same as for the main site. I suppose themes got "RSS" kind of totally hardwired, and I am for now forced to use RSS it seems.

BTW: Puting "rss_link" in global context to "None" didn't change anything.

Yours,
Kay

Chris “Kwpolska” Warrick

unread,
Apr 12, 2014, 2:22:56 PM4/12/14
to Nikola—Discuss
On Sat, Apr 12, 2014 at 7:26 PM, Kay Hayen <kay....@gmail.com> wrote:
> Hello,
>
> I was just attempting to setup Nikola to render my performance graphs as a
> separate site. So I did "new_site", and I couldn't observe any effect.
> Probably
> this explains:
>
> [~/repos]> mkdir t
> [~/repos]> cd t/
> [~/repos/t]> ../nikola/scripts/nikola new_site
> [2014-04-12T17:04:38Z] WARNING: Nikola: Could not guess locale for language
> en, using locale C
> [2014-04-12T17:04:38Z] ERROR: Nikola: This command needs to run inside an
> existing Nikola site.

Pretty sure that’s not a thing. It should be `nikola init`.

> Then next up, I wanted to disable archive, and rss feed generation, as it's
> not going to have any
> posts (yet). I put this:
>
> DISABLED_PLUGINS = [ "render_mustache", "local_search", "render_archive",
> "generate_rss" ]

DISABLED_PLUGINS is basically not supported. It’s flaky and leads to
unexpected errors. We can’t guarantee it will not fail.
Something is seemingly missing here…
Set a standalone RSS_LINK setting to a string that evaluates to True
(eg. a space). Whether it’s used or not is determined by `if
rss_link:`.

I also suggest you disable the plugin responsible for index generation.

--
Chris “Kwpolska” Warrick <http://kwpolska.tk>
PGP: 5EAAEA16
stop html mail | always bottom-post | only UTF-8 makes sense

Kay Hayen

unread,
Apr 12, 2014, 3:25:24 PM4/12/14
to nikola-...@googlegroups.com
Hello Chris,

> [~/repos]> mkdir t
> [~/repos]> cd t/
> [~/repos/t]> ../nikola/scripts/nikola new_site
> [2014-04-12T17:04:38Z] WARNING: Nikola: Could not guess locale for language
> en, using locale C
> [2014-04-12T17:04:38Z] ERROR: Nikola: This command needs to run inside an
> existing Nikola site.

Pretty sure that’s not a thing.  It should be `nikola init`.

Oh, I can put whatever command I want to, and it wouldn't say anything different. I
suggest to improve the error message to check if I even provided a legal command
or to tell me the only legal command.

Especially because "nikola list" doesn't include "init" for me.

../nikola/scripts/nikola list
[2014-04-12T19:10:42Z] WARNING: Nikola: Could not guess locale for language en, using locale C
Scanning posts..done!
build_less         Generate CSS out of LESS sources.
build_sass         Generate CSS out of Sass sources.
copy_assets        Copy theme assets into output.
copy_files         Copy static files into the output folder.
create_bundles     Bundle assets using WebAssets.
generate_rss       Generate RSS feeds.
post_render        Group of tasks to be executes after site is rendered.
redirect           Generate redirections
render_archive     Render the post archives.
render_galleries   Render image galleries.
render_indexes     Render the blog indexes.
render_listings    Render pretty listings.
render_pages       Render pages into output.
render_posts       Build HTML fragments from metadata and text.
render_site        Group of tasks to render the site.
render_sources     Copy page sources into the output.
render_tags        Render the tag/category pages and feeds.
sitemap            Generate google sitemap.

And "scanning posts", seriously? That output outside a site seems wrong too. And I
noticed it created an "output" and "cache" directory. Seriously, that's surprising.
 
> Then next up, I wanted to disable archive, and rss feed generation, as it's
> not going to have any
> posts (yet). I put this:
>
> DISABLED_PLUGINS = [ "render_mustache", "local_search", "render_archive",
> "generate_rss" ]

DISABLED_PLUGINS is basically not supported.  It’s flaky and leads to
unexpected errors.  We can’t guarantee it will not fail.

I had to disable the first two though, because otherwise they would be generated which I don't want to.

And why are they called "plugins" if they cannot be disabled.

But of course I agree, that that is not a possible interface to support. I still would like to
be able to tell these plugins to shut up and do nothing.


>
>     ( "*.rst", ".", "story.tmpl" ),
>
> while having an "index.rst" in the site root directory. Only when I changed
> this to:

Something is seemingly missing here…

The only thing that worked for me is this:

    ( "index/*.rst", ".", "story.tmpl" ),

with a file index/index.rst.

I am surprised that I have to use folders. That I can't just list pages individually. I mean
the patterns are nice yes, but I would have expected to be able to put:

    ( "index.rst", ".", "story.tmpl" ),

and have that work. The name of the variable is "PAGES" and suggests that it's not
about directories and patterns. Or maybe I am doing it wrong.

> I figure, I am attempting to do something very unsupported. :/
>
> I don't want to change the theme, as it should be the same as for the main
> site. I suppose themes got "RSS" kind of totally hardwired, and I am for now
> forced to use RSS it seems.
>
> BTW: Puting "rss_link" in global context to "None" didn't change anything.

Set a standalone RSS_LINK setting to a string that evaluates to True
(eg. a space).  Whether it’s used or not is determined by `if
rss_link:`.

My "rss_link" as "None", which evaluates to False does fine. Actually I have that
setting from my main site, where it doesn't preclude RSS generation:

RSS_PATH = ""
RSS_LINK = None

which then are put into global_context in lower case. I have a comment in it, which
says RSS_LINK is for use inside the feed. And RSS_PATH will be injected into the
RSS path. I wonder how to get /dev/null into it.


I also suggest you disable the plugin responsible for index generation.

I did that already. Currently I have this:

 DISABLED_PLUGINS = [ "render_mustache", "local_search", "render_archive", "render_indexes", "render_tags" ]

I just have the empty and pointless "RSS" link in every generated HTML file. I will look for ways to get tid of that.

If Nikola doesn't support non-RSS sites, I guess, "sed" and "rm" will have to rescue me once more...

Yours,
Kay


Roberto Alsina

unread,
Apr 12, 2014, 6:37:17 PM4/12/14
to nikola-...@googlegroups.com
On 12/04/14 16:25, Kay Hayen wrote:
Hello Chris,

> [~/repos]> mkdir t
> [~/repos]> cd t/
> [~/repos/t]> ../nikola/scripts/nikola new_site
> [2014-04-12T17:04:38Z] WARNING: Nikola: Could not guess locale for language
> en, using locale C
> [2014-04-12T17:04:38Z] ERROR: Nikola: This command needs to run inside an
> existing Nikola site.

Pretty sure that’s not a thing.  It should be `nikola init`.

Oh, I can put whatever command I want to, and it wouldn't say anything different. I
suggest to improve the error message to check if I even provided a legal command
or to tell me the only legal command.

Especially because "nikola list" doesn't include "init" for me.


nikola list gives you a list of tasks for nikola build. If you try nikola help it's there:

  nikola init                 create a Nikola site in the specified folder



../nikola/scripts/nikola list
[2014-04-12T19:10:42Z] WARNING: Nikola: Could not guess locale for language en, using locale C
Scanning posts..done!
build_less         Generate CSS out of LESS sources.
build_sass         Generate CSS out of Sass sources.
copy_assets        Copy theme assets into output.
copy_files         Copy static files into the output folder.
create_bundles     Bundle assets using WebAssets.
generate_rss       Generate RSS feeds.
post_render        Group of tasks to be executes after site is rendered.
redirect           Generate redirections
render_archive     Render the post archives.
render_galleries   Render image galleries.
render_indexes     Render the blog indexes.
render_listings    Render pretty listings.
render_pages       Render pages into output.
render_posts       Build HTML fragments from metadata and text.
render_site        Group of tasks to render the site.
render_sources     Copy page sources into the output.
render_tags        Render the tag/category pages and feeds.
sitemap            Generate google sitemap.

And "scanning posts", seriously? That output outside a site seems wrong too. And I
noticed it created an "output" and "cache" directory. Seriously, that's surprising.

Oh, yes, that's a bug. nikola list should fail if you are not in a site.



 
> Then next up, I wanted to disable archive, and rss feed generation, as it's
> not going to have any
> posts (yet). I put this:
>
> DISABLED_PLUGINS = [ "render_mustache", "local_search", "render_archive",
> "generate_rss" ]

DISABLED_PLUGINS is basically not supported.  It’s flaky and leads to
unexpected errors.  We can’t guarantee it will not fail.

I had to disable the first two though, because otherwise they would be generated which I don't want to.


DISABLED_PLUGINS is supported, those first two are being moved into optional plugins repo soon, too.


And why are they called "plugins" if they cannot be disabled.

But of course I agree, that that is not a possible interface to support. I still would like to
be able to tell these plugins to shut up and do nothing.


Use DISABLED_PLUGINS, that's what it's for.




>
>     ( "*.rst", ".", "story.tmpl" ),
>
> while having an "index.rst" in the site root directory. Only when I changed
> this to:

Something is seemingly missing here…

The only thing that worked for me is this:

    ( "index/*.rst", ".", "story.tmpl" ),

with a file index/index.rst.

I am surprised that I have to use folders. That I can't just list pages individually. I mean
the patterns are nice yes, but I would have expected to be able to put:

    ( "index.rst", ".", "story.tmpl" ),


No, you can't. That has never worked. and is exactly the same as ("stories/*.rst", "", "story.tmpl") and adding a stories/index.rst
In general we don't put data files along the conf.py



and have that work. The name of the variable is "PAGES" and suggests that it's not
about directories and patterns. Or maybe I am doing it wrong.

It's a glob to find the pages. It says

# POSTS and PAGES contains (wildcard, destination, template) tuples.
It's in the manual, too.



> I figure, I am attempting to do something very unsupported. :/
>
> I don't want to change the theme, as it should be the same as for the main
> site. I suppose themes got "RSS" kind of totally hardwired, and I am for now
> forced to use RSS it seems.
>
> BTW: Puting "rss_link" in global context to "None" didn't change anything.

Set a standalone RSS_LINK setting to a string that evaluates to True
(eg. a space).  Whether it’s used or not is determined by `if
rss_link:`.

My "rss_link" as "None", which evaluates to False does fine. Actually I have that
setting from my main site, where it doesn't preclude RSS generation:

RSS_PATH = ""
RSS_LINK = None


We don't have a way to preclude RSS generation.


which then are put into global_context in lower case. I have a comment in it, which
says RSS_LINK is for use inside the feed. And RSS_PATH will be injected into the
RSS path. I wonder how to get /dev/null into it.

You can't without replacing base_helper.tmpl with one where html_feedlinks is empty:

<%def name="html_feedlinks()">
</%def>



I also suggest you disable the plugin responsible for index generation.

I did that already. Currently I have this:

 DISABLED_PLUGINS = [ "render_mustache", "local_search", "render_archive", "render_indexes", "render_tags" ]

I just have the empty and pointless "RSS" link in every generated HTML file. I will look for ways to get tid of that.

Please add a feature request. I never even thought about disabling RSS.

Roberto Alsina

unread,
Apr 12, 2014, 6:59:04 PM4/12/14
to nikola-...@googlegroups.com
On 12/04/14 16:25, Kay Hayen wrote:
>
> And "scanning posts", seriously? That output outside a site seems
> wrong too. And I
> noticed it created an "output" and "cache" directory. Seriously,
> that's surprising.

Fixed in
https://github.com/getnikola/nikola/commit/44fe320fb169da8d971bcd54fbcbf93d5096e937

Kay Hayen

unread,
Apr 13, 2014, 2:03:21 PM4/13/14
to nikola-...@googlegroups.com

Hello Roberto,
> DISABLED_PLUGINS is supported, those first two are being moved into
> optional plugins repo soon, too.
>
>> And why are they called "plugins" if they cannot be disabled.
>>
>> But of course I agree, that that is not a possible interface to
>> support. I still would like to
>> be able to tell these plugins to shut up and do nothing.
>>
>
> Use DISABLED_PLUGINS, that's what it's for.

OK then.

>>
>> I am surprised that I have to use folders. That I can't just list
>> pages individually. I mean
>> the patterns are nice yes, but I would have expected to be able to put:
>>
>> ( "index.rst", ".", "story.tmpl" ),
>>
>
> No, you can't. That has never worked. and is exactly the same as
> ("stories/*.rst", "", "story.tmpl") and adding a stories/index.rst
> In general we don't put data files along the conf.py

I take it.

BTW: I am not sure how if that's documented, because it requires to
disable a plugin, which seems not documented.

>> and have that work. The name of the variable is "PAGES" and suggests
>> that it's not
>> about directories and patterns. Or maybe I am doing it wrong.
>
> It's a glob to find the pages. It says
>
> # POSTS and PAGES contains (wildcard, destination, template) tuples.
> It's in the manual, too.

To me "index.rst" is a pattern too, just not one matching a lot of
things. And I don't get why you want to
preclude people from putting posts or pages top level. Isn't the a user
decision.


>> I also suggest you disable the plugin responsible for index
>> generation.
>>
>>
>> I did that already. Currently I have this:
>>
>> DISABLED_PLUGINS = [ "render_mustache", "local_search",
>> "render_archive", "render_indexes", "render_tags" ]
>>
>> I just have the empty and pointless "RSS" link in every generated
>> HTML file. I will look for ways to get tid of that.
>
> Please add a feature request. I never even thought about disabling RSS.

Done.

While doing this performance thing, I noticed other things too.

There is no support for matplotlib graphs. Sphinx rest seems to allow
some things there. So I wrote Python
code to generate the graphs from data. That was probably necessary
anyway. But it is strange that except
for dot, I couldn't find things.

I can't easily do "forward / backward" on the pages. Right now, one has
to go forward and backward to
navigate, not good at all. But since I generate the pages myself anyway,
there will be ways to address
that.

There is nothing to render a "diff" output. I am using raw HTML with
difflib.HtmlDiff now, but it doesn't
quite look right.

Check out
http://speedcenter.nuitka.net/constructs/construct-localvariableassign.html
to get an idea
what I am doing. But beware that the menu bar will make you escape the
site. Ultimately the two sites
of mine will integrate in a nicer way (back and forth), when I consider
this ready.

Yours,
Kay

Chris “Kwpolska” Warrick

unread,
Apr 13, 2014, 2:35:12 PM4/13/14
to Nikola—Discuss
Hello,

On Sun, Apr 13, 2014 at 8:03 PM, Kay Hayen <kay....@gmail.com> wrote:
> There is no support for matplotlib graphs. Sphinx rest seems to allow some
> things there. So I wrote Python
> code to generate the graphs from data. That was probably necessary anyway.
> But it is strange that except
> for dot, I couldn't find things.

Nikola supports pygal, which can get you graphs (and nicer ones than
matplotlib’s at that):

https://github.com/getnikola/nikola/blob/master/nikola/plugins/compile/rest/chart.py

> To me "index.rst" is a pattern too, just not one matching a lot of things.

Nikola will accept a 'stories/index.rst' pattern, provided that it
appears before 'stories/*.rst'. That’s all you need.

> And I don't get why you want to preclude people from putting posts or pages top level. Isn't the a user decision.

We don’t allow files in the main directory, because this could easily
result in a mess and problems. What sort of problems, may you ask?

With POSTS = (('posts/*.rst', 'p', 'post.tmpl')):

mkdir -p posts/foo
vim posts/foo/bar.rst
nikola build

And output/p/foo/bar.html comes to life.

Now, imagine we allowed '*.rst' as the pattern. And you have a
problem, because there are tons of other subdirectories, that might
contain *.rst files (including output/, cache/, posts/, stories/ and
sometimes galleries/*/). Everything is broken and everything
conflicts with everything.

(and no, special-casing things that do not contain wildcards is not
the way to go. Detecting that is hard, and you don’t gain much
anyways.)

Kay Hayen

unread,
Apr 13, 2014, 5:04:35 PM4/13/14
to nikola-...@googlegroups.com

Hello Chris,

Am 13.04.2014 20:35, schrieb Chris “Kwpolska” Warrick:
> Hello,
>
> On Sun, Apr 13, 2014 at 8:03 PM, Kay Hayen <kay....@gmail.com> wrote:
>> There is no support for matplotlib graphs. Sphinx rest seems to allow some
>> things there. So I wrote Python
>> code to generate the graphs from data. That was probably necessary anyway.
>> But it is strange that except
>> for dot, I couldn't find things.
> Nikola supports pygal, which can get you graphs (and nicer ones than
> matplotlib’s at that):
>
> https://github.com/getnikola/nikola/blob/master/nikola/plugins/compile/rest/chart.py

That's absolutely down to it. Thanks for the link. I couldn't convince
"install_plugin rest_chart"
or anything like that to work. Seems I will take the effort to rebase to
exclude issues due to it.

Yours,
Kay

Roberto Alsina

unread,
Apr 14, 2014, 6:24:30 AM4/14/14
to nikola-...@googlegroups.com
On Sun, Apr 13, 2014 at 3:03 PM, Kay Hayen <kay....@gmail.com> wrote:

While doing this performance thing, I noticed other things too.

There is no support for matplotlib graphs. Sphinx rest seems to allow some things there.  So I wrote Python
code to generate the graphs from data. That was probably necessary anyway. But it is strange that except
for dot, I couldn't find things.


I am not familiar with matplotlib graphs in sphinx. Can you give me any pointers? We have pygal which does really handsome graphs, but the more the merrier :-)

 
I can't easily do "forward / backward" on the pages. Right now, one has to go forward and backward to
navigate, not good at all. But since I generate the pages myself anyway, there will be ways to address
that.

There is nothing to render a "diff" output. I am using raw HTML with difflib.HtmlDiff now, but it doesn't
quite look right.


This would be a great thing to add! I'll see what I can find.

 
Check out http://speedcenter.nuitka.net/constructs/construct-localvariableassign.html to get an idea
what I am doing. But beware that the menu bar will make you escape the site. Ultimately the two sites
of mine will integrate in a nicer way (back and forth), when I consider this ready.

Yours,
Kay


--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kay Hayen

unread,
Apr 15, 2014, 3:24:11 AM4/15/14
to nikola-...@googlegroups.com

Hello Roberto,

> There is no support for matplotlib graphs. Sphinx rest seems to
> allow some things there. So I wrote Python
> code to generate the graphs from data. That was probably necessary
> anyway. But it is strange that except
> for dot, I couldn't find things.
>
>
> I am not familiar with matplotlib graphs in sphinx. Can you give me any
> pointers? We have pygal which does really handsome graphs, but the more
> the merrier :-)

Check out this:

http://matplotlib.org/sampledoc/extensions.html#inserting-matplotlib-plots

It spares me from coming up with a filename for the SVG and an extra
step to run it.

In fact, PyGal is likely perfectly fine for what I am doing, which is
just bulks of barcharts and the like. But for technical and scientific
stuff, matplotlib is the standard, isn't it?

> I can't easily do "forward / backward" on the pages. Right now, one
> has to go forward and backward to
> navigate, not good at all. But since I generate the pages myself
> anyway, there will be ways to address
> that.
>
> There is nothing to render a "diff" output. I am using raw HTML with
> difflib.HtmlDiff now, but it doesn't
> quite look right.
>
>
> This would be a great thing to add! I'll see what I can find.

That would be great. Using raw HTML naturally will always look out of
place. And if you can, having a diff of stuff after being syntax
highlighted would be ... I don't know super fantastic. But merely
added/changed/removed colored context diff, will already do. :-)

Yours,
Kay

Roberto Alsina

unread,
Apr 15, 2014, 3:30:58 AM4/15/14
to nikola-...@googlegroups.com
On 15/04/14 04:24, Kay Hayen wrote:
>
> Hello Roberto,
>
> > There is no support for matplotlib graphs. Sphinx rest seems to
>> allow some things there. So I wrote Python
>> code to generate the graphs from data. That was probably necessary
>> anyway. But it is strange that except
>> for dot, I couldn't find things.
>>
>>
>> I am not familiar with matplotlib graphs in sphinx. Can you give me any
>> pointers? We have pygal which does really handsome graphs, but the more
>> the merrier :-)
>
> Check out this:
>
> http://matplotlib.org/sampledoc/extensions.html#inserting-matplotlib-plots
>
>
> It spares me from coming up with a filename for the SVG and an extra
> step to run it.
>
> In fact, PyGal is likely perfectly fine for what I am doing, which is
> just bulks of barcharts and the like. But for technical and scientific
> stuff, matplotlib is the standard, isn't it?
>

Yeah, something like that is perfectly doable (as a rule, if it can be
done in Sphinx, it probably can be done in Nikola with some effort)
Added Issue #1242 to track it


>> I can't easily do "forward / backward" on the pages. Right now, one
>> has to go forward and backward to
>> navigate, not good at all. But since I generate the pages myself
>> anyway, there will be ways to address
>> that.
>>
>> There is nothing to render a "diff" output. I am using raw HTML with
>> difflib.HtmlDiff now, but it doesn't
>> quite look right.
>>
>>
>> This would be a great thing to add! I'll see what I can find.
>
> That would be great. Using raw HTML naturally will always look out of
> place. And if you can, having a diff of stuff after being syntax
> highlighted would be ... I don't know super fantastic. But merely
> added/changed/removed colored context diff, will already do. :-)

I am looking for software I can "steal" to do this without much success.
Surely there is something, somewhere. If not... well, it's just more work.
Added Issue #1243 to track it.

No promises about when I'll tackle these, but they will eventually happen.

Roberto Alsina

unread,
Apr 15, 2014, 11:41:32 AM4/15/14
to nikola-...@googlegroups.com
On 15/04/14 04:30, Roberto Alsina wrote:
>>>
>>>
>>> There is nothing to render a "diff" output. I am using raw HTML
>>> with
>>> difflib.HtmlDiff now, but it doesn't
>>> quite look right.
>>>
>>>
>>> This would be a great thing to add! I'll see what I can find.
>>
>> That would be great. Using raw HTML naturally will always look out of
>> place. And if you can, having a diff of stuff after being syntax
>> highlighted would be ... I don't know super fantastic. But merely
>> added/changed/removed colored context diff, will already do. :-)
>
> I am looking for software I can "steal" to do this without much
> success. Surely there is something, somewhere. If not... well, it's
> just more work.
> Added Issue #1243 to track it.
>
> No promises about when I'll tackle these, but they will eventually
> happen.

I added a basic plugin using Htmldiff and some CSS, works ok-ish, needs
some love still.
Reply all
Reply to author
Forward
0 new messages