Skip to content
kokiito0926Public

About

HTMLから記事本文や主要なテキストのみを抽出するコマンドラインのツールです。

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

Repository files navigation

justtext

justtextは、HTMLから記事本文や主要なテキストのみを抽出するコマンドラインのツールです。
ウェブサイトをクロールしたあとに、そのHTMLから記事本文や主要なテキストのみを抽出すると、大規模言語モデルに与えやすくなります。

インストール

$ npm install --save @kokiito0926/justtext
$ npm install --global @kokiito0926/justtext

使用方法

curlなどで取得したHTMLをパイプでjusttextに流し込みます。

$ curl -sSL https://example.com/ | justtext

ライブラリとして使用することもできます。

import { justtext } from "@kokiito0926/justtext";

const fo = await fetch("https://example.com/");
const html = await fo.text();
const text = justtext(html);
console.log(text);

ライセンス

MIT

About

HTMLから記事本文や主要なテキストのみを抽出するコマンドラインのツールです。

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages