diff --git a/glyptodon/__pycache__/__init__.cpython-311.pyc b/glyptodon/__pycache__/__init__.cpython-311.pyc
index 2e35a84..3832a18 100644
Binary files a/glyptodon/__pycache__/__init__.cpython-311.pyc and b/glyptodon/__pycache__/__init__.cpython-311.pyc differ
diff --git a/glyptodon/__pycache__/annotation.cpython-311.pyc b/glyptodon/__pycache__/annotation.cpython-311.pyc
index d5c133b..baef9d9 100644
Binary files a/glyptodon/__pycache__/annotation.cpython-311.pyc and b/glyptodon/__pycache__/annotation.cpython-311.pyc differ
diff --git a/glyptodon/__pycache__/classes.cpython-311.pyc b/glyptodon/__pycache__/classes.cpython-311.pyc
index 1e27bfa..e9e0c8b 100644
Binary files a/glyptodon/__pycache__/classes.cpython-311.pyc and b/glyptodon/__pycache__/classes.cpython-311.pyc differ
diff --git a/glyptodon/__pycache__/export.cpython-311.pyc b/glyptodon/__pycache__/export.cpython-311.pyc
index ce1e195..c68879e 100644
Binary files a/glyptodon/__pycache__/export.cpython-311.pyc and b/glyptodon/__pycache__/export.cpython-311.pyc differ
diff --git a/glyptodon/__pycache__/information.cpython-311.pyc b/glyptodon/__pycache__/information.cpython-311.pyc
index 49f2de8..fb1ab4a 100644
Binary files a/glyptodon/__pycache__/information.cpython-311.pyc and b/glyptodon/__pycache__/information.cpython-311.pyc differ
diff --git a/glyptodon/__pycache__/manuscriptFiles.cpython-311.pyc b/glyptodon/__pycache__/manuscriptFiles.cpython-311.pyc
index 3b9fb66..f15f684 100644
Binary files a/glyptodon/__pycache__/manuscriptFiles.cpython-311.pyc and b/glyptodon/__pycache__/manuscriptFiles.cpython-311.pyc differ
diff --git a/glyptodon/__pycache__/selection.cpython-311.pyc b/glyptodon/__pycache__/selection.cpython-311.pyc
index 8272743..7218627 100644
Binary files a/glyptodon/__pycache__/selection.cpython-311.pyc and b/glyptodon/__pycache__/selection.cpython-311.pyc differ
diff --git a/glyptodon/app.py b/glyptodon/app.py
index 937bc6a..c69e3a0 100644
--- a/glyptodon/app.py
+++ b/glyptodon/app.py
@@ -209,7 +209,6 @@ def saveNContinuteCallback(
saveTranscripts(manContents, manFilenames, selectedManuscript[0])
manuscripts = currentManuscripts()
- print(manuscripts)
selectionKey = {}
selectionNames = []
for manuscript in manuscripts:
diff --git a/nbs/07_app.ipynb b/nbs/07_app.ipynb
index 0b8635b..b1cda25 100644
--- a/nbs/07_app.ipynb
+++ b/nbs/07_app.ipynb
@@ -11,7 +11,7 @@
},
{
"cell_type": "code",
- "execution_count": 1,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -20,7 +20,7 @@
},
{
"cell_type": "code",
- "execution_count": 2,
+ "execution_count": null,
"metadata": {
"tags": []
},
@@ -41,7 +41,7 @@
},
{
"cell_type": "code",
- "execution_count": 3,
+ "execution_count": null,
"metadata": {
"tags": []
},
@@ -130,7 +130,7 @@
},
{
"cell_type": "code",
- "execution_count": 4,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -155,7 +155,7 @@
},
{
"cell_type": "code",
- "execution_count": 5,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -346,7 +346,7 @@
},
{
"cell_type": "code",
- "execution_count": 6,
+ "execution_count": null,
"metadata": {
"tags": []
},
@@ -415,36 +415,9 @@
"When the ```finalizeSelection``` button is clicked, we need to start creating the figures that will be used in the ```annotation-figure``` object. This is a CPU intensive process (taking roughly 20 seconds to perform on my machine), so it isn't something performed trivially."
]
},
- {
- "cell_type": "raw",
- "metadata": {},
- "source": [
- "#| export\n",
- "@callback(\n",
- " Output(\"page-selector\", \"options\"),\n",
- " Output(\"page-selector\", \"value\"),\n",
- " Output(\"tabs-object\",\"value\", allow_duplicate=True),\n",
- " Input(\"finalize-selection\", \"n_clicks\"),\n",
- " prevent_initial_call=True,\n",
- ")\n",
- "def finalizeSelectionCallback(clicks):\n",
- " global selectedManuscript\n",
- " dropdownOptions = []\n",
- " relativePaths = manuscriptImages(selectedManuscript[0])\n",
- "\n",
- " index = 1\n",
- " for path in relativePaths:\n",
- " imageName = path.split(\"/\")[-1]\n",
- " if imageName[0] != \".\":\n",
- " dropdownOptions.append({\"label\": f\"Page {index}\", \"value\": path})\n",
- " index = index + 1\n",
- "\n",
- " return dropdownOptions, dropdownOptions[0][\"value\"], \"information\""
- ]
- },
{
"cell_type": "code",
- "execution_count": 7,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -469,7 +442,7 @@
},
{
"cell_type": "code",
- "execution_count": 8,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -583,97 +556,6 @@
" return \"annotation\", manSelectVal, manSelectOpts, dropdownOptions, dropdownOptions[0][\"value\"]"
]
},
- {
- "cell_type": "raw",
- "metadata": {},
- "source": [
- "#| export\n",
- "@callback(\n",
- " Output(\"tabs-object\", \"value\", allow_duplicate=True),\n",
- " Output(\"manuscript-select\", \"value\"),\n",
- " Output(\"manuscript-select\", \"options\"),\n",
- " Input(\"save-and-continue\", \"n_clicks\"),\n",
- " # Input objects\n",
- " State(\"work\", \"value\"),\n",
- " State(\"author\", \"value\"),\n",
- " State(\"language\", \"value\"),\n",
- " State(\"country\", \"value\"),\n",
- " State(\"city\", \"value\"),\n",
- " State(\"institution\", \"value\"),\n",
- " State(\"centuries-slider\", \"value\"),\n",
- " # Upload objects\n",
- " State(\"upload-images\", \"contents\"),\n",
- " State(\"upload-images\", \"filename\"),\n",
- " State(\"upload-manuscripts\",\"contents\"),\n",
- " State(\"upload-manuscripts\",\"filename\"),\n",
- " # Conditional object\n",
- " State(\"manuscript-select\", \"value\"),\n",
- " State(\"manuscript-select\", \"options\"),\n",
- " prevent_initial_call=True,\n",
- ")\n",
- "def saveNContinuteCallback(\n",
- " clicks, # Input save-and-continue\n",
- " work, # State work\n",
- " author, # State author\n",
- " language, # State language\n",
- " country, # State country\n",
- " city, # State city\n",
- " institution, # State institution\n",
- " centuriesValue, # State centuries-slider\n",
- " imContents, # State upload-images\n",
- " imFilenames, # State upload-images\n",
- " manContents, # State upload-manuscripts\n",
- " manFilenames, # State upload-manuscripts\n",
- " manSelectVal, # State manuscript-select value\n",
- " manSelectOpts, # State manuscript select options\n",
- "):\n",
- " global selectedManuscript\n",
- " global centuries\n",
- " global selectionKey\n",
- " centuriesData = \"\"\n",
- " if centuriesValue[0] == centuriesValue[1]:\n",
- " centuriesData = centuries[centuriesValue[0]] + \" Century\"\n",
- " else:\n",
- " centuriesData = (\n",
- " centuries[centuriesValue[0]]\n",
- " + \" to \"\n",
- " + centuries[centuriesValue[1]]\n",
- " + \" Centuries\"\n",
- " )\n",
- " \n",
- " information = {\n",
- " \"Work\": work,\n",
- " \"Author\": author,\n",
- " \"Language\": language,\n",
- " \"Country\": country,\n",
- " \"City\": city,\n",
- " \"Institution\": institution,\n",
- " \"Centuries\": centuriesData,\n",
- " }\n",
- "\n",
- " if manSelectVal == \"Create New Manuscript\":\n",
- " selectedManuscript = (createManuscriptDirectory(information), information)\n",
- " saveImages(imContents, imFilenames, selectedManuscript[0])\n",
- " saveTranscripts(manContents, manFilenames, selectedManuscript[0])\n",
- " \n",
- " manuscripts = currentManuscripts()\n",
- " \n",
- " selectionKey = {}\n",
- " selectionNames = []\n",
- " for manuscript in manuscripts:\n",
- " selectionNames.append(manuscript[1][\"Work\"])\n",
- " selectionKey[selectionNames[-1]] = manuscript\n",
- " \n",
- " manSelectVal = information[\"Work\"]\n",
- " manSelectOpts = selectionNames + [\"Create New Manuscript\"]\n",
- " \n",
- " return \"annotation\", manSelectVal, manSelectOpts\n",
- " else:\n",
- " updateMetadata(selectedManuscript[0], information)\n",
- " \n",
- " return \"annotation\", manSelectVal, manSelectOpts"
- ]
- },
{
"cell_type": "markdown",
"metadata": {
@@ -687,7 +569,7 @@
},
{
"cell_type": "code",
- "execution_count": 9,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -864,7 +746,7 @@
},
{
"cell_type": "code",
- "execution_count": 10,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -948,7 +830,7 @@
},
{
"cell_type": "code",
- "execution_count": 11,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -1001,7 +883,7 @@
},
{
"cell_type": "code",
- "execution_count": 12,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -1099,7 +981,7 @@
},
{
"cell_type": "code",
- "execution_count": 13,
+ "execution_count": null,
"metadata": {},
"outputs": [],
"source": [
@@ -1124,7 +1006,7 @@
},
{
"cell_type": "code",
- "execution_count": 14,
+ "execution_count": null,
"metadata": {
"tags": []
},
@@ -1155,33 +1037,11 @@
},
{
"cell_type": "code",
- "execution_count": 15,
+ "execution_count": null,
"metadata": {
"tags": []
},
- "outputs": [
- {
- "data": {
- "text/html": [
- "\n",
- " \n",
- " "
- ],
- "text/plain": [
- ""
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
+ "outputs": [],
"source": [
"#| export\n",
"if __name__ == \"__main__\":\n",
@@ -1190,23 +1050,11 @@
},
{
"cell_type": "code",
- "execution_count": 16,
+ "execution_count": null,
"metadata": {
"tags": []
},
- "outputs": [
- {
- "name": "stdout",
- "output_type": "stream",
- "text": [
- "[('/home/dc/glyptodon/nbs/manuscripts/eparchos', {'Work': 'EPARCHOS', 'Author': 'None', 'Language': 'None', 'Country': 'None', 'City': 'None', 'Institution': 'None', 'Centuries': '1st to 20th Centuries'}), ('/home/dc/glyptodon/nbs/manuscripts/stvrnktmnstrygrkcllctnn.53', {'Work': 'Stavronikita Monastery Greek handwritten document Collection no.53', 'Author': '', 'Language': 'Greek', 'Country': 'Greece', 'City': 'Mount Athos', 'Institution': 'Stavronikita Monastery', 'Centuries': '14th Century'})]\n",
- "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m\n",
- "\u001b[1;31mKeyError\u001b[0m Traceback (most recent call last)\n",
- "\u001b[1;31mKeyError\u001b[0m: 'shapes'\n",
- "\n"
- ]
- }
- ],
+ "outputs": [],
"source": [
"#| hide\n",
"import nbdev\n",