rda-python-miscs 2.0.4__tar.gz → 2.0.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/PKG-INFO +1 -1
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/pyproject.toml +1 -1
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/pg_rst.py +19 -28
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rst_templates/index.rst.temp +3 -8
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rst_templates/section.rst.temp +0 -3
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs.egg-info/PKG-INFO +1 -1
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/LICENSE +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/MANIFEST.in +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/README.md +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/setup.cfg +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/__init__.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/bash_qsub.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/bashqsub.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/bashqsub.usg +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/gdex_ls.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/gdexls.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/gdexls.usg +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/gdexls_standalone.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/pg_docs.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/pg_wget.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/pgwget.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rda_cp.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rda_kill.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rda_mod.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rda_own.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rda_ps.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rda_sub.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rda_zip.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdacp.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdacp.usg +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdakill.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdakill.usg +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdals.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdals.usg +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdamod.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdamod.usg +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdaown.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdaown.usg +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdaps.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdaps.usg +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdasub.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdasub.usg +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdazip.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rdazip.usg +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rst_templates/toc.rst.temp +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/tcsh_qsub.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/tcshqsub.py +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/tcshqsub.usg +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs.egg-info/SOURCES.txt +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs.egg-info/dependency_links.txt +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs.egg-info/entry_points.txt +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs.egg-info/requires.txt +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs.egg-info/top_level.txt +0 -0
- {rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/tests/test_miscs.py +0 -0
|
@@ -129,7 +129,7 @@ class PgRST(PgFile, PgUtil):
|
|
|
129
129
|
|
|
130
130
|
This is the main entry point. It populates ``self.sections``,
|
|
131
131
|
``self.options``, and ``self.examples`` by calling ``parse_docs``, then
|
|
132
|
-
writes ``index.rst
|
|
132
|
+
writes ``index.rst`` and one ``section<id>.rst`` per
|
|
133
133
|
section into ``DOCDIR``.
|
|
134
134
|
|
|
135
135
|
Args:
|
|
@@ -155,8 +155,6 @@ class PgRST(PgFile, PgUtil):
|
|
|
155
155
|
else:
|
|
156
156
|
self.write_index(self.sections[0])
|
|
157
157
|
|
|
158
|
-
self.write_toc()
|
|
159
|
-
|
|
160
158
|
for section in self.sections:
|
|
161
159
|
self.write_section(section)
|
|
162
160
|
|
|
@@ -404,29 +402,17 @@ class PgRST(PgFile, PgUtil):
|
|
|
404
402
|
def write_index(self, section):
|
|
405
403
|
"""Write ``index.rst`` from the ``index.rst.temp`` template.
|
|
406
404
|
|
|
407
|
-
Passes ``TITLE`` (document title)
|
|
408
|
-
as substitution variables.
|
|
405
|
+
Passes ``TITLE`` (document title), ``SECID`` (first section id),
|
|
406
|
+
and the generated ``TOC`` RST content as substitution variables.
|
|
409
407
|
|
|
410
408
|
Args:
|
|
411
409
|
section (dict): The first section dict, used to supply ``SECID``.
|
|
412
410
|
"""
|
|
413
|
-
hash = {'TITLE' : self.DOCS['DOCTIT'], 'SECID' : section['secid']
|
|
411
|
+
hash = {'TITLE' : self.DOCS['DOCTIT'], 'SECID' : section['secid'],
|
|
412
|
+
'TOC' : self.create_toc()}
|
|
414
413
|
|
|
415
414
|
self.template_to_rst("index", hash)
|
|
416
415
|
|
|
417
|
-
#
|
|
418
|
-
# write the table of contents: toc.rst
|
|
419
|
-
#
|
|
420
|
-
def write_toc(self):
|
|
421
|
-
"""Write ``toc.rst`` from the ``toc.rst.temp`` template.
|
|
422
|
-
|
|
423
|
-
Passes ``TITLE`` and the generated ``TOC`` RST content as substitution
|
|
424
|
-
variables.
|
|
425
|
-
"""
|
|
426
|
-
hash = {'TITLE' : self.DOCS['DOCTIT'], 'TOC' : self.create_toc()}
|
|
427
|
-
|
|
428
|
-
self.template_to_rst("toc", hash)
|
|
429
|
-
|
|
430
416
|
#
|
|
431
417
|
# write a section rst file
|
|
432
418
|
#
|
|
@@ -651,8 +637,9 @@ class PgRST(PgFile, PgUtil):
|
|
|
651
637
|
"""Scan *line* for option references, section-category keywords, URLs, and
|
|
652
638
|
quoted program names, and replace each with an RST hyperlink.
|
|
653
639
|
|
|
654
|
-
|
|
655
|
-
`` `text <
|
|
640
|
+
All links use RST named anchor references (`` `name`_ `` or
|
|
641
|
+
`` `text <name_>`_ ``) targeting anchors of the form ``.. _name:``.
|
|
642
|
+
Cross-file option links target ``.. _section{secid}:`` anchors.
|
|
656
643
|
|
|
657
644
|
Args:
|
|
658
645
|
line (str): Source text line to process.
|
|
@@ -687,14 +674,15 @@ class PgRST(PgFile, PgUtil):
|
|
|
687
674
|
pre = optary[0]
|
|
688
675
|
after = optary[2]
|
|
689
676
|
secid = self.options[opt]['secid']
|
|
677
|
+
anchor = None # RST anchor name for same-file or cross-file links (.. _NAME:)
|
|
690
678
|
if secid == csecid:
|
|
691
|
-
|
|
679
|
+
anchor = opt
|
|
692
680
|
elif self.options[opt]['type'] == "Action":
|
|
693
|
-
|
|
681
|
+
anchor = "section{}".format(secid)
|
|
694
682
|
elif ptype == 2 and opt == "FN":
|
|
695
|
-
|
|
683
|
+
anchor = "field"
|
|
696
684
|
else:
|
|
697
|
-
|
|
685
|
+
anchor = "section{}".format(secid)
|
|
698
686
|
|
|
699
687
|
ms = re.search(r'-\(({}\|\w+)\)'.format(opt), line)
|
|
700
688
|
if ms:
|
|
@@ -703,7 +691,10 @@ class PgRST(PgFile, PgUtil):
|
|
|
703
691
|
after = ')'
|
|
704
692
|
|
|
705
693
|
replace = pre + opt + after
|
|
706
|
-
|
|
694
|
+
if opt == anchor:
|
|
695
|
+
link = "{}`{}`_{}".format(pre, opt, after)
|
|
696
|
+
else:
|
|
697
|
+
link = "{}`{} <{}_>`_{}".format(pre, opt, anchor, after)
|
|
707
698
|
line = line.replace(replace, link)
|
|
708
699
|
|
|
709
700
|
opts = re.findall(r'(^|\W){}( Options*\W|\W|$)'.format(self.SEARCH), line)
|
|
@@ -720,9 +711,9 @@ class PgRST(PgFile, PgUtil):
|
|
|
720
711
|
opt += ms.group(1)
|
|
721
712
|
after = after.replace(ms.group(1), '')
|
|
722
713
|
if ptype == 2 and re.search(r'Mode Options*', opt) and dtype == 3:
|
|
723
|
-
link = "{}`{}
|
|
714
|
+
link = "{}`{} <mode_>`_{}".format(pre, opt, after)
|
|
724
715
|
else:
|
|
725
|
-
link = "{}`{} <section{}
|
|
716
|
+
link = "{}`{} <section{}_>`_{}".format(pre, opt, secid, after)
|
|
726
717
|
line = line.replace(replace, link)
|
|
727
718
|
|
|
728
719
|
ms = re.search(r'(https*://\S+)(\.|\,)', line)
|
{rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rst_templates/index.rst.temp
RENAMED
|
@@ -15,15 +15,10 @@
|
|
|
15
15
|
A GUIDE TO __TITLE__
|
|
16
16
|
============================
|
|
17
17
|
|
|
18
|
-
.. contents:: Table of Contents
|
|
19
|
-
:depth: 2
|
|
20
|
-
:local:
|
|
21
|
-
|
|
22
|
-
See the :doc:`toc` for the full table of contents.
|
|
23
|
-
|
|
24
18
|
.. toctree::
|
|
25
19
|
:maxdepth: 2
|
|
26
20
|
:caption: Contents
|
|
27
21
|
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
section__SECID__
|
|
23
|
+
|
|
24
|
+
__TOC__
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs/rst_templates/toc.rst.temp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs.egg-info/requires.txt
RENAMED
|
File without changes
|
{rda_python_miscs-2.0.4 → rda_python_miscs-2.0.5}/src/rda_python_miscs.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|