diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..cfa4e00 Binary files /dev/null and b/.DS_Store differ diff --git a/README.md b/README.md deleted file mode 100644 index 1eb5007..0000000 --- a/README.md +++ /dev/null @@ -1 +0,0 @@ -# TreePlanting_Draft \ No newline at end of file diff --git a/credentials.pyc b/credentials.pyc new file mode 100644 index 0000000..fa54141 Binary files /dev/null and b/credentials.pyc differ diff --git a/index.html b/index.html deleted file mode 100644 index 97ea712..0000000 --- a/index.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - Freedom Forest - - - - - -
-
-

Freedom Forest

-

Here, we love to uplift and celebrate you winning the hardest health battles!

- See Your Tree -
-
- - - -
-
- -

🦾 Congratulations on your defeat!

-

FreedomForest aims to uplift and be a part of welcoming you to your new beginning.

-

sampletextt sampletextt sampletextt sampletextt

-

sampletextt sampletextt sampletextt sampletextt

-
-
- -
-
-

Stay Connected

-

Send a positive note to recent warriors.

- Twitter - Donate to AIDS - Help Prevent Cancer - Email -
-
- - - - diff --git a/main.py b/main.py new file mode 100644 index 0000000..9c5d86a --- /dev/null +++ b/main.py @@ -0,0 +1,48 @@ +import tweepy +import credentials +from models import UserTree +from flask import Flask, render_template, json + + +app = Flask(__name__) + +auth = tweepy.OAuthHandler(credentials.consumer_key, credentials.consumer_secret) +auth.set_access_token(credentials.access_key, credentials.access_secret) +api = tweepy.API(auth) + + +p_tweets = api.search("I beat cancer") + +accounts = {} + + +for tweet in p_tweets: + userInstance = UserTree(tweet.author.screen_name, tweet.author.name, + tweet.author.profile_image_url, tweet.text, tweet.author.created_at) + accounts[tweet.author.name] = userInstance + print(tweet.text) + +c = p_tweets[0].text + +#val = accounts['PJ'] +#print(val.tweet_text) + +@app.route('/') +def hello_world(): + return render_template('index.html') + +@app.route('/tree') +def tree_page(value): + val = "Charles" + return '{}'.format(value) + +@app.route('/test') +def test(): + for val in p_tweets: + g = tree_page(value=val) + return g + return + + +if __name__ == '__main__': + app.run() \ No newline at end of file diff --git a/models.py b/models.py new file mode 100644 index 0000000..0233852 --- /dev/null +++ b/models.py @@ -0,0 +1,8 @@ +class UserTree: + + def __init__(self, name, username, picture, tweet_text, date): + self.name = name + self.username = username + self.picture = picture + self.tweet_text = tweet_text + self.date = date \ No newline at end of file diff --git a/models.pyc b/models.pyc new file mode 100644 index 0000000..74ce6ce Binary files /dev/null and b/models.pyc differ diff --git a/styles.css b/styles.css deleted file mode 100644 index 7d79041..0000000 --- a/styles.css +++ /dev/null @@ -1,152 +0,0 @@ -html, body { - margin: 0; - padding: 0; -} - -body { - font-family: 'Roboto', sans-serif; - font-weight: 100; -} - -.container { - margin: 0 auto; - max-width: 940px; - padding: 0 10px; -} - -.header { - background: url(https://images.unsplash.com/photo-1535469420027-517674dad7a1?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1950&q=80) no-repeat center center; - background-size: cover; - height: 800px; - text-align: center; -} - -.header .container { - position: relative; - top: 200px; -} - -.header h1 { - color: #fff; - line-height: 100px; - font-size: 80px; - margin-top: 0; - margin-bottom: 80px; - text-transform: uppercase; -} - -@media (min-width:850px) { - .header h1 { - font-size: 120px; - } -} - -.header p { - color: #fff; - font-weight: 500; - letter-spacing: 8px; - margin-bottom: 40px; - margin-top: 0; - text-transform: uppercase; -} - -.btn { - color: #fff; - background: #000; - padding: 10px 40px; - text-decoration: none; - transition: background .5s; -} - -.nav { - background: #000; - height: 80px; - width: 100%; -} - -.nav ul { - height: 80px; - list-style: none; - margin: 0 auto; - padding: 0; -} - -.nav ul li { - color: #fff; - display: inline-block; - height: 80px; - line-height: 80px; - list-style: none; - padding: 0 10px; - transition: background .5s; -} - -.btn:hover, .nav ul li:hover { - background: #117bff; - cursor: pointer; - transition: background .5s; -} - -.main .container { - margin: 80px auto; -} - -.main img { - float: left; - margin: 50px 80px 50px 0; -} - -.jumbotron { - background: url(https://images.unsplash.com/photo-1571986584949-8ebd7cd2151b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1950&q=80) center center; - background-size: cover; - height: 600px; -} - -.jumbotron .container { - position: relative; - top: 220px; -} - -.jumbotron h2 { - color: #fff; - text-align: right; -} - -.jumbotron p { - color: #fff; - text-align: right; -} - -.jumbotron .btn { - margin: 10px 0 0; - float: right; -} - -.footer { - background: #000; - height: 80px; - padding-bottom: 50px; -} - -.footer p { - color: #fff; - font-size: 14px; - height: 80px; - line-height: 80px; - margin: 0; -} - -@media (max-width: 500px) { - .header h1 { - font-size: 50px; - line-height: 64px; - } - - .main, .jumbotron { - padding: 0 30px; - } - - .main img { - width: 100%; - } -} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..5b2859c --- /dev/null +++ b/templates/index.html @@ -0,0 +1,220 @@ + + + + Freedom Forest + + + + + + + +
+
+

Freedom Forest

+

Here, we love to uplift and celebrate you winning the hardest health battles!

+ See Your Tree +
+
+ + + +
+
+ +

🦾 Congratulations on your defeat!

+

FreedomForest aims to uplift and be a part of welcoming you to your new beginning.

+

sampletextt sampletextt sampletextt sampletextt

+

sampletextt sampletextt sampletextt sampletextt

+
+
+ +
+
+

Stay Connected

+

Send a positive note to recent warriors.

+ Twitter + Donate to AIDS + Help Prevent Cancer + Email +
+
+ + + + \ No newline at end of file diff --git a/style.css b/templates/tree.html similarity index 52% rename from style.css rename to templates/tree.html index c3b10e1..efc8527 100644 --- a/style.css +++ b/templates/tree.html @@ -1,6 +1,16 @@ -html, body { + + + + See Your Tree + + + + + + + +
+
+

See Your Tree

+

See yourself as a new plant in a larger garden of other overcomers!

+ +
+ +
+ + Search by Twitter Username +
+
+ + + +
+
+ +

Find your tree below!

+

+

+

+
+
+ +
+
+

Stay Connected

+

Send a positive note to recent warriors.

+ Twitter + Donate to AIDS + Help Prevent Cancer + Email +
+
+ + + + \ No newline at end of file diff --git a/tree.html b/tree.html deleted file mode 100644 index 84ac6a8..0000000 --- a/tree.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - See Your Tree - - - - - -
-
-

See Your Tree

-

See yourself as a new plant in a larger garden of other overcomers!

- Search by Twitter Username -
-
- - - -
-
- -

Find your tree below!

-

-

-

-
-
- -
-
-

Stay Connected

-

Send a positive note to recent warriors.

- Twitter - Donate to AIDS - Help Prevent Cancer - Email -
-
- - - -