newsline-cli 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +25 -1
- package/fetch.py +4 -1
- package/install.sh +2 -2
- package/package.json +3 -3
- package/readme/de.md +26 -1
- package/readme/es.md +25 -1
- package/readme/fr.md +26 -1
- package/readme/ja.md +25 -1
- package/readme/ko.md +23 -1
- package/readme/pt.md +25 -1
- package/readme/zh.md +22 -1
- package/refresh.sh +8 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 itdar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -10,17 +10,23 @@
|
|
|
10
10
|
A rotating regional headline sits at the bottom of your session — so a long wait turns into a
|
|
11
11
|
quick news check. It shows *below* your existing status line (your HUD stays).
|
|
12
12
|
|
|
13
|
+
<p align="center"><img src="docs/demo.gif" alt="newsline — rotating regional headlines in the Claude Code status line" width="720"></p>
|
|
14
|
+
|
|
13
15
|
## Install & run — one line
|
|
14
16
|
|
|
15
17
|
```sh
|
|
16
18
|
# curl (macOS / Linux / WSL) — installs and sets up right away
|
|
17
|
-
curl -fsSL https://raw.githubusercontent.com/itdar/
|
|
19
|
+
curl -fsSL https://raw.githubusercontent.com/itdar/newsline/master/install.sh | sh
|
|
18
20
|
|
|
19
21
|
# Homebrew
|
|
20
22
|
brew install itdar/tap/newsline && newsline init
|
|
21
23
|
|
|
22
24
|
# npm
|
|
23
25
|
npm i -g newsline-cli && newsline init
|
|
26
|
+
|
|
27
|
+
# Claude Code plugin — run inside Claude Code, then /newsline:setup
|
|
28
|
+
/plugin marketplace add itdar/newsline
|
|
29
|
+
/plugin install newsline@itdar
|
|
24
30
|
```
|
|
25
31
|
|
|
26
32
|
The news line appears on your **next message** — no restart. Setup asks for a language & topic
|
|
@@ -34,6 +40,24 @@ and keeps your existing status line.
|
|
|
34
40
|
stay fresh without reinstalling. If it's unreachable, newsline **falls back to built-in feeds**.
|
|
35
41
|
- The status line is instant (served from a cache); refreshes run in the background.
|
|
36
42
|
|
|
43
|
+
## Privacy
|
|
44
|
+
|
|
45
|
+
Everything that runs on your machine is in this repo — and this is the complete list of
|
|
46
|
+
what ever leaves it:
|
|
47
|
+
|
|
48
|
+
- **Feed curation** (at most once per hour): `lang`, coarse country, local time, day of
|
|
49
|
+
week, timezone offset, `topic`, and the plugin version go to the edge service so it can
|
|
50
|
+
pick fresh regional sources. No tracking ID, no personal data.
|
|
51
|
+
- **Headline clicks**: links open through a small redirect (it sees the article URL plus
|
|
52
|
+
`lang`/`topic`/version), so dead sources can be swapped server-side and clicks counted
|
|
53
|
+
in aggregate. There is no per-user identifier.
|
|
54
|
+
- **Never sent, never read**: your code, prompts, files, or Claude conversations. The
|
|
55
|
+
status line renders from a local cache and never blocks on the network.
|
|
56
|
+
|
|
57
|
+
**Fully local mode**: set `"api": "off"` and `"endpoint": "off"` in
|
|
58
|
+
`~/.config/newsline/config.json` — feeds come from the bundled `feeds.json` and headlines
|
|
59
|
+
link straight to the articles. Nothing is contacted except the news feeds themselves.
|
|
60
|
+
|
|
37
61
|
## Configure
|
|
38
62
|
|
|
39
63
|
Re-run `newsline init`, or edit `~/.config/newsline/config.json`:
|
package/fetch.py
CHANGED
|
@@ -124,7 +124,8 @@ def render(title, link, endpoint, lang):
|
|
|
124
124
|
ver = (os.environ.get("NEWSLINE_VERSION") or "").strip()
|
|
125
125
|
if ver:
|
|
126
126
|
q["v"] = ver
|
|
127
|
-
|
|
127
|
+
# fully-local mode: no endpoint -> link straight to the article, no redirect
|
|
128
|
+
wrapped = endpoint + "?" + urllib.parse.urlencode(q) if endpoint else link
|
|
128
129
|
if len(title) > MAX_TITLE:
|
|
129
130
|
title = title[: MAX_TITLE - 1] + "…"
|
|
130
131
|
label = f"{ICON} {title}" if ICON else title
|
|
@@ -137,6 +138,8 @@ def main():
|
|
|
137
138
|
if len(sys.argv) < 4:
|
|
138
139
|
return 2
|
|
139
140
|
lang, feeds_path, endpoint = sys.argv[1], sys.argv[2], sys.argv[3]
|
|
141
|
+
if endpoint.strip().lower() in ("off", "none", "direct", "local"):
|
|
142
|
+
endpoint = ""
|
|
140
143
|
count = int(sys.argv[4]) if len(sys.argv) > 4 else 5
|
|
141
144
|
|
|
142
145
|
with open(feeds_path, encoding="utf-8") as f:
|
package/install.sh
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env sh
|
|
2
2
|
# newsline · installer — works from a local checkout OR piped from the web:
|
|
3
3
|
# ./install.sh
|
|
4
|
-
# curl -fsSL https://raw.githubusercontent.com/itdar/
|
|
4
|
+
# curl -fsSL https://raw.githubusercontent.com/itdar/newsline/master/install.sh | sh
|
|
5
5
|
# No build step; copies the scripts onto your PATH. Idempotent (safe to re-run).
|
|
6
6
|
set -eu
|
|
7
7
|
|
|
8
|
-
REPO="${NEWSLINE_REPO:-itdar/
|
|
8
|
+
REPO="${NEWSLINE_REPO:-itdar/newsline}"
|
|
9
9
|
REF="${NEWSLINE_REF:-master}"
|
|
10
10
|
PREFIX="${NEWSLINE_PREFIX:-$HOME/.local}"
|
|
11
11
|
SHARE="$PREFIX/share/newsline"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "newsline-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Locale-aware one-line news in your Claude Code status line — local, composes with your existing status line.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"newsline": "newsline"
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
],
|
|
29
29
|
"repository": {
|
|
30
30
|
"type": "git",
|
|
31
|
-
"url": "git+https://github.com/itdar/
|
|
31
|
+
"url": "git+https://github.com/itdar/newsline.git"
|
|
32
32
|
},
|
|
33
|
-
"homepage": "https://github.com/itdar/
|
|
33
|
+
"homepage": "https://github.com/itdar/newsline",
|
|
34
34
|
"license": "MIT"
|
|
35
35
|
}
|
package/readme/de.md
CHANGED
|
@@ -11,17 +11,23 @@ Eine rotierende regionale Schlagzeile sitzt am unteren Rand deiner Sitzung – s
|
|
|
11
11
|
ein schneller Blick in die Nachrichten. Sie erscheint *unter* deiner bestehenden Statusleiste (dein HUD
|
|
12
12
|
bleibt erhalten).
|
|
13
13
|
|
|
14
|
+
<p align="center"><img src="../docs/demo.gif" alt="newsline — rotierende regionale Schlagzeilen in der Claude-Code-Statusleiste" width="720"></p>
|
|
15
|
+
|
|
14
16
|
## Installieren & starten — eine Zeile
|
|
15
17
|
|
|
16
18
|
```sh
|
|
17
19
|
# curl (macOS / Linux / WSL) — installiert und richtet sofort ein
|
|
18
|
-
curl -fsSL https://raw.githubusercontent.com/itdar/
|
|
20
|
+
curl -fsSL https://raw.githubusercontent.com/itdar/newsline/master/install.sh | sh
|
|
19
21
|
|
|
20
22
|
# Homebrew
|
|
21
23
|
brew install itdar/tap/newsline && newsline init
|
|
22
24
|
|
|
23
25
|
# npm
|
|
24
26
|
npm i -g newsline-cli && newsline init
|
|
27
|
+
|
|
28
|
+
# Claude-Code-Plugin — in Claude Code ausführen, danach /newsline:setup
|
|
29
|
+
/plugin marketplace add itdar/newsline
|
|
30
|
+
/plugin install newsline@itdar
|
|
25
31
|
```
|
|
26
32
|
|
|
27
33
|
Die News-Zeile erscheint bei deiner **nächsten Nachricht** – kein Neustart nötig. Die Einrichtung fragt
|
|
@@ -36,6 +42,25 @@ nach Sprache und Thema und behält deine bestehende Statusleiste bei.
|
|
|
36
42
|
newsline auf die integrierten Feeds zurück**.
|
|
37
43
|
- Die Statusleiste ist sofort da (aus einem Cache); Aktualisierungen laufen im Hintergrund.
|
|
38
44
|
|
|
45
|
+
## Datenschutz
|
|
46
|
+
|
|
47
|
+
Alles, was auf deinem Rechner läuft, steht in diesem Repository — und das ist die
|
|
48
|
+
vollständige Liste dessen, was ihn je verlässt:
|
|
49
|
+
|
|
50
|
+
- **Feed-Kuratierung** (höchstens einmal pro Stunde): `lang`, grobes Land, Ortszeit,
|
|
51
|
+
Wochentag, Zeitzone, `topic` und die Plugin-Version gehen an den Edge-Dienst, damit er
|
|
52
|
+
aktuelle regionale Quellen auswählen kann. Keine Tracking-ID, keine persönlichen Daten.
|
|
53
|
+
- **Klicks auf Schlagzeilen**: Links öffnen sich über eine kleine Weiterleitung (sie sieht
|
|
54
|
+
die Artikel-URL plus `lang`/`topic`/Version), damit tote Quellen serverseitig ersetzt und
|
|
55
|
+
Klicks aggregiert gezählt werden können. Es gibt keine nutzerbezogene Kennung.
|
|
56
|
+
- **Nie gesendet, nie gelesen**: dein Code, deine Prompts, Dateien oder
|
|
57
|
+
Claude-Unterhaltungen. Die Statusleiste wird aus einem lokalen Cache gezeichnet und wartet
|
|
58
|
+
nie auf das Netzwerk.
|
|
59
|
+
|
|
60
|
+
**Vollständig lokaler Modus**: setze `"api": "off"` und `"endpoint": "off"` in
|
|
61
|
+
`~/.config/newsline/config.json` — die Feeds kommen aus der mitgelieferten `feeds.json`, und
|
|
62
|
+
Schlagzeilen verlinken direkt auf die Artikel. Außer den Feeds selbst wird nichts kontaktiert.
|
|
63
|
+
|
|
39
64
|
## Konfigurieren
|
|
40
65
|
|
|
41
66
|
Führe `newsline init` erneut aus oder bearbeite `~/.config/newsline/config.json`:
|
package/readme/es.md
CHANGED
|
@@ -10,17 +10,23 @@
|
|
|
10
10
|
Un titular regional rotativo aparece en la parte inferior de tu sesión, así una larga espera se convierte
|
|
11
11
|
en un vistazo rápido a las noticias. Se muestra *debajo* de tu barra de estado actual (tu HUD se mantiene).
|
|
12
12
|
|
|
13
|
+
<p align="center"><img src="../docs/demo.gif" alt="newsline — titulares regionales rotativos en la barra de estado de Claude Code" width="720"></p>
|
|
14
|
+
|
|
13
15
|
## Instalar y ejecutar — una línea
|
|
14
16
|
|
|
15
17
|
```sh
|
|
16
18
|
# curl (macOS / Linux / WSL) — instala y configura al instante
|
|
17
|
-
curl -fsSL https://raw.githubusercontent.com/itdar/
|
|
19
|
+
curl -fsSL https://raw.githubusercontent.com/itdar/newsline/master/install.sh | sh
|
|
18
20
|
|
|
19
21
|
# Homebrew
|
|
20
22
|
brew install itdar/tap/newsline && newsline init
|
|
21
23
|
|
|
22
24
|
# npm
|
|
23
25
|
npm i -g newsline-cli && newsline init
|
|
26
|
+
|
|
27
|
+
# Plugin de Claude Code — ejecútalo dentro de Claude Code y luego /newsline:setup
|
|
28
|
+
/plugin marketplace add itdar/newsline
|
|
29
|
+
/plugin install newsline@itdar
|
|
24
30
|
```
|
|
25
31
|
|
|
26
32
|
La línea de noticias aparece en tu **próximo mensaje**, sin reiniciar. La configuración te pregunta el
|
|
@@ -36,6 +42,24 @@ idioma y el tema, y conserva tu barra de estado actual.
|
|
|
36
42
|
- La barra de estado es instantánea (servida desde una caché); las actualizaciones se ejecutan en
|
|
37
43
|
segundo plano.
|
|
38
44
|
|
|
45
|
+
## Privacidad
|
|
46
|
+
|
|
47
|
+
Todo lo que se ejecuta en tu equipo está en este repositorio — y esta es la lista completa
|
|
48
|
+
de lo que sale de él:
|
|
49
|
+
|
|
50
|
+
- **Curación de feeds** (como máximo una vez por hora): `lang`, país aproximado, hora local,
|
|
51
|
+
día de la semana, zona horaria, `topic` y la versión del plugin se envían al servicio edge
|
|
52
|
+
para elegir fuentes regionales actualizadas. Sin ID de seguimiento, sin datos personales.
|
|
53
|
+
- **Clics en titulares**: los enlaces se abren a través de una pequeña redirección (ve la URL
|
|
54
|
+
del artículo más `lang`/`topic`/versión), para poder reemplazar fuentes caídas en el
|
|
55
|
+
servidor y contar los clics de forma agregada. No hay identificador por usuario.
|
|
56
|
+
- **Nunca se envía ni se lee**: tu código, prompts, archivos o conversaciones con Claude. La
|
|
57
|
+
barra de estado se dibuja desde una caché local y nunca espera a la red.
|
|
58
|
+
|
|
59
|
+
**Modo totalmente local**: pon `"api": "off"` y `"endpoint": "off"` en
|
|
60
|
+
`~/.config/newsline/config.json` — los feeds vienen del `feeds.json` incluido y los titulares
|
|
61
|
+
enlazan directamente a los artículos. No se contacta con nada salvo los propios feeds.
|
|
62
|
+
|
|
39
63
|
## Configurar
|
|
40
64
|
|
|
41
65
|
Vuelve a ejecutar `newsline init` o edita `~/.config/newsline/config.json`:
|
package/readme/fr.md
CHANGED
|
@@ -10,17 +10,23 @@
|
|
|
10
10
|
Un titre régional défile en bas de votre session : une longue attente se transforme en un coup d'œil
|
|
11
11
|
rapide à l'actualité. Il s'affiche *sous* votre barre d'état existante (votre HUD reste en place).
|
|
12
12
|
|
|
13
|
+
<p align="center"><img src="../docs/demo.gif" alt="newsline — titres régionaux défilants dans la barre d'état de Claude Code" width="720"></p>
|
|
14
|
+
|
|
13
15
|
## Installer et lancer — une ligne
|
|
14
16
|
|
|
15
17
|
```sh
|
|
16
18
|
# curl (macOS / Linux / WSL) — installe et configure immédiatement
|
|
17
|
-
curl -fsSL https://raw.githubusercontent.com/itdar/
|
|
19
|
+
curl -fsSL https://raw.githubusercontent.com/itdar/newsline/master/install.sh | sh
|
|
18
20
|
|
|
19
21
|
# Homebrew
|
|
20
22
|
brew install itdar/tap/newsline && newsline init
|
|
21
23
|
|
|
22
24
|
# npm
|
|
23
25
|
npm i -g newsline-cli && newsline init
|
|
26
|
+
|
|
27
|
+
# Plugin Claude Code — à lancer dans Claude Code, puis /newsline:setup
|
|
28
|
+
/plugin marketplace add itdar/newsline
|
|
29
|
+
/plugin install newsline@itdar
|
|
24
30
|
```
|
|
25
31
|
|
|
26
32
|
La ligne d'actualité apparaît dès votre **prochain message** — sans redémarrage. La configuration vous
|
|
@@ -36,6 +42,25 @@ demande une langue et un thème, et conserve votre barre d'état existante.
|
|
|
36
42
|
- La barre d'état est instantanée (servie depuis un cache) ; les rafraîchissements s'exécutent en
|
|
37
43
|
arrière-plan.
|
|
38
44
|
|
|
45
|
+
## Confidentialité
|
|
46
|
+
|
|
47
|
+
Tout ce qui s'exécute sur votre machine se trouve dans ce dépôt — et voici la liste complète
|
|
48
|
+
de ce qui en sort :
|
|
49
|
+
|
|
50
|
+
- **Curation des flux** (au plus une fois par heure) : `lang`, pays approximatif, heure
|
|
51
|
+
locale, jour de la semaine, fuseau horaire, `topic` et la version du plugin sont envoyés au
|
|
52
|
+
service edge pour choisir des sources régionales à jour. Pas d'ID de suivi, pas de données
|
|
53
|
+
personnelles.
|
|
54
|
+
- **Clics sur les titres** : les liens s'ouvrent via une petite redirection (elle voit l'URL
|
|
55
|
+
de l'article plus `lang`/`topic`/version), afin de remplacer côté serveur les sources mortes
|
|
56
|
+
et de compter les clics de façon agrégée. Aucun identifiant par utilisateur.
|
|
57
|
+
- **Jamais envoyé, jamais lu** : votre code, vos prompts, vos fichiers ou vos conversations
|
|
58
|
+
avec Claude. La barre d'état s'affiche depuis un cache local et n'attend jamais le réseau.
|
|
59
|
+
|
|
60
|
+
**Mode entièrement local** : mettez `"api": "off"` et `"endpoint": "off"` dans
|
|
61
|
+
`~/.config/newsline/config.json` — les flux viennent du `feeds.json` embarqué et les titres
|
|
62
|
+
pointent directement vers les articles. Rien d'autre que les flux eux-mêmes n'est contacté.
|
|
63
|
+
|
|
39
64
|
## Configurer
|
|
40
65
|
|
|
41
66
|
Relancez `newsline init`, ou modifiez `~/.config/newsline/config.json` :
|
package/readme/ja.md
CHANGED
|
@@ -10,17 +10,23 @@
|
|
|
10
10
|
地域のヘッドラインがセッション下部で切り替わり表示され、長い待ち時間がサッとニュースをチェックする
|
|
11
11
|
時間に変わります。既存のステータスライン(HUD)の **下の行に** 表示されるので、HUD はそのまま残ります。
|
|
12
12
|
|
|
13
|
+
<p align="center"><img src="../docs/demo.gif" alt="newsline — Claude Code のステータスラインで切り替わる地域ヘッドライン" width="720"></p>
|
|
14
|
+
|
|
13
15
|
## インストールと実行 — 一行で
|
|
14
16
|
|
|
15
17
|
```sh
|
|
16
18
|
# curl (macOS / Linux / WSL) — インストールとセットアップを一気に
|
|
17
|
-
curl -fsSL https://raw.githubusercontent.com/itdar/
|
|
19
|
+
curl -fsSL https://raw.githubusercontent.com/itdar/newsline/master/install.sh | sh
|
|
18
20
|
|
|
19
21
|
# Homebrew
|
|
20
22
|
brew install itdar/tap/newsline && newsline init
|
|
21
23
|
|
|
22
24
|
# npm
|
|
23
25
|
npm i -g newsline-cli && newsline init
|
|
26
|
+
|
|
27
|
+
# Claude Code プラグイン — Claude Code 内で実行し、その後 /newsline:setup
|
|
28
|
+
/plugin marketplace add itdar/newsline
|
|
29
|
+
/plugin install newsline@itdar
|
|
24
30
|
```
|
|
25
31
|
|
|
26
32
|
ニュース行は **次のメッセージ** で表示されます — 再起動は不要です。セットアップで言語とトピックを
|
|
@@ -35,6 +41,24 @@ npm i -g newsline-cli && newsline init
|
|
|
35
41
|
フォールバック** します。
|
|
36
42
|
- ステータスラインはキャッシュから **即座に** 表示され、更新はバックグラウンドで実行されます。
|
|
37
43
|
|
|
44
|
+
## プライバシー
|
|
45
|
+
|
|
46
|
+
あなたのマシンで動くコードはすべてこのリポジトリで公開されており、外部に送られる情報は以下が
|
|
47
|
+
すべてです:
|
|
48
|
+
|
|
49
|
+
- **フィードのキュレーション**(最大 1 時間に 1 回): 地域に合った最新ソースを選ぶため、`lang`、
|
|
50
|
+
おおまかな国、現地時刻、曜日、タイムゾーン、`topic`、プラグインのバージョンをエッジサービスに
|
|
51
|
+
送ります。トラッキング ID や個人情報はありません。
|
|
52
|
+
- **ヘッドラインのクリック時**: 停止したソースをサーバー側で差し替え、クリックを集計カウント
|
|
53
|
+
できるよう、小さなリダイレクトを経由します(記事 URL + `lang`/`topic`/バージョンのみ)。
|
|
54
|
+
ユーザーごとの識別子はありません。
|
|
55
|
+
- **決して送信・閲覧しないもの**: コード、プロンプト、ファイル、Claude との会話。ステータス
|
|
56
|
+
ラインはネットワークを待たず、ローカルキャッシュから描画されます。
|
|
57
|
+
|
|
58
|
+
**完全ローカルモード**: `~/.config/newsline/config.json` に `"api": "off"` と
|
|
59
|
+
`"endpoint": "off"` を設定すると、フィードは同梱の `feeds.json` のみを使い、ヘッドラインは記事に
|
|
60
|
+
直接リンクします。ニュースフィード以外にはどこにも接続しません。
|
|
61
|
+
|
|
38
62
|
## 設定
|
|
39
63
|
|
|
40
64
|
`newsline init` を再実行するか、`~/.config/newsline/config.json` を編集します:
|
package/readme/ko.md
CHANGED
|
@@ -10,17 +10,23 @@
|
|
|
10
10
|
긴 작업을 기다리는 시간이 뉴스 한 번 훑는 시간이 됩니다 — 세션 하단에 지역 맞춤 헤드라인이
|
|
11
11
|
회전 표시됩니다. 기존 상태줄(HUD) **아래 줄에** 붙어서, HUD는 그대로 보입니다.
|
|
12
12
|
|
|
13
|
+
<p align="center"><img src="../docs/demo.gif" alt="newsline — Claude Code 상태줄에 회전하는 지역 헤드라인" width="720"></p>
|
|
14
|
+
|
|
13
15
|
## 설치 & 실행 — 한 줄
|
|
14
16
|
|
|
15
17
|
```sh
|
|
16
18
|
# curl (macOS / Linux / WSL) — 설치 + 셋업까지 바로
|
|
17
|
-
curl -fsSL https://raw.githubusercontent.com/itdar/
|
|
19
|
+
curl -fsSL https://raw.githubusercontent.com/itdar/newsline/master/install.sh | sh
|
|
18
20
|
|
|
19
21
|
# Homebrew
|
|
20
22
|
brew install itdar/tap/newsline && newsline init
|
|
21
23
|
|
|
22
24
|
# npm
|
|
23
25
|
npm i -g newsline-cli && newsline init
|
|
26
|
+
|
|
27
|
+
# Claude Code 플러그인 — Claude Code 안에서 실행 후 /newsline:setup
|
|
28
|
+
/plugin marketplace add itdar/newsline
|
|
29
|
+
/plugin install newsline@itdar
|
|
24
30
|
```
|
|
25
31
|
|
|
26
32
|
뉴스 줄은 **다음 메시지 때** 나타납니다 — 재시작 불필요. 셋업은 언어·분야를 물어보고, 기존
|
|
@@ -33,6 +39,22 @@ npm i -g newsline-cli && newsline init
|
|
|
33
39
|
재설치 없이 소스가 최신으로 유지되고, 엣지가 불통이면 **내장 피드로 자동 폴백**합니다.
|
|
34
40
|
- 상태줄은 캐시에서 **즉시** 표시되고, 갱신은 백그라운드에서 돕니다.
|
|
35
41
|
|
|
42
|
+
## 프라이버시
|
|
43
|
+
|
|
44
|
+
내 컴퓨터에서 도는 코드는 전부 이 저장소에 공개돼 있고, 밖으로 나가는 정보는 아래가 전부입니다:
|
|
45
|
+
|
|
46
|
+
- **피드 큐레이션** (최대 1시간에 1번): 지역에 맞는 최신 소스를 고르기 위해 `lang`, 대략적인
|
|
47
|
+
국가, 현지 시각, 요일, 타임존, `topic`, 플러그인 버전을 엣지 서비스로 보냅니다. 추적 ID·개인정보
|
|
48
|
+
없음.
|
|
49
|
+
- **헤드라인 클릭 시**: 죽은 소스를 서버에서 교체하고 클릭을 집계 카운트할 수 있도록 작은
|
|
50
|
+
리다이렉트를 경유합니다(기사 URL + `lang`/`topic`/버전만 전달). 사용자별 식별자는 없습니다.
|
|
51
|
+
- **절대 전송·열람하지 않는 것**: 코드, 프롬프트, 파일, Claude 대화. 상태줄은 네트워크를 기다리지
|
|
52
|
+
않고 로컬 캐시에서 그립니다.
|
|
53
|
+
|
|
54
|
+
**완전 로컬 모드**: `~/.config/newsline/config.json`에 `"api": "off"`, `"endpoint": "off"`를 넣으면
|
|
55
|
+
피드는 내장 `feeds.json`만 쓰고 헤드라인은 기사로 바로 연결됩니다. 뉴스 피드 외에는 아무 곳에도
|
|
56
|
+
접속하지 않습니다.
|
|
57
|
+
|
|
36
58
|
## 설정
|
|
37
59
|
|
|
38
60
|
`newsline init` 재실행 또는 `~/.config/newsline/config.json` 편집:
|
package/readme/pt.md
CHANGED
|
@@ -10,17 +10,23 @@
|
|
|
10
10
|
Uma manchete regional rotativa fica na parte de baixo da sua sessão — então uma longa espera vira uma
|
|
11
11
|
olhada rápida nas notícias. Ela aparece *abaixo* da sua barra de status atual (seu HUD permanece).
|
|
12
12
|
|
|
13
|
+
<p align="center"><img src="../docs/demo.gif" alt="newsline — manchetes regionais rotativas na barra de status do Claude Code" width="720"></p>
|
|
14
|
+
|
|
13
15
|
## Instalar e executar — uma linha
|
|
14
16
|
|
|
15
17
|
```sh
|
|
16
18
|
# curl (macOS / Linux / WSL) — instala e configura na hora
|
|
17
|
-
curl -fsSL https://raw.githubusercontent.com/itdar/
|
|
19
|
+
curl -fsSL https://raw.githubusercontent.com/itdar/newsline/master/install.sh | sh
|
|
18
20
|
|
|
19
21
|
# Homebrew
|
|
20
22
|
brew install itdar/tap/newsline && newsline init
|
|
21
23
|
|
|
22
24
|
# npm
|
|
23
25
|
npm i -g newsline-cli && newsline init
|
|
26
|
+
|
|
27
|
+
# Plugin do Claude Code — execute dentro do Claude Code e depois /newsline:setup
|
|
28
|
+
/plugin marketplace add itdar/newsline
|
|
29
|
+
/plugin install newsline@itdar
|
|
24
30
|
```
|
|
25
31
|
|
|
26
32
|
A linha de notícias aparece na sua **próxima mensagem** — sem reiniciar. A configuração pergunta o
|
|
@@ -35,6 +41,24 @@ idioma e o tema, e mantém a sua barra de status atual.
|
|
|
35
41
|
integrados como alternativa**.
|
|
36
42
|
- A barra de status é instantânea (servida de um cache); as atualizações rodam em segundo plano.
|
|
37
43
|
|
|
44
|
+
## Privacidade
|
|
45
|
+
|
|
46
|
+
Tudo o que roda na sua máquina está neste repositório — e esta é a lista completa do que
|
|
47
|
+
sai dela:
|
|
48
|
+
|
|
49
|
+
- **Curadoria de feeds** (no máximo uma vez por hora): `lang`, país aproximado, hora local,
|
|
50
|
+
dia da semana, fuso horário, `topic` e a versão do plugin são enviados ao serviço edge para
|
|
51
|
+
escolher fontes regionais atualizadas. Sem ID de rastreamento, sem dados pessoais.
|
|
52
|
+
- **Cliques nas manchetes**: os links abrem por um pequeno redirecionamento (ele vê a URL do
|
|
53
|
+
artigo mais `lang`/`topic`/versão), para trocar fontes mortas no servidor e contar cliques
|
|
54
|
+
de forma agregada. Não há identificador por usuário.
|
|
55
|
+
- **Nunca enviado, nunca lido**: seu código, prompts, arquivos ou conversas com o Claude. A
|
|
56
|
+
barra de status é desenhada de um cache local e nunca espera pela rede.
|
|
57
|
+
|
|
58
|
+
**Modo totalmente local**: defina `"api": "off"` e `"endpoint": "off"` em
|
|
59
|
+
`~/.config/newsline/config.json` — os feeds vêm do `feeds.json` incluído e as manchetes
|
|
60
|
+
apontam direto para os artigos. Nada além dos próprios feeds é contatado.
|
|
61
|
+
|
|
38
62
|
## Configurar
|
|
39
63
|
|
|
40
64
|
Execute `newsline init` novamente ou edite `~/.config/newsline/config.json`:
|
package/readme/zh.md
CHANGED
|
@@ -10,17 +10,23 @@
|
|
|
10
10
|
一条轮播的区域头条位于会话底部——漫长的等待就变成了快速浏览新闻的时间。它显示在你现有状态栏的
|
|
11
11
|
*下方*(你的 HUD 保持不变)。
|
|
12
12
|
|
|
13
|
+
<p align="center"><img src="../docs/demo.gif" alt="newsline — 在 Claude Code 状态栏中轮播的区域头条" width="720"></p>
|
|
14
|
+
|
|
13
15
|
## 安装并运行 — 一行搞定
|
|
14
16
|
|
|
15
17
|
```sh
|
|
16
18
|
# curl (macOS / Linux / WSL) — 安装并立即完成设置
|
|
17
|
-
curl -fsSL https://raw.githubusercontent.com/itdar/
|
|
19
|
+
curl -fsSL https://raw.githubusercontent.com/itdar/newsline/master/install.sh | sh
|
|
18
20
|
|
|
19
21
|
# Homebrew
|
|
20
22
|
brew install itdar/tap/newsline && newsline init
|
|
21
23
|
|
|
22
24
|
# npm
|
|
23
25
|
npm i -g newsline-cli && newsline init
|
|
26
|
+
|
|
27
|
+
# Claude Code 插件 — 在 Claude Code 内执行,然后运行 /newsline:setup
|
|
28
|
+
/plugin marketplace add itdar/newsline
|
|
29
|
+
/plugin install newsline@itdar
|
|
24
30
|
```
|
|
25
31
|
|
|
26
32
|
新闻行会在你的 **下一条消息** 时出现——无需重启。设置会询问语言和主题,并保留你现有的状态栏。
|
|
@@ -32,6 +38,21 @@ npm i -g newsline-cli && newsline init
|
|
|
32
38
|
若无法连接,newsline 会 **回退到内置源**。
|
|
33
39
|
- 状态栏即时显示(来自缓存);刷新在后台进行。
|
|
34
40
|
|
|
41
|
+
## 隐私
|
|
42
|
+
|
|
43
|
+
在你电脑上运行的所有代码都在这个仓库里——以下就是会离开你机器的全部信息:
|
|
44
|
+
|
|
45
|
+
- **新闻源筛选**(每小时最多一次):`lang`、粗略的国家、当地时间、星期、时区、`topic` 和插件
|
|
46
|
+
版本会发送到边缘服务,以便挑选最新的区域新闻源。没有跟踪 ID,没有个人数据。
|
|
47
|
+
- **点击头条时**:链接经由一个小型重定向打开(它只看到文章 URL 加 `lang`/`topic`/版本),以便在
|
|
48
|
+
服务器端替换失效的新闻源并做聚合点击统计。没有任何按用户区分的标识符。
|
|
49
|
+
- **绝不发送、绝不读取**:你的代码、提示词、文件或与 Claude 的对话。状态栏从本地缓存渲染,
|
|
50
|
+
从不等待网络。
|
|
51
|
+
|
|
52
|
+
**完全本地模式**:在 `~/.config/newsline/config.json` 中设置 `"api": "off"` 和
|
|
53
|
+
`"endpoint": "off"` —— 新闻源只使用内置的 `feeds.json`,头条直接链接到文章。除了新闻源本身,
|
|
54
|
+
不会联系任何服务。
|
|
55
|
+
|
|
35
56
|
## 配置
|
|
36
57
|
|
|
37
58
|
重新运行 `newsline init`,或编辑 `~/.config/newsline/config.json`:
|
package/refresh.sh
CHANGED
|
@@ -15,10 +15,15 @@ FEEDS="${NEWSLINE_FEEDS:-$HERE/feeds.json}"
|
|
|
15
15
|
# The redirect wrapper you control. This is the ONE remote piece — clicks pass
|
|
16
16
|
# through it so monetization can be switched on later WITHOUT re-shipping.
|
|
17
17
|
ENDPOINT="${NEWSLINE_ENDPOINT:-https://newsline.thesockerrr.workers.dev/r}"
|
|
18
|
+
# "off" (also none/direct/local) links headlines straight to the article — no redirect
|
|
19
|
+
case "$ENDPOINT" in off|OFF|none|direct|local) ENDPOINT="" ;; esac
|
|
20
|
+
# Curation API base; "off" (also none/local) skips it entirely — bundled feeds only
|
|
21
|
+
API="${NEWSLINE_API:-https://newsline.thesockerrr.workers.dev}"
|
|
22
|
+
case "$API" in off|OFF|none|local) API="" ;; esac
|
|
18
23
|
COUNT="${NEWSLINE_COUNT:-15}" # how many headlines to cache for rotation
|
|
19
24
|
# Client version, sent to /feed as ?v= for the server-side update nudge.
|
|
20
25
|
# Bump together with package.json when tagging a release.
|
|
21
|
-
export NEWSLINE_VERSION="${NEWSLINE_VERSION:-0.1.
|
|
26
|
+
export NEWSLINE_VERSION="${NEWSLINE_VERSION:-0.1.6}"
|
|
22
27
|
LOCK="$CACHE_DIR/refresh.lock"
|
|
23
28
|
mkdir -p "$CACHE_DIR" 2>/dev/null
|
|
24
29
|
|
|
@@ -75,7 +80,7 @@ if [ -s "$RESOLVED" ] && [ -f "$RESOLVE_STAMP" ]; then
|
|
|
75
80
|
[ $((now - smt)) -lt "$RESOLVE_TTL" ] && need_resolve=0
|
|
76
81
|
fi
|
|
77
82
|
if [ "$need_resolve" = "1" ]; then
|
|
78
|
-
if python3 "$HERE/resolve.py" "$lang" "$FEEDS" "$
|
|
83
|
+
if python3 "$HERE/resolve.py" "$lang" "$FEEDS" "$API" > "$RESOLVED.tmp" 2>/dev/null \
|
|
79
84
|
&& [ -s "$RESOLVED.tmp" ]; then
|
|
80
85
|
mv -f "$RESOLVED.tmp" "$RESOLVED"
|
|
81
86
|
touch "$RESOLVE_STAMP"
|
|
@@ -105,7 +110,7 @@ if [ -n "$msg" ]; then
|
|
|
105
110
|
case "$HERE" in # install channel by where we live
|
|
106
111
|
*"/node_modules/"*) ucmd="npm i -g newsline-cli" ;;
|
|
107
112
|
*[Cc]ellar*|*linuxbrew*) ucmd="brew upgrade newsline" ;;
|
|
108
|
-
*) ucmd="curl -fsSL https://raw.githubusercontent.com/itdar/
|
|
113
|
+
*) ucmd="curl -fsSL https://raw.githubusercontent.com/itdar/newsline/master/install.sh | sh" ;;
|
|
109
114
|
esac
|
|
110
115
|
# yellow line, command in bold bright yellow — mirrors Claude Code's own update nudge
|
|
111
116
|
printf '\033[33m[%s] Run: \033[1;93m%s\033[0m\n' "$msg" "$ucmd" > "$NOTICE.tmp" && mv -f "$NOTICE.tmp" "$NOTICE"
|