Skip to content

Commit ec88ee0

Browse files
committed
add README + clean everything up
1 parent 7f80f16 commit ec88ee0

9 files changed

Lines changed: 57 additions & 441 deletions

File tree

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Sid Nutulapati
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,35 @@
1-
# news-aggregator
1+
# news-aggregator
2+
3+
An early build of a service that collects and analyzes news articles. Done with [NewsAPI.org](https://newsapi.org/) and [Indico](https://indico.io).
4+
5+
![screenshot](mvp_homepage.png)
6+
7+
Ugly as hell, I know. PRs welcome!
8+
9+
## Purpose
10+
11+
This is an MVP of the idea found [here](https://medium.com/@captainsidd/paying-for-a-news-aggregator-e88364fbfc0d). Branched off from the original idea somewhat, mostly to make building this more doable in a 24 hour hackathon - vast majority of this was done at Brickhack 4.
12+
13+
## Installation
14+
15+
You'll need API keys for both the NewsAPI and Indico. Once you have those, make the file `./lambda/environment.yml`:
16+
17+
``` yaml
18+
NEWS_API_KEY: xxxxxxxxxx
19+
INDICO_KEY: xxxxxxxxxx
20+
```
21+
22+
Then install [Serverless](https://serverless.com), and make sure you can deploy to AWS with AWS credentials setup in your `bash_profile`
23+
24+
To deploy:
25+
26+
```sh
27+
cd lambda
28+
npm install
29+
sls deploy
30+
```
31+
32+
This will display two different endpoints, the base of which should replace `const BASE_URL` in `news-aggregator-web/src/App.js`.
33+
34+
Note: Haven't got the frontend up and running anywhere - want to handle the rate limit issue for the Indico API before the site is publically available.
35+

index.html

Lines changed: 0 additions & 41 deletions
This file was deleted.

lambda/handler.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ def query_article(event, context):
6868
def select_parse_random(news_articles):
6969
"""
7070
Takes given news articles and returns a max of 20 random articles, leaving only important data
71+
@TODO: Figure out how to make this better. 20 random articles isn't the best representation of the days news.
7172
"""
7273
indexes = []
7374
if len(news_articles['articles']) < 20:

mvp_homepage.png

288 KB
Loading

news-aggregator-web/src/App.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ class App extends Component {
7272
</div>
7373
<button type="submit" className="btn btn-default">Search</button>
7474
</form>
75-
<ul className="nav navbar-nav navbar-right">
76-
<li><a href="#">Link</a></li>
77-
</ul>
7875
</div>
7976
</div>
8077
</nav>

0 commit comments

Comments
 (0)