(glossaries)
| 174 | |
| 175 | |
| 176 | def print_glossaries(glossaries): |
| 177 | headers = [ |
| 178 | "Glossary ID", |
| 179 | "Name", |
| 180 | "Ready", |
| 181 | "Source", |
| 182 | "Target", |
| 183 | "Count", |
| 184 | "Created", |
| 185 | ] |
| 186 | data = [ |
| 187 | [ |
| 188 | glossary.glossary_id, |
| 189 | glossary.name, |
| 190 | str(glossary.ready), |
| 191 | glossary.source_lang, |
| 192 | glossary.target_lang, |
| 193 | str(glossary.entry_count), |
| 194 | str(glossary.creation_time), |
| 195 | ] |
| 196 | for glossary in glossaries |
| 197 | ] |
| 198 | data.insert(0, headers) |
| 199 | |
| 200 | col_max_widths = [ |
| 201 | max(len(row[col_num]) for row in data) |
| 202 | for col_num in range(len(headers)) |
| 203 | ] |
| 204 | for row in data: |
| 205 | print( |
| 206 | "\t".join( |
| 207 | [col.ljust(width) for col, width in zip(row, col_max_widths)] |
| 208 | ) |
| 209 | ) |
| 210 | |
| 211 | |
| 212 | def action_glossary_list(deepl_client: deepl.DeepLClient): |
no outgoing calls
no test coverage detected