From 760bd63d047d5299b72e34f042c6a060c90931b6 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Thu, 22 Feb 2018 14:18:44 +0200 Subject: Update README --- README.rst | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/README.rst b/README.rst index ce0fa1d..7c4c1e4 100644 --- a/README.rst +++ b/README.rst @@ -6,17 +6,28 @@ A small Python library for decoding .NET viewstate. Can be used in various scrap Usage ----- -```python -from viewstate import ViewState -vs = ViewState(base64EncodedViewState) -``` +The Viewstate decoder accepts Base64 encoded .NET viewstate data and returns the decoded output in the form of plain Python objects. -Test ----- +There are two main ways to use this package. First, it can be used as an imported library with the following typical use case: -```python -python test.py -``` +:: + + from viewstate import ViewState + vs = ViewState(base64EncodedViewState) + decoded_state = vs.decode() + +Alternatively, the library can be used via command line by executing the model: + +:: + + $ cat data.base64 | python -m viewstate + +Which will pretty-print the decoded data structure. + +Development +----------- + +Unit test are run via `pytest` References ---------- -- cgit v1.3.1