Twitter bot that turns comment chains into ace attorney scenes. Inspired by and using https://github.com/micah5/ace-attorney-reddit-bot

Overview

Ace Attorney twitter Bot

Twitter bot that turns comment chains into ace attorney scenes. Inspired by and using https://github.com/micah5/ace-attorney-reddit-bot Currently being executed on @aceCourtBot

Check also the Telegram, Discord and Reddit bots!

Getting Started

Prerequisites

  • Python 3
  • Twitter Credentials.
  • Ace Attorney data. Download it here and put them in ./assets/

Installing

Clone the repository with submodules

git clone --recursive https://github.com/LuisMayo/ace-attorney-twitter-bot

Install dependencies of this repo and the child repo

python -m pip install -r requirements.txt
python -m pip install -r ace-attorney-reddit-bot/requirements.txt

Copy keys-dummy.json into keys.json and fill the required settings with the access keys you should've obtained from Twitter's Developer portal

Start the project python main.py

Note about Linux systems

In Linux it may be a bit harder to set the enviorenment properly. More specifically it may be hard to install required codecs. If having a codec problem (like "couldn't find codec for id 27") you may need to compile ffmpeg and opencv by yourself. You should be good using these guides (tested on Ubuntu with success and on Debian without success)

Contributing

Since this is a tiny project we don't have strict rules about contributions. Just open a Pull Request to fix any of the project issues or any improvement you have percieved on your own. Any contributions which improve or fix the project will be accepted as long as they don't deviate too much from the project objectives. If you have doubts about whether the PR would be accepted or not you can open an issue before coding to ask for my opinion

Comments
  • Music command recognition

    Music command recognition

    This code needs this pull request https://github.com/LuisMayo/ace-attorney-bot/pull/27 in order to work fully, as a new argument has been added in the function "comments_to_scene". When mentioning the bot, now you can add a music= argument, followed by 3 posibilities: PWR: Just like the default bot, using music from the first game JFA: Music from Justice for All TAT: Music from Trials and Tribulations If there is no music argument in the mention, it will be selected randomly between these options. However, if there is some typo in the arguments, the bot will remind the user how to write it properly I'm sure this isn't perfect, so please tell me any mistakes I may have made :)

    PD: The other person commiting this, "Julian", is also me, I forgot to configure the git user name and I don't know how to change it :P

    opened by jonatep 6
  • CJK support

    CJK support

    I'm curious, is CJK supposed to be supported? It seems that the bot can output hiragana fine but it ignored kanji and left those parts blank.

    I wonder how hard it would be to support multiple languages. Is it a matter of providing a font?

    duplicate 
    opened by reibitto 4
  • Add music from other Ace Attorney games

    Add music from other Ace Attorney games

    I think it would be cool to add the trial and pursuit music from Justice for All and/or Trials and Tribulations, so it is selected randomly every time the bot is called, or it is specified as an argument in the mention. For example, if you want the music to be from Justice for All, you must mention the bot like this: "@aceCourtbot render, music=JFA"

    enhancement 
    opened by jonatep 3
  • whitespace only name fallback

    whitespace only name fallback

    Solves #55

    What's changed?

    • Included text / font scoring code in Comment, which will fall back to a user's "screen_name" if their "name" isn't properly renderable.
    • Included venv/ and others in the .gitignore

    Test Cases Test thread: https://twitter.com/tmoll_/status/1516931029633667072?s=20&t=msFYZQ2HP_chV_cB9c77kg Result: link

    Another Test Thread with normal usernames: https://twitter.com/TwitterDev/status/1511757922354663425?s=20&t=msFYZQ2HP_chV_cB9c77kg Result: link

    opened by QuantumFractal 2
  • Document about MongoDB / Consider migrating to Mongita

    Document about MongoDB / Consider migrating to Mongita

    39c569e7c89755e2c9058df618a8df325e5fc080 added pymongo dependency but readme does not say about that 👀

    Edit: Please consider Mongita btw. MongoDB installation is not very straightforward especially for database newcomers, and Mongita requires no installation. This way you don't have to document anything about MongoDB, and the migration is more than simple as it's (nearly) a drop-in replacement:

    - from pymongo import MongoClient
    - mongo_client = MongoClient('mongodb://localhost/')
    + from mongita import MongitaClientDisk
    + mongo_client = MongitaClientDisk()
    
    documentation enhancement good first issue 
    opened by saschanaz 1
  • Refactored comment_list_bridge

    Refactored comment_list_bridge

    opened by QuantumFractal 1
  • Issue rendering whitespace only names on Twitter

    Issue rendering whitespace only names on Twitter

    Hey Luis,

    I noticed that when I use the bot with my twitter account @tmoll which uses a whitespace character name, it doesn't render in the bot.

    Thread: https://twitter.com/tmoll_/status/1516931029633667072?s=20&t=msFYZQ2HP_chV_cB9c77kg Render: https://cdn.moll.dev/content/media/random/1517247987419738113.mp4

    opened by QuantumFractal 1
  • & symbol seems to have issues

    & symbol seems to have issues

    When a tweet uses the ampersand it displays as "&" and takes up its own text box which leads me to believe the bot isn't parsing it right

    bug duplicate 
    opened by clawyf 1
  • Korean text flowing out of box sometimes

    Korean text flowing out of box sometimes

    | Vertically | Horizontally | |-|-| | image From https://twitter.com/aceCourtBot/status/1490695673309708292 | image From https://twitter.com/aceCourtBot/status/1490702071267569672 |

    I am not sure whether this is Korean-specific or being applied to all full-width characters.

    opened by lens0021 1
  • Allow a whitelist of users to be able to make public renders

    Allow a whitelist of users to be able to make public renders

    These users would be manually added, and will be able to make public renders (i.e, not in a response, but just posted for the bot). The way this would work is that when an user request a render, we check whether they're on the whitelist or not, if they are their render will be public. The bot should also mention this in the tweet, and link to the account who requested the render.

    These users would need to agree to strictly comply with the rules . They also must have shown interest in the bot for some months. Only AceAdjudicator and ObamaTheSimp would be able to do so for now.

    enhancement good first issue 
    opened by LuisMayo 1
  • user abusing bot to harass others

    user abusing bot to harass others

    take a look at @ShinyLegendary's use of the bot. she is making perhaps 10 requests per hour today. i don't know if you blacklist users but it would be ideal in this situation

    opened by girlmaya 1
  • The HateSonar dependency is broken

    The HateSonar dependency is broken

    Installation goes fine, but importing it causes ModuleNotFoundError: https://github.com/Hironsan/HateSonar/issues/127

    Installing scikit-learn 0.22.2.post1 fixes this as https://github.com/Hironsan/HateSonar/issues/127#issuecomment-945937431, but it shows this project has an unmaintained dependency.

    Since it doesn't work anyway for anything other than English, maybe make it optional too?

    bug 
    opened by saschanaz 1
  • Have issue to render Ukrainian characters

    Have issue to render Ukrainian characters

    the problem occurs with characters 'і' та 'ї' as seen below https://twitter.com/aceCourtBot/status/1481934051216924673?t=gqHf24qh73mOczcGmvs0CA&s=09

    duplicate 
    opened by nehaturov 2
  • Pull images from media previews

    Pull images from media previews

    When someone shares a link or a youtube vod, bot should show the media thumnails as images in the video

    Original suggestion: https://twitter.com/NasLeaf/status/1471654990469025794

    enhancement 
    opened by LuisMayo 0
