Comments (14)
Hi ! Can you explain this a bit? @VickiLanger
from lgbtq-of-the-day-bot.
Absolutely, @iriyagupta. Right now, tweet.py
sends a string f"today's queerness is a {adjective} {label} {noun}"
to Twitter. I'd like for this string to show up on a random image from the img_bg
folder.
I have no clue how to generate the image and I've put very little thought into how it could be done.
Ways I've thought about doing it:
- This twitter bot by @joemfox generates images, though I'm not sure how. I haven't looked. that bot's repo
- Lots of sites like webwide.io and dev.to have images that generate when links are posted. I don't want links, but I'm sure similar could be done. They're doing it with open graph, I think.
from lgbtq-of-the-day-bot.
@VickiLanger So is it like if the image with a text is already available let us say the text is "Today's queerness is a purring biromantic walkman" it should also generate the image 98 which is containing the same text or if the text is not available on the image from the img_bg folder, you want any random image with no text on it to appear and display the string sent by tweet.py?
from lgbtq-of-the-day-bot.
@iriyagupta The images in the folder are all blank. I'd like it to grab a random image and show the string on the image
from lgbtq-of-the-day-bot.
@VickiLanger Oh okay, understandable. I will give it a try
from lgbtq-of-the-day-bot.
@VickiLanger do we have a registered consumer key for the application? Or shall I create my own
from lgbtq-of-the-day-bot.
@iriyagupta I have keys. I'm not sure how to share them without sharing them publically. I think you should be able to use authenticate_api
from tweet.py
https://github.com/VickiLanger/Queer-of-the-day-bot/blob/production/tweet.py.
from lgbtq-of-the-day-bot.
@VickiLanger Without keys authenticate_api doesn't seem to work, is there anywhere we can share them?
from lgbtq-of-the-day-bot.
You're right. It won't work locally without the keys. Sharing keys poses a security risk. It would be best to get keys of your own, if need be. I got my keys through https://developer.twitter.com/en/apps
reference: https://twitter.com/grahamcox82/status/1311742466429722626?s=20
from lgbtq-of-the-day-bot.
@VickiLanger So I have applied for twitter developer account but it will take some time to get accepted, before that I won't be able to run this due to the lack of auth key
from lgbtq-of-the-day-bot.
Sounds great. I understand
from lgbtq-of-the-day-bot.
@VickiLanger are you facing an issue posting an image to Twitter or generating the image with the text itself?
from lgbtq-of-the-day-bot.
@tahazanzibarwala Generating the image itself
from lgbtq-of-the-day-bot.
Hey @VickiLanger , i wrote some utility functions that may help and with very few customizations you can change the font:style,color,size and the positions.
The methods do the following:1]Choose a random image from img_bg folder
2]Write text on the image in the blank area. [text are classified into -short ,-long]
3]The image object is returned for any operations also its name for saving it locally in the current dir.
I hope my code may help you =)
#78
from lgbtq-of-the-day-bot.
Related Issues (20)
- Change image text from default to a real font HOT 5
- TOP PRIORITY: Alt text not working HOT 12
- Fix text showing up on image HOT 3
- Make emojis show on images, if possible HOT 2
- Fix Spelling Errors (first timers only) HOT 16
- Add More Background Images HOT 15
- Non specific dates for lgbtq history HOT 2
- Randomize Fonts used in to Create Images HOT 3
- Tweet on Remembrance, (inter)national, & Visibility Days HOT 1
- Add More Remembrance, (Inter)national, & Visibility Days
- Variable Dates for Annual Events HOT 1
- TOP PRIORITY: Check image for a11y before posting HOT 2
- Generate WCAG compliant Images for Backgrounds instead of using files in `img_bg HOT 1
- Create Basic Website HOT 4
- Text showing up not centered HOT 2
- Math to add "X years ago" to the history tweets
- Annual Events Tweeting Error HOT 5
- Repeating annual event?? HOT 2
- Incorrect Event Date Posted HOT 5
- Suggest to loosen the dependency on tweepy HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lgbtq-of-the-day-bot.