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 fully responsive interface to manage all your favorite software on your HTPC.

Python 3 port of Hellowlol's HTPC Manager fork We made this an organization repository to be more independent from single developers. If you want to j

26 Jan 04, 2023
A minimalistic, modern Discord bot for roles and polls using dropdowns

DropBot A minimalistic, modern Discord bot for roles and polls using dropdowns Made by ThatOneCalculator Technologies used Instructions Type /, and na

ModernBots 1 Jun 27, 2022
A Telegram Bot to return Youtube Video Tags Using YoutubeTags API

YouTube-TagFind-Bot A Telegram Bot to return Youtube Video Tags Using YoutubeTags API YoutubeTags API Wrapper YoutubeTags is a python third-party api

Nuhman Pk 9 Aug 25, 2022
SIGIT - Simple Information Gathering Toolkit

SIGIT - Simple Information Gathering Toolkit Features userrecon - username reconnaissance facedumper - dump facebook information mailfinder - find ema

Termux Hackers 437 Dec 29, 2022
Python script to backup/convert your Spotify playlists into the XSPF format.

Python script to backup/convert your Spotify playlists into the XSPF format.

Chris Ovenden 4 Jun 09, 2022
Let your friends know when you are online and offline xD

Twitter Last Seen Activity Let your friends know when you are online and offline Laser-light eyes when online Last seen is mentioned in user bio Also

Kush Choudhary 12 Aug 16, 2021
An Telegram Bot By @ZauteKm To Stream Videos In Telegram Voice Chat Of Both Groups & Channels. Supports Live Streams, YouTube Videos & Telegram Media !!

Telegram Video Stream Bot (Py-TgCalls) An Telegram Bot By @ZauteKm To Stream Videos In Telegram Voice Chat Of Both Groups & Channels. Supports Live St

Zaute Km 14 Oct 21, 2022
A Simple and User-Friendly Google Collab Notebook with UI to transfer your data from Mega to Google Drive.

Mega to Google Drive (UI Added! 😊 ) A Simple and User-Friendly Google Collab Notebook with UI to transfer your data from Mega to Google Drive. ⚙️ How

Dr.Caduceus 18 Aug 16, 2022
Analyzed the data of VISA applicants to build a predictive model to facilitate the process of VISA approvals.

Analyzed the data of Visa applicants, built a predictive model to facilitate the process of visa approvals, and based on important factors that significantly influence the Visa status recommended a s

Jesus 1 Jan 08, 2022
A Discord bot themed around the Swedish heavy metal band Sabaton! (Python)

A Discord bot themed around the Swedish heavy metal band Sabaton! (Python)

Evan Lundberg 1 Nov 29, 2021
股票量化

StockQuant Gary-Hertel 请勿提交issue!可以加入交流群与其他朋友一起自学交流,加微信mzjimmy 一、配置文件的设置 启动框架需要先导入必要的模块,并且载入一次配置文件! 配置文件是一个json格式的文件config.json,在docs文件夹中有模板

218 Dec 25, 2022
VoiceMaster-Discord-Bot - Fork from original Discord bot with max channel limit, staff role and more

VoiceMaster VoiceMaster is a discord bot created to change the way servers work,

2 Feb 28, 2022
Tools ini hanya bisa digunakan untuk menyerang website atau http/s

☢️ Tawkun DoS ☢️ Tools ini hanya bisa digunakan untuk menyerang website atau http/s FITUR: [ ☯️ ] Proxy Mode [ 🔥 ] SOCKS Mode | Kadang Eror [ ☢️ ] Ht

Bandhitawkunthi 9 Jul 19, 2022
Projeto de teste para acesso a API SWAPI.

SwapiTest Projeto de teste para acesso a API Swapi com informações sobre Star Wars. Como rodar o programa Foi utilizado o pipenv, então basta clonar o

Gabriel de Souza Alves 1 Nov 23, 2021
We have made you a wrapper you can't refuse

We have made you a wrapper you can't refuse We have a vibrant community of developers helping each other in our Telegram group. Join us! Stay tuned fo

20.6k Jan 04, 2023
Validate all your Customer IAM Policies against AWS Access Analyzer - Policy Validation

✅ Access Analyzer - Batch Policy Validator This script will analyze using AWS Access Analyzer - Policy Validation all your account customer managed IA

Victor GRENU 41 Dec 12, 2022
Reverse engineering the dengue virus (under development construction)

Reverse engineering the dengue virus (under development 🚧 ) What is dengue? Dengue is a viral infection transmitted to humans through the bite of inf

kjain 4 Feb 09, 2022
Moon-TikTok-Checker - A TikTok Username checking tool that probably 3/4 people use to get rare usernames

Moon Checker (educational Purposes Only) What Is Moon Checker? This is a TikTok

glide 4 Nov 30, 2022
Automate HoYoLAB Genshin Daily Check-In Using Github Actions

Genshin Daily Check-In 🤖 Automate HoYoLAB Daily Check-In Using Github Actions KOR, ENG Instructions Fork the repository Go to Settings - Secrets Cli

Leo Kim 41 Jun 24, 2022