8000 GitHub - book/mail2tweet: Tweet the subject and first URL of an email · GitHub
[go: up one dir, main page]

Skip to content

About

Tweet the subject and first URL of an email

Resources

Stars

4 stars

Watchers

1 watching

Forks

Latest commit

 

History

45 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

5272
I'm subscribed to a mailing-list were people send interesting articles,
usually as a link followed by the full text (for archival, as URL tend
to become obsolete over time).

The link are interesting enough that they could be shared with more
people. Enters Twitter. I want to tweet a summary of the emails:
simply the subject line and the first URL in the body.

mail2tweet gets the oldest email matching the given criteria,
and tweets subject and first link from an email on stdin.

The YAML config files hold the credentials, "last email tweeted",
and content-munging information.

    # example use in a crontab
    */5 * * * * mail2tweet --config config.yml

    # example config.yml
    cleanup:
      subject:
        - '\[Sylvester\] *'
        - '^(?:(?i:Fwd|Re): *)*'
      body:
        - 'https?://(?:\S+\.)?example.(?:biz|com|net)'
        - '#!/'
    imap:
      password: puttytat
      port: 993
      server: imap.example.com
      ssl: 1
      uid: 1
      user: tweety.bird
    mail:
      folder: INBOX.lists.sylvester
      last: 1326892229
      search:
        - HEADER
        - x-list
        - funny_link
    seen_file: seen_url.yml
    sender_map:
      sylvester@example.com: puttytat
      granny@example.com: grandma
    twitter:
      access_token: 97fo59774-Gy9e4fl2p5PjRHnbdheDrcJJN2DVlAqTSQTX1zgS
      access_token_secret: ENlqvrDcjdSQI4xm2TbTrg9mKysQbe002aurvg37kj
      consumer_key: xvRaJ0bNmlD6Tnz5bfSJR
      consumer_secret: cOZpoTxk7sP3H2VZm4mr7iRrdWfItIIuBv5y03amu
      tags:
        - hector
        - granny
        - sylvester

About

Tweet the subject and first URL of an email

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages

0