Spaces:
Running
Running
Update app.py
Browse filesI think I accidentally entered a tab, cfreating a syntax error in the previous code
116 unmodified lines11711811912012112212311 unmodified lines13513613713813914014114214314414512 unmodified lines158159160161162163164177 unmodified lines342343344345346347348116 unmodified linesword_index = 0while word_index < len(words_data):# First table row needs 1 slot for reference block + 6 slots for words = 7 total columnscurrent_limit = 6 if len(chunks) == 0 else 7word = words_data[word_index]11 unmodified linesreturn chunksdef build_html_tables(manuscript, reference, words_data):# Rule: Table is explicitly locked to 7.0 inches wide overalltable_style = ("width: 7.0in !important; min-width: 7.0in !important; max-width: 7.0in !important; ""table-layout: fixed !important; border-collapse: collapse; margin-bottom: 4pt; ""direction: rtl; border: 1pt solid #b7b7b7; background-color: #ffffff; ""line-height: 1.0 !important; height: auto; margin-left: auto !important; margin-right: auto !important;")12 unmodified linescurrent_chunk.append({"hebrew": " ", "transliteration": " ", "translation": " ", "morphology": " "})allocated_slots += 1# Native align="center" makes Google Docs automatically center the table on pastehtml_output.append(f'<table style="{table_style}" align="center">')# Rule: Every column is locked to exactly 1.0 inch wide to guarantee a 7.0 inch total width177 unmodified linesoutputs=[status_panel, output_html, copy_btn],show_progress="hidden")clear_btn.click(fn=None, inputs=[], outputs=[text_string_input], js="() => ''")copy_btn.click(fn=None, js=copy_js)if __name__ == "__main__":116 unmodified lines11711811912012112211 unmodified lines13413513613713813914014114214314414514614712 unmodified lines160161162163164165177 unmodified lines343344345346347348349116 unmodified linesword_index = 0while word_index < len(words_data):current_limit = 6 if len(chunks) == 0 else 7word = words_data[word_index]11 unmodified linesreturn chunksdef build_html_tables(manuscript, reference, words_data):total_table_width_in = 7.0# Static overall structural boundaries matching your publishing layout template# Native margins forced to auto and align center for seamless Google Docs insertiontable_style = (f"width: {total_table_width_in}in !important; min-width: {total_table_width_in}in !important; "f"max-width: {total_table_width_in}in !important; table-layout: fixed !important; border-collapse: collapse; ""margin-bottom: 4pt; direction: rtl; border: 1pt solid #b7b7b7; background-color: #ffffff; ""line-height: 1.0 !important; height: auto; margin-left: auto !important; margin-right: auto !important;")12 unmodified linescurrent_chunk.append({"hebrew": " ", "transliteration": " ", "translation": " ", "morphology": " "})allocated_slots += 1html_output.append(f'<table style="{table_style}" align="center">')# Rule: Every column is locked to exactly 1.0 inch wide to guarantee a 7.0 inch total width177 unmodified linesoutputs=[status_panel, output_html, copy_btn],show_progress="hidden")clear_btn.click(fn=None, inputs=[], outputs=[text_string_input], js="() => ''")copy_btn.click(fn=None, js=copy_js)if __name__ == "__main__":
app.py+8-7