Commit Graph

13 Commits

Author SHA1 Message Date
Maximilian Hils
75d952c46c prominently link to examples in script docs 2017-04-27 18:23:36 +02:00
Aldo Cortesi
e6eeab6094 Revamp how addons work
- Addons now nest, which means that addons can manage addons. This has a number
of salutary effects - the scripts addon no longer has to poke into the global
addons list, we no longer have to replace/remove/boot-outof parent addons when
we load scripts, and this paves the way for making our top-level tools into
addons themselves.
- All addon calls are now wrapped in a safe execution environment where
exceptions are caught, and output to stdout/stderr are intercepted and turned
into logs.
- We no longer support script arguments in sys.argv - creating an option
properly is the only way to pass arguments. This means that all scripts are
always directly controllable from interctive tooling, and that arguments are
type-checked.

For now, I've disabled testing of the har dump example - it needs to be moved
to the new argument handling, and become a class addon. I'll address that in a
separate patch.
2017-04-25 22:13:44 +12:00
Maximilian Hils
98a079aa69 rename logging.py example. this conflicted with Python's stdlib 2016-12-19 16:21:17 +01:00
Aldo Cortesi
007aeef770 Addon test docs, remove stray deprecated events
Fixes #1572
2016-12-17 10:03:35 +13:00
Maximilian Hils
9af8f4bb31 organize examples
This commit is largely based on work by Thiago Arrais (@thiagoarrais)
and Shane Bradfield (@l33tLumberjack). I wasn't really able to get their
PR reasonably merged onto the latest master, so I reapplied their changes
manually here and did some further improvements on that.
2016-11-21 02:28:10 +01:00
Quentin Pradet
eb7bcb37ec
docs: Fix typos 2016-11-14 08:43:32 +04:00
Aldo Cortesi
0b2a2ad2a6 docs: examples/logging -> examples/context_logging 2016-10-30 16:58:50 +13:00
Aldo Cortesi
22eebfd574 addons.Addons -> addonmanager, builtins -> addons 2016-10-19 14:39:39 +13:00
Aldo Cortesi
00603021d9 docs: concurrency, developing scripts 2016-10-16 20:39:34 +13:00
Aldo Cortesi
57b8ed21a9 docs: scripts on saved flows 2016-10-16 20:26:06 +13:00
Aldo Cortesi
55cb2a8547 docs: logging and the context 2016-10-16 20:26:06 +13:00
Aldo Cortesi
fb69c9c345 docs: overview, classes, arguments 2016-10-16 20:26:06 +13:00
Aldo Cortesi
fdb6a44245 docs: cleanups improvements and fighting sphinx
- Hide links to internal code listings, and link to github instead
- Improve formatting of code/example captions
- Fix outdated documentation of command-line options
- Complete documentation of all events + improved formatting
- tcp_open -> tcp_start, tcp_close -> tcp_end to reduce confusion
2016-10-16 20:26:06 +13:00