NAME
smsdump - converter for SMS PDBs to human readable formats
SYNOPSIS
smsdump [ -F filter-expr ] [ -d date-format ] [ -f txt-expr ] [ -o file ] [ -t raw|txt ] file
smsdump --help
smsdump --version
OPTIONS
- -F EXPR, --filter=EXPR
-
EXPR is a Perl expression (default:
1
) that will be eval()'ed against record field values. If EXPR is true, record is process, otherwise it is skipped. - -d FORMAT, --date-format=FORMAT
-
Specify how to convert message timestamp using conventions described in Date::Format. Note that conversion is applied twice, to allow corret
%Z
handling (see timestamp field explanation in Palm::SMS(3) Fields section). Default is%a %b %e %T %%Z %Y
. - -h, --help
-
Print a brief help message and exit.
- -f EXPR, --text-format=EXPR
-
EXPR is a Perl expression that will be eval()'ed in order to obtain the txt type output.
- -o FILE, --output=FILE
-
Write output to
FILE
instead of standard output. - -t TYPE, --type=TYPE
-
Define which type of format the output should be written in. Possible values are
txt
(default) andraw
. See smsdump(1) Description section for further explanations. - --version
-
Print program version number and copyleft information.
DESCRIPTION
smsdump is a small utility written in Perl. It is shipped with and makes use of Palm::SMS Perl module in order to provide an easy and quick way to extract your SMS messages out of a Palm PDB database file and convert them to a human readable format. The PDB format understood is that of Palm::SMS's.
smsdump output format can be chosen via switch --type
among several possibilities enlisted below.
- txt
-
This is the default format. It writes the SMS messages as plain text. The output is obtained by setting --text-format option to (you can cut-and-paste the following lines into your bash prompt):
--text-format ' ($folder==0?"From": # folder ($folder==1?"To": ($folder==2?"To (pending)":"(Uh?)"))). " ". ($name?"$name ":""). # name ($firstName?"$firstName ":""). # firstName ($name||$firstName?"($phone)":"$phone"). # phone " ". $timestamp. # timestamp "\n". $text. # text "\n\n"'
- raw
-
This format is meant for further processing of your messages when you can not or do not want to use Perl and Palm::SMS. Each line of the output represents a message from the input PDB file. A line consists of a NULL (e.g.,
\0
) separated list of values where new lines (e.g.,\n
) and backslashes (e.g.,\
) have been escaped with two plain characters,\n
and\\
rispectively.
FILTERING
--filter=EXPR
option allows to include only certain messages in the output. EXPR
can be any valid Perl expression which is evaluated for each PDB record. Only $id, $folder (converted to string), $firstName, $name, $phone, $timestamp, and $text (see Palm::SMS(3) Fields section) are valid variables, others leading to unpredictable results. If EXPR
returned value is true, message is processed, otherwise it is skipped.
For example, in order to print out all the message sent to Jo and John, the switch should be set to something like:
--filter='$name =~ /^Jo/ and $folder eq "Inbox"'
SEE ALSO
AUTHOR
smsdump is written and maintained by Lorenzo Cappelletti <lorenzo.cappelletti@email.it>.
COPYRIGHT AND DISCLAIMER
This program is Copyright 2005 by Lorenzo Cappelletti. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.