Many popular manga artists on Twitter have English comments. Many of them love the manga series but have to wait until the official translation to read the chapter. How can I help English-speaking readers be able to read and understand the manga Tweet as soon as possible? That is where my bot comes in.
What it does
I first run a program and list the most recent manga tweets using Tweepy. I then filter the list to contain only posts that have at least one image in them. With this filtered list, I create a HTML page that has every tweet in chronological order accompanied by text fields associated with the number of images and a submit button. After I translate the text and press submit, the bot will reply to the manga tweet with an english translation for each image/panel.
How we built it
We first created make_data.py which contains a MangaFeed object. The MangaFeed object takes in a search term and an integer representing how many search results to get and creates a dictionary for each relevant tweet. The dictionary has fields "url," "post_id", "twitter handle", "date posted", and "images" which we can reference through the self.tweets property. We then generated an HTML file displaying the relevant tweets. We had to figure out a way to pass each tweet's post_id and twitter handle - we ended up being "hacky" and putting them as the id for the "form" div. Lastly, we implemented read_form.js and app.py which uses a Flask framework to transfer form field data from the HTML to the python file from which we call the update_status method from Tweepy.
Challenges we ran into
Accomplishments that we're proud of
Despite the challenges, we managed to get the base functionality of the website working - tweets will be made when clicking the submit button, the feed displays manga tweets correctly, and the website has a fairly neat design. Furthermore, the high-fidelity designs for what we envision as the final product look professional and I am happy with the video demo.
What we learned
The biggest lesson we learned is to be eager in taking on challenges. Coming into this hackathon, I was worried that I don't have the coding knowledge necessary in order to do things like extrapolating data from an API response and working with servers to read form data. Through working on this project, not only did I learn about how to program these things, but I also gained confidence about my ability - both in programming and in general. The second biggest thing I learned is to use established frameworks (like Tweepy, Flask) when possible because otherwise, code gets unintuitive.
What's next for Twitter Manga Translator
I think Twitter Manga Translator is extremely promising to make the Twitter manga community more inclusive! Before getting to a publicly usable product, however, there are major updates that need to be made: 1. Making a separate bot account (not connected to my personal Twitter, haha) to post translations, 2. The ability for Twitter Manga Translator to be "summoned" when a user @'s the bot in a manga tweet, 3. Refined tweet search and filtering so that retweets do not cluster the feed, 4. set up a server for Manga Translator bot so I don't need to use localhost.