-
Taggnostr
-
I haven't done anything particular with stylesheets in my code, so I don't know if I am supposed to specify them somewhere or what
-
willingc
howdy Taggnostr
-
Taggnostr
hello willingc
-
willingc
Are there any stylesheet settings in your theme.conf
-
Taggnostr
I don't have a theme.conf (afaik)
-
I'm trying to create a new builder to output html in a specific format
-
I already have the writer, and I was successfully using it with plain docutils, and now I'm trying to port it to sphinx
-
willingc
Hmm...have you tried it with the latest version of Sphinx
-
Taggnostr
and afaiu that requires me to write a new extension that defines a new builder
-
no, but maybe themes are related
-
I inherited from the default HTML builder, so maybe that looks for themes
-
even though the error comes from docutils, not from sphinx
-
willingc
Do you know where the Values object comes from?
-
Taggnostr
<class 'docutils.frontend.Values'>
-
not sure where it comes from though
-
willingc
Hmm...
-
I'm looking at the Sphinx source for some clues
-
Taggnostr
maybe I shouldn't inherit from the base HTML builder and write a new builder from scratch, except that I'm not sure how to do it
-
I already tried looking at the source, but haven't found anything interesting so far...
-
willingc
Did you look here? sphinx/sphinx/writers/html.py
-
Taggnostr
yes
-
willingc
looks like line 54 has stylesheet
-
Taggnostr
I tried to add that bit but nothing changed
-
willingc
blech
-
Taggnostr
also the one at line 40
-
now I'm trying to write the translator without inheriting from the one at line 64
-
willingc
-
Taggnostr
in theory my writer is able to output the full html document, so it shouldn't care about themes, templates, and other similar things
-
I just want to use some extra directives that sphinx provides
-
so my plan was to stick my writer in sphinx, and then add the missing visit_node/depart_node (or probably inherit them from sphinx)
-
-
like this one
-
so this means I need to inherit from HTMLTranslator after all, and then I guess I'll have to override all the extra things I don't need
-
willingc
-
Taggnostr
yes, this is what I did for my basic writer :)
-
willingc
So writer was subclassed and the translator too.
-
I'm stumped
-
-
Taggnostr
I don't know, I think it's added automatically because I don't even see it in the config
-
but maybe I'm doing some progress
-
-
my class subclasses this one, and in the __init__ I call the baseclass with super()
-
however I get other errors related to the settings, and I found out that the settings are document.settings, and document is passed in *args
-
so I can just do document.settings.stylesheet = None and the error goes away
-
willingc
I think the ext.oldcmarkup.py was removed
-
Taggnostr
and I get this instead: AttributeError: 'Values' object has no attribute 'stylesheet_path'
-
I'll try to define them all and see what happens, even though I think I might need to copy them from somewhere else...
-
willingc
When you do a custom theme you need to specify path and stylesheet
-
Set the path to None and see what happens
-
Taggnostr
fwiw when I was using the writer directly I was specifying the stylesheets with the --stylesheet option
-
but that's something I could look at later
-
willingc
Is it working now?
-
Taggnostr
maybe I got what's going on
-
the missing settings are on the translator rather than the document
-
willingc
oh for goodness sake
-
I bet you are correct
-
Taggnostr
I just tried printing self.settings instead of document.settings (the one searched for by docutils), and I found the missing attributes
-
so I'll just copy them over and see what happens :)
-
willingc
Cool. Hope you get it. Time to cook dinner. Good luck!
-
Taggnostr
thanks :)
-
willingc
b
-
Taggnostr
ok, I noticed something else
-
the file in the root seem to have all the attributes, the one in subdirs don't
-
Arfrever has quit
-
bitprophet has left the channel
-
kushal joined the channel
-
rivarun joined the channel
-
rivarun has quit
-
rivarun joined the channel
-
Arfrever joined the channel
-
j12t has quit
-
j12t joined the channel
-
j12t has quit
-
j12t joined the channel
-
ddom joined the channel
-
j12t has quit
-
j12t joined the channel
-
j12t has quit
-
j12t joined the channel
-
ionelmc joined the channel
-
j12t has quit
-
j12t joined the channel
-
untitaker_ joined the channel
-
untitaker_ is now known as untitaker
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit
-
untitaker joined the channel
-
untitaker has quit