Changeset 33752


Ignore:
Timestamp:
2019-12-04T21:14:53+13:00 (4 years ago)
Author:
davidb
Message:

Followed Dr Bainbridge's suggestion to correct hnz.Identifiers that contain spaces to containing hyphens

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/heritage-nz/collect/pdf-reports/prepare/xls-to-csv.py

    r33224 r33752  
    183183                        # Check to see if companion PDF file present
    184184                        # pdf_filename = os.path.join(excel_dirname,"pdfs",formatted_cell_value+".pdf")
    185                         id = formatted_cell_value.replace(" ","-")
     185
     186                        # ANU EDIT: for header_name Report Identifier, we want to ensure
     187                        # spaces are replaced by hypens. A trim() (strip()) first to not replace
     188                        # spaces at start and end/outside the bookending quotes.
     189                        #id = formatted_cell_value.replace(" ","-")
     190                        # Not just the id in memory, but the hnz.Identifier value that ends
     191                        # up in the PDF (UN)BOUND files needs to have spaces replaced with hyphens
     192                        formatted_cell_value = formatted_cell_value.strip().replace(" ","-")
     193                        id = formatted_cell_value
    186194                       
    187195                        pdf_file = id_to_relative_pdf_file(id)
Note: See TracChangeset for help on using the changeset viewer.