mirror of
https://github.com/jberkel/sms-backup-plus.git
synced 2026-04-25 17:05:59 +03:00
[GH-ISSUE #1022] Parameterize the IMAP folder path #815
Labels
No labels
AM+RCS
FAQ
awaiting response
backup
bespoke
bug
calendar
call log
cannot reproduce
cloudless
device-specific
documentation
dual- & multi-SIM
duplicate
feature-request
fixed in beta
good first issue
half-missing
help wanted
helpful
meta
misattribution
mms
other message sources
pull-request
question
rejuvenation
restore
schedule
security
stale
task
thanks
v1.5.1
v1.5.10
v1.5.11
v1.5.2
v1.5.3
v1.5.3
v1.5.4
v1.5.4
v1.5.5
v1.5.5
v1.5.6
v1.5.7
v1.5.8
v1.5.9
v1.6β
xoauth
~$ bounty $~
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/sms-backup-plus-jberkel#815
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kurahaupo on GitHub (Jun 1, 2020).
Original GitHub issue: https://github.com/jberkel/sms-backup-plus/issues/1022
(This follows on from implementing multi-SIM.)
Allow tokens to be included in the Gmail label/IMAP folder, such as:
%{device_name}this phone's name%{slot}the SIM slot number in this phone.%{slot_id}the IMEI of (the SIM slot in) this phone%{sim_id}the SIM's serial number (ICCID or IMSI)%{sim_phone}the SIM's phone number (MSISDN)%{phone}the other party's phone number (MSISDN or E.123 format if possible)%{name}name of the other party (from Google Contacts; same as used for the subject line now)%{kind}(a token such asSMS,MMS,RCS)@kurahaupo commented on GitHub (Jun 1, 2020):
The
%{slot}notation could be expanded to allow%{slot+char}where char is any printable unicode character, indicating the first slot. The default would be+1giving1/2/3.Other possibilities include:
0/1/2A/B/C₁/₂/₃❶/❷/❸Ⅰ/Ⅱ/Ⅲ.α/β/γ@kurahaupo commented on GitHub (Jun 1, 2020):
It may then also make sense to use these same tokens for configuring the RFC2822 headers in the saved messages, rather than having specialized code in each case.
To that end, it may also be useful to recognize
%{time},%{senttime},%{recvtime},%{now}, etc, with optional modifiers:%{time±timezone}, where ±timezone is either+hh,-hh,+hhmmor-hhmm), or+and a known timezone label to convert from UTC to that timezone, or-and a known timezone label to convert from that timezone to UTC;multiple offsets can be given, in particular to convert from one timezone, to UTC, to another timezone. Timezone label
localrefers to the current primary timezone of the device.%{time~format}where format is usable bystrftimeor similar.%{my_email}the email address associated with the IMAP or Gmail account;%{my_name}the name associated with the Gmail account;%{my_phone}as an alias for (or replacement of)%{sim_phone}(above);@kurahaupo commented on GitHub (Jun 1, 2020):
I have in mind a generic parsing mechanism that would work through a string and pick out each token of the form
%{…}, then from that take the first "C" identifier (matching /\<[[:alpha:]_][[:alnum:]]*\>/) and look that up to determine the precise function. The result from that function would replace the token in the initial string.Modifiers could be introduced by any sensible punctuation, such as
+char after a numeric value such asslot+number or-number after a numeric or time value~format as perstrftimeorsprintf:modifier-function:ucconvert to uppercase:lcconvert to lowercase:tcconvert to titlecase:lookup{value1|value2|value3|…}Any number of generic modifiers may be given after any specific ones, as they apply to whatever result is returned by the lookup and previous modifiers.
NB: this implies that the matching of
%{to}must take nested brackets into account.@kurahaupo commented on GitHub (Jun 1, 2020):
If anyone has any preferences for the start and end symbols, please say so now...