pleroma-bot


Namepleroma-bot JSON
Version 0.8.5 PyPI version JSON
download
home_pagehttps://github.com/robertoszek/pleroma-bot
SummaryMirror one or multiple Twitter accounts in Pleroma/Mastodon
upload_time2021-02-23 17:11:31
maintainer
docs_urlNone
authorRoberto Chamorro
requires_python>=3.6
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Stork (pleroma-bot)

[![Build Status](https://travis-ci.com/robertoszek/pleroma-bot.svg?branch=develop)](https://travis-ci.com/robertoszek/pleroma-bot)
[![Version](https://img.shields.io/pypi/v/pleroma-bot.svg)](https://pypi.org/project/pleroma-bot/)
[![codecov](https://codecov.io/gh/robertoszek/pleroma-bot/branch/master/graph/badge.svg?token=0c4Gzv4HjC)](https://codecov.io/gh/robertoszek/pleroma-bot)
[![Python 3.6](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/release/python-360/)
[![Requires.io (branch)](https://img.shields.io/requires/github/robertoszek/pleroma-bot/master)](https://requires.io/github/robertoszek/pleroma-bot/requirements/?branch=master)
[![License](https://img.shields.io/github/license/robertoszek/pleroma-bot)](https://github.com/robertoszek/pleroma-bot/blob/master/LICENSE.md)

![Stork](img/stork-smaller.svg)

Mirror one or multiple Twitter accounts in Pleroma/Mastodon.

[![Documentation](img/docs.png)](https://robertoszek.github.io/pleroma-bot)

## Introduction

After using the pretty cool [mastodon-bot](https://github.com/yogthos/mastodon-bot) for a while, I found it was lacking some actions which were of use to me. 

For precisely those cases I've written this Python project that automates them, asking such info to [Twitter's API](https://developer.twitter.com/en/docs/twitter-api/v1) and updating the relevant fields on the [Pleroma API](https://docs-develop.pleroma.social/backend/API/pleroma_api/)/[Mastodon API](https://docs.joinmastodon.org/client/intro/) side.


## Features 

So basically, it does the following:

* Retrieves **tweets** and posts them on the Fediverse account if their timestamp is newer than the last post.
  * Can filter out RTs or not
  * Can filter out replies or not
* Media retrieval and upload of multiple **attachments**. This includes:
  * Video
  * Images
  * Animated GIFs 
  * Polls
* Retrieves **profile info** from Twitter and updates it in on the Fediverse account. This includes:
  * *Display name*
  * *Profile picture*
  * *Banner image*
  * *Bio text*
* Adds some **metadata fields** to the Fediverse account, pointing to the original Twitter account or custom text.

## Installation
### Using pip
```
$ pip install pleroma-bot
```
### Using a package manager
Here's a list of the available packages.

| Package type   | Link                                                    | Maintainer                                    |
|:--------------:|:-------------------------------------------------------:|:---------------------------------------------:|
| AUR (Arch)     | https://aur.archlinux.org/packages/python-pleroma-bot  | [robertoszek](https://github.com/robertoszek) |

## Usage
```console
$ pleroma-bot [--noProfile] [--forceDate [FORCEDATE]] [-c CONFIG]
```

```console
Bot for mirroring one or multiple Twitter accounts in Pleroma/Mastodon.

optional arguments:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        path of config file (config.yml) to use and parse. If
                        not specified, it will try to find it in the current
                        working directory.
  -n, --noProfile       skips Fediverse profile update (no background image,
                        profile image, bio text, etc.)
  --forceDate [FORCEDATE]
                        forces the tweet retrieval to start from a specific
                        date. The twitter_username value (FORCEDATE) can be
                        supplied to only force it for that particular user in
                        the config
  -s, --skipChecks      skips first run checks
  --verbose, -v
  --version             show program's version number and exit
```
### Before running
You'll need the following:

* A [Twitter Bearer Token](https://developer.twitter.com/en/docs/authentication/api-reference/token)
* The user/users [Pleroma/Mastodon Bearer Tokens](https://tinysubversions.com/notes/mastodon-bot/)

If you plan on retrieving tweets from an account which has their tweets **protected**, you'll also need the following:
* Consumer Key and Secret. You'll find them on your project app keys and tokens section at [Twitter's Developer Portal](https://developer.twitter.com/en/portal/dashboard)
* Access Token Key and Secret.  You'll also find them on your project app keys and tokens section at [Twitter's Developer Portal](https://developer.twitter.com/en/portal/dashboard). 
Alternatively, you can obtain the Access Token and Secret by running [this](https://github.com/joestump/python-oauth2/wiki/Twitter-Three-legged-OAuth-Python-3.0) locally, while being logged in with a Twitter account which follows or is the owner of the protected account

Create a ```config.yml``` file in the same path where you are calling ```pleroma-bot```. There's a config example in this repo called ```config.yml.sample``` that can help you when filling yours out:
```yaml
twitter_base_url: https://api.twitter.com/1.1
# Change this to your Fediverse instance
pleroma_base_url: https://pleroma.robertoszek.xyz
# (optional) Change this to your preferred nitter instance
nitter_base_url: https://nitter.net
# How many tweets to get in every execution
# Twitter's API hard limit is 3,200
max_tweets: 40
# Twitter bearer token
twitter_token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# List of users and their attributes
users:
- twitter_username: KyleBosman
  pleroma_username: KyleBosman
  # Mastodon/Pleroma token obtained by following the README.md
  pleroma_token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  # (optional) keys and secrets for using OAuth 1.0a (for protected accounts)
  consumer_key: xxxxxxxxxxxxxxxxxxxxxxxxx
  consumer_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  access_token_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  access_token_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  # If you want to add a link to the original status or not
  signature: true
  # (optional) If you want to download Twitter attachments and add them to the Pleroma posts.
  # By default they are not
  media_upload: true
  # (optional) If twitter links should be changed to nitter ones. By default they are not
  nitter: true
  # (optional) If mentions should be transformed to links to the mentioned Twitter profile
  rich_text: true
  # (optional) visibility of the post. Must one of the following: public, unlisted, private, direct
  # by default is "unlisted"
  visibility: "unlisted"
  # (optional) Force all posts for this account to be sensitive or not
  # The NSFW banner for the instance will be shown for attachments as a warning if true
  # If not defined, the original tweet sensitivity will be used on a tweet by tweet basis
  sensitive: false
  # (optional) If RTs are to be also be posted in the Fediverse account. By default they are included
  include_rts: false
  # (optional) If replies are to be also posted in the Fediverse account. By default they are included
  include_replies: false
  # (optional) How big attachments can be before being ignored and not being uploaded to the Fediverse post
  # Examples: "30MB", "1.5GB", "0.5TB"
  file_max_size: 500MB
  # additional custom-named attributes
  support_account: robertoszek
  # you can use any attribute from 'user' inside a string with {{ attr_name }} and it will be replaced
  # with the attribute value. e.g. {{ support_account }}
  bio_text: "\U0001F916 BEEP BOOP \U0001F916 \nI'm a bot that mirrors {{ twitter_username }} Twitter's\
    \ account. \nAny issues please contact @{{ support_account }} \n \n " # username will be replaced by its value
  # Optional metadata fields and values for the Pleroma profile
  fields:
  - name: "\U0001F426 Birdsite"
    value: "{{ twitter_url }}"
  - name: "Status"
    value: "I am completely operational, and all my circuits are functioning perfectly."
  - name: "Source"
    value: "https://gitea.robertoszek.xyz/robertoszek/pleroma-twitter-info-grabber"
# Mastodon instance example
- twitter_username: WoolieWoolz
  pleroma_username: 24660
  pleroma_base_url: https://botsin.space
  pleroma_token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  # Mastodon doesn't support rich text!
  rich_text: false
  signature: true
  nitter: true
  visibility: "unlisted"
  media_upload: true
  max_tweets: 50
  bio_text: "\U0001F916 BEEP BOOP \U0001F916 \nI'm a bot that mirrors {{ twitter_username }} Twitter's\
    \ account. \nAny issues please contact @{{ support_account }} \n \n " # username will be replaced by its value
  fields:
  - name: "\U0001F426 Birdsite"
    value: "{{ twitter_url }}"
  - name: "Status"
    value: "I am completely operational, and all my circuits are functioning perfectly."
  - name: "Source"
    value: "https://gitea.robertoszek.xyz/robertoszek/pleroma-twitter-info-grabber"
# Minimal config example
- twitter_username: arstechnica
  pleroma_username: mynewsbot
  pleroma_token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  bio_text: ""
```

Changing the ```users``` to the desired ones. You can add as many users as needed.

Also change the following to your Pleroma/Mastodon instance URL:
```yaml
pleroma_base_url: https://pleroma.robertoszek.xyz
```
### Running

If you're running the bot for the first time it will ask you for the date you wish to start retrieving tweets from (it will gather all from that date up to the present). 
If you leave it empty and just press enter it will default to the oldest date that Twitter's API allows ('```2010-11-06T00:00:00Z```') for tweet retrieval.

To force this behaviour in future runs you can use the ```--forceDate``` argument (be careful, no validation is performed with the already posted toots/posts by that Fediverse account and you can end up with duplicates posts/toots!).

Additionally, you can provide a ```twitter_username``` if you only want to force the date for one user in your config.

For example:

```console
$ pleroma-bot --forceDate WoolieWoolz
```

If the ```--noProfile``` argument is passed, *only* new tweets will be posted. The profile picture, banner, display name and bio will **not** be updated on the Fediverse account.

NOTE: An ```error.log``` file will be created at the path from which ```pleroma-bot``` is being called.

### crontab entry example 
**(everyday at 6:15 AM)** update profile and **(every 10 min.)** post new tweets:
```bash
# Post tweets every 10 min
*/10 * * * * cd /home/robertoszek/myvenv/ && . bin/activate && pleroma-bot noProfile

# Update pleroma profile with Twitter info every day at 6:15 AM
15 6 * * * cd /home/robertoszek/myvenv/ && . bin/activate && pleroma-bot
```

## Screenshots

![Screenshot](img/cmd.png)


![Screenshot](img/screenshot.png)

## Acknowledgements
These projects proved to be immensely useful, they are Python wrappers for the Mastodon API and Twitter API respectively:

* [Mastodon.py](https://github.com/halcy/Mastodon.py)
* [twitter-python](https://github.com/bear/python-twitter)

They were part of the impetus for this project, challenging myself to not just import them and use them, instead opting to directly do the heavy lifting with built-in python modules. 

That and [mastodon-bot](https://github.com/yogthos/mastodon-bot) not working after upgrading the Pleroma instance I was admin on 😅. This event lead to repurposing it and adding the tweet gathering and posting capabilities.

## Contributing

Patches, pull requests, and bug reports are more than [welcome](https://github.com/robertoszek/pleroma-bot/issues/new/choose), please keep the style consistent with the original source.


## License

MIT License

Copyright (c) 2021 Roberto Chamorro / project contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

**Tested and confirmed working against** :
* ```Pleroma BE 2.0.50-2547-g5c2b6922-develop```
* ```Mastodon v3.2.1```
* ```Twitter API v1.1 and v2```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/robertoszek/pleroma-bot",
    "name": "pleroma-bot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Roberto Chamorro",
    "author_email": "robertoszek@robertoszek.xyz",
    "download_url": "https://files.pythonhosted.org/packages/8f/bb/bf0382ca52554df40550725802cb7cf023af3f245b1b0a6a174d8422b3a5/pleroma-bot-0.8.5.tar.gz",
    "platform": "",
    "description": "# Stork (pleroma-bot)\n\n[![Build Status](https://travis-ci.com/robertoszek/pleroma-bot.svg?branch=develop)](https://travis-ci.com/robertoszek/pleroma-bot)\n[![Version](https://img.shields.io/pypi/v/pleroma-bot.svg)](https://pypi.org/project/pleroma-bot/)\n[![codecov](https://codecov.io/gh/robertoszek/pleroma-bot/branch/master/graph/badge.svg?token=0c4Gzv4HjC)](https://codecov.io/gh/robertoszek/pleroma-bot)\n[![Python 3.6](https://img.shields.io/badge/python-3.6+-blue.svg)](https://www.python.org/downloads/release/python-360/)\n[![Requires.io (branch)](https://img.shields.io/requires/github/robertoszek/pleroma-bot/master)](https://requires.io/github/robertoszek/pleroma-bot/requirements/?branch=master)\n[![License](https://img.shields.io/github/license/robertoszek/pleroma-bot)](https://github.com/robertoszek/pleroma-bot/blob/master/LICENSE.md)\n\n![Stork](img/stork-smaller.svg)\n\nMirror one or multiple Twitter accounts in Pleroma/Mastodon.\n\n[![Documentation](img/docs.png)](https://robertoszek.github.io/pleroma-bot)\n\n## Introduction\n\nAfter using the pretty cool [mastodon-bot](https://github.com/yogthos/mastodon-bot) for a while, I found it was lacking some actions which were of use to me. \n\nFor precisely those cases I've written this Python project that automates them, asking such info to [Twitter's API](https://developer.twitter.com/en/docs/twitter-api/v1) and updating the relevant fields on the [Pleroma API](https://docs-develop.pleroma.social/backend/API/pleroma_api/)/[Mastodon API](https://docs.joinmastodon.org/client/intro/) side.\n\n\n## Features \n\nSo basically, it does the following:\n\n* Retrieves **tweets** and posts them on the Fediverse account if their timestamp is newer than the last post.\n  * Can filter out RTs or not\n  * Can filter out replies or not\n* Media retrieval and upload of multiple **attachments**. This includes:\n  * Video\n  * Images\n  * Animated GIFs \n  * Polls\n* Retrieves **profile info** from Twitter and updates it in on the Fediverse account. This includes:\n  * *Display name*\n  * *Profile picture*\n  * *Banner image*\n  * *Bio text*\n* Adds some **metadata fields** to the Fediverse account, pointing to the original Twitter account or custom text.\n\n## Installation\n### Using pip\n```\n$ pip install pleroma-bot\n```\n### Using a package manager\nHere's a list of the available packages.\n\n| Package type   | Link                                                    | Maintainer                                    |\n|:--------------:|:-------------------------------------------------------:|:---------------------------------------------:|\n| AUR (Arch)     | https://aur.archlinux.org/packages/python-pleroma-bot  | [robertoszek](https://github.com/robertoszek) |\n\n## Usage\n```console\n$ pleroma-bot [--noProfile] [--forceDate [FORCEDATE]] [-c CONFIG]\n```\n\n```console\nBot for mirroring one or multiple Twitter accounts in Pleroma/Mastodon.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -c CONFIG, --config CONFIG\n                        path of config file (config.yml) to use and parse. If\n                        not specified, it will try to find it in the current\n                        working directory.\n  -n, --noProfile       skips Fediverse profile update (no background image,\n                        profile image, bio text, etc.)\n  --forceDate [FORCEDATE]\n                        forces the tweet retrieval to start from a specific\n                        date. The twitter_username value (FORCEDATE) can be\n                        supplied to only force it for that particular user in\n                        the config\n  -s, --skipChecks      skips first run checks\n  --verbose, -v\n  --version             show program's version number and exit\n```\n### Before running\nYou'll need the following:\n\n* A [Twitter Bearer Token](https://developer.twitter.com/en/docs/authentication/api-reference/token)\n* The user/users [Pleroma/Mastodon Bearer Tokens](https://tinysubversions.com/notes/mastodon-bot/)\n\nIf you plan on retrieving tweets from an account which has their tweets **protected**, you'll also need the following:\n* Consumer Key and Secret. You'll find them on your project app keys and tokens section at [Twitter's Developer Portal](https://developer.twitter.com/en/portal/dashboard)\n* Access Token Key and Secret.  You'll also find them on your project app keys and tokens section at [Twitter's Developer Portal](https://developer.twitter.com/en/portal/dashboard). \nAlternatively, you can obtain the Access Token and Secret by running [this](https://github.com/joestump/python-oauth2/wiki/Twitter-Three-legged-OAuth-Python-3.0) locally, while being logged in with a Twitter account which follows or is the owner of the protected account\n\nCreate a ```config.yml``` file in the same path where you are calling ```pleroma-bot```. There's a config example in this repo called ```config.yml.sample``` that can help you when filling yours out:\n```yaml\ntwitter_base_url: https://api.twitter.com/1.1\n# Change this to your Fediverse instance\npleroma_base_url: https://pleroma.robertoszek.xyz\n# (optional) Change this to your preferred nitter instance\nnitter_base_url: https://nitter.net\n# How many tweets to get in every execution\n# Twitter's API hard limit is 3,200\nmax_tweets: 40\n# Twitter bearer token\ntwitter_token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n# List of users and their attributes\nusers:\n- twitter_username: KyleBosman\n  pleroma_username: KyleBosman\n  # Mastodon/Pleroma token obtained by following the README.md\n  pleroma_token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n  # (optional) keys and secrets for using OAuth 1.0a (for protected accounts)\n  consumer_key: xxxxxxxxxxxxxxxxxxxxxxxxx\n  consumer_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n  access_token_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n  access_token_secret: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\n  # If you want to add a link to the original status or not\n  signature: true\n  # (optional) If you want to download Twitter attachments and add them to the Pleroma posts.\n  # By default they are not\n  media_upload: true\n  # (optional) If twitter links should be changed to nitter ones. By default they are not\n  nitter: true\n  # (optional) If mentions should be transformed to links to the mentioned Twitter profile\n  rich_text: true\n  # (optional) visibility of the post. Must one of the following: public, unlisted, private, direct\n  # by default is \"unlisted\"\n  visibility: \"unlisted\"\n  # (optional) Force all posts for this account to be sensitive or not\n  # The NSFW banner for the instance will be shown for attachments as a warning if true\n  # If not defined, the original tweet sensitivity will be used on a tweet by tweet basis\n  sensitive: false\n  # (optional) If RTs are to be also be posted in the Fediverse account. By default they are included\n  include_rts: false\n  # (optional) If replies are to be also posted in the Fediverse account. By default they are included\n  include_replies: false\n  # (optional) How big attachments can be before being ignored and not being uploaded to the Fediverse post\n  # Examples: \"30MB\", \"1.5GB\", \"0.5TB\"\n  file_max_size: 500MB\n  # additional custom-named attributes\n  support_account: robertoszek\n  # you can use any attribute from 'user' inside a string with {{ attr_name }} and it will be replaced\n  # with the attribute value. e.g. {{ support_account }}\n  bio_text: \"\\U0001F916 BEEP BOOP \\U0001F916 \\nI'm a bot that mirrors {{ twitter_username }} Twitter's\\\n    \\ account. \\nAny issues please contact @{{ support_account }} \\n \\n \" # username will be replaced by its value\n  # Optional metadata fields and values for the Pleroma profile\n  fields:\n  - name: \"\\U0001F426 Birdsite\"\n    value: \"{{ twitter_url }}\"\n  - name: \"Status\"\n    value: \"I am completely operational, and all my circuits are functioning perfectly.\"\n  - name: \"Source\"\n    value: \"https://gitea.robertoszek.xyz/robertoszek/pleroma-twitter-info-grabber\"\n# Mastodon instance example\n- twitter_username: WoolieWoolz\n  pleroma_username: 24660\n  pleroma_base_url: https://botsin.space\n  pleroma_token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n  # Mastodon doesn't support rich text!\n  rich_text: false\n  signature: true\n  nitter: true\n  visibility: \"unlisted\"\n  media_upload: true\n  max_tweets: 50\n  bio_text: \"\\U0001F916 BEEP BOOP \\U0001F916 \\nI'm a bot that mirrors {{ twitter_username }} Twitter's\\\n    \\ account. \\nAny issues please contact @{{ support_account }} \\n \\n \" # username will be replaced by its value\n  fields:\n  - name: \"\\U0001F426 Birdsite\"\n    value: \"{{ twitter_url }}\"\n  - name: \"Status\"\n    value: \"I am completely operational, and all my circuits are functioning perfectly.\"\n  - name: \"Source\"\n    value: \"https://gitea.robertoszek.xyz/robertoszek/pleroma-twitter-info-grabber\"\n# Minimal config example\n- twitter_username: arstechnica\n  pleroma_username: mynewsbot\n  pleroma_token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n  bio_text: \"\"\n```\n\nChanging the ```users``` to the desired ones. You can add as many users as needed.\n\nAlso change the following to your Pleroma/Mastodon instance URL:\n```yaml\npleroma_base_url: https://pleroma.robertoszek.xyz\n```\n### Running\n\nIf you're running the bot for the first time it will ask you for the date you wish to start retrieving tweets from (it will gather all from that date up to the present). \nIf you leave it empty and just press enter it will default to the oldest date that Twitter's API allows ('```2010-11-06T00:00:00Z```') for tweet retrieval.\n\nTo force this behaviour in future runs you can use the ```--forceDate``` argument (be careful, no validation is performed with the already posted toots/posts by that Fediverse account and you can end up with duplicates posts/toots!).\n\nAdditionally, you can provide a ```twitter_username``` if you only want to force the date for one user in your config.\n\nFor example:\n\n```console\n$ pleroma-bot --forceDate WoolieWoolz\n```\n\nIf the ```--noProfile``` argument is passed, *only* new tweets will be posted. The profile picture, banner, display name and bio will **not** be updated on the Fediverse account.\n\nNOTE: An ```error.log``` file will be created at the path from which ```pleroma-bot``` is being called.\n\n### crontab entry example \n**(everyday at 6:15 AM)** update profile and **(every 10 min.)** post new tweets:\n```bash\n# Post tweets every 10 min\n*/10 * * * * cd /home/robertoszek/myvenv/ && . bin/activate && pleroma-bot noProfile\n\n# Update pleroma profile with Twitter info every day at 6:15 AM\n15 6 * * * cd /home/robertoszek/myvenv/ && . bin/activate && pleroma-bot\n```\n\n## Screenshots\n\n![Screenshot](img/cmd.png)\n\n\n![Screenshot](img/screenshot.png)\n\n## Acknowledgements\nThese projects proved to be immensely useful, they are Python wrappers for the Mastodon API and Twitter API respectively:\n\n* [Mastodon.py](https://github.com/halcy/Mastodon.py)\n* [twitter-python](https://github.com/bear/python-twitter)\n\nThey were part of the impetus for this project, challenging myself to not just import them and use them, instead opting to directly do the heavy lifting with built-in python modules. \n\nThat and [mastodon-bot](https://github.com/yogthos/mastodon-bot) not working after upgrading the Pleroma instance I was admin on \ud83d\ude05. This event lead to repurposing it and adding the tweet gathering and posting capabilities.\n\n## Contributing\n\nPatches, pull requests, and bug reports are more than [welcome](https://github.com/robertoszek/pleroma-bot/issues/new/choose), please keep the style consistent with the original source.\n\n\n## License\n\nMIT License\n\nCopyright (c) 2021 Roberto Chamorro / project contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n**Tested and confirmed working against** :\n* ```Pleroma BE 2.0.50-2547-g5c2b6922-develop```\n* ```Mastodon v3.2.1```\n* ```Twitter API v1.1 and v2```\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Mirror one or multiple Twitter accounts in Pleroma/Mastodon",
    "version": "0.8.5",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "48091404f761cef80d3ba8d7fa9f2dc8",
                "sha256": "5b2742a17a2d6b71d3bb2ea64ebabae8838b47e0a106a423bf563fb7732759f9"
            },
            "downloads": -1,
            "filename": "pleroma_bot-0.8.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "48091404f761cef80d3ba8d7fa9f2dc8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 35068,
            "upload_time": "2021-02-23T17:11:30",
            "upload_time_iso_8601": "2021-02-23T17:11:30.225805Z",
            "url": "https://files.pythonhosted.org/packages/b4/64/f6faa86bd911c9deaf4e9fe2ec2e14a68944a8adf0ee3d6f696cfcb80de7/pleroma_bot-0.8.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "146689e925934815188d4faaab6bef1e",
                "sha256": "9e69a71ec08999cb629caeb1778d8173a1821fe6283ece84a26898254b400e2d"
            },
            "downloads": -1,
            "filename": "pleroma-bot-0.8.5.tar.gz",
            "has_sig": false,
            "md5_digest": "146689e925934815188d4faaab6bef1e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 27150,
            "upload_time": "2021-02-23T17:11:31",
            "upload_time_iso_8601": "2021-02-23T17:11:31.897277Z",
            "url": "https://files.pythonhosted.org/packages/8f/bb/bf0382ca52554df40550725802cb7cf023af3f245b1b0a6a174d8422b3a5/pleroma-bot-0.8.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-02-23 17:11:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "robertoszek",
    "error": "Could not fetch GitHub repository",
    "lcname": "pleroma-bot"
}
        
Elapsed time: 0.25283s