Skip to content

Commit 447dc46

Browse files
committed
v6.1.4rc1
- Moving to `extractus` (#61)
1 parent e9cb0a3 commit 447dc46

File tree

19 files changed

+131
-132
lines changed

19 files changed

+131
-132
lines changed

CONTRIBUTING.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
1-
# Contributing to feed-reader
1+
# Contributing to `@extractus/feed-extractor`
22

3-
While `feed-reader` is just a simple library with personal purpose, I'm happy if it can be useful for you too.
3+
Glad to see you here.
44

5-
Anyway, I hope it always gets better, so pull requests are welcome, though larger proposals should be discussed first.
5+
Collaborations and pull requests are always welcomed, though larger proposals should be discussed first.
66

7-
As an OSS, it should follow the Unix philosophy: "do one thing and do it well".
7+
As an OSS, it's better to follow the Unix philosophy: "do one thing and do it well".
88

9-
## Installation
109

11-
- Ensure you have `node` and `npm` installed.
12-
- After cloning the repository, run `npm install` in the root of the repository.
13-
- Run `npm test` to ensure that everything works correctly in your environment.
10+
## What you can contribute?
1411

15-
If it works well, you can start modifying your fork.
12+
We are planing to re-write this tool in TypeScript and make it Deno-first library.
13+
If you are interested, please join our team.
1614

17-
In this process, you can use [`node eval.js` command](https://github.com/ndaidong/feed-reader#quick-evaluation) to evaluate your changes.
15+
Besides that, you can also:
16+
17+
- Test and report bugs
18+
- Fix unresolved issues
19+
- Improve performance
20+
- Write better documentation
21+
- Create examples or build demos
22+
- Feedback on software design and APIs
1823

1924

2025
## Third-party libraries
@@ -32,7 +37,7 @@ Make sure your code lints before opening a pull request.
3237

3338

3439
```bash
35-
cd feed-reader
40+
cd feed-extractor
3641

3742
# check coding convention issue
3843
npm run lint
@@ -49,18 +54,18 @@ npm run lint:fix
4954
Be sure to run the unit test suite before opening a pull request. An example test run is shown below.
5055

5156
```bash
52-
cd feed-reader
57+
cd feed-extractor
5358
npm test
5459
```
5560

56-
![feed-reader unit test](https://i.imgur.com/xTwZK6B.png)
61+
![feed-extractor unit test](https://i.imgur.com/xTwZK6B.png)
5762

5863
If test coverage decreased, please check test scripts and try to improve this number.
5964

6065

6166
## Documentation
6267

63-
If you've changed APIs, please update README and [the examples](https://github.com/ndaidong/feed-reader/tree/main/examples).
68+
If you've changed APIs, please update README and [the examples](https://github.com/extractus/feed-extractor/tree/main/examples).
6469

6570

6671
## Clean commit histories
@@ -79,6 +84,6 @@ For people new to git, please refer the following guides:
7984

8085
## License
8186

82-
By contributing to `feed-reader`, you agree that your contributions will be licensed under its [MIT license](https://github.com/ndaidong/feed-reader/blob/main/LICENSE).
87+
By contributing to `@extractus/feed-extractor`, you agree that your contributions will be licensed under its [MIT license](https://github.com/extractus/feed-extractor/blob/main/LICENSE).
8388

8489
---

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2015 Dong Nguyen
3+
Copyright (c) 2015 Extractus
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 35 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,23 @@
1-
# feed-reader
1+
# feed-extractor
22

33
To read & normalize RSS/ATOM/JSON feed data.
44

5-
[![NPM](https://badge.fury.io/js/feed-reader.svg)](https://badge.fury.io/js/feed-reader)
6-
![CI test](https://github.com/ndaidong/feed-reader/workflows/ci-test/badge.svg)
7-
[![Coverage Status](https://img.shields.io/coveralls/github/ndaidong/feed-reader)](https://coveralls.io/github/ndaidong/feed-reader?branch=main)
8-
![CodeQL](https://github.com/ndaidong/feed-reader/workflows/CodeQL/badge.svg)
5+
[![npm version](https://badge.fury.io/js/@extractus%2Ffeed-extractor.svg)](https://badge.fury.io/js/@extractus%2Ffeed-extractor)
6+
![CI test](https://github.com/extractus/feed-extractor/workflows/ci-test/badge.svg)
7+
[![Coverage Status](https://img.shields.io/coveralls/github/extractus/feed-extractor)](https://coveralls.io/github/extractus/feed-extractor?branch=main)
8+
![CodeQL](https://github.com/extractus/feed-extractor/workflows/CodeQL/badge.svg)
99
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
1010

1111
## Intro
1212

13-
*feed-reader* is a part of tool sets for content builder:
13+
*feed-extractor* is a part of tool sets for content builder:
1414

15-
- [feed-reader](https://github.com/ndaidong/feed-reader): extract & normalize RSS/ATOM/JSON feed
16-
- [article-parser](https://github.com/ndaidong/article-parser): extract main article from given URL
17-
- [oembed-parser](https://github.com/ndaidong/oembed-parser): extract oEmbed data from supported providers
15+
- [feed-extractor](https://github.com/extractus/feed-extractor): extract & normalize RSS/ATOM/JSON feed
16+
- [article-extractor](https://github.com/extractus/article-extractor): extract main article from given URL
17+
- [oembed-extractor](https://github.com/extractus/oembed-extractor): extract oEmbed data from supported providers
1818

1919
You can use one or combination of these tools to build news sites, create automated content systems for marketing campaign or gather dataset for NLP projects...
2020

21-
```
22-
┌────────────────┐
23-
┌───────► article-parser ├──────────┐
24-
│ └────────────────┘ │
25-
┌─────────────┐ ┌─────────┴────┐ ┌────────▼─────────┐ ┌─────────────┐
26-
│ feed-reader ├───► feed entries │ │ content database ├───► public APIs │
27-
└─────────────┘ └─────────┬────┘ └────────▲─────────┘ └─────────────┘
28-
│ ┌────────────────┐ │
29-
└───────► oembed-parser ├──────────┘
30-
└────────────────┘
31-
```
3221

3322
## Demo
3423

@@ -40,39 +29,43 @@ You can use one or combination of these tools to build news sites, create automa
4029
### Node.js
4130

4231
```bash
43-
npm i feed-reader
32+
npm i @extractus/feed-extractor
4433

4534
# pnpm
46-
pnpm i feed-reader
35+
pnpm i @extractus/feed-extractor
4736

4837
# yarn
49-
yarn add feed-reader
38+
yarn add @extractus/feed-extractor
5039
```
5140

5241
```ts
5342
// es6 module
54-
import { read } from 'feed-reader'
43+
import { read } from '@extractus/feed-extractor'
5544

5645
// CommonJS
57-
const { read } = require('feed-reader')
46+
const { read } = require('@extractus/feed-extractor')
5847

5948
// or specify exactly path to CommonJS variant
60-
const { read } = require('feed-reader/dist/cjs/feed-reader.js')
49+
const { read } = require('@extractus/feed-extractor/dist/cjs/feed-extractor.js')
6150
```
6251

6352
### Deno
6453

6554
```ts
66-
import { read } from 'https://esm.sh/feed-reader'
55+
// deno > 1.28
56+
import { read } from 'npm:@extractus/feed-extractor'
57+
58+
// deno < 1.28
59+
// import { read } from 'https://esm.sh/@extractus/feed-extractor'
6760
```
6861

6962
### Browser
7063

7164
```ts
72-
import { read } from 'https://unpkg.com/feed-reader@latest/dist/feed-reader.esm.js'
65+
import { read } from 'https://unpkg.com/@extractus/feed-extractor@latest/dist/feed-extractor.esm.js'
7366
```
7467

75-
Please check [the examples](https://github.com/ndaidong/feed-reader/tree/main/examples) for reference.
68+
Please check [the examples](https://github.com/extractus/feed-extractor/tree/main/examples) for reference.
7669

7770
### Deta cloud
7871

@@ -110,9 +103,10 @@ Feed content must be accessible and conform one of the following standards:
110103
For example:
111104

112105
```js
113-
import { read } from 'feed-reader'
106+
import { read } from '@extractus/feed-extractor'
114107

115-
read('https://news.google.com/atom').then(result => console.log(result))
108+
const result = await read('https://news.google.com/atom')
109+
console.log(result)
116110
```
117111

118112
Without any options, the result should have the following structure:
@@ -151,13 +145,13 @@ Object with all or several of the following properties:
151145
For example:
152146

153147
```ts
154-
import { read } from 'feed-reader'
148+
import { read } from '@extractus/feed-extractor'
155149

156-
read('https://news.google.com/atom', {
150+
await read('https://news.google.com/atom', {
157151
useISODateFormat: false
158152
})
159153

160-
read('https://news.google.com/rss', {
154+
await read('https://news.google.com/rss', {
161155
useISODateFormat: false,
162156
getExtraFeedFields: (feedData) => {
163157
return {
@@ -191,10 +185,10 @@ You can use this param to set request headers to fetch.
191185
For example:
192186

193187
```js
194-
import { read } from 'feed-reader'
188+
import { read } from '@extractus/feed-extractor'
195189

196190
const url = 'https://news.google.com/rss'
197-
read(url, null, {
191+
await read(url, null, {
198192
headers: {
199193
'user-agent': 'Opera/9.60 (Windows NT 6.0; U; en) Presto/2.1.1'
200194
}
@@ -206,11 +200,11 @@ You can also specify a proxy endpoint to load remote content, instead of fetchin
206200
For example:
207201

208202
```js
209-
import { read } from 'feed-reader'
203+
import { read } from '@extractus/feed-extractor'
210204

211205
const url = 'https://news.google.com/rss'
212206

213-
read(url, null, {
207+
await read(url, null, {
214208
headers: {
215209
'user-agent': 'Opera/9.60 (Windows NT 6.0; U; en) Presto/2.1.1'
216210
},
@@ -223,14 +217,14 @@ read(url, null, {
223217
})
224218
```
225219

226-
Passing requests to proxy is useful while running `feed-reader` on browser. View `examples/browser-feed-reader` as reference example.
220+
Passing requests to proxy is useful while running `@extractus/feed-extractor` on browser. View `examples/browser-feed-reader` as reference example.
227221

228222

229223
## Quick evaluation
230224

231225
```bash
232-
git clone https://github.com/ndaidong/feed-reader.git
233-
cd feed-reader
226+
git clone https://github.com/extractus/feed-extractor.git
227+
cd feed-extractor
234228
npm install
235229

236230
node eval.js --url=https://news.google.com/rss --normalization=y --useISODateFormat=y --includeEntryContent=n --includeOptionalElements=n

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ Description above is a general rule and may be altered on case by case basis.
1212

1313
You can report low severity vulnerabilities as GitHub issues.
1414

15-
More severe vulnerabilities should be reported to my email [email protected] or Twitter [@ndaidong](https://twitter.com/ndaidong).
15+
More severe vulnerabilities should be reported to email extractus.security@skiff.com.
1616

1717
---

build.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
/**
2-
* build.js
3-
* @ndaidong
4-
**/
1+
// build.js
52

63
import { readFileSync, writeFileSync, copyFileSync, rmSync, mkdirSync } from 'fs'
74

@@ -38,7 +35,7 @@ const esmVersion = {
3835
...baseOpt,
3936
platform: 'browser',
4037
format: 'esm',
41-
outfile: `dist/${pkg.name}.esm.js`,
38+
outfile: 'dist/feed-extractor.esm.js',
4239
banner: {
4340
js: comment
4441
}
@@ -50,7 +47,7 @@ const cjsVersion = {
5047
platform: 'node',
5148
format: 'cjs',
5249
mainFields: ['main'],
53-
outfile: `dist/cjs/${pkg.name}.js`,
50+
outfile: 'dist/cjs/feed-extractor.js',
5451
banner: {
5552
js: comment
5653
}

build.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import {
99

1010
const pkg = JSON.parse(readFileSync('./package.json'))
1111

12-
const esmFile = `./dist/${pkg.name}.esm.js`
13-
const cjsFile = `./dist/cjs/${pkg.name}.js`
12+
const esmFile = './dist/feed-extractor.esm.js'
13+
const cjsFile = './dist/cjs/feed-extractor.js'
1414
const cjsPkg = JSON.parse(readFileSync('./dist/cjs/package.json'))
1515
const cjsType = './dist/cjs/index.d.ts'
1616

0 commit comments

Comments
 (0)