Viral-Tees is a service that aims to catch the most trending topics and offer limited time access to merchandise showcasing these topics. Using the social media to track trends, we aim to be first to market with viral-tees.
- Mitchell Bregman - Initial work - [Gallup]
- Leon Kozlowski - Initial work - [Bloomberg]
-
git clone {repo}
-
pip install -r requirements.txt
-
.env
:
SHOPIFY_API="{shopify-api}"
TWITTER_API_KEY="{twitter-api}"
TWITTER_API_SECRET="{twitter-api}"
TWITTER_API_TOKEN="{twitter-api}"
TWITTER_API_ACCESS="{twitter-api}"
FACEBOOK_TOKEN="{facebook-api}"
FACEBOOK_APP_ID="{facebook-api}"
FACEBOOK_APP_SECRET="{facebook-api}"
FACEBOOK_AD_ACCT_ID="{facebook-api}"
FACEBOOK_BUSINESS_ID="{facebook-api}"
FACEBOOK_PAGE_ID="{facebook-api}"
FACEBOOK_PIXEL_ID="{facebook-api}"
MONGO_SERVER="{server}"
MONGO_PORT="{port}"
MONGO_DATABASE="{database}"
- Open 4 terminals:
luigid
mongod --port=$MONGO_PORT
python app.py
python run_luigi.py --all
DeepClean
Removes data
and static
folders and all files within.
python run_luigi.py --flow clean
StartLogging
Start logging mechanism of pipeline
QueryTwitterTrends
For each city metro location in run_luigi.py
, write to json with trend data.
StoreTrendsData
For each json saved by QueryTwitterTrends
write data to mongo
StoreTrimTrendsData
Query mongo for all trends in current run, and generate a unique list of trends for all metro regions
StoreImageTweets
Query Twitter via tweepy and save only tweets with images to mongo
SaveImage
Saves images from filtered trends data.
CropImage
Cropping images based on a cv2 KeyPoints heuristic
ParseImageTweets
Parse out images in order to host on backend via Flask
ImageOverlay
Overlay cropped images onto background shirt image along with text outlining the trend and date
GenerateShirtData
Using data stored in mongo, develop a set of data in order to post shirts to Shopify
PostShopify
From the data generated in GenerateData
and the shirt produced in ImageOverlay
post a product to Shopify
OutputTwitterTasks
OutputImageTasks
OutputShirtTasks
Wrapper task for developing shirts
OutputShopifyTasks
Wrapper task for pushing shirts to Shopify