tgmount-ng icon indicating copy to clipboard operation
tgmount-ng copied to clipboard

Allow specifying file naming format

Open JuniorJPDJ opened this issue 3 years ago • 2 comments

eg. providing parameter like --format '{msgid}_{filename}'

JuniorJPDJ avatar Apr 09 '23 16:04 JuniorJPDJ

How are you going to use this feature? Would you please give me some examples of custom file naming.

nktknshn avatar Apr 26 '23 07:04 nktknshn

Legacy tgmount has {msgid} {filename}.{fileext} format for normal files. Example: 77876 Sonata Arctica - The Days of Grays (2009).zip. And msg_{msgid}_doc for unnamed files. Example: msg_221285_doc.

I'd like to be able to configure the naming and for example make it {filename}.{msgid}.{fileext} for named and {msgid}.{fileext} for unnamed. fileext can be guessed from mimetype if filename is not present. This will for example allow easily unpacking multipart archives.

Or just for {msgid}_{filename}.{fileext} so there's no space between msgid and filename.

Or for people not needing msgid at all they could set it to {filename}.{fileext} and that would be cool for them.

jpruciak avatar Apr 26 '23 07:04 jpruciak