Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions colab_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
},
{
Expand All @@ -19,7 +19,7 @@
},
"outputs": [],
"source": [
"!pip install -r dobble/requirements.txt"
"!pip install -r dobble/.devcontainer/requirements.txt"
]
},
{
Expand All @@ -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\""
]
},
{
Expand Down Expand Up @@ -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}"
]
}
],
Expand Down
Loading