GithubHelp home page GithubHelp logo

maybethisisru / miniflux-sanity Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 0.0 874 KB

Command line utility to mark items older than specified time as read in Miniflux ๐Ÿ“–

Home Page: https://rubygems.org/gems/miniflux_sanity

License: GNU Affero General Public License v3.0

Ruby 100.00%
atom rubygem rss miniflux2 miniflux

miniflux-sanity's Introduction

miniflux-sanity

Download counter for the RubyGem

๐Ÿ‘ฉโ€๐Ÿ’ป A Ruby command-line utility to mark older entries as read on your Miniflux app. Defaults to items older than a conservative 30 days.

๐Ÿš€ Switch to 1 day and run daily to wake up to a fresh feed.

โญ Please star the project if you like it or use it -- and want to send some internet support. ๐Ÿฅฐ

A screenshot from my Terminal showcasing the utility in action

Motivation

If I haven't read something in the preceding week, it's unlikely I ever will. Miniflux doesn't offer an archive option so we mark entries as read instead. All it really does is offer me a saner overview of "unread" items at the top.

As is usually the case for me, I wanted to build something meaningful as I pick up Ruby again. This was a small use-case that was a good first challenge to tackle.

The code is admittedly not perfect. I welcome any constructive criticism or feedback, more so if you are a Ruby enthusiast.

Feature-set

  • Uses token authentication
  • Supports cloud and self-hosted Miniflux apps
  • Configurable number of days before which to mark items as read
  • Resumes marking as read if interrupted

Note: A common concern might be if this muddies your actual read history. Thanks to the way Miniflux works, this surprisingly does not meddle with your history. It only marks items as read. That is it! This was untrue, my apologies!

Usage

You must have Ruby available on your system/shell.

Install by running gem install miniflux_sanity.

All command line options can be viewed by running miniflux_sanity --help.

To-do

  • Unit testing
  • Resume fetching if command crashes in between
  • Optionally, if an item is starred and unread, don't mark it as read.
    • This could lend itself to a nice workflow where my "to-read" can be starred while scanning through items.

Goals

  • Get comfortable with Ruby's syntax
  • Work with Class, Module, dotenv etc.
  • Work with JSON
  • Work with Ruby's File API
  • Interact with an API using an HTTP library

Development

The Ruby version is specified in .ruby-version. rbenv is able to read and set the correct local version in your shell.

  • git clone [email protected]:hirusi/miniflux-sanity.git
  • cd miniflux-sanity
  • Install the dependencies: bundle
  • After making desired changes, install locally without publishing to RubyGems: bundle exec rake install
    • I don't know a better workflow at the moment, sorry. ๐Ÿคทโ€โ™€๏ธ
  • Run the utility: miniflux_sanity
    • You'll need a token from your Miniflux app under Settings > API Keys -> Create a new API key

If you have a Docker setup to contribute using Alpine OS as its base, I'd be very happy to merge your PR.

Publishing

  • Test changes locally with an install: bundle exec rake install
  • Update version in gemspec, commit
  • Publish when happy: bundle exec rake release

miniflux-sanity's People

Contributors

maybethisisru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.