hidely-cli: add a --json option to `list`
まだ誰も着手していません。
評価
調査の方向性
crates/hidely-cli/src/main.rs から始めてください。ここには list コマンドと USAGE テキストがあります。次に crates/hidely-core/src/windows.rs の list_windows(None) と WindowInfo 型、そして excluded フラグのために display_affinity(hwnd) を読んでください。crates/hidely-cli/Cargo.toml に serde_json を追加し、list --json がイシューに示されたフィールドを持つオブジェクトをウィンドウごとに 1 つ出力するようにしてください。cargo test --workspace と cargo build --workspace が成功し、通常の list の出力が変わらず、README のコマンド一覧にそのフラグが記載されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
hidely-cli list prints a table for people. Scripts would rather have JSON.
What to do
In crates/hidely-cli/src/main.rs, accept hidely-cli list --json and print a JSON array with one object per window:
[
{ "hwnd": "0x1a2b3c", "process": "notepad", "exe": "notepad.exe", "title": "notes.txt - Notepad", "excluded_from_capture": false }
]
- The data is already there:
list_windows(None)returnsWindowInfovalues (seewindows.rs), anddisplay_affinity(hwnd)says whether a window is excluded. - Add
serde_jsontocrates/hidely-cli/Cargo.tomland build the output withserde_json::json!, so titles with quotes or backslashes are escaped correctly. hidely-cli listwithout the flag must print exactly what it prints today.- Add the option to the
USAGEtext at the top of the file and to the command list in the README.
Done when
hidely-cli list --jsonprints valid JSON (try piping it intoConvertFrom-Jsonin PowerShell).- Plain
hidely-cli listis unchanged. cargo test --workspaceandcargo build --workspacepass.
- 主要言語
- Rust
- スター
- 7
- フォーク
- 1
- 平均マージ
- 6時間 34分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CodingRule/Hidely のほかの issue
-
accessibility help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
CodingRule/Hidely#15 ·
-
compatibility help wanted testing
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
CodingRule/Hidely#14 ·
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
CodingRule/Hidely#13 ·
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
CodingRule/Hidely#12 ·
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
CodingRule/Hidely#2 ·
CodingRule/Hidely の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
autofixer: follow-up
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
tursodatabase/turso#12531 ·
メンテナーはふだん 1 日以内に返信
-
bug help wanted ui
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
userFRM/egui-charts#4292 ·
メンテナーはふだん 1 日以内に返信
-
Issue-Bug Need-Review
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
PowerShell/DSC#1832 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信