#! /usr/bin/env python3 # encoding: utf-8 # library imports import over # local imports import version # -------------------------------------------------- # Exceptions class ConfigurationError(Exception): pass # -------------------------------------------------- # Functions # -------------------------------------------------- # Classes # -------------------------------------------------- def noop(*args): return args def int4(*args): return [int(x) for x in args] if __name__ == "__main__": main = over.app.Main("new-over-test", version.str, "LICENSE", features={"config_file": True}) # name, description, callback, default=Option_sources.none, count=0, overwrite=True, abbr=None, in_cfg_file=True, show_in_help=True main.add_option("boolean-single", "ISO 8601 date for a new transfer (valid with +EHMU), defaults to current date. It's also used for relative times with --analysis-timeframe. You can use a day-count relative to today here.", over.callback.boolean, [False], abbr="1") main.add_option("boolean-triple", "", over.callback.booleans, [False, False, False], abbr="3", count=3) main.add_option("str-single", "", str, ["kek"], abbr="s", count=1) main.add_option("str-quad", "", noop, ["ze", "kek", "is", "bek"], abbr="4", count=4) main.add_option("int-quad", "", int4, [45, 72, 97, 18], abbr="i", count=4) main.add_option("int-quad-multi", "", int4, [45, 72, 97, 18], abbr="I", count=4, overwrite=False) main.add_doc("Description", ["What it does.", "Another paragraph."]) main.add_doc("Moar", ["When we launched Raspberry Pi Zero last November, it’s fair to say we were blindsided<.> by the level of demand. We immediately sold every copy of MagPi issue 40 and every Zero in stock at our distributors; and every time a new batch of Zeros came through from the factory they’d sell out in minutes. To complicate matters, Zero then had to compete for factory space with Raspberry Pi 3, which was ramping for launch at the end of February.", "To connect the camera to the Zero, we offer a custom six-inch adapter cable. This converts from the fine-pitch connector format to the coarser pitch used by the camera board. Liz has a great picture of Mooncake, the official Raspberry Pi cat, attempting to eat the camera cable. She won’t let me use it in this post so that you aren’t distracted from the pictures of the new Zero itself. I’ve a feeling she’ll be tweeting it later today."]) main.setup()