kianby / mail2diaspora

[DEPRECATED] Post text and image to Diaspora via e-mails

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[DEPRECATED]

Mail to Diaspora

Small piece of code providing a way to post text and image to Diaspora via emails. It is part of my ecosystem built around RabbitMQ. It depends on SRMail to send and receive e-mails. Other dependencies are listed in requirements.txt. Mail2Diaspora is written in Python 3.

config.json is a configuration example.

Diaspy connection patch for Framasphere:

class Connection():
    """Object representing connection with the pod.
    """
    _token_regex = re.compile(r'name="csrf-token"\s+content="(.*?)"')
    _userinfo_regex = re.compile(r'window.current_user_attributes = ({.*})')
    # this is for older version of D*
    _token_regex_2 = re.compile(r'content="(.*?)"\s+name="csrf-token')
    _userinfo_regex_2 = re.compile(r'gon.user=({.*});gon.appConfig')
    _verify_SSL = True

About

[DEPRECATED] Post text and image to Diaspora via e-mails

License:GNU General Public License v3.0


Languages

Language:Python 99.4%Language:Shell 0.6%