Skip to content

Commit

Permalink
Clean up some TODOs, add Labels user manual link
Browse files Browse the repository at this point in the history
  • Loading branch information
crugas committed Dec 15, 2023
1 parent e624d81 commit abe9640
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
6 changes: 3 additions & 3 deletions as_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def __init__(self, input_id, repo_id, client, output_dir, rmv_anc, export_all=Fa
client (ASnake.client object): a client object from ASnake.client to allow to connect to the ASpace API
output_dir (str): filepath containing the folder a user wants files to be exported to
"""
self.input_id = input_id # TODO: Replace using the user input as filename and use the ID from ASpace (not number, but user supplied in ASpace
self.input_id = input_id
"""str: user generated resource identifier"""
self.filename = None
"""str: the name assigned to the exported file"""
Expand Down Expand Up @@ -95,7 +95,7 @@ def fetch_results(self):
user_id_index = 0
if combined_user_id == combined_aspace_id_clean: # if user-input id matches id in ASpace
try:
if self.remove_alphanums is True: # TODO: confirm this exports RBRL112JRR not closed one and doesn't change the filename to add CLOSED
if self.remove_alphanums is True:
self.filename = combined_aspace_id_clean
else:
self.filename = combined_aspace_id[:-1]
Expand All @@ -122,7 +122,7 @@ def fetch_results(self):
self.error += "-" * 135
if non_match_results and match_results:
self.result = "Returning {}...\nOther results:\n\n".format(aspace_id)
for ident, title in non_match_results.items(): # TODO: add match_results to self.results - above code is grabbing the 2nd result and exporting the filename of RBRL112JRRCLOSED
for ident, title in non_match_results.items():
self.result += "Resource ID: {:15} {}{:<5} Title: {} \n\n".format(ident, "|", "", title)
self.result += "-" * 135

Expand Down
11 changes: 2 additions & 9 deletions as_xtf_GUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,7 @@ def run_gui(defaults):
tooltip=' Export container labels for resources ', disabled=False),
sg.Button(button_text=" EXPORT ALL ", key="_EXPORT_ALLCONTLABELS_", disabled=False,
tooltip=" Export all published resources as container label files ")],
[sg.Text("Options", font=("Roboto", 13)),
sg.Text("Help", font=("Roboto", 11), text_color="blue", enable_events=True,
key="_CONTOPT_HELP_")],
[sg.Text("Options", font=("Roboto", 13))],
[sg.Button(" Labels Export Options ", key="_LABELS_OPTIONS_",
tooltip=' Choose how you would like to export container labels ')],
[sg.Button(button_text=" Open Output ", key="_OPEN_LABEL_DEST_",
Expand Down Expand Up @@ -458,11 +456,6 @@ def run_gui(defaults):
open_folder(defaults, "source_labels", "labels_export_default", "_OUTPUT_DIR_")
if event_simple == "_LABELS_OPTIONS_" or event_simple == "Change Container Labels Export Options":
get_contlabel_options(defaults)
if event_simple == "_CONTOPT_HELP_":
logger.info(f'User opened CONTLABELS Options Help button')
webbrowser.open("https://github.com/uga-libraries/ASpace_Batch_Export-Cleanup-Upload/wiki/User-Manual#conta"
"iner-labels-screen",
new=2)
# ------------- EXPORT THREADS -------------
if event_simple in (EAD_EXPORT_THREAD, MARCXML_EXPORT_THREAD, PDF_EXPORT_THREAD, CONTLABEL_EXPORT_THREAD):
window_simple[f'{"_EXPORT_EAD_"}'].update(disabled=False)
Expand Down Expand Up @@ -1767,7 +1760,7 @@ def get_contlabel_options(defaults):
window_conopt.close()
if event_conopt == "_LABELS_HELP_":
logger.info(f'User opened Container Labels Options Help button')
webbrowser.open("https://github.com/uga-libraries/ASpace_Batch_Export-Cleanup-Upload/wiki/User-Manual#container-labels-screen", # TODO: Make Container Label options manual page
webbrowser.open("https://github.com/uga-libraries/ASpace_Batch_Export-Cleanup-Upload/wiki/User-Manual#label-export-options",
new=2)
if event_conopt == "_SAVE_SETTINGS_LABELS_":
if os.path.isdir(values_conopt["_CONT_OUT_DIR_"]) is False:
Expand Down

0 comments on commit abe9640

Please sign in to comment.