IM::Scan(3pm)
πΈ NAME πΈ
IM::Scan β scan listing from mail/news message. It's a Perl module from the Internet Message (IM) family, and this page is the 3pm one, bestie. π
β¨ SYNOPSIS β¨
use IM::Scan;
&set_scan_form($scan_form, $width, $use_jis);
&read_petnames();
%Head = &get_header($mail_file);
&disp_msg(\%Head);
π DESCRIPTION π
So, <cyan>IM::Scan</cyan> handles the scan format and the petnames format for mail/news messages. That's literally its whole job and it does it flawlessly, no cap. π«Ά
This module is provided by IM (Internet Message).
π FILES π
$HOME/.im/Configβ the user profile π
π PROFILE COMPONENTS π
Here's the whole lineup, bestie β component, what it even means, and a lil example:
MailDir:β your mail directory β e.g.MailWidth:β one line width β e.g.80JisSafe:β safely substr for ISO-2022-JP β e.g.onForm:β scan format β e.g.%+5n %m%d %8f %-30S %bPetnameFile:β nickname file β e.g.~/.im/PetnameAddress:β your mail addresses β e.g.kazu@mew.org, kazu@wide.ad.jpAddrRegex:β regexp of your addresses, if necessary β e.g.^kazu@.*$
π₯ SCAN FORMAT π₯
The '%{width}{header-type}' format is available, and you can define any header-type you want. Obsessed. π Default valid header-types are:
%n message number
%d raw Date: field
%f MIME decoded From: field
%t MIME decoded To: filed
%g raw Newsgroups: field
%a friendly From: field
%A If this message is originated by yourself, friendly To:
or raw Newsgroups: is displayed in 'To:xxx' or 'Ng:xxx'
format, respectively. Otherwise, friendly From: field is
displayed.
%P Similar to %A, but display raw address of mail sender
instead of friendly From: field, just like mh-e.
%i indent to display thread
%s MIME decoded Subject: field
%S indented MIME decoded Subject (same as %i+%s)
%b a part of body extracted with heuristic
%m Multipart type
'S'igned, 'E'ncrypt, 'M'ultipart, 'P'artial or none
%p mark '*' if the message is destined to you
%D mark 'D' if the message is duplicated
%M %p+%D
%F folder path
%K file block size (1024 bytes/block)
%y year
%c month (digit)
%C month (string)
%e mday
%h hour
%E min
%G sec
Now about that {width} β it's an integer, and it can have a '-' sign or not. If a '-' sign exists, the content of a header-type gets displayed with left adjustment. And if the integer has a leading '0', the field gets padded with leading '0's. Simple as that. π«
To improve processing speed, needless process on JIS character should be avoided. Even if 'JisSafe' is on, only %f, %t, %A, %s, %S and %b are processed with 'substr' routine for JIS characters by default. If you want to process other header-types with the JIS version of 'substr', specify '!' just after '%', like this: %!-8S. π§
Also for the record: ScanForm "%+5n %m%d %-14A %-18S %b" works as same as IM default scaning. β
π¦ PETNAMES FORMAT π¦
Following format is valid in petnames file. A line beginning with '#' is ignored. Periodt. π
# This is comments
Kazu@Mew.org "Mr.Kazu"
nom@Mew.org "Nomsun"
π COPYRIGHT π
IM (Internet Message) is copyrighted by IM developing team. You can redistribute it and/or modify it under the modified BSD license. See the copyright file for more details. π
And that's the whole vibe check, bestie β this was IM153, dated 2016-10-10, page IM::Scan(3pm). Go forth and scan those messages, main character. πβ¨π«Ά
π¦ where this page comes from
- debian bookworm: im 1:153-4 Β· BSD-3-Clause
- debian trixie: im 1:153-4 Β· BSD-3-Clause
- ubuntu jammy: im 1:153-4 Β· BSD-3-Clause
- ubuntu noble: im 1:153-4 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms