nicorac / bcr-gui

BCR-GUI is a companion app for the great BCR (Basic Call Recorder) Android application and other supported ROMs with embedded call recorders.
https://coolsoft.altervista.org
GNU General Public License v3.0
138 stars 7 forks source link

Not accepting file output format used by bcr app #63

Closed toohazy closed 6 months ago

toohazy commented 6 months ago

Describe the bug I'm using the following in brc for file output format, based in bcr wiki {date:yyyy-MM-dd @ h.mm a}[_{direction}|][_sim{simslot}|][{phonenumber}|][[{contact_name}|{caller_name}|{call_log_name}]|]

When I enter this into bcr-gui, I get the following error in red letters: Invalid regular expression: /{date:yyyy-MM-dd @ h.mm a}[_(?in|out|conference)|][_sim(?\d+)|][_(?[\d+- ]+|unknown)|][_[(?.)|(?.)|(?.*)]|]/: Unmatched ')'

To Reproduce Steps to reproduce the behavior:

  1. Go to bcr app, open
  2. Click on output, edit format, enter desired format, click ok
  3. Rename files in bcr folder manually based in new format as suggested in bcr guide
  4. Open bcr-gui, click edit next to "fire name pattern" and enter same format used in bcr app
  5. Get error message
  6. Files in bcr-gui all show a "unknown"

Expected behavior Bcr-gui should accept the pattern and identify the files

Screenshots If applicable, add screenshots to help explain your problem.

Versions (please complete the following information):

nicorac commented 6 months ago

There's a slight difference in placeholders between BCR and BCR-GUI, and (sadly) you cannot use the same.

In this case, the placeholder {date:yyyy-MM-dd @ h.mm a} is not valid in BCR. BCR-GUI has a specific placeholder for each date part you'd like to parse, like {date:year}, [date:month} and so on. It also has a default pattern for BCR that should work out of the box (available by pressing the TEMPLATES button).

You can get the list of supported placeholders by pressing the PLACEHOLDERS button.

Feel free to post here a sample filename you'd like to parse (change the number and hide the names) and I'll try to help you get the right pattern😉

toohazy commented 6 months ago

Thank you, I looked at the placeholder part, and for example it lacks an AM/PM part and only offers 24h system. I'm also experimenting with bcr's folder feature to immediately sort files.

nicorac commented 6 months ago

Parsing AM/PM formatted strings is not impossible, the hard part is to "validate" it to be a valid datetime value 😉. Please post a sample filename here (beware to replace contact name with xxxx and phone number with a sequence like 1234567890).

nicorac commented 6 months ago

Closing for no activity. Feel free to reopen...

nicorac commented 6 months ago

Just released v1.4.1 with a fix for this.

Feel free to test it and report any issue 😉