1
0

25 Commits

Author SHA1 Message Date
George Mandis
6aa4dc80b3 Merge branch 'main' into glitch 2022-12-04 15:04:10 -08:00
George Mandis
0fbe6c16ad Updates for package, node and README (#12) 2022-12-04 17:49:50 -05:00
George Mandis
bdb8bf8ef4 Updated demo/default feeds list (#11) 2022-12-04 17:37:31 -05:00
George Mandis
adb1227b95 Update README.md 2022-12-04 17:33:17 -05:00
dependabot[bot]
e9f570ab07 Bump node-fetch from 3.1.0 to 3.1.1 (#7)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-31 11:48:44 -07:00
Antoni
7e9d187d37 Fixed typo in README.md (#9) 2022-08-31 11:48:32 -07:00
Marko Vujanic
58fa8d0d47 Fix typo de;ay -> delay (#8) 2022-07-06 08:25:02 -04:00
George Mandis
b9a7da4287 Merge branch 'main' into glitch 2021-12-05 13:41:43 -08:00
George Mandis
1b3f20379a Removing comment 2021-11-29 01:36:02 -08:00
George Mandis
89dbf2c17a Updating express server for module 2021-11-29 01:35:39 -08:00
George Mandis
b429c213b8 Tweaked server for Glitch 2021-11-29 01:08:47 -08:00
George Mandis
1a9c60a4d6 Merging 2.0 in and tweaking for Glitch 2021-11-29 01:06:07 -08:00
George Mandis
57571db322 Fixed feed branch name 2021-11-14 20:03:50 -08:00
George Mandis
6fca9e15be Updated default feeds 2021-11-14 19:57:39 -08:00
George Mandis
6dbd6bfe02 Added missing const. How did I not ever catch this? 2021-11-14 19:51:23 -08:00
George Mandis
29e2188b2e Updated package.json for glitch branch 2021-11-14 19:46:31 -08:00
George Mandis
415bfb6c73 Updated package.json 2021-11-14 19:40:23 -08:00
George Mandis
a5ff96e449 Updated Bubo to v1.0.1 2021-11-14 19:39:43 -08:00
George Mandis
1cd365e257 Added gitignore 2021-11-14 19:39:31 -08:00
George Mandis
d124194296 Merge branch 'main' into glitch 2021-05-09 11:49:28 -07:00
George Mandis
713a4eedaa Merge branch 'master' into glitch 2020-02-04 10:09:38 -05:00
George Mandis
53843e949e Create server.js
Added server file to run Express on Glitch
2020-02-04 10:07:55 -05:00
George Mandis
949bea60b3 Merge branch 'master' into glitch 2020-02-04 09:44:24 -05:00
George Mandis
ceaad6c5b4 Merge branch 'master' into glitch 2020-02-04 09:43:06 -05:00
George Mandis
fbfda83125 Created glitch branch 2020-02-04 09:32:05 -05:00
8 changed files with 1037 additions and 905 deletions

2
.gitignore vendored
View File

@@ -1,4 +1,4 @@
node_modules/* node_modules/*
public/index.html public/index.html
dist/* dist/*
.DS_Store .DS_Store

2
.nvmrc
View File

@@ -1 +1 @@
16.4.1 18.12.1

View File

@@ -1,36 +1,28 @@
[![Netlify Status](https://api.netlify.com/api/v1/badges/81dd219c-51cb-4418-a18c-42c8b104c689/deploy-status)](https://app.netlify.com/sites/bubo-rss-demo/deploys) [![Netlify Status](https://api.netlify.com/api/v1/badges/81dd219c-51cb-4418-a18c-42c8b104c689/deploy-status)](https://app.netlify.com/sites/bubo-rss-demo/deploys)
# 🦉 Bubo Reader (2.0) # 🦉 Bubo Reader
Bubo Reader is a hyper-minimalist <acronym title="Really Simple Syndication">RSS</acronym> and <acronym title="JavaScript Object Notation">JSON</acronym> feed reader you can deploy on your own server, [Netlify](https://netlify.com) in a few steps or [Glitch](https://glitch.com) in even fewer steps! The goal of the project is to generate a webpage that shows a list of links from a collection of feeds organized by category and website. That's it. Bubo Reader is a hyper-minimalist <acronym title="Really Simple Syndication">RSS</acronym> and <acronym title="JavaScript Object Notation">JSON</acronym> feed reader you can deploy on your own server, [Netlify](https://netlify.com) in a few steps or [Glitch](https://glitch.com) in even fewer steps! The goal of the project is to generate a webpage that shows a list of links from a collection of feeds organized by category and website. That's it.
It is named after this [silly robot owl](https://www.youtube.com/watch?v=MYSeCfo9-NI) from Clash of the Titans (1981). It is named after this [silly robot owl](https://www.youtube.com/watch?v=MYSeCfo9-NI) from Clash of the Titans (1981).
You can read more about how this project came about on my blog: You can read more about this project on my blog:
- [Introducing Bubo RSS: An Absurdly Minimalist RSS Feed Reader](https://george.mand.is/2019/11/introducing-bubo-rss-an-absurdly-minimalist-rss-feed-reader/). - [Introducing Bubo RSS: An Absurdly Minimalist RSS Feed Reader](https://george.mand.is/2019/11/introducing-bubo-rss-an-absurdly-minimalist-rss-feed-reader/).
- [Publishing Bubos RSS to Netlify with GitHub Actions](https://george.mand.is/2020/02/publishing-bubos-rss-to-netlify-with-github-actions/)
## Get Started
## Getting Started - Clone or fork the repo and run `npm install` to install the dependencies.
- Clone or fork the repo and run `npm install` to install the dependencies.
- Update `feeds.json` to include categories and links to feeds you would like to see. - Update `feeds.json` to include categories and links to feeds you would like to see.
- Run `npm run build:bubo` - Run `npm run build:bubo`
That's it! You should now have a static page with links to the latest content from your feeds in the `public` folder, ready to serve. That's it! You should now have a static page with links to the latest content from your feeds in the `public` folder, ready to serve.
## Differences in Bubo 2.0 <details>
<summary>
Version 2.0 has introduced some substantial changes for Bubo! While the static output remains endearingly spartan, the engine that builds it has changed a bit. <strong>Anatomy of Bubo Reader</strong>
</summary>
Hopefully all of these changes are in services of making this project more useful to others and encouraging outside contributions.
Changes of note:
- Bubo has been rewritten in [TypeScript](https://www.typescriptlang.org/). It's pretty slick! I anticipate the typing could be improved, but it's a start.
- You fill find an `.nvmrc` file in the root of this project. Learn more [about nvm](https://github.com/nvm-sh/nvm) if you're unfamiliar.
- The script will actually write your `index.html` file for you (Previously the build script simply ran `node src/index.js > output/index.html`). It makes a strong assumption that this file lives in the `public` folder.
- There is a somewhat sophisticated mechansim in-place for batching & throttling your requests, if needed.
## Anatomy of Bubo Reader
The static pieces: The static pieces:
@@ -45,14 +37,19 @@ The engine:
- `src/renderer.ts` — The renderer that loads Nunjucks, the template and understands how to process the incoming feed data. Prefer something else? This is the place to change it! - `src/renderer.ts` — The renderer that loads Nunjucks, the template and understands how to process the incoming feed data. Prefer something else? This is the place to change it!
- `src/utilities.ts` — A variety of parsing and normalization utilities for Bubo, hidden away to try and keep things clean. - `src/utilities.ts` — A variety of parsing and normalization utilities for Bubo, hidden away to try and keep things clean.
## Throttling </details>
In the main `index.ts` file you will find two values that allow yout to batch and throttle your feed requests: <details>
<summary>
<strong>Throttling</strong>
</summary>
- `MAX_CONNECTIONS` dictates the maximium number of requests a batch can have going at once. In the main `index.ts` file you will find two values that allow you to batch and throttle your feed requests:
- `DELAY_MS` dictates the amount of de;ay time between each batch.
The default configuration is **no batching or throttling** beacuse `MAX_CONNECTIONS` is set to `Infinity`. If you wanted to change Bubo to only fetch one feed at a time every second you could set these values to: - `MAX_CONNECTIONS` dictates the maximum number of requests a batch can have going at once.
- `DELAY_MS` dictates the amount of delay time between each batch.
The default configuration is **no batching or throttling** because `MAX_CONNECTIONS` is set to `Infinity`. If you wanted to change Bubo to only fetch one feed at a time every second you could set these values to:
```javascript ```javascript
const MAX_CONNECTIONS = 1; const MAX_CONNECTIONS = 1;
@@ -67,22 +64,20 @@ const DELAY_MS = 2500;
``` ```
In practice, I've never _really_ run into an issue leaving `MAX_CONNECTIONS` set to `Infinity` but this feels like a sensible safeguard to design. In practice, I've never _really_ run into an issue leaving `MAX_CONNECTIONS` set to `Infinity` but this feels like a sensible safeguard to design.
## Demos
You can view live demos here: </details>
- [https://bubo-rss-demo.netlify.com/](https://bubo-rss-demo.netlify.com/) <details>
- [http://bubo-rss.glitch.me/](http://bubo-rss.glitch.me/) <summary>
<strong>Getting Started</strong>
Not the most exciting-looking demos, I'll admit, but they work! </summary>
**Getting Started**
- [Deploying to Glitch](#glitch) - [Deploying to Glitch](#glitch)
- [Deploying to Netlify](#netlify) - [Deploying to Netlify](#netlify)
- [Keeping feeds updated](#updated) - [Keeping feeds updated](#updated)
<a id="glitch"></a> <a id="glitch"></a>
## Deploying to Glitch ## Deploying to Glitch
The quickest way is to remix the project on Glitch: The quickest way is to remix the project on Glitch:
@@ -93,6 +88,7 @@ There is also a `glitch` branch on this repo if you'd prefer to start there.
Just change some feeds in `./config/feeds.json` file and you're set! If you'd like to modify the style or the template you can changed `./public/style.css` file or the `./config/template.html` file respectively. Just change some feeds in `./config/feeds.json` file and you're set! If you'd like to modify the style or the template you can changed `./public/style.css` file or the `./config/template.html` file respectively.
<a id="netlify"></a> <a id="netlify"></a>
## Deploying to Netlify ## Deploying to Netlify
- [Fork the repository](https://github.com/georgemandis/bubo-rss/fork) - [Fork the repository](https://github.com/georgemandis/bubo-rss/fork)
@@ -102,6 +98,7 @@ Just change some feeds in `./config/feeds.json` file and you're set! If you'd li
The deploy settings should automatically import from the `netlify.toml` file. All you'll need to do is confirm and you're ready to go! The deploy settings should automatically import from the `netlify.toml` file. All you'll need to do is confirm and you're ready to go!
<a id="updated"></a> <a id="updated"></a>
### Keeping Feeds Updated ### Keeping Feeds Updated
#### Using Netlify Webhooks #### Using Netlify Webhooks
@@ -112,21 +109,29 @@ To keep your feeds up to date you'll want to [setup a Build Hook](https://www.ne
- [Zapier](https://zapier.com/) - [Zapier](https://zapier.com/)
- [EasyCron](https://www.easycron.com/) - [EasyCron](https://www.easycron.com/)
#### Using GitHub Actions
Coming soon—there is an old branch that demonstrates this, but it needs to be revisisted in light of Bubo 2.0.
#### Rolling Your Own #### Rolling Your Own
If you already have a server running Linux and some command-line experience it might be simpler to setup a [cron job](https://en.wikipedia.org/wiki/Cron). If you already have a server running Linux and some command-line experience it might be simpler to setup a [cron job](https://en.wikipedia.org/wiki/Cron).
</details>
## Demos
You can view live demos here:
- [https://bubo-rss-demo.netlify.com/](https://bubo-rss-demo.netlify.com/)
- [http://bubo-rss.glitch.me/](http://bubo-rss.glitch.me/)
## Support ## Support
If you found this useful please consider sponsoring me or this project. If you found this useful please consider [sponsoring me or this project](https://github.com/sponsors/georgemandis).
If you'd rather run this on your own server please consider using one of these affiliate links to setup a micro instance on [Linode](https://www.linode.com/?r=8729957ab02b50a695dcea12a5ca55570979d8b9), [Digital Ocean](https://m.do.co/c/31f58d367777) or [Vultr](https://www.vultr.com/?ref=8403978). If you'd rather run this on your own server please consider using one of these affiliate links to setup a micro instance on [Linode](https://www.linode.com/?r=8729957ab02b50a695dcea12a5ca55570979d8b9), [Digital Ocean](https://m.do.co/c/31f58d367777) or [Vultr](https://www.vultr.com/?ref=8403978).
## Showcase ## Showcase
Here are some websites using Bubo Reader: Here are some websites using Bubo Reader:
- [Kevin Fiol](https://kevinfiol.com/reader/) ([repo](https://github.com/kevinfiol/reader)) - [Kevin Fiol](https://kevinfiol.com/reader/) ([repo](https://github.com/kevinfiol/reader))
Please share if you would like to be featured!

View File

@@ -1,22 +1,26 @@
{ {
"Web Development": [ "Developer News": [
"https://hacks.mozilla.org/feed/", "https://hacks.mozilla.org/feed/",
"https://web.dev/feed.xml", "https://web.dev/feed.xml",
"https://v8.dev/blog.atom", "https://v8.dev/blog.atom",
"https://alistapart.com/main/feed/", "https://alistapart.com/main/feed/",
"https://css-tricks.com/feed/", "https://css-tricks.com/feed/",
"https://dev.to/feed" "https://dev.to/feed",
"https://changelog.com/feed"
], ],
"Blogs": [ "Blogs": [
"https://george.mand.is/feed.xml", "https://george.mand.is/feed.xml",
"https://joy.recurse.com/feed.atom" "https://joy.recurse.com/feed.atom"
], ],
"Social": [
"https://social.mandis.dev/@georgemandis.rss"
],
"My GitHub Projects": [ "My GitHub Projects": [
"https://github.com/georgemandis.atom", "https://github.com/georgemandis.atom",
"https://github.com/georgemandis/bubo-rss/releases.atom", "https://github.com/georgemandis/bubo-rss/releases.atom",
"https://github.com/georgemandis/konami-js/releases.atom", "https://github.com/georgemandis/konami-js/releases.atom",
"https://github.com/georgemandis/konami-js/commits/main.atom", "https://github.com/georgemandis/konami-js/commits/main.atom",
"https://github.com/javascriptforartists/cheer-me-up-and-sing-me-a-song/commits/master.atom", "https://github.com/javascriptforartists/cheer-me-up-and-sing-me-a-song/commits/master.atom",
"https://github.com/georgemandis/circuit-playground-midi-multi-tool/commits/master.atom" "https://github.com/georgemandis/circuit-playground-midi-multi-tool/commits/master.atom"
] ]
} }

View File

@@ -1,4 +0,0 @@
[build]
command = "npm run build:bubo"
publish = "./public/"

1789
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -10,7 +10,9 @@
"clean": "rm -rf dist", "clean": "rm -rf dist",
"build": "tsc", "build": "tsc",
"bubo": "node dist/index.js", "bubo": "node dist/index.js",
"build:bubo": "tsc && node dist/index.js" "build:bubo": "tsc && node dist/index.js",
"start": "npm run build:bubo; node server.js",
"test": "echo \"Error: no test specified\" && exit 1"
}, },
"author": { "author": {
"name": "George Mandis", "name": "George Mandis",
@@ -27,19 +29,21 @@
}, },
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"chalk": "^5.0.0", "chalk": "^5.1.2",
"node-fetch": "^3.1.0", "node-fetch": "^3.3.0",
"nunjucks": "^3.2.0", "nunjucks": "^3.2.3",
"rss-parser": "^3.6.3" "rss-parser": "^3.12.0",
"express": "^4.17.1"
}, },
"engines": { "node": "16.x" },
"devDependencies": { "devDependencies": {
"@types/node": "^16.11.10", "@types/node": "^16.18.4",
"@types/nunjucks": "^3.2.0", "@types/nunjucks": "^3.2.1",
"@types/xml2js": "^0.4.9", "@types/xml2js": "^0.4.11",
"@typescript-eslint/eslint-plugin": "^5.4.0", "@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.4.0", "@typescript-eslint/parser": "^5.45.0",
"eslint": "^8.3.0", "eslint": "^8.29.0",
"tslib": "^2.3.1", "tslib": "^2.4.1",
"typescript": "^4.5.2" "typescript": "^4.9.3"
} }
} }

24
server.js Normal file
View File

@@ -0,0 +1,24 @@
// Bubo RSS (on Glitch!)
// init project
import express from "express";
import { URL } from 'url';
const __dirname = new URL('.', import.meta.url).pathname;
const app = express();
// we've started you off with Express,
// but feel free to use whatever libs or frameworks you'd like through `package.json`.
// http://expressjs.com/en/starter/static-files.html
app.use(express.static("public"));
// http://expressjs.com/en/starter/basic-routing.html
app.get("/", function(request, response) {
response.sendFile(__dirname + "/public/index.html");
});
// listen for requests :)
const listener = app.listen(process.env.PORT, function() {
console.log("Your app is listening on port " + listener.address().port);
});