Coder Social home page Coder Social logo

porglezomp / feedburst Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 8.0 148 KB

A tool to consume comic RSS feeds and present them to you in bunches, on a schedule of your choosing

License: GNU General Public License v3.0

Rust 99.87% Batchfile 0.13%
webcomics feed-reader rss-reader atom-reader rust

feedburst's Introduction

Feedburst!

Build status Build Status Coverage Status Release Crates.io

Feedburst is a tool that presents you your RSS feeds in chunks, according to a policy that you set.

Installing

You can install Feedburst by going to the releases page and downloading the latest release for your platform. If you have cargo already installed, you can also get it by running:

cargo install feedburst

Configuring

Feedburst is configured with a config file containing all the comics you'd like to read, and policy about when and how you'd like to read them. Any line that begins with with a # will be treated as a comment and ignored. Entries in that config file look like the following:

# A nice friendly comic
"Goodbye to Halos" <http://goodbyetohalos.com/feed/> @ 2 new comics @ overlap 1 comic @ on monday

The "Title" is whatever title you’d like to display the comic as. The <link> is a link to the RSS feed to pull the comics from. The @policy are rules for when and how you’d like that comic feed to be presented to you.

  • @ # new comic(s): Wait for there to be at least # new comics before you see them.
  • @ overlap # comic(s): Show the last # comics that you read.
  • @ on monday/tuesday/etc…: Show the comics once the corresponding day has passed.
  • @ every # day(s): Wait at least # days since you last read the comic.
  • @ ignore url /pattern/: Don't include comics that have pattern in the URL (also ignore title).
  • @ keep title /pattern/: Only include comics that have pattern in the title (also keep url).
  • @ open all: Open every new comic, not just the earliest. This is useful for some tumblr comics that don't have forward/backward buttons on individual pages.

For more features, see the advanced config section.

Config Location

By default, on macOS and Linux, the config file is stored at:

~/.config/feedburst/config.feeds

and on Windows, it's stored at

%AppData%\Feedburst\config.feeds

If you want to set a different default location for your config file, you can set the $FEEDBURST_CONFIG_FILE environment variable. If you want to use a different config for a single run, then use --config FILE on the command line.

Advanced Config

Feed Data Location

By default, all of your feeds are stored together. On macOS and Linux, they're stored at:

~/.local/share/feedburst/feeds/

On Windows you can find your feeds at:

%AppData%\Feedburst\feeds\

If you want to store your feeds in a location different from the default, then you have two options. First, you can override the base path for all of your comics on the command line with --feeds PATH. If you'd like to permanently change the base path, then add a line to your config file

root PATH

This will store all feeds that come after that line at PATH. You can use as many root directives as you want to, and each feed will use whichever was specified most recently. If you'd like to reset later feeds to be stored at the default location, then just put feed on its own on the line.

Customizing the Browser

By default feedburst will try to open comics in your default browser. If that doesn't work, or if you want to open your comics in another browser, you can customize the command it uses to open it using command in your config file. Any comics that come after that line will be opened using that command.

For example,

command '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome' --incognito

on macOS will use Chrome to open the comic in Incognito mode.

If you'd like to reset later feeds to be opened with the default command, just put command on its own line.

feedburst's People

Contributors

pickfire avatar porglezomp avatar w-culhane avatar zxey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

feedburst's Issues

Linux and macOS Releases

Looks like the Travis-CI deploy config is broken, so they're not being produced.

No stash found.

