Update dependencies, fix compatibility with Sphinx 1.6, ignore PyCharm files
authorJan Dittberner <jandd@cacert.org>
Sat, 13 Jan 2018 14:12:30 +0000 (15:12 +0100)
committerJan Dittberner <jandd@cacert.org>
Sat, 13 Jan 2018 14:12:30 +0000 (15:12 +0100)
.gitignore
doc-requirements.txt
docs/sphinxext/cacert.py

index 7638b3b..7285178 100644 (file)
@@ -6,3 +6,4 @@
 _build/
 py2venv/
 venv/
+.idea/
\ No newline at end of file
index 2d10381..e317d52 100644 (file)
@@ -1,13 +1,13 @@
-Babel==2.3.4
-Jinja2==2.8
-MarkupSafe==0.23
-Pygments==2.1.3
-Sphinx==1.4.3
-alabaster==0.7.8
-docutils==0.12
+Babel==2.5.1
+Jinja2==2.10
+MarkupSafe==1.0
+Pygments==2.2.0
+Sphinx==1.6.6
+alabaster==0.7.10
+docutils==0.14
 imagesize==0.7.1
-pytz==2016.4
-six==1.10.0
+pytz==2017.3
+six==1.11.0
 snowballstemmer==1.2.1
 jandd.sphinxext.ip==0.2.4
 jandd.sphinxext.mac==0.1.0
index 9ec27a7..f605bb8 100644 (file)
@@ -13,7 +13,6 @@ from ipaddress import ip_address
 from docutils import nodes
 from docutils.parsers.rst import Directive
 from docutils.parsers.rst import directives
-from docutils.parsers.rst import roles
 
 from sphinx import addnodes
 from sphinx.errors import SphinxError
@@ -207,11 +206,6 @@ def create_table_row(rowdata):
     return row
 
 
-def _create_interpreted_file_node(text, line=0):
-    return roles._roles['file']('', ':file:`%s`' % text,
-                                text, line, None)[0][0]
-
-
 def _sslcert_item_key(item):
     return "%s-%d" % (item['cn'], item['serial'])
 
@@ -253,7 +247,7 @@ def _file_ref_paragraph(cert_info, filekey, app, env, docname):
             app.builder, docname, place['docname'], place['target']['ids'][0],
             reftext)
         para += nodes.Text(":")
-        para += _create_interpreted_file_node(place[filekey])
+        para += addnodes.literal_emphasis(text=place[filekey])
         if pos + 1 < len(places):
             para += nodes.Text(", ")
     return para
@@ -365,18 +359,18 @@ def process_sslcerts(app, doctree):
         item = nodes.list_item()
         subbullets += item
         certfile = nodes.paragraph(text="certificate in file ")
-        certfile += _create_interpreted_file_node(
-            certdata['certfile'], node.line)
+        certfile += addnodes.literal_emphasis(text=certdata['certfile']) #, node.line)
         item += certfile
         item = nodes.list_item()
         subbullets += item
         keyfile = nodes.paragraph(text="private key in file ")
-        keyfile += _create_interpreted_file_node(
-            certdata['keyfile'], node.line)
+        keyfile += addnodes.literal_emphasis(text=certdata['keyfile'])
+        #keyfile += _create_interpreted_file_node(
+        #    certdata['keyfile'], node.line)
         item += keyfile
 
         node.parent.replace_self([targetnode, indexnode, bullets])
-        env.note_indexentries_from(env.docname, doctree)
+        #env.note_indexentries_from(env.docname, doctree)
 
 
 def process_sshkeys(app, doctree):
@@ -384,7 +378,7 @@ def process_sshkeys(app, doctree):
     if not hasattr(env, 'cacert_sshkeys'):
         env.cacert_sshkeys = []
 
-    for node in doctree.traverse(sshkeylist_node):
+    for _ in doctree.traverse(sshkeylist_node):
         if hasattr(env, 'cacert_sshkeylistdoc'):
             raise SphinxError(
                 "There must be one sshkeylist directive present in "
@@ -449,7 +443,6 @@ def process_sshkeys(app, doctree):
         seealso += seepara
 
         node.replace_self(content)
-        env.note_indexentries_from(env.docname, doctree)
 
 
 def process_sslcert_nodes(app, doctree, docname):
@@ -528,7 +521,7 @@ def process_sslcert_nodes(app, doctree, docname):
             content.append(cert_sec)
 
         node.replace_self(content)
-        env.note_indexentries_from(docname, doctree)
+        #env.note_indexentries_from(docname, doctree)
 
 
 def process_sshkeys_nodes(app, doctree, docname):