mueller-ma / PrepaidBalance

App to check your prepaid balance
Apache License 2.0
35 stars 14 forks source link

custom regex #272

Open KUKARAF opened 6 months ago

KUKARAF commented 6 months ago

Is your feature request related to a problem? Please describe. some telcos provide multiple types of funds (e.g. bonus funds and real funds) like '''Stan konta: 83.26 zl (w tym promocyjne: 5.01 zl). Konto wazne do 07.03.2024 + 31 dni na odbieranie polaczen.'''

Describe the solution you'd like i'd like to be able to set a custom regex to decide what is being interpreted as the funds. (atm the bonus funds of 5.01 are being seen as the only real value). Alternatively a possibility of handling 2 types of funds would be great too but i am not certain how viable that is.

Describe alternatives you've considered All sorts of diffrent ussd codes that would not include the bonus funds.

Additional context n/a

mueller-ma commented 6 months ago

Allowing custom regex is more work than adding a parser for your provider. Also I don't think you can add both values which might be preferable?

mueller-ma commented 6 months ago

Feel free to add a suitable parser. Hint: There's already a similar one: https://github.com/mueller-ma/PrepaidBalance/blob/main/app/src/main/java/com/github/muellerma/prepaidbalance/parser/concrete/KauflandMobilParser.kt