GithubHelp home page GithubHelp logo

bhupesh-v / defe Goto Github PK

View Code? Open in Web Editor NEW
29.0 3.0 17.0 811 KB

devfeed is a Tech feed Aggregator for Developers & Tech Enthusiasts

License: GNU General Public License v2.0

Python 36.03% HTML 44.64% JavaScript 13.41% CSS 4.51% Shell 0.69% Procfile 0.11% Dockerfile 0.40% Makefile 0.20%
developer-tools feed-reader aggregator newsfeed feeder xml-feed feeds feeders atom-feed productivity devfeed defe defe-cli materializecss rss-reader hacktoberfest

defe's Introduction

defe logo

A Tech feed Aggregator for Developers

Read Stories which matter
Twitter URL

build GitHub release (latest by date) Website PyPI GitHub PyPI Downloads lgtm alerts Codacy Badge Language grade: Python Gitter

Built with ❤︎ by Bhupesh Varshney
Twitter Follow
The story behind defe

✨ Features

  • PWA
  • Share Stories
  • Minimal UI
  • Command Line Interface
  • Feeds from more than 100 sources categorized in
    • 📰 News
    • 🎙️ Podcasts
    • 📧 Newsletters ... And Much More

🌈 Demo

WebApp

CLI

📦 Package

You can use the defe package to build bots 🤖

from defe import defe
import pprint

f = defe.feed()

pprint.pprint(f.news(3))
pprint.pprint(f.feeders("newsletters"))

See Dcoumetation for more.

🔮 Installation

Install defe CLI using pip from PyPI

pip install defe

Development

  1. Clone the repository
git clone https://github.com/Bhupesh-V/defe.git
  1. Create virtual environment
python3 -m venv venv
  1. Activate virtual environment

    Linux/MacOS

    source venv/bin/activate

    Windows

    .\venv\Scripts\activate
  2. Install Dependencies

pip install -r requirements.txt
  1. Lint the project with
black --check --diff .
  1. Run the Development Server (for WebApp)
flask run
  1. To Use the defe CLI, run
python -m defe

📝 Changelog

See the CHANGELOG.md file for details.

Author

👥 Bhupesh Varshney

☺️ Show your support

Support me by giving a ⭐️ if this project helped you! or just Twitter URL

Donate using Liberapay Support on ko-fi

📜 License

This project is licensed under the GPL License. See the LICENSE file for details.

👋 Contributing

Please read the CONTRIBUTING guidelines for the process of submitting pull requests to us.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


AyushRawal

🐛

Jahir

🐛 💻

Arunaabh Pant

💻 🎨

Ozy Vielma

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

defe's People

Contributors

allcontributors[bot] avatar arunaaabh95 avatar bhupesh-v avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

defe's Issues

feed.news(3) argument bug

Bug description
When using the package in the cli to display news feed and you pass in a news number count like "pprint.pprint(f.news(3))" just as it says in the read.me, It shows an error "feed.news() takes 1 positional argument but 2 were given". I went through the code and noticed the news argument in the feed class (found in defe/defe.py) doesn't take in an argument for the number of news, that's why this error is showing, so I'm suggesting you update the package usage in the read.me to reflect that it doesn't take in any argument.

Steps to reproduce the behavior:
from defe import defe
import pprint
f = defe.feed()
pprint.pprint(f.news(3))
You should see a positional argument error.

Expected behavior
Update read.me to reflect that no positional argument is passed.

image

Desktop (please complete the following information):

  • OS: [Windows]
  • Terminal

Additional context
I may not have passed the argument right, but following the documentation from the read.me, this is what it reproduces.

Option to fetch only one feeder

A -feeder flag would be a vialbe solution to do this.
For example:

defe podcasts -feeder=changelog will fetch all podcasts from Changelog.com

Typo in podcasts.json

There is a small typo in podcasts.json
'Software Defined Talk' has been mentioned twice.
The second one should be 'Soft Skills Engineering'.

Custom Loading Bar

A nice addition to the CLI would be for e.g a different colour of loading bar or emojis in progress bar

