  <refentry id="twidge">
  <indexterm><primary>twidge</><secondary>Reference For</></>
  <refentryinfo>
    <address><email>jgoerzen@complete.org</email></address>
    <author><firstname>John</firstname><surname>Goerzen</surname></author>
  </refentryinfo>

  <refmeta>
    <refentrytitle>twidge</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo>John Goerzen</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>twidge</refname>
    <refpurpose>Microblogging client for Twitter, Identica</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>twidge</command>
      <arg choice="opt">-d</arg>
      <arg choice="opt">-c <replaceable>FILE</replaceable></arg>
      <arg choice="plain"><replaceable>command</replaceable></arg>
      <arg choice="opt"><replaceable>command_args</replaceable></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>twidge</command>
      <arg choice="plain">--help</arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1 id="twidge.description">
    <title>Description</title>
    <para>
      &twidge; is a client for microblogging sites such as 
      <ulink url="http://twitter.com/">Twitter</ulink> and
      <ulink url="http://identi.ca/">Identica</ulink> (identi.ca).
      Microblogging sites let you post short one-paragraph updates,
      follow the updates that your friends post, and interact with
      everyone in the site in a conversation style.
    </para>
    <para>
      &twidge; is a client to make working with microblogging sites
      faster and easier.  It is extremely versatile, and can be
      customized to work the way you want to work, and combined with
      other tools to do just about anything.
    </para>
    <para>
      &twidge; can be used quite nicely interactively from the shell.
      It is useful directly as-is, and with simple shell aliases can
      make a highly efficient system to do exactly what you want.  It
      is perfectly capable of being your only client for
      microblogging.
    </para>
    <para>
      &twidge; also can be used in an automated way, via
      <command>cron(1)</command>, or it can even integrate with your
      email system.
    </para>
    <para>
      A full list of &twidge; features, along with numerous
      suggestions on how to use it, can be found at the &twidge;
      website at <ulink
      url="http://software.complete.org/twidge"></ulink>.
    </para>
    
    <para>
      But, if you'd like to get going RIGHT NOW, skip to the Quick
      Start section below.  For now, I'll summarize a few &twidge;
      features; a more comprehensive list is on the website.
    </para>

    <refsect2 id="twidge.features">
      <title>Feature List</title>
      <itemizedlist>
        <listitem><para>Convenient, easy to learn, and fast command-line
            interface (it's simple to do simple things, and
            advanced things are possible)</para>
        </listitem>

        <listitem><para>This extensive manual, and numerous examples
        on the website</para></listitem>

        <listitem><para>Compatible with any microblogging service that
            implements the Twitter API.  Tested with Twitter and
            Identica (identi.ca).  Should be compatible with any other
            system.
          </para></listitem>

        <listitem><para>Full support for reading the activity of your
            friends, replies to you, and your own
            activity.</para></listitem>

        <listitem><para>Optional capability to remember what you have
            seen already and suppress those updates in future
            runs.</para></listitem>

        <listitem><para>Optional automatic shortening of long URLs via is.gd</para></listitem>
        
        <listitem><para>Optional integration with your email system --
            send and receive updates via email.</para></listitem>

        <listitem><para>Specifically designed to be friendly to use in
            shell scripts.</para></listitem>

        <listitem><para>Shell scripting makes it easy to do many
            things, such as scheduling future updates (with
            <command>at</command>), ignoring certain updates
            (with <command>grep</command>), etc.</para></listitem>
        
        <listitem><para>Easy use of multiple accounts by having
            multiple configuration profiles.   Mechanism lends itself
            to shell aliases and tools.</para></listitem>

        <listitem><para>Small, minimalist footprint</para>
        </listitem>

        <listitem><para>Output formats are easily parsed.  Input
            formats are easily generated.  Configuration file format is
            liberal and easy to generate.
          </para></listitem>

        <listitem><para>Robust error detection and recovery
        throughout.
          </para></listitem>
      </itemizedlist>
    </refsect2>

  </refsect1>

  <refsect1 id="twidge.quickstart">
    <title>Quick Start</title>
    <para>
      This section will describe how a first-time &twidge; user can
      get up and running quickly.  It assumes you already have
      &twidge; compiled or installed on your system.  If not,
      please follow the instructions in the
      <filename>INSTALL</filename>
      file in the
      source distribution.
    </para>
    <para>
      To get started, simply run <command>twidge setup</command> at your
      shell prompt.  &twidge; will lead you through the first-time
      configuration -- which is very quick and completely
      self-explanatory!
    </para>
    <para>
      Now, let's start exploring.  <command>twidge lsrecent
      -su</command> will show you the 20 most recent updates from the
      people you follow.  After the first time, it will remember what
      you've seen and only show you new updates.  In place of
      <command>lsrecent</command>, you could substitue
      <command>lsreplies</command> to replies to you.  You can also
      run <command>twidge lsrecent --help</command>, or refer to this
      document, for more details on the command.  In short, -s tells
      the system to save what you've seen, and -u tells it to only
      show you unseen items.
    </para>
    <para>
      You can subscribe to updates from friends by running
      <command>twidge follow
      <replaceable>nick</replaceable></command>.  To subscribe to
      updates for &twidge; itself, you'd run <command>twidge follow
      unixtwidge</command>.  If you've had enough of updates from
      someone, just use the <command>twidge unfollow</command> command.
    </para>
    <para>
      Now, how about posting your own updates?  Just type
      <command>twidge update</command>.  Type your update, and press
      Enter when done.  Your update may scroll past the end of the
      screen; don't worry about it.  Just don't hit Enter until you're
      done.  You can also pass your update on the command line, taking
      care to quote it if it contains spaces or shell characters.
    </para>
    <para>
      That's the quick tour.  For many more examples, refer to the
      website.
    </para>
  </refsect1>

  <refsect1 id="twidge.options">
    <indexterm><primary>Options (command-line)</primary></indexterm>
    <title>Options</title>
    <para>
      &twidge; always is invoked with the name of a specific
      operation, such as <option>update</option> or
      <option>lsrecent</option>.  In &twidge;, these operations are
      called <emphasis>commands</emphasis>.  Each command has its
      own options, which are given after the command on the
      &twidge; command line.  A full summary of each command's
      options is given later in this manual.
    </para>
    
    <para>
      You may obtain a list of all commands with <command>twidge
        lscommands</command>.  Help is available for any individual
      command with <command>twidge <replaceable>command</replaceable>
        --help</command>.  Global help is available with
      <command>twidge --help</command>.
    </para>
    <refsect2 id="twidge.options.global">
      <title>Global Options</title>
      <para>
        These options may be specified <emphasis>before</emphasis> any
        command.
      </para>
      <variablelist>
        <varlistentry><term>-c <replaceable>FILE</replaceable></term>
                      <term>--config=<replaceable>FILE</replaceable></term>
          <listitem><para>
              By default, &twidge; uses
              <filename>~/.twidgerc</filename> for configuration.
              With this option, you can specify an alternate file.
              &twidge; will read configuration information
              from it.  In certain cases, &twidge; will also write to
              it, such as with the <command>twidge setup</command>
              command, or the -s option to one of the ls commands.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term>-d</term><term>--debug</term>
          <listitem><para>
              Enables debugging output.  This verbose output helps you
              learn what &twidge; is doing every step of the way and
              diagnose any problems you may encounter.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </refsect2>

  </refsect1>

  <refsect1 id="twidge.commands">
    <indexterm><primary>Commands</primary></indexterm>
    <title>Commands in Twidge</title>
    <para>
      &twidge; has many different commands.  You must specify a
      command when using &twidge;.
      This section will discuss each command in
      detail.  Note that all commands are case-sensitive and should be
      <emphasis>given in lowercase</emphasis>.
    </para>
    <para>
      All commands support the option <option>--help</option>.  Running
      <command>twidge <replaceable>command</replaceable>
      --help</command> will display information about the command and
      its options.  Since all commands support this, it won't be
      explicitly listed for each command below.
    </para>

  </refsect1>
  <refsect1 id="twidge.commands.updatedisplay">
    <title>Commands to Display Updates</title>
    <cmdsynopsis>
        <command>twidge ls<replaceable>*</replaceable></command>
        <arg choice="opt">-a</arg>
        <arg choice="opt">-l</arg>
        <arg choice="opt">-s</arg>
        <arg choice="opt">-u</arg>
    </cmdsynopsis>
    <para>
      Several commands can display updates from yourself or others.
      They all share a common syntax and common set of options.  The
      commands are
      <command>lsdm</command>, <command>lsdmarchive</command>,
      <command>lsrecent</command>, <command>lsreplies</command>,
      and <command>lsrtreplies</command>.
      Here are the common options:
    </para>
    
    <variablelist>
      <varlistentry><term>-a</term>
        <term>--all</term>
        <listitem><para>
            Normally, microblogging sites return one "page" of results
            -- typically, 20 or 100 results, depending on the
            operation.  Specifying --all requests &twidge; to
            continually send requests to the microblogging site until
            it receives an entire set of information.  Normally this
            is a bad idea, but when used in combination with -u --
            especially if you have used -s before -- it can be a
            useful way to poll for all new updates.
          </para>
          <para>
            If not used carefully, this command can generate many
            requests to the server and can use a significant amount of
            bandwidth.  Microblogging sites have traffic limits, and
            will not take kindly to this.  Be careful when you use
            --all.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry><term>-e <replaceable>command</replaceable></term>
        <term>--exec=<replaceable>command</replaceable></term>
        <listitem><para>
            Causes any normal output to be suppressed.  Instead, for
            each item that is retrieved, call the given command.  The
            command will be passed exactly four arguments.  Care
            should be exercised when using them in shell scripts due
            to the likelihood of the presence of shell
            metacharacters.  The arguments are:
          </para>
          <orderedlist>
            <listitem><para>
                The update ID for the given update.
              </para></listitem>
            <listitem><para>
                The username that created the update</para></listitem>
            <listitem><para>
                A suggested Message-ID for representing the update in
                email.  Contains the enclosing angle brackets.
              </para></listitem>
            <listitem><para>
                The update text itself.  Likely contains spaces and
                other shell metacharacters.
              </para></listitem>
          </orderedlist>
        </listitem>
      </varlistentry>

      <varlistentry><term>-l</term>
        <term>--long</term>
        <listitem><para>
            The default output format shows a nickname and a message,
            formatted nicely for display.  Using this option causes
            output to include these columns: message ID, sender nick,
            recipient nick (empty unless a direct message), update
            text, and date created.
            The output format is suitable for machine parsing. 
            horizontal tab character \t separates the columns,
            and is guaranteed to appear nowhere else.  It is also
            guaranteed that \n will appear nowhere within a line when
            using -l.
          </para>
          <para>
            The columns as presented are anticipated to remain
            stable.  However, additional columns could be added to the
            right of these columns in future versions of &twidge;.
            Well-behaved parsers should be prepared to discard any
            surplus columns to the right of those specified in this
            document.
          </para>
        </listitem>
        </varlistentry>

      <varlistentry>
        <term>-m <replaceable>address</replaceable></term>
        <term>--mailto=<replaceable>address</replaceable></term>
        <listitem><para>
            Causes any normal output to be suppressed.  Instead, for
            each item that is retrieved, generate an email and send it
            to the given address.  The subject line will contain the
            sender nickname and the first 30 characters of the text.
            The body will contain
            the entire text.  The message is sent by using the program
            listed as sendmail in the configuration file.  If mailfrom
            is listed in the configuration file, it is listed as the
            from address and the name of the sender is listed as the
            from comment.
          </para>
          <para>
            A Message-ID designed to uniquely identify this update is
            generated and included.  In addition, headers beginning
            with X-Twidge- will be added, with various metadata.
          </para>
          <para>
            It should be noted that a simple script could be used with
            --exec to achieve this same purpose, but with greater
            flexibility.
            The functionality is built into &twidge; as well for
            convenience.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry><term>-s</term>
        <term>--saveid</term>
        <listitem><para>
            Saves the ID of the most recent fetched message for future
            use with -u.  Requires write access to your configuration
            file.
          </para></listitem>
      </varlistentry>

      <varlistentry><term>-u</term>
        <term>--unseen</term>
        <listitem><para>
            Causes the command to show only items since the last use
            of -s with this particular command.  If -s has never
            before been used with this command, has no effect.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>

    <para>
      Some of these options don't make sense together; for instance,
      --long, --exec, and --mailto are mutually exclusive.  Results
      are undefined if you use such options simultaneously.
    </para>

    <refsect2 id="twidge.commands.lsdm">
      <title>lsdm</title>
      <para>
        Lists direct messages sent to you.  Note: identi.ca does not
        support direct messages, and this will cause an error with
        that service.
      </para>
    </refsect2>

    <refsect2 id="twidge.commands.lsdmarchive">
      <title>lsdmarchive</title>
      <para>
        Lists direct messages you have sent.  Note: identi.ca does not
        support direct messages, and this command will cause an error
        with that service.
      </para>
    </refsect2>

    <refsect2 id="twidge.commands.lsrecent">
      <title>lsrecent</title>
      <para>
        Lists recent posts made by you or the people you follow.
      </para>
    </refsect2>

    <refsect2 id="twidge.commands.lsreplies">
      <title>lsreplies</title>
      <para>
        Lists recent replies made by anyone on the microblogging site
        to you.
      </para>
    </refsect2>

    <refsect2 id="twidge.commands.lsrtreplies">
      <title>lsrtreplies</title>
      <para>
        List retweets of your statuses made by others.
      </para>
      <para>
        Note: identi.ca doesn't support new-style retweets and will
        return an error on this command.
      </para>
    </refsect2>

  </refsect1>

  <refsect1 id="twidge.commands.displayinfo">
    <title>Commands to Display Other Information</title>
    <para>
      These commands honor --all and --long like the other commands,
      but do not honor --saveid or --unseen, as these options make no
      sense.
    </para>

    <refsect2 id="twidge.commands.lsfollowers">
      <title>lsfollowers</title>
      <cmdsynopsis>
        <command>twidge lsfollowers</command>
        <arg choice="opt"><replaceable>options</replaceable></arg>
        <arg choice="opt"><replaceable>username</replaceable></arg>
      </cmdsynopsis>
      <para>
        Will slow a list of people following you.  If given an
        optional username, shows the people that follow that user.  If
        given --long, shows the IDs for each person.  You may need to
        use --all to get a complete list, but again this may generate
        significant traffic.
      </para>
    </refsect2>

    <refsect2 id="twidge.commands.lsfollowing">
      <title>lsfollowing</title>
      <cmdsynopsis>
        <command>twidge lsfollowing</command>
        <arg choice="opt"><replaceable>options</replaceable></arg>
        <arg choice="opt"><replaceable>username</replaceable></arg>
      </cmdsynopsis>
      <para>
        Shows a list of the people you follow.  Arguments and actions
        are the same as with lsfollowers.
      </para>
    </refsect2>
  </refsect1>

  <refsect1 id="twidge.commands.action">
    <title>Action Commands</title>
    <para>
      These commands perform an action on the server.
    </para>


    <refsect2 id="twidge.commands.dmsend">
      <title>dmsend</title>
      <cmdsynopsis>
        <command>twidge dmsend</command>
        <arg choice="plain"><replaceable>recipient</replaceable></arg>
        <arg choice="opt"><replaceable>status</replaceable></arg>
      </cmdsynopsis>
      <para>
        Causes &twidge; to send a new direct message to the designated
        recipient.  If a
        status is given on the command line, it must be presented as a
        single argument to &twidge; by the use of shell quoting if
        needed.  If no status is given on the command line, a single
        line will be read from stdin and used as the status.
      </para>
      <para>
        The maximum length of updates on various microblogging sites
        is 140 characters.  Twidge will abort with an error if your
        update attempt exceeds that length.
      </para>
      <para>
        By default, Twidge will attempt to shorten URLs in your
        updates via an URL shortening service, but only if your
        update's length exceeds 140 characters. This means long
        URLs shorter than 140 characters WILL NOT be shortened.
      </para>
      <para>
        If you want all your URLs to be shortened all the time
        regardless of their length, then set shortenall = yes
        in the [DEFAULT] or [dmsend] section of your configuration
        file.
      </para>
      <para>
        You can disable URL shortening altogether by setting
        shortenurls = no in the [DEFAULT] or [dmsend] section of
        your configuration file.
      </para>
    </refsect2>

    <refsect2 id="twidge.commands.follow">
      <title>follow</title>
      <cmdsynopsis>
        <command>twidge follow</command>
        <arg choice="plain"><replaceable>username</replaceable></arg>
      </cmdsynopsis>
      <para>
        This command will cause &twidge; to request that the
        microblogging site add the given username to the list of
        people you follow.  It is considered an error to attempt to
        add someone you already follow.
      </para>
    </refsect2>

    <refsect2 id="twidge.commands.setop">
      <title>setup</title>
      <cmdsynopsis><command>twidge setup</command></cmdsynopsis>
      <para>
        Enters the interactive first-time setup tool.
      </para>
    </refsect2>

    <refsect2 id="twidge.commands.unfollow">
      <title>unfollow</title>
      <cmdsynopsis>
        <command>twidge unfollow</command>
        <arg choice="plain"><replaceable>username</replaceable></arg>
      </cmdsynopsis>
      <para>
        This command will cause &twidge; to request that the
        microblogging site remove the given username from the list of
        people you follow.  It is considered an error to attempt to
        remove someone you do not follow.
      </para>
    </refsect2>

    <refsect2 id="twidge.commands.update">
      <title>update</title>
      <cmdsynopsis>
        <command>twidge update</command>
        <arg choice="opt">-i <replaceable>MSGID</replaceable> |
          --inreplyto <replaceable>MSGID</replaceable></arg>
        <arg choice="opt"><replaceable>status</replaceable></arg>
      </cmdsynopsis>
      <cmdsynopsis>
        <command>twidge update -r</command>
      </cmdsynopsis>
      <para>
        Causes &twidge; to post a new status to the server.  If a
        status is given on the command line, it must be presented as a
        single argument to &twidge; by the use of shell quoting if
        needed.  If no status is given on the command line, a single
        line will be read from stdin and used as the status.
      </para>
      <para>
        The maximum length of updates on various microblogging sites
        is 140 characters.  Twidge will abort with an error if your
        update attempt exceeds that length.
      </para>
      <para>
        By default, Twidge will attempt to shorten URLs in your
        updates via an URL shortening service, but only if your
        update's length exceeds 140 characters. This means long
        URLs shorter than 140 characters WILL NOT be shortened.
      </para>
      <para>
        If you want all your URLs to be shortened all the time
        regardless of their length, then set shortenall = yes
        in the [DEFAULT] or [dmsend] section of your configuration
        file.
      </para>
      <para>
        You can disable URL shortening altogether by setting
        shortenurls = no in the [DEFAULT] or [dmsend] section of
        your configuration file.
      </para>
      <para>
        When -r is given, &twidge; expects to read an RFC2822 email
        message in stdin.  The body of the message will be used as the
        content of the update.  The References header of the message
        will be briefly scanned, and if appropriate, the reply-to
        attribute of the update will reflect the Message-ID referred
        to therein.  This way, if you use <command>twidge lsrecent
        --mailto</command> to email recent items to you, then use your
        email reply button to reply to them, &twidge; will link the
        two on Twitter.  This linkage can be done even if you omit
        @reply, but will likely confuse many people because most other
        clients can't do this.  You should still include @reply.
      </para>
      <para>
        It should be noted that, in an effort to minimize size and
        complexity, &twidge; has an extremely simple email parser.
        You should send it only plain text messages.  Do not use HTML,
        RTF, attachments, or anything that would cause MIME headers to
        appear in the RFC2822 body.  You probably want to turn off
        your signature as well. &twidge; will convert newline
        characters to spaces when processing your message body.  
      </para>
      <para>
        When -i is given, the internal Twitter ID of a message is
        expected to be passed.  This sets the "in reply to" flag on
        Twitter appropriately.
      </para>
    </refsect2>
  </refsect1>

  <refsect1 id="twidge.commands.other">
    <title>Other Command</title>
    
    <refsect2 id="twidge.commands.lscommands">
      <indexterm><primary>Commands</><secondary>lscommands</></>
      <title>lscommands</title>
      <cmdsynopsis><command>twidge lscommands</command></cmdsynopsis>
      <para>
        This command will display a list of all available &twidge;
        commands along with a brief description of each.
      </para>
    </refsect2>
  </refsect1>

  <refsect1 id="twidge.config">
    <title>twidge Configuration File</title>
    <para>
      &twidge; has a configuration file in which you can set various
      options.  This file normally lives under
      <filename>~/.twidgerc</filename>.
    </para>
    <para>
      The configuration file has multiple sections.  Each section has
      a name and is introduced with the name in brackets.  Each
      section has one or more options.
    </para>
    <para>
      The section named DEFAULT is special in that it provides
      defaults that will be used whenever an option can't be found
      under a different section.  If you specify no section names,
      DEFAULT is the assumed section.  Some items, such as urlbase,
      are assumed to be in DEFAULT.
    </para>
    <para>
      Let's start by looking at an example file, and then proceed to
      examine all the options that are available.
    </para>
    <programlisting><![CDATA[
[DEFAULT]

; If your password contains a percent sign (%), list it twice (%%)

; Path to server API interface -- no trailing slash
urlbase = https://twitter.com

shortenurls = yes

; Last IDs seen by different commands.  Written to with -s.

[lsrecent]
lastid = 914881241
]]></programlisting>
    <para>
      Whenever &twidge; looks for information about a particular
      option, it first checks to see if it can find that option in a
      section for that option.  If not, it checks the
      <option>DEFAULT</option> section.  If it still doesn't find an
      answer, it consults its built-in defaults.
    </para>
    <refsect2 id="twidge.config.general">
      <title>General Options</title>
      <para>These are specified in the <option>DEFAULT</option>
        section.
      </para>
      <variablelist>
        <varlistentry><term>serverbase</term>
          <listitem><para>
              The base URL to access the API of the microblogging
              site.  This should contain the server name but not the
              API path.  The default is
              <literal>https://api.twitter.com</literal>.  For Identica,
              you would use <literal>http://identi.ca/api (note that some users have trouble if attempting to use SSL with identica).</literal>.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term>urlbase</term>
          <listitem><para>
              The URL to access the API of the microblogging site.
              The default, <literal>%(serverbase)s/1</literal> is
              for Twitter.  To use Identica, you would specify
              <literal>%(serverbase)s</literal>.  Do not put a
              trailing slash on this option.
            </para></listitem>
        </varlistentry>
        <varlistentry><term>oauthrequesttoken</term>
          <listitem><para>
              The URL to access the oAuth request token interface.  The
              default,
              <literal>%(serverbase)s/oauth/request_token</literal>, will
              work with most environments.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term>oauthaccesstoken</term>
          <listitem><para>
              The oAuth access token URL.  Default is
              <literal>%(serverbase)s/oauth/access_token</literal>.
            </para></listitem>
        </varlistentry>
        <varlistentry><term>oauthauthorize</term>
          <listitem><para>
              The oAuth authorize URL.  Default is
              <literal>%(serverbase)s/oauth/authorize</literal>.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term>oauthconsumerkey</term>
          <listitem><para>
              The oAuth consumer key.  Twidge is registered with
              Twitter and identi.ca and will supply a reasonable
              default for those two based on the content of urlbase.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term>oauthconsumersecret</term>
          <listitem><para>
              The oAuth consumer secret.  A default is provided as
              with oauthconsumerkey.
            </para>
          </listitem>
        </varlistentry>
        <varlistentry><term>oauthdata</term>
          <listitem><para>
              Automatically written by <command>twidge
                setup</command>.  Do not alter.
            </para>
          </listitem>
        </varlistentry>
      </variablelist>
    </refsect2>              

    <refsect2 id="twidge.config.options">
      <title>Per-Command Options</title>
      <para>
        These options may be specified in <option>DEFAULT</option> or
        in a per-option section.  If placed in
        <option>DEFAULT</option>, they will apply to all relevant options
        unless overridden.
      </para>
      <variablelist>
        <varlistentry><term>lastid</term>
          <listitem><para>
              Stores the last ID seen for commands that support -s or
          -u.
            </para></listitem>
        </varlistentry>

        <varlistentry><term>mailfrom</term>
          <listitem><para>
              Gives the email address to use for the From: header on
              messages generated by &twidge;.  Normally specified in
              [DEFAULT] so as to impact all commands.  If not given, 
              &twidge; specifies no From: line, leaving the system's
              mail transport to assign a default one.
            </para>
            <para>
              Should contain a bare email address only -- no brackets,
              parens, quotes, or comments.
            </para>
            <para>
              When given, Twidge uses the nickname and this address
              for the From line.  When not given, the nickname is
              prepended to the Subject line.
            </para>
          </listitem>
        </varlistentry>

        <varlistentry><term>savelast</term>
          <listitem><para>
              For one of the "ls" class of commands, implies -s on
              every invocation, rather than require it to be manually
              given.  This option need only be present; the value you
              give it doesn't mater.
            </para>
          </listitem>
        </varlistentry>

        <varlistentry><term>sendmail</term>
          <listitem><para>
              Stores the path to the sendmail executable on your
              system, used for sending mail.  Normally specified in
              [DEFAULT] so as to impact all commands.  Defaults to
              /usr/sbin/sendmail.
            </para></listitem>
        </varlistentry>
        
        <varlistentry><term>shortenurls</term>
          <listitem>
            <para>
              You may specify <literal>shortenurls</literal> in the
              <literal>[update]</literal> section.  It defaults to yes.  If
              set to no, will cause &twidge; to omit its attempt to shorten
              URLs in your updates. If set to yes, will cause &twidge; to
              shorten URLs in your updates, only if the latter's length
              exceeds 140 characters. See <literal>shortenall</literal>
            </para>
          </listitem>
        </varlistentry>

        <varlistentry><term>shortenall</term>
          <listitem>
            <para>
              You may specify <literal>shortenall</literal> in the
              <literal>[update]</literal> section.  It defaults to no.  If
              set to yes, will cause &twidge; to shorten all URLs in
              your updates, all the time. It only makes sense if
              <literal>shortenurls</literal> is set to yes.
            </para>
          </listitem>
        </varlistentry>

      </variablelist>

    </refsect2>

    <refsect2 id="twidge.config.shortening">
      <title>URL Shortening Options</title>
      <para>
        &twidge; uses is.gd as its default URL shortening service.
      </para>
      <para>
        To enable the bit.ly or j.ump URL shorteners, you must add a
        <literal>[bitly]</literal> or <literal>[jmp]</literal> section
        to the configuration file.  This should contain two entries:
        <literal>login</literal> and <literal>apikey</literal> as
        found in <ulink url="http://bit.ly/account/"></ulink>.  For
        example:
      </para>
      <programlisting>
