Returns the text of the stats export of the given fit
(fit, callback)
| 192 | |
| 193 | |
| 194 | def exportFitStats(fit, callback): |
| 195 | """ |
| 196 | Returns the text of the stats export of the given fit |
| 197 | """ |
| 198 | sections = filter(None, (firepowerSection(fit), # Prune empty sections |
| 199 | tankSection(fit), |
| 200 | repsSection(fit), |
| 201 | miscSection(fit))) |
| 202 | |
| 203 | text = "{} ({})\n".format(fit.name, fit.ship.item.typeName) + "\n" |
| 204 | text += "\n".join(sections) |
| 205 | |
| 206 | if callback: |
| 207 | callback(text) |
| 208 | else: |
| 209 | return text |
no test coverage detected