-
Improvement
-
Resolution: Unresolved
-
Normal
-
None
-
None
-
None
-
None
When copying cells from a spreadsheet, they are stored with the TSV/CSV mimetype. We could interpret that as key/value pairs for tags when pasted into Picard. Something like:
# Probably map from mimetype to dialect MIMETYPE_LIBREOFFICE_TSVC = "application/x-libreoffice-tsvc" if mimedata.hasFormat(MIMETYPE_LIBREOFFICE_TSVC): try: import io import csv text = mimedata.data(MIMETYPE_LIBREOFFICE_TSVC).data().decode('utf16') rows = csv.reader(io.StringIO(text), dialect='excel-tab') if rows: data = {} for row in rows: try: tag, old, new = row if tag: data[tag] = { 'old': old, 'new': new, } except ValueError as e: log.error(e) log.debug(data) except Exception as e: log.error(e)
We could add multiple handlers for different source applications.
- depends on
-
PICARD-2287 Support copy and paste of one or multiple tags
-
- In Development Branch
-