Giter VIP home page Giter VIP logo

social-art-feed's Introduction

Social-Art-Feed

The Social Art Feed is designed to pull targeted livestream information from twitter and build a webpage out of the images from those post. Example of Output: http://omegaraven.com/testing_grounds/hashtagsmile/hashtagsmile.htm

Requirements

Social-Art-Feed uses the following: Python 3.5.2 (may work with other versions but this is what I tested with) Tweepy (To get Tweepy check out https://github.com/tweepy/tweepy)

Description of Parts:

  • StreamController.py: Is the main portion of the application it utilizes Tweepy to gather information from twitter based on filter criteria. It then uses a second filter to remove anything that is unwanted from the data. With the data that remains it generates Output.txt. This portion also generates a backup of the text file for debugging information.
  • NoEncodeBuilder.py: Takes Output.txt and generates an html document from it then saves the html file under /site You can edit the type of page that is generated by modifying the message in this file. (Currently using this version due to some encoding problems. Future versions may revert back to just using Builder.py if I can work out the unicode issue.)
  • FtpPush.py: This is a very simple FtpPush script that will push the html file up to the choosen site of your choice.
  • filter.txt: This is the file where you put all the terms you do not want showing up on the page.
  • Config.txt: This file stores the twitter token information.

Setup

Tweepy Config Set-Up:

  • Sign into Twitter ( Twitter )
  • Go to https://apps.twitter.com/
  • Choose to create a new app
  • Authorize said application for your own account
  • Go to the applications Keys and Access Tokens Page and you will need to get you Access Token, Access Secret, Consumer Token, and Consumer Secret. (Please note keep these private as they can be used to control your Twitter acount)
  • Open the Config.txt file and plug in the information:
CONSUMER_KEY:your_consumer_key
CONSUMER_SECRET:your_consumer_secret
ACCESS_KEY:your_access_key
ACCESS_SECRET:your_access_secret

(Important when switching out the information in this file don't put in a space after the colon)

Application Configuration:

  • Defining Search terms for LiveStream
    • Open StreamController.py
    • Add desired search filters to look for in the data stream
    # Filter Data here
    stream.filter(track=['#happy', '#life', '#love'])

(Each term is closed in using ' and seperated with , so here you see by default we are looking for post containing #happy, #life, and #love)

  • Build the filter file which contains which terms to exclude.
    • Open filter.txt and add what you would like to filter out with each one on it's own line.
retweeted_status
#FOLLOWTRICK
bieber
quoted_status

(You can also put in the json parameters from Twitter like "possibly_sensitive":true to block many adult post. Some will get through if the user isn't using Twitter properly.)

Builder Configuration:

  • You can adjust the way the page looks from Builder.py (Leaving it will generate an example.htm file under the /site folder)
  • The name you use here will need to be the same name referenced in the FtpPush.py should you choose to use it.

Optional:

The scripts call themselves so you can modify this by editting the StreamController.py Remove the function calls inside the on_data function.

    Builder.build_func()
    FtpPush.push_data()

Usage:

I am currently operating from a Linux System and start the program by going into the folder from terminal and run

python3 StreamController.py

Notes:

If anyone does anything with this and would like to show me hit me up either here through github or mortal.glitch at omegaraven dot com. Licensed under the MIT License.

social-art-feed's People

Contributors

mortalglitch avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.