Hello,

I would like to know how can I start or where to look for documenting 
Saltstack files. What I want to do is, suppose I have some .sls files that  
start with a comment block like this:
 
>
> {#
> Description: A fox rans....
> Ports: 80, 443
> Services: http
> Log Files: 
>     /var/log/http - example logfile
>
> #}


The thing is that you do not need to know much about Saltstack, only that 
.sls files are it's configuration files. And the above example is a comment 
block, and all my files that start
 with a comment block with that structure (description, ports, services, 
log files) HAS to be parsed by sphinx.

 How can I get all this data automatically from all those files and put it 
all in a html builded by Sphinx.
 So my final output would be like this:

> All Descriptions:...
> All ports: ...
> All services...


What I know is that I have to make my own domain (probably using 
domaintools on sphinx-contrib). Should I use this package or make my own 
domain from scratch?

Also I've found this sphinx domain from the official Saltstack repo:
*    
  https://github.com/saltstack/salt/blob/develop/doc/_ext/saltdomain.py 
<https://github.com/saltstack/salt/blob/develop/doc/_ext/saltdomain.py>*
The thing is that I can't quite understand what is happening exactly in 
that domain, so I could know if that is useful or not for me.
But from what I see it creates some directives { 
        'event': Event,
        'state': State,
        'formula': LiterateFormula,
        'currentformula': CurrentFormula,
        'saltconfig': LiterateCoding,
} 
All I need to do is parse the comment block from the beginning of my .sls 
files and get that info from all files.
 
Any info would be much appreciated.

Thanks a lot in advance!

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

Reply via email to