From aea6fd28c8eb5f65aa883f50244c936970b15ed9 Mon Sep 17 00:00:00 2001 From: Miroslav Date: Tue, 20 Feb 2018 16:25:39 +0200 Subject: Hotkeys cleanup --- examples/simple/custom_contentview.py | 4 ---- 1 file changed, 4 deletions(-) (limited to 'examples/simple') diff --git a/examples/simple/custom_contentview.py b/examples/simple/custom_contentview.py index b958bdce..77d32474 100644 --- a/examples/simple/custom_contentview.py +++ b/examples/simple/custom_contentview.py @@ -7,10 +7,6 @@ from mitmproxy import contentviews class ViewSwapCase(contentviews.View): name = "swapcase" - - # We don't have a good solution for the keyboard shortcut yet - - # you manually need to find a free letter. Contributions welcome :) - prompt = ("swap case text", "z") content_types = ["text/plain"] def __call__(self, data, **metadata) -> contentviews.TViewResult: -- cgit v1.2.3 From 29ef663aa10a2cef5e6e1d310848d888d0d8e379 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 20 Feb 2018 17:14:21 +0100 Subject: add documentation for custom_option.py --- examples/simple/custom_option.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'examples/simple') diff --git a/examples/simple/custom_option.py b/examples/simple/custom_option.py index 5b6070dd..8d0cfe7f 100644 --- a/examples/simple/custom_option.py +++ b/examples/simple/custom_option.py @@ -1,3 +1,13 @@ +""" +This example shows how addons can register custom options +that can be configured at startup or during execution +from the options dialog within mitmproxy. + +Example: + +$ mitmproxy --set custom=true +$ mitmproxy --set custom # shorthand for boolean options +""" from mitmproxy import ctx -- cgit v1.2.3 From 3934dbb5ad6bf69fd22f682a74b2933874f9f01f Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Tue, 20 Feb 2018 17:15:35 +0100 Subject: update log_events example documentation --- examples/simple/log_events.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'examples/simple') diff --git a/examples/simple/log_events.py b/examples/simple/log_events.py index 581b99f3..b9aa2c1f 100644 --- a/examples/simple/log_events.py +++ b/examples/simple/log_events.py @@ -1,8 +1,6 @@ """ It is recommended to use `ctx.log` for logging within a script. -This goes to the event log in mitmproxy and to stdout in mitmdump. - -If you want to help us out: https://github.com/mitmproxy/mitmproxy/issues/1530 :-) +print() statements are equivalent to ctx.log.warn(). """ from mitmproxy import ctx -- cgit v1.2.3