]> Cypherpunks.ru repositories - pyderasn.git/commitdiff
Append offset to tree elements in browser 8.3
authorSergey Matveev <stargrave@stargrave.org>
Thu, 14 Jan 2021 07:22:43 +0000 (10:22 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Thu, 14 Jan 2021 07:25:09 +0000 (10:25 +0300)
VERSION
doc/install.rst
doc/news.rst
pyderasn.py

diff --git a/VERSION b/VERSION
index 2983cad049515b2f3cdad093170575baac65ee19..cf022018d84dff72b77a8f74904e8e46964c7175 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-8.2
+8.3
index c327a80894f70d53454a1e4b6d6a51d54ee13213..67814080854e466d14ff8de667a64915b9488f32 100644 (file)
@@ -4,11 +4,11 @@ Install
 Preferable way is to :ref:`download <download>` tarball with the
 signature from `official website <http://www.pyderasn.cypherpunks.ru/>`__::
 
-    $ [fetch|wget] http://www.pyderasn.cypherpunks.ru/pyderasn-8.2.tar.xz
-    $ [fetch|wget] http://www.pyderasn.cypherpunks.ru/pyderasn-8.2.tar.xz.sig
-    $ gpg --verify pyderasn-8.2.tar.xz.sig pyderasn-8.2.tar.xz
-    $ xz --decompress --stdout pyderasn-8.2.tar.xz | tar xf -
-    $ cd pyderasn-8.2
+    $ [fetch|wget] http://www.pyderasn.cypherpunks.ru/pyderasn-8.3.tar.xz
+    $ [fetch|wget] http://www.pyderasn.cypherpunks.ru/pyderasn-8.3.tar.xz.sig
+    $ gpg --verify pyderasn-8.3.tar.xz.sig pyderasn-8.3.tar.xz
+    $ xz --decompress --stdout pyderasn-8.3.tar.xz | tar xf -
+    $ cd pyderasn-8.3
     $ python setup.py install
     # or copy pyderasn.py (+six.py, possibly termcolor.py) to your PYTHONPATH
 
@@ -21,7 +21,7 @@ You can also find it mirrored on :ref:`download <download>` page.
 You could use pip (**no** OpenPGP authentication is performed!) with PyPI::
 
     $ cat > requirements.txt <<EOF
-    pyderasn==8.2 --hash=sha256:TO-BE-FILLED
+    pyderasn==8.3 --hash=sha256:TO-BE-FILLED
     six==1.15.0 --hash=sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259
     EOF
     $ pip install --requirement requirements.txt
index cfb092a2f05f6ea07cf5b743fda3c6ce5136b015..048c8f8439ea0b6ff0ab72edd065cd7194edb8c6 100644 (file)
@@ -1,6 +1,12 @@
 News
 ====
 
+.. _release8.3:
+
+8.3
+---
+* Append offsets to tree elements in ASN.1 browser for ease of navigation.
+
 .. _release8.2:
 
 8.2
index 19e026dc109115f371675b7218230488a37e27b8..ad20ddbefa32263f28fa4940f1958628bc71f515 100755 (executable)
@@ -1204,7 +1204,7 @@ except ImportError:  # pragma: no cover
     def colored(what, *args, **kwargs):
         return what
 
-__version__ = "8.2"
+__version__ = "8.3"
 
 __all__ = (
     "agg_octet_string",
@@ -7675,7 +7675,7 @@ def browse(raw, obj, oid_maps=()):
                 self._state_update()
             return super(TW, self).selectable()
 
-        def get_display_text(self):
+        def _get_display_text_without_offset(self):
             pp, constructed = self._get_pp()
             style = "constructed" if constructed else ""
             if len(pp.decode_path) == 0:
@@ -7693,6 +7693,10 @@ def browse(raw, obj, oid_maps=()):
                 ))
             return (style, ent)
 
+        def get_display_text(self):
+            pp, _ = self._get_pp()
+            return "%s: [%d]" % (self._get_display_text_without_offset(), pp.offset)
+
         def _scroll(self, what, step):
             self.state[what]._invalidate()
             pos = self.state[what].focus_position