Skip to content

Commit

Permalink
styled and added xml upload functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Dcosthephalump committed Aug 3, 2023
1 parent eb0ad25 commit eb8def8
Show file tree
Hide file tree
Showing 16 changed files with 319 additions and 298 deletions.
Binary file modified glyptodon/__pycache__/__init__.cpython-311.pyc
Binary file not shown.
Binary file modified glyptodon/__pycache__/annotation.cpython-311.pyc
Binary file not shown.
Binary file modified glyptodon/__pycache__/classes.cpython-311.pyc
Binary file not shown.
Binary file modified glyptodon/__pycache__/export.cpython-311.pyc
Binary file not shown.
Binary file modified glyptodon/__pycache__/information.cpython-311.pyc
Binary file not shown.
Binary file modified glyptodon/__pycache__/manuscriptFiles.cpython-311.pyc
Binary file not shown.
Binary file modified glyptodon/__pycache__/selection.cpython-311.pyc
Binary file not shown.
3 changes: 3 additions & 0 deletions glyptodon/_modidx.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
'glyptodon.export.createExportButton': ('export.html#createexportbutton', 'glyptodon/export.py'),
'glyptodon.export.createExportDownload': ('export.html#createexportdownload', 'glyptodon/export.py'),
'glyptodon.export.createExportInfo': ('export.html#createexportinfo', 'glyptodon/export.py'),
'glyptodon.export.createExportLayout': ('export.html#createexportlayout', 'glyptodon/export.py'),
'glyptodon.export.createExportName': ('export.html#createexportname', 'glyptodon/export.py')},
'glyptodon.information': { 'glyptodon.information.createCenturiesSlider': ( 'information.html#createcenturiesslider',
'glyptodon/information.py'),
Expand All @@ -80,6 +81,8 @@
'glyptodon/manuscriptFiles.py'),
'glyptodon.manuscriptFiles.saveImages': ( 'manuscriptfiles.html#saveimages',
'glyptodon/manuscriptFiles.py'),
'glyptodon.manuscriptFiles.saveTranscripts': ( 'manuscriptfiles.html#savetranscripts',
'glyptodon/manuscriptFiles.py'),
'glyptodon.manuscriptFiles.updateMetadata': ( 'manuscriptfiles.html#updatemetadata',
'glyptodon/manuscriptFiles.py'),
'glyptodon.manuscriptFiles.zipManuscript': ( 'manuscriptfiles.html#zipmanuscript',
Expand Down
42 changes: 26 additions & 16 deletions glyptodon/annotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,27 @@ def createAnnotationInfo():
)
)

# %% ../nbs/04_annotation.ipynb 9
# %% ../nbs/04_annotation.ipynb 10
def createAnnotationTextArea():
return dbc.Textarea(id="annotation-text-area",value="Enter transcription text here!",style={"width":"100%","height":285})
return dbc.Textarea(id="annotation-text-area",value="Enter transcription text here!",style={"width":"100%","height":800})

# %% ../nbs/04_annotation.ipynb 12
# %% ../nbs/04_annotation.ipynb 13
def createPageSelector():
return dcc.Dropdown(id="page-selector")

# %% ../nbs/04_annotation.ipynb 15
# %% ../nbs/04_annotation.ipynb 16
def createSaveShapes():
return dbc.Button("Save Shapes", color="info", id="save-shapes")

# %% ../nbs/04_annotation.ipynb 17
# %% ../nbs/04_annotation.ipynb 18
def createSaveAnnotation():
return dbc.Button("Save Transcription", color="info", id="save-annotation")

# %% ../nbs/04_annotation.ipynb 19
# %% ../nbs/04_annotation.ipynb 20
def createNextTab():
return dbc.Button("Next Tab", color="primary", id="next-tab")

# %% ../nbs/04_annotation.ipynb 21
# %% ../nbs/04_annotation.ipynb 22
def createAnnotationFigure(path):
img = cv2.imread(path)
# This reorders the color channels (the first two indices relate to the intensity values of individual colors while the last index indicates what
Expand All @@ -67,7 +67,7 @@ def createAnnotationFigure(path):
opacity=0.6))
return fig

# %% ../nbs/04_annotation.ipynb 25
# %% ../nbs/04_annotation.ipynb 26
def createFigureLayout():
return dbc.Card(
[
Expand All @@ -81,16 +81,20 @@ def createFigureLayout():
"eraseshape",
]
},
style={
"height": 800,
"width": 800,
},
),
createSaveShapes(),
]
)

# %% ../nbs/04_annotation.ipynb 28
# %% ../nbs/04_annotation.ipynb 29
def createTextareaLayout():
return dbc.Card([createAnnotationTextArea(), createSaveAnnotation()])

# %% ../nbs/04_annotation.ipynb 31
# %% ../nbs/04_annotation.ipynb 32
def createAnnotationLayout():
return html.Div(
[
Expand All @@ -99,12 +103,18 @@ def createAnnotationLayout():
dbc.Card(
[
dbc.Container(
dbc.Row(
children=[
dbc.Col(createFigureLayout(), md=7),
dbc.Col(createTextareaLayout(), md=5),
]
)
[
dbc.Row(
children=[
dbc.Col(createFigureLayout(), md=7),
dbc.Col(createTextareaLayout(), md=5),
]
)
],
style={
"height": "95%",
"width": "95%",
},
),
createNextTab(),
]
Expand Down
Loading

0 comments on commit eb8def8

Please sign in to comment.