Podcast page breaks if feed has only 1 link in "links" object

Describe the bug
Podcast page breaks if feed has only 1 link in "links" object

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Home'
  2. Click on 'Feed>Podcasts'

Expected behavior
Podcast page should open and feed should be visible with working audio player.

Screenshots
image

image

Add Categories like AI, C++, IoT for searching

This is more of a Documentation like work.
For starters we have to do this :

  1. Go through every feeder files in the feeders directory.
  2. create a new JSON field category.
  3. Assign appropriate categories like devops, machine learning, security etc.

Feel free to ask anything

Add your favorite feeders

Send in RSS/Atom Feeds of your favorite sites, newsletters, podcasts.
Make sure you are only editing one of these files

Don't forget to read the CONTRIBUTING guidelines before sending any PR.


This issue will remain open so you can always contribute 🤗

reload feed lookup in defe CLI

Is your feature request related to a problem? Please describe.
The defe CLI for now prompts the user to add an Index value to open the link in browser. We need something to reload the lookup without hitting Ctrl+c

notwant

Describe the solution you'd like
Ask the user to re-lookup the feed, so that new result pop-up

Describe alternatives you've considered
We can input R to reload or maybe bind a keyboard shortcut to do that. The 2nd approach seems more appropriate

Play Podcasts in terminal

Download Podcasts locally and ask user to play them.
Better if we can stream it
Look for playsound packages in Python

Changes is template not reflecting while testing

Describe the bug
When I make changes to templates eg(base.html) the changes do not reflect while testing

To Reproduce
Steps to reproduce the behavior:

  1. make changes to file (eg base.html) will not happen for home.html
  2. reload localhost
    3 new changes not reflected

Expected behavior
Should be able to see new changes

Probable Solution
In app.py we should watch for template files which are not loaded via render_template function
Reference: https://stackoverflow.com/questions/9508667/reload-flask-app-when-template-file-changes

Media notification for the PWA

Media Notification - for podcasts

Starter code inside script.js

defe/static/script.js

Lines 130 to 137 in 5b2db4a

/* navigator.mediaSession.setActionHandler('play', function() {});
navigator.mediaSession.setActionHandler('pause', function() {});
navigator.mediaSession.setActionHandler('previoustrack', function(podcast_list) {
current_podcast = podcast_list.indexOf(podcast_url);
index = (index - 1 + playlist.length) % playlist.length;
playAudio();
});
navigator.mediaSession.setActionHandler('nexttrack', function() {})*/

header images for webapp

Is your feature request related to a problem? Please describe.
It would be nice to show some header images (if the feed provides it)
Something like this probably

Describe the solution you'd like
For every card rendered on webapp we can show the image if it exists
The feedparser library colllects these links for us in a single key

f3 = feedparser.parse("https://www.telegraph.co.uk/technology/rss.xml")
f3.entries[0].links
[{'rel': 'alternate', 'type': 'text/html', 'href': 'https://www.telegraph.co.uk/technology/0/houseparty-app-delete-account-is-safe/'}, {'length': '99', 'type': 'image/jpeg', 'href': 'https://www.telegraph.co.uk/content/dam/technology/2020/03/31/Conversation-8-People_trans_NvBQzQNjv4BqZgEkZX3M936N5BQK4Va8RWtT0gK_6EfZT336f62EI5U.jpg', 'rel': 'enclosure'}]

Usually the images will exist in either the links key or sometimes in media_content

>>> f = feedparser.parse("https://www.freecodecamp.org/news/rss/")
>>> f.entries[0].keys()
dict_keys(['title', 'title_detail', 'summary', 'summary_detail', 'links', 'link', 'id', 'guidislink', 'tags', 'authors', 'author', 'published', 'published_parsed', 'media_content', 'content'])
>>> f.entries[0]['media_content']
[{'url': 'https://www.freecodecamp.org/news/content/images/2020/04/sunset_loading2-1.gif', 'medium': 'image'}]

One thing to note that the images may exist for some source & not for others, so make sure there is a fallback mechanism (if/else to say 😅 )

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.