IM::Scan(3pm)

πŸ“¦
version 153 Β· 2 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

🌸 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. Mail
  • Width: β€” one line width β€” e.g. 80
  • JisSafe: β€” safely substr for ISO-2022-JP β€” e.g. on
  • Form: β€” scan format β€” e.g. %+5n %m%d %8f %-30S %b
  • PetnameFile: β€” nickname file β€” e.g. ~/.im/Petname
  • Address: β€” your mail addresses β€” e.g. kazu@mew.org, kazu@wide.ad.jp
  • AddrRegex: β€” 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"

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