This repository stores SMS and parsing formats and sender lists for banks. It is designed to be easy to edit by non-developers and safe to validate.
- Formats and sender lists are maintained by the community.
- Each change is validated to prevent broken parsing.
- All data is stored in plain text.
src/
<bank name>_<bank id>/
senders.txt
formats/
<format name>_<format id>.txt
bank nameandformat nameshould be human-readable without_(use spaces).- Spaces in file/folder names are supported by Git and common OSes.
- When using shell commands, quote paths with spaces.
bank idandformat idare numeric IDs from the database.- If an ID is not known yet, it can be empty:
bank name_orformat name_format namewithout_is also treated as empty ID.
senders.txt contains one sender per line.
- Empty lines are ignored.
- Lines starting with
#are treated as senders, not comments.
formats/<format name>_<format id>.txt
<regex>
-----COLUMNS-----
<col1>;<col2>;...;<colN>
-----EXAMPLE-----
<example 1>
-----EXAMPLE-----
<example 2>
- First line: regex in plain text.
- Add an empty line before each
-----COLUMNS-----and-----EXAMPLE-----marker. -----COLUMNS-----is required and must be followed by a single;-separated line.- Columns are positional and correspond to regex capture groups.
- If any column is empty, the format is informational (no transaction created).
- Each
-----EXAMPLE-----section is required (at least one).- Examples can be multi-line until the next marker.
- Examples are trimmed for validation/export.
Columns map regex groups to parsed fields. Use field#arg when a field needs an argument.
Columns are trimmed for validation/export.
| Column | Meaning | Notes |
|---|---|---|
payee |
Merchant or counterparty name | |
income |
Income amount | Account currency |
outcome |
Outcome amount | Account currency |
fee |
Fee amount | Used to calculate net amount |
cashback |
Cashback amount | Used to calculate net amount |
op_income |
Income in original amount | Optional |
op_outcome |
Outcome in original amount | Optional |
balance |
Account balance | |
av_balance |
Available balance | |
comment |
Comment / extra text | |
instrument / op_instrument |
Original instrument symbol | Sets original instrument |
acc_instrument |
Account instrument symbol | Sets account instrument |
date#<format> |
Transaction date | Format string, e.g. date#yyyy-MM-dd |
syncid#<accountType> |
Account sync id | Optional transfer account type |
mcc |
Merchant category code | Integer |
- Keep changes focused: one bank/format per commit.
- Each file is committed separately with the provided scripts.
- Do not add comments to
senders.txt.
- Each format file must include regex,
COLUMNS, and at least oneEXAMPLE. - Every example must match its own regex.
- Examples must not match regexes of other formats in the same bank.
- Group count in the match must equal the number of columns.
- Column names must be in the allowed list above.
src/
<bank name>_<bank id>/
senders.txt
formats/
<format name>_<format id>.txt
bank nameиformat name— человекочитаемые и без_(используйте пробелы).- Пробелы в именах поддерживаются Git и обычными ОС.
- В командах оболочки используйте кавычки для путей с пробелами.
bank idиformat id— числовые ID из базы.- Если ID ещё неизвестен, он может быть пустым:
bank name_илиformat name_format nameбез_также считается пустым ID.
senders.txt содержит одного отправителя на строку.
- Пустые строки игнорируются.
- Строки, начинающиеся с
#, тоже считаются отправителями.
formats/<format name>_<format id>.txt
<regex>
-----COLUMNS-----
<col1>;<col2>;...;<colN>
-----EXAMPLE-----
<example 1>
-----EXAMPLE-----
<example 2>
- Первая строка — regex.
- Перед каждым
-----COLUMNS-----и-----EXAMPLE-----нужна пустая строка. -----COLUMNS-----обязателен и должен содержать одну строку с;.- Колонки позиционные и соответствуют группам regex.
- Если есть пустая колонка, формат считается информационным.
-----EXAMPLE-----обязателен (минимум один).- Пример может быть многострочным до следующего маркера.
- Примеры триммятся при валидации/экспорте.
Колонки сопоставляют группы regex с полями. Используйте field#arg, если нужен аргумент.
Колонки триммятся при валидации/экспорте.
| Колонка | Смысл | Примечание |
|---|---|---|
payee |
Получатель / мерчант | |
income |
Сумма дохода | В валюте счёта |
outcome |
Сумма расхода | В валюте счёта |
fee |
Комиссия | Учитывается в итоговой сумме |
cashback |
Кешбэк | Учитывается в итоговой сумме |
op_income |
Доход в исходной сумме | Опционально |
op_outcome |
Расход в исходной сумме | Опционально |
balance |
Баланс счёта | |
av_balance |
Доступный баланс | |
comment |
Комментарий / доп. текст | |
instrument / op_instrument |
Символ исходной валюты | |
acc_instrument |
Символ валюты счёта | |
date#<format> |
Дата операции | Формат, напр. date#yyyy-MM-dd |
syncid#<accountType> |
Sync ID счёта | Тип для трансфера |
mcc |
MCC | Целое число |
- Изменяйте одну сущность за раз.
- Каждый файл коммитится отдельно.
- Не используйте комментарии в
senders.txt.
- В каждом формате обязателен regex,
COLUMNSи минимум одинEXAMPLE. - Каждый пример обязан матчиться своим regex.
- Примеры не должны матчиться regex других форматов этого же банка.
- Количество групп должно совпадать с количеством колонок.
- Имена колонок должны быть из списка выше.
