GithubHelp home page GithubHelp logo

creativcoder / headlines Goto Github PK

View Code? Open in Web Editor NEW
107.0 5.0 23.0 5.16 MB

[WIP] A simple news reading GUI app built in Rust

Rust 91.14% Shell 2.08% HTML 6.79%
rustlang gui app application egui tutorial

headlines's Introduction

Headlines [WIP]

A cross platform native GUI app built with Rust using egui. Uses newsapi.org as the source to fetch news articles.

screenshot

This project is intended to serve as educational content for folks learning Rust. To follow along in the journey check out the video walkthoughs below:

Video walkthroughs

EP 7a

EP 7b

EP 8

EP 9

Subscribe to the creativcoder channel to stay updated for more.

Implementation Status / Roadmap

  • Base UI
  • Integrate dark mode
  • Integrate real articles feed.
  • Config window for setting API_KEY
  • State persistance
  • Cross platform
  • Build and release script
  • CI integration using GitHub Actions
  • More API features
  • Multiple news sources.

Build and run instructions

Before building headlines make sure you have rust toolchain installed and egui dependencies are installed.

Linux

cargo run

Windows

cargo run.

Mac

cargo run should work but would help if someone can test it.

Web

Headlines can be served from your browser (only at localhost at the moment, because of CORS)

  • Run ./setup_web.sh script to install dependencies.
  • Run ./start_web.sh to spawn the app in the browser.

Contributions

All kinds of contributions are welcome.

License

MIT

headlines's People

Contributors

creativcoder 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

headlines's Issues

[Exercise] Implement refresh button event handler

In part b, we finished headlines but left the refresh button event handler for grab.

As an exercise, it would be great to implement the refresh button event handler.

We want the following behavior:

When the refresh button is clicked, the app should momentarily render a loading screen, and then make another get request to top-headlines endpoint and re-populate the list of articles.

Feel free to reach out for queries.

does not compile on more recent versions

HELLO

Just FYI,

I built this OK and used it as supplied, works fine. Thank you.

However, today I upgraded headlines Cargo.toml to use the most recent versions of dependent crates eframe and tracing-subscriber (current as of 3 Feb 2022) and this project no longer compiles or compiles and does not run, has a lot of issues, too numerous to mention (functions no longer found, life-time annotation errors, etc).

tracing-subscriber = "0.2.25" - tried 0.3.0 up to 0.3.7 (0.3.0 compiled but got run-time errors).
eframe = {version = "0.14.0", features = ["persistence"]} - tried 0.15.0 and 0.16.0 (latest as of 3 Feb 2022)

I can always use the old versions of those dependent crates, as you had used, but it wont be good enough for very long.

egui appears to be too early in its development cycle to start using now, the code disruption/API churn is simply too great.
I can not even compile their eframe examples with newest (0.16.0) either.

It is a pity, as egui/eframe/epi looked like a good Rust GUI candidate.

If you ever manage to "upgrade" this project to use the latest crate versions, please let us know.

thanks and regards

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.