Releases(v1.0.9)
  • v1.0.9(Nov 17, 2022)

    What's Changed

    • Improved command detection by @LuisMayo in https://github.com/LuisMayo/ace-attorney-twitter-bot/pull/38
    • Differentiates between new mentions at the start of a tweet and reply mentions by @ZavierHenry in https://github.com/LuisMayo/ace-attorney-twitter-bot/pull/49
    • whitespace only name fallback by @QuantumFractal in https://github.com/LuisMayo/ace-attorney-twitter-bot/pull/56
    • Refactored comment_list_bridge by @QuantumFractal in https://github.com/LuisMayo/ace-attorney-twitter-bot/pull/58
    • Use Mongita by default by @saschanaz in https://github.com/LuisMayo/ace-attorney-twitter-bot/pull/60
    • Enable adult mode by @LuisMayo in https://github.com/LuisMayo/ace-attorney-twitter-bot/pull/65

    New Contributors

    • @LuisMayo made their first contribution in https://github.com/LuisMayo/ace-attorney-twitter-bot/pull/38
    • @ZavierHenry made their first contribution in https://github.com/LuisMayo/ace-attorney-twitter-bot/pull/49
    • @QuantumFractal made their first contribution in https://github.com/LuisMayo/ace-attorney-twitter-bot/pull/56
    • @saschanaz made their first contribution in https://github.com/LuisMayo/ace-attorney-twitter-bot/pull/60

    Full Changelog: https://github.com/LuisMayo/ace-attorney-twitter-bot/compare/v1.0.8...v1.0.9

    Source code(tar.gz)
    Source code(zip)
  • v1.0.8(Mar 7, 2021)

  • v1.0.5(Mar 6, 2021)

  • v1.0.4(Mar 1, 2021)

  • v1.0.3(Feb 28, 2021)

  • v1.0.2(Feb 16, 2021)

  • v1.0.1(Feb 3, 2021)

  • v1.0.0(Feb 2, 2021)

    • All languages should now be supported thanks to Google translator before sentiment analysis.
    • Full twitter text is now shown instead of a 140 characters stripped-down version.
    • Tags and links no longer show on the conversation
    Source code(tar.gz)
    Source code(zip)
  • v0.2.0(Jan 31, 2021)

  • v0.1.0(Jan 29, 2021)

Owner
Luis Mayo Valbuena
Computer engineer and front-end developer
Luis Mayo Valbuena
A reddit bot that imitates the popular reddit bot "u/repostsleuthbot" to trick people into clicking on a rickroll

Reddit-Rickroll-Bot A reddit bot that imitates the popular reddit bot "u/repostsleuthbot" to trick people into clicking on a rickroll Made with The Py

null 0 Jul 16, 2022
Reddit comment bot emulating Telugu actor N. Bala Krishna.

Balayya-Bot Reddit comment bot emulating Telugu actor N. Bala Krishna. Project structure config.py contains Bot's higher level configuration. generate

Kari Lorince 2 Nov 5, 2021
Shred your reddit comment and post history

trasheddit Shred your reddit comment and post history (x89/Shreddit replacement) Usage Simple Example Download trasheddit: git clone https://github.co

Elly 2 Jan 5, 2022
A Python package that can be used to download post and comment data from Reddit.

Reddit Data Collector Reddit Data Collector is a Python package that allows a user to collect post and comment data from Reddit. It is built on top of

Nico Van den Hooff 3 Jul 26, 2022
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
Turns any script into a telegram bot

pytobot Turns any script into a telegram bot Install pip install --upgrade pytobot Usage Script: while True: message = input() if message == "

Dmitry Kotov 17 Jan 6, 2023
A python bot that stops muck chains

muck-chains-stopper-bot a bot that stops muck chains this is the source code of u/DaniDevChainBreaker (the main r/DaniDev muck chains breaker) guys th

null 24 Jan 4, 2023
Track live sentiment for stocks from Reddit and Twitter and identify growing stocks

Market Sentiment About This repository can mainly be used for two things. a. Tracking the live sentiment of stocks from Reddit and Twitter b. Tracking

Market Sentiment 345 Dec 17, 2022
Auto Join: A GitHub action script to automatically invite everyone to the organization who comment at the issue page.

Auto Invite To Org By Issue Comment A GitHub action script to automatically invite everyone to the organization who comment at the issue page. What is

Max Base 6 Jun 8, 2022
CryptoApp - Python code to pull wallet balances from a variety of different chains through nothing other than your public key.

CryptoApp - Python code to pull wallet balances from a variety of different chains through nothing other than your public key.

Zach Frank 4 Dec 13, 2022
Bot that embeds a random hysterical meme from Reddit into your text channel as an embedded message, using an API call.

Discord_Meme_Bot ?? Bot that embeds a random hysterical meme from Reddit into your text channel as an embedded message, using an API call. Add the bot

null 2 Jan 16, 2022
Twitter-bot - A Simple Twitter bot with python

twitterbot To use this bot, You will require API Key and Access Key. Signup at h

Bentil Shadrack 8 Nov 18, 2022
Twitter bot that finds new friends in Twitter.

PythonTwitterBot Twitter Bot Thats Find New Friends pip install textblob pip install tweepy pip install googletrans check requirements.txt file Env

IbukiYoshida 4 Aug 11, 2021
twitter bot tha uses tweepy library class to connect to TWITTER API

TWITTER-BOT-tweepy- twitter bot that uses tweepy library class to connect to TWITTER API replies to mentions automatically and follows the tweet.autho

Muziwandile Nkomo 2 Jan 8, 2022
Mini Tool to lovers of debe from eksisozluk (one of the most famous website -reffered as collaborative dictionary like reddit- in Turkey) for pushing debe (Most Liked Entries of Yesterday) to kindle every day via Github Actions.

debe to kindle Mini Tool to lovers of debe from eksisozluk (one of the most famous website -refered as collaborative dictionary like reddit- in Turkey

null 11 Oct 11, 2022
A github actions + python code to extract URLs to code repositories to put into standard form, starting with github

A github actions + python code to extract URLs to code repositories to put into standard form, starting with github ---- NOTE: JUS

Justin Gosses 2 Nov 15, 2021