diff --git a/acquire.ipynb b/acquire.ipynb index 42f0038..365496e 100644 --- a/acquire.ipynb +++ b/acquire.ipynb @@ -6,7 +6,6 @@ "metadata": {}, "outputs": [], "source": [ - "#!/usr/bin/env python3\n", "import sys\n", "import os\n", "import numpy as np\n", @@ -39,6 +38,9 @@ "cell_type": "code", "execution_count": null, "metadata": { + "jupyter": { + "source_hidden": true + }, "tags": [] }, "outputs": [], @@ -225,9 +227,6 @@ " # Swap flag\n", " first = not first\n", " reason = \"Session complete\"\n", - " except KeyboardInterrupt:\n", - " print()\n", - " reason = \"Keyboard interrupt\"\n", " except ValueError as e:\n", " logger.error(\"%s\" % e)\n", " reason = \"Wrong image dimensions? Fix nx, ny in config.\"\n", @@ -248,6 +247,9 @@ "cell_type": "code", "execution_count": null, "metadata": { + "jupyter": { + "source_hidden": true + }, "tags": [] }, "outputs": [], @@ -578,23 +580,9 @@ "outputs": [], "source": [ "if __name__ == '__main__':\n", - "\n", - " # Read commandline options\n", - " conf_parser = argparse.ArgumentParser(description='Capture and compress' +\n", - " ' live video frames.')\n", - " conf_parser.add_argument('-c', '--conf_file',\n", - " help=\"Specify configuration file. If no file\" +\n", - " \" is specified 'configuration.ini' is used.\",\n", - " metavar=\"FILE\")\n", - " conf_parser.add_argument('-t', '--test', \n", - " nargs='?',\n", - " action='store', \n", - " default=False,\n", - " help='Testing mode - Start capturing immediately for (optional) seconds',\n", - " metavar=\"s\")\n", - " conf_parser.add_argument('-l', '--live', action='store_true',\n", - " help='Display live image while capturing')\n", - "# args = conf_parser.parse_args()" + " test_duration = 10\n", + " testing = True\n", + " live = False" ] }, { @@ -605,8 +593,6 @@ "source": [ " # Process commandline options and parse configuration\n", " cfg = configparser.ConfigParser(inline_comment_prefixes=('#', ';'))\n", - " \n", - " #conf_file = args.conf_file if args.conf_file else \"configuration.ini\"\n", " conf_file = \"configuration.ini\"\n", " result = cfg.read([conf_file])\n", " if not result:\n", @@ -659,8 +645,6 @@ "outputs": [], "source": [ " # Testing mode\n", - " test_duration = 10\n", - " testing = True\n", " logger.info(\"Test mode: %s\" % testing)\n", " if (testing):\n", " logger.info(\"Test duration: %ds\" % test_duration)" @@ -673,7 +657,6 @@ "outputs": [], "source": [ " # Live mode\n", - " live = False\n", " #live = True if args.live else False\n", " logger.info(\"Live mode: %s\" % live)" ]