EtienneLamoureux / sc-trade-companion

Companion application for SC Trade Tools
https://sc-trade.tools
GNU General Public License v3.0
28 stars 7 forks source link

Fix commodity listings not being split correctly #31

Open EtienneLamoureux opened 9 months ago

EtienneLamoureux commented 9 months ago

Situation

Sometimes, the OCR does not correctly split the different commodity listings:

"cules starlifter","SELLS","agricultural supplies max inventory  aluninur nax inventory  d astatine very high inventory  beryl wax inventory add hydrogen wax inventory  waste","100.0","10000","max inventory","2023-12-04 11:40:24"
"crusader c2 hercules starlifter","SELLS","wax ass  astatine","252.0","4000","very high inventory","2023-12-04 11:40:20"
"crusader c2 hercules starlifter","SELLS","waste","3.0","75","max inventory","2023-12-04 11:40:20"
"cules starlifter","SELLS","wax frp  astatine very high inventory y beryl max inventory  hydrogen max inventory rr waste","252.0","4000","max inventory","2023-12-04 11:40:24"

This is caused by this method not calculating the correct value for the paragraph gap.

Tasks

  1. Implement the fix documented in this comment

Results

  1. Paragraph gap is always calculated correctly