Open
Description
Using latest version of GIT provided GYB
Situation: Google Takeout (G Suite Takeout) is from "Czech" locale (label Inbox is "Doručené", etc...)
Feature request: Map original label name to new label name, such as
./gyb.py --action restore-mbox --label-map Doručené,Inbox --label-map Důležité,Important ...
Temporary solution, i've successfully used, is to replace given labels with new ones in the mbox file, like this
# get list of labels sorted with count
grep X-Gmail-Labels Veškerá\ pošta\ včetně\ spamu\ a\ koše.mbox | sort -h | uniq -c | sort -n
# replace one of the labels appropriately
# care about placing ^ on the beginning of label and $ on the end, to not match partial labels
sed -i "s|^X-Gmail-Labels: =?UTF-8?Q?Odesl=C3=A1no,Nep=C5=99e=C4=8Dten=C3=A9?=$|X-Gmail-Labels: Sent,Unread|g" Veškerá\ pošta\ včetně\ spamu\ a\ koše.mbox
# after all the labels are replaced with correct ones, proceed with restore-mbox action