rda-python-miscs 2.0.12__py3-none-any.whl → 2.0.14__py3-none-any.whl

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.
@@ -288,9 +288,10 @@ class PgRST(PgFile, PgUtil):
288
288
  if title[-1] != ':':
289
289
  for l in range(1, lcnt):
290
290
  line = lines[l].strip()
291
- title += ' ' + line
292
291
  ol += 1
293
- if line[-1] == ':': break
292
+ if line:
293
+ title += ' ' + line
294
+ if line[-1] == ':': break
294
295
  example['desc'] = '\n'.join(lines[ol:]) if lcnt > ol else ''
295
296
  example['title'] = title
296
297
  option['exmidxs'].append(len(self.examples)) # record example index in option
@@ -873,6 +874,13 @@ class PgRST(PgFile, PgUtil):
873
874
  str: RST-formatted table or list content.
874
875
  """
875
876
  line0 = lines[0]
877
+ if any('-->' in line for line in lines):
878
+ max_width = max(len(line) for line in lines)
879
+ content = ".. code-block:: none\n\n"
880
+ for line in lines:
881
+ content += " " + line.ljust(max_width) + "\n"
882
+ content += "\n"
883
+ return content
876
884
  ms = re.match(r'^\s+-\s+(.*)', line0)
877
885
  if ms:
878
886
  content = "* " + self.replace_option_link(ms.group(1), secid, 1)
@@ -984,7 +992,8 @@ class PgRST(PgFile, PgUtil):
984
992
  if len(v) > 1 and v[0] == '-': v = v[1:]
985
993
  content += "\n * - " + v
986
994
  for c in range(1, ncols):
987
- v = row[c]
995
+ # Handle IndexError by using empty string if column is missing
996
+ v = row[c] if c < len(row) else ""
988
997
  if len(v) > 1 and v[0] == '-': v = v[1:]
989
998
  content += "\n - " + v
990
999
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rda_python_miscs
3
- Version: 2.0.12
3
+ Version: 2.0.14
4
4
  Summary: RDA Python package to hold RDA miscellaneous utility programs
5
5
  Author-email: Zaihua Ji <zji@ucar.edu>
6
6
  Project-URL: Homepage, https://github.com/NCAR/rda-python-miscs
@@ -7,7 +7,7 @@ rda_python_miscs/gdexls.py,sha256=Wh4tQgKmoQ3YrlXN0etlhK5CDqvFzH75cRZgUtUGBDc,10
7
7
  rda_python_miscs/gdexls.usg,sha256=aJ_bPgKkgmhoXVFV7rdTpwb9odM_pygI3clppQ1-3cM,2953
8
8
  rda_python_miscs/gdexls_standalone.py,sha256=YcKnJ0Zm0SbZET4X8IQnrEyoAsHp5estUpOfWEIToQU,453
9
9
  rda_python_miscs/pg_docs.py,sha256=_AoqrWroUu7FQMVWaTSTZBQMwi1BH1-RjKb1nDHgxOI,25369
10
- rda_python_miscs/pg_rst.py,sha256=Pr248Y3RqcUkVgYDQGOYcy6AhzjBOrFXUr4JI9gHmNs,47898
10
+ rda_python_miscs/pg_rst.py,sha256=HM7_Gcu5cpqS2l8jhGFMs6VA4h1tlf9UM5t06kHQszA,48311
11
11
  rda_python_miscs/pg_wget.py,sha256=DHBOL9CMP0cRvLR8mEG5HqX2nRfgzb2C5WvIbgqCrOE,6815
12
12
  rda_python_miscs/pgwget.py,sha256=lsFKIX8Xhsz2yHpgbTCuWWQ57XcZJgVKB2jJi7h3oec,7622
13
13
  rda_python_miscs/rda_cp.py,sha256=Voear5P9tbBO63vjSs3lCIUxqXxfI6QtWVpM6w9KRzM,7132
@@ -38,9 +38,9 @@ rda_python_miscs/tcshqsub.py,sha256=wk711Ou_SwfcIrPGDUiGofTA_qabKGAFg1w6iZYc-ZU,
38
38
  rda_python_miscs/tcshqsub.usg,sha256=VttA4Sv4Rbx2VoajwEvfdO0StPGRlSoK9RpU3iHuMDY,2164
39
39
  rda_python_miscs/rst_templates/index.rst.temp,sha256=YSa1JM6X9x2SC6UiqJu_9xRrVYGLKwNI43DBJEGDX08,523
40
40
  rda_python_miscs/rst_templates/section.rst.temp,sha256=-CUtutvctG2tIdkqrkFxVEzmNN3atRJXBDQaTnMJ6Gw,572
41
- rda_python_miscs-2.0.12.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
42
- rda_python_miscs-2.0.12.dist-info/METADATA,sha256=TvFWlYuqxMk-3rNpE3e9ngJHWSRIO4E5Q0iBH_vHblw,670
43
- rda_python_miscs-2.0.12.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
44
- rda_python_miscs-2.0.12.dist-info/entry_points.txt,sha256=qKg-5kE64N8sgiR4Bd0qzGqHBUun8WwOZhIE-GXzbVQ,524
45
- rda_python_miscs-2.0.12.dist-info/top_level.txt,sha256=W5rz7DrWb7hXABUbGgWcwe6D644X338LR8_zdgmtLhg,17
46
- rda_python_miscs-2.0.12.dist-info/RECORD,,
41
+ rda_python_miscs-2.0.14.dist-info/licenses/LICENSE,sha256=1dck4EAQwv8QweDWCXDx-4Or0S8YwiCstaso_H57Pno,1097
42
+ rda_python_miscs-2.0.14.dist-info/METADATA,sha256=_SKcLjSi7EIY2Nc5H0eCogCV95l7b7CIqwh1WnSu0hA,670
43
+ rda_python_miscs-2.0.14.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
44
+ rda_python_miscs-2.0.14.dist-info/entry_points.txt,sha256=qKg-5kE64N8sgiR4Bd0qzGqHBUun8WwOZhIE-GXzbVQ,524
45
+ rda_python_miscs-2.0.14.dist-info/top_level.txt,sha256=W5rz7DrWb7hXABUbGgWcwe6D644X338LR8_zdgmtLhg,17
46
+ rda_python_miscs-2.0.14.dist-info/RECORD,,