/home/travis/.rvm/gems/ruby-2.2.0/gems/octokit-4.6.2/lib/octokit/client/releases.rb:86:in `initialize': No such file or directory @ rb_sysopen - target/release/feedburst (Errno::ENOENT)

Concurrent feed fetching

Right now feeds are fetched entirely in series, which is unnecessarily slow. This could be done either with futures or with multiple threads, as long as there's not sequential waiting on network requests.

Improve error reporting for all errors

Currently some errors will print silly things like

Error: Error: Cannot open "foo"

We should avoid duplicated messages and improve the code that's doing the error handling

Rate-limit comic opening

If you haven't read any comics in a while and Feedburst decides to open a bunch of comics, the many tabs opening all at once can cause some trouble loading. We want the first comic open as soon as possible, and then it's fine if the rest come slower.

Use sqlite for data storage

Data storage is going to get increasingly complicated, and I want to be able to migrate it. Better still, this makes some other robustness fixes like #13 not-my-problem.

Windows platform layer doesn't handle paths correctly

C:\Users\J>SET RUST_LOG=feed=trace,main=trace
C:\Users\J>feedburst
DEBUG:feedburst::config: Using config found from the platform config dir: "C:\\Users\\J\\AppData\\Roaming\\Feedburst\\config.feeds"
DEBUG:feedburst::config: Using platform data: "C:\\Users\\J\\AppData\\Roaming\\Feedburst\\feeds"
Error opening feed file "C:\\Users\\J\\AppData\\Roaming\\Feedburst\\feeds": Access is denied. (os error 5)

Refactor

Currently it's hard to modify, and not enough code is in the library portion. We need a proper API so that the CLI and the GUI can share code.

Feed fetching error message doesn't account for status codes

When fetching a feed that currently 404s, you get a message about how it couldn't parse RSS or Atom:

Error in feed Balderdash: Could not parse XML as Atom or RSS from input

Presumably this is because the 404 page returns content, and we're trying to parse that 404 content as a feed instead of using the error status code to provide an appropriate error message.

Allow filtering comics

This issue is inspired by El Goonish Shive which interleaves the feeds for two related comics and a sketchbook. In order to deal with this, we should be able to filter comics by the URL and the article title.

Syntax:

@ ignore url /egsnp/
@ keep title /EGS:NP/

Display comic schedule

In order to help planning out a config, have an option to display a calendar of what comics are shown on what days of the week.

For example:

$ feedburst calendar
Mon     Questionable Content
        Dumbing of Age
Fri     Dinosaur Comics
        Gunnerkrigg Court
Sat     Saturday Morning Breakfast Cereal

Smarter feed fetching

Use the @ on weekday and the @ every # days data to decide what might possibly be available today, and fetch that first.

Chapter detection

Many comics are separated into chapters identifiable by either a URL prefix or a title prefix.
You could have @ chapter url or @ chapter title, and use some common-prefix heuristic to detect when chapter breaks occur.

URLs from Goodbye to Halos, with the chapter marked:

http://www.goodbyetohalos.com/comic/prologue-10
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
http://www.goodbyetohalos.com/comic/a-premonition-6
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
http://www.goodbyetohalos.com/comic/01141
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Recent entry titles from Goodbye to Halos:

Goodbye to Halos - 01.141
Goodbye to Halos - 01.140

Entry titles from Gunnerkrigg Court:

Chapter 63: Page 16
Chapter 63: Page 15
Chapter 63: Page 14

Open all pages for comics that don't have good navigation on-page

Some comics (particularly often those hosted on tumblr) don't have good forward/backward navigation if you take the RSS link directly to a comic, so these should have all the pages to read opened, instead of just the first one.

Potential policy syntax: @ all pages

File locking on feed files

Theoretically, if someone accidentally ran two instances of feedburst at once, a feed file could be corrupted. File locking should hopefully fix this issue.

Handle time edge-cases

There are two edge-cases that I figured out during discussion on #69 that need to be tested and fixed. From that discussion:

Exploring the semantics of the is_scheduled policies:

@ every # day(s) should wait at least # days. I think this should be independent of the times during those days, so if you read it at midnight on one day, and the morning a week later, less than 7 days have elapsed, but it should be considered as 7 days. I think this one is handled incorrectly, and we need to count days of the week rather than number of days in the elapsed time.

@ on monday/tuesday/etc should require that it was last read before that day, and it is now that day or later. Currently, if you last read it sunday night, and it's marked as @ on monday, I believe it will currently think 0 days have passed, and so not realize that you went from sunday -> monday.

Allow custom locations for feed storage

  • Allow a command-line flag to set the feed storage location:
    For testing purposes, and for flexibility in general?

  • Allow config files to specify the root location for feed storage:
    If you want to have multiple config files for different comics collections, and have them store their feeds separately from each other, being able to specify the feed location in the config file would be helpful.

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.