From 8c58bdcd6d58d4f5c21453680abbf4168140457c Mon Sep 17 00:00:00 2001 From: Thomas Rouch Date: Fri, 13 Mar 2026 18:25:59 +0000 Subject: [PATCH] add options in notebook --- colab_notebook.ipynb | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/colab_notebook.ipynb b/colab_notebook.ipynb index 1213137..deed4ab 100644 --- a/colab_notebook.ipynb +++ b/colab_notebook.ipynb @@ -8,7 +8,7 @@ }, "outputs": [], "source": [ - "!git clone --depth 1 --branch v1.3.0 https://github.com/ThomasParistech/dobble.git" + "!git clone --depth 1 --branch v1.4.1 https://github.com/ThomasParistech/dobble.git" ] }, { @@ -19,7 +19,7 @@ }, "outputs": [], "source": [ - "!pip install -r dobble/requirements.txt" + "!pip install -r dobble/.devcontainer/requirements.txt" ] }, { @@ -31,7 +31,7 @@ "# 👋 Note: If you don't have your own images and just want to test the notebook\n", "# with the provided example images, simply run this cell and skip the next one.\n", "# The next cell is only needed if you're uploading your own images.\n", - "INPUT_SYMBOLS_FOLDER = \"dobble/images/symbols_examples\"" + "INPUT_SYMBOLS_FOLDER = \"dobble/assets/symbols_examples\"" ] }, { @@ -76,14 +76,28 @@ "source": [ "import os\n", "\n", + "#@markdown ### Output\n", "#@markdown Name of the output results folder.\n", "OUTPUT_RESULTS_FOLDER = \"out_results\" #@param {type:\"string\"}\n", "\n", + "#@markdown ---\n", + "#@markdown ### Options\n", + "#@markdown Card diameter (in cm) for printing.\n", + "card_size_cm = 13.0 #@param {type:\"number\"}\n", + "#@markdown Use hexagonal card shape instead of circular.\n", + "hexagon = False #@param {type:\"boolean\"}\n", + "\n", + "#@markdown ---\n", "#@markdown Generate your Dobble by running this cell.\n", "\n", - "!cd dobble; python3 -m dobble \\\n", - " --symbols_folder {os.path.abspath(INPUT_SYMBOLS_FOLDER)} \\\n", - " --output_folder {os.path.abspath(OUTPUT_RESULTS_FOLDER)}" + "cmd = (\n", + " f\"cd dobble && python3 -m dobble\"\n", + " f\" --symbols_folder {os.path.abspath(INPUT_SYMBOLS_FOLDER)}\"\n", + " f\" --output_folder {os.path.abspath(OUTPUT_RESULTS_FOLDER)}\"\n", + " f\" --card_size_cm {card_size_cm}\"\n", + " f\" --hexagon {hexagon}\"\n", + ")\n", + "!{cmd}" ] } ],