[jmp]
login: bitlyapidemo
apikey: R_0da49e0a9118ff35f52f629d2d71bf07
      </programlisting>
    </refsect2>

    <refsect2 id="twidge.config.aliases">
      <title>Aliases</title>
      <para>
        You can add an <literal>[alias]</literal> section to the
        config file which will effectively create new commands.  For
        example:
      </para>
      <programlisting>
[alias]
recent: lsrecent -u
replies: lsreplies -u
      </programlisting>
    </refsect2>
  </refsect1>
              

  <refsect1 id="twidge.tips">
    <title>Tips & Hints</title>
    <para>
      Here are a few tips and hints to make &twidge; more pleasant
      for you.
    </para>
    <refsect2 id="twidge.tips.proxy">
      <title>Going Through a Proxy</title>
      <para>
        If your connections must go through a proxy, you'll need to
        set an environment variable.
        If you use an
        environment variable, your settings may will also impact other
        applications -- and that's probably what you want.  See the
        Environment section later for tips on doing that.
      </para>
    </refsect2>

  </refsect1>

  <refsect1 id="twidge.environment">
    <title>Environment</title>
    <para>
      &twidge; does not read any environment variables directly.
      However, it does pass on the environment to the
      programs it calls, such as Curl.  This can be useful for
      specifying proxies.  Please see
      <application>curl</application>(1) for more details.
    </para>
  </refsect1>

  <refsect1 id="twidge.conforming">
    <title>Conforming To</title>
    <itemizedlist>
      <listitem><para>The <ulink
      url="http://www.w3.org/XML/">Extensible Markup Language
            (XML)</ulink> standard (W3C)</para></listitem>
      </itemizedlist>
  </refsect1>

  <refsect1 id="twidge.copyright">
    <title>Copyright</title>
    <indexterm><primary>Copyright</></>
    <para>
      &twidge;, all code, documentation, files, and build scripts are
      Copyright &copy; 2006-2008 John Goerzen.  All code, documentation,
      sripts, and files are under the following license unless
      otherwise noted:
    </para>
    <para>
      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.
    </para>
    
    <para>
      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.
    </para>
    
    <para>
      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., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    </para>
    <para>
      The GNU General Public License is available in the file COPYING
      in the source distribution.  Debian GNU/Linux users may find this in
      /usr/share/common-licenses/GPL-2.
    </para>
    <para>
      If the GPL is unacceptable for your uses, please e-mail me; alternative
      terms can be negotiated for your project.
    </para>
  </refsect1>
  
  <refsect1 id="twidge.author">
    <title>Author</title>
    <para>
      &twidge;, its modules, documentation, executables, and all
      included files, except where noted, was written by
      John Goerzen <email>jgoerzen@complete.org</email> and
      copyright is held as stated in the COPYRIGHT section.
    </para>
  </refsect1>

  <refsect1 id="twidge.seealso">
    <title>See Also</title>
    <para>
      <application>curl</application>(1)
    </para>
    <para>
      The &twidge; homepage at <ulink
      url="http://software.complete.org/twidge"></>.
    </para>
  </refsect1>
  
  </refentry>
