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
Tubee is a web application, which runs actions when your subscribed channel upload new videos

Tubee is a web application, which runs actions when your subscribed channel upload new videos, think of it as a better IFTTT but built specifically for YouTube with many enhancements.

Tomy Hsieh 11 Jan 01, 2023
Video Stream: an Advanced Telegram Bot that's allow you to play Video & Music on Telegram Group Video Chat

Video Stream is an Advanced Telegram Bot that's allow you to play Video & Music

SHU KURENAI TEAM 4 Nov 05, 2022
A free sniper bot built to work with PancakeSwap: Router V2

Pancakeswap Sniper Bot PancakeSwap sniper bot. Automated sniping bot to snipe crypto coin launches. How it works The sniping bot can be used in three

89 Aug 06, 2022
A method to check whether a Discord user is using the client or not.

Discord Captcha Method This is an example, of a verification trough a check, if the user loads the picture send with the verification-message. This ma

Julien 2 Jan 19, 2022
Linkvertise-Bypass - Bypass Linkvertise advertisement

Linkvertise-Bypass Bypass Linkvertise advertisement 📕 instructions Copy And Pas

Flex Tools 4 Jun 10, 2022
Another Autoscaler is a Kubernetes controller that automatically starts, stops, or restarts pods from a deployment at a specified time using a cron annotation.

Another Autoscaler Another Autoscaler is a Kubernetes controller that automatically starts, stops, or restarts pods from a deployment at a specified t

Diego Najar 66 Nov 19, 2022
A Discord/Xenforo bot!

telathbot A Discord/Xenforo bot! Pre-requisites pyenv (via installer) poetry Docker (with Go version of docker compose enabled) Local development Crea

Telath 4 Mar 09, 2022
this synchronizes my appearances with my calendar

Josh's Schedule Synchronizer Here's the "problem:" I use a spreadsheet to maintain all my public appearances. I check the spreadsheet as often as poss

Josh Long 2 Oct 18, 2021
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.

Pancakeswap Sniper bot Full version of Pancakeswap sniping bot used to snipe during fair coin launches. With advanced options and a graphical user int

Jesus Crypto 204 Apr 27, 2022
Copier template for solving Advent of Code puzzles with Python

Advent of Code Python Template for Copier This template creates scaffolding for one day of Advent of Code. It includes tests and can download your per

Geir Arne Hjelle 6 Dec 25, 2022
A library that revolutionizes the way people interact with NextDNS.

NextDNS-API An awesome way to interface with your NextDNS account - via Python! Explore the docs » Report Bug . Request Feature Table Of Contents Abou

34 Dec 07, 2022
This an API wrapper library for the OpenSea API written in Python 3.

OpenSea NFT API Python 3 wrapper This an API wrapper library for the OpenSea API written in Python 3. The library provides a simplified interface to f

Attila Tóth 159 Dec 26, 2022
The unofficial Amazon search CLI & Python API

amzSear The unofficial Amazon Product CLI & API. Easily search the amazon product directory from the command line without the need for an Amazon API k

Asher Silvers 95 Nov 11, 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
ServiceX DID Finder Girder

ServiceX_DID_Finder_Girder Access datasets for ServiceX from yt Hub Finding datasets This DID finder is designed to take a collection id (https://gird

1 Dec 07, 2021
A complete Python application to automatize the process of uploading files to Amazon S3

Upload files or folders (even with subfolders) to Amazon S3 in a totally automatized way taking advantage of: Amazon S3 Multipart Upload: The uploaded

Pol Alzina 1 Nov 20, 2021
Make WhatsApp ChatBot and use WhatsApp API to send the WhatsApp messages in python .

Ultramsg.com WhatsApp Bot using WhatsApp API and ultramsg Demo WhatsApp API ChatBot using Ultramsg API with python. Opportunities and tasks: The outpu

Ultramsg 64 Dec 29, 2022
Python API client library for phpIPAM installations

phpypam: Python API client library for phpIPAM installation As we started to develop phpipam-ansible-modules we used an existing python library for ph

codeaffen 3 Aug 03, 2022
Gera um PDF, logo depois de você responder um questionário simples, e envia para o e-mail que você informar.

PDF generator and send it for your email Criador: Francisco Robson de O. Dutra Filho Repositório criado no dia 18/09/2021 Instagram: @robsondutra_ Sob

8 Nov 22, 2021
Create Multiple CF entry for multiple websites

AWS-CloudFront Problem: Deploy multiple CloudFront for account with multiple domains. Functionality: Running this script in loop and deploy CloudFront

Giten Mitra 5 Nov 18, 2022