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
Uses discords api to see if a token has a valid payment method.

Discord Payment Checker Uses discords api to see if a token has a valid payment method. Report Bug ยท Request Feature Features Checks tokens Checks all

dropout 10 Dec 01, 2022
An interactive and multi-function Telegram bot, made especially for Telegram groups.

PyKorone An interaction and fun bot for Telegram groups, having some useful and other useless commands. Created as an experiment and learning bot but

Amano Team 17 Nov 12, 2022
Telegram bot/scraper to get the latest NUS vacancy reports.

Telegram bot/scraper to get the latest NUS vacancy reports. Stay ahead of the curve and don't get modrekt.

Chee Hong 1 Jan 08, 2022
C Y B ฮž R UserBot is a project that simplifies the use of Telegram.

C Y B ฮž R USฮžRBOT ๐Ÿ‡ฆ๐Ÿ‡ฟ C Y B ฮž R UserBot is a project that simplifies the use of Telegram. All rights reserved. Automatic Setup Android: open Termux p

FVREED 4 Dec 07, 2022
A Telegram Repo For Devs To Controll The Bots Under Maintenance.This Bot Is For Developers, If Your Bot Is Down, Use This Repo To Give Your Dear Subscribers Some Support By Providing Them Response.

Maintenance Bot A Telegram Repo For Devs To Controll The Bots Under Maintenance About This Bot This Bot Is For Developers, If Your Bot Is Down, Use Th

Vษชแด แด‡แด‹ 47 Dec 29, 2022
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)

OpenAPI Generator Master (5.3.1): 5.4.x (5.4.x): 6.0.x (6.0.x): โญ โญ โญ If you would like to contribute, please refer to guidelines and a list of open t

OpenAPI Tools 14.8k Jan 04, 2023
An API or getting Optifine VersionsList/Version/Download-URL.

Optifine-API An API for getting Optifine VersionsList/Versions/Download-URL. Table of contents Get Versions List Get Specify Versions Download Optifin

2 Dec 04, 2022
๐€ ๐ฆ๐จ๐๐ฎ๐ฅ๐š๐ซ ๐“๐ž๐ฅ๐ž๐ ๐ซ๐š๐ฆ ๐†๐ซ๐จ๐ฎ๐ฉ ๐ฆ๐š๐ง๐š๐ ๐ž๐ฆ๐ž๐ง๐ญ ๐›๐จ๐ญ ๐ฐ๐ข๐ญ๐ก ๐ฎ๐ฅ๐ญ๐ข๐ฆ๐š๐ญ๐ž ๐Ÿ๐ž๐š๐ญ๐ฎ๐ซ๐ž๐ฌ

๐‡๐จ๐ฐ ๐“๐จ ๐ƒ๐ž๐ฉ๐ฅ๐จ๐ฒ For easiest way to deploy this Bot click on the below button ๐Œ๐š๐๐ž ๐๐ฒ ๐’๐ฎ๐ฉ๐ฉ๐จ๐ซ๐ญ ๐†๐ซ๐จ๐ฎ๐ฉ ๐’๐จ๐ฎ๐ซ๐œ๐ž๐ฌ ๐†๐ž๐ง๐ž?

Mukesh Solanki 2 Oct 06, 2021
Buy early bsc gems with custom gas fee, slippage, amount. Auto approve token after buy

Buy early bsc gems with custom gas fee, slippage, amount. Auto approve token after buy. Sell buyed token with custom gas fee, slippage, amount. And more.

Jesus Crypto 206 May 01, 2022
A simple and stupid Miinto API wrapper

miinto-api-wrapper Miinto API Wrapper is a simple python wrapper for Miinto API. Miinto is a fashion luxury marketplace. For more information see the

Giuseppe Checchia 3 Jan 09, 2022
PyMed is a Python library that provides access to PubMed.

IMPORTANT NOTE: I don't have time to maintain this library (as some of you might have noticed). The PubMed API is a little chaotic, without a clear do

Gijs Wobben 143 Dec 21, 2022
Clubhouse API written in Python. Standalone client included. For reference and education purposes only.

clubhouse-py is originally developed for the sake of interoperability. Standalone client is also created with very basic features, including but not limited to the audio-chat

1.7k Jan 05, 2023
A Python Client for News API

newsapi-python A Python client for the News API. License Provided under MIT License by Matt Lisivick. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRAN

Matt Lisivick 281 Dec 29, 2022
Ulaavi for nuke, helps to keep our stocl elements organised.

Ulaavi Ulaavi for nuke, helps to keep our stock elements organised. Installation Downlaod ffmpeg from ffmpeg.org linux : https://johnvansickle.com/ffm

Arun Subramaniyam 17 Aug 24, 2022
A simple notebook to stream torrent files directly to Google Drive using Google Colab.

Colab-Torrent-to-Drive Originally by FKLC, this is a simple notebook to stream torrent files directly to Google Drive using Google Colab. You can eith

1 Jan 11, 2022
RDMAss - A Python Discord bot creating an interaction with RDM API

RDMAss A Python Discord bot creating an interaction with RDM API. Features Assig

5 Sep 21, 2022
Trading bot - A Trading bot With Python

Trading_bot Trading bot intended for 1) Tracking current prices of tokens 2) Set

Tymur Kotkov 29 Dec 01, 2022
Basic query to access Traindex API

traindex-api-query Basic query to access Traindex API Please make sure to provide your Traindex API key to the line 8 in the script file. There are tw

Foretheta 1 Nov 11, 2021
My beancount practice as a template

my-beancount-template ไธชไบบ Beancount ๆ–นๆกˆ็š„ๆจกๆฟไป“ๅบ“ ็›ธๅ…ณๅšๅฎข ๅคๅผ่ฎฐ่ดฆๆŒ‡ๅŒ—๏ผˆไธ€๏ผ‰๏ผšWhat and Why๏ผŸ ๅคๅผ่ฎฐ่ดฆๆŒ‡ๅŒ—๏ผˆไบŒ๏ผ‰๏ผšๅš่ดฆๆ–นๆณ•่ฎบ ๅคๅผ่ฎฐ่ดฆๆŒ‡ๅŒ—๏ผˆไธ‰๏ผ‰๏ผšๅฆ‚ไฝ•ๆ‰“้€ ไธๅŠ้€”่€ŒๅบŸ็š„่ฎฐ่ดฆๆ–นๆกˆ ้…็ฝฎ ่ฏฆ็ป†้…็ฝฎ่ฏทๅ‚่€ƒๅšๅฎขไธ‰ใ€‚ๅฟ…้กปไฟฎๆ”น็š„้…็ฝฎๆœ‰๏ผš BotๅŠŸ่ƒฝ๏ผšdata/be

KAAAsS 29 Nov 29, 2022
A visualization of people a user follows on Twitter

Twitter-Map This software allows the user to create maps of Twitter accounts. Installation git clone Oliver Greenwood 12 Jul 20, 2022