Skip to content

Commit 2420ee4

Browse files
committed
feat: 데이터를 보일 때 rich를 사용하지 않는 --no-rich-data 추가
1 parent e961845 commit 2420ee4

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/httpc/_base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ def _extract_next_data_cli() -> None:
149149
parser.add_argument("--include", "-i", action="append", type=str, default=[], help="Include only specific prefixes.")
150150
parser.add_argument("--exclude", "-x", action="append", type=str, default=[], help="Exclude specific prefixes.")
151151
parser.add_argument("--outline", nargs="?", type=int, default=_NOTSET, help="Show a outline for the data.")
152+
parser.add_argument("--no-rich-data", "-n", action="store_true", help="Do not use rich for data output.")
152153
args = parser.parse_args()
153154
# return print(args)
154155

@@ -211,7 +212,10 @@ def _extract_next_data_cli() -> None:
211212
if not args.include_prefixed and item.prefix:
212213
continue
213214
console.rule(f"[b]{item.hexdigit} start[/b]")
214-
console.print(item.value)
215+
if args.no_rich_data:
216+
print(item.value)
217+
else:
218+
console.print(item.value)
215219
console.rule(f"[b]{item.hexdigit} end [/b]")
216220
return
217221

0 commit comments

Comments
 (0)