statusline 0.1.0__tar.gz → 0.1.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statusline
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Tiny single-line status updater for CLI
5
5
  Author-email: Hunhee Choi <hunhee9982@gmail.com>
6
6
  License: MIT License
@@ -53,10 +53,18 @@ Made because I got tired of spamming `print()` in brute-force / crawling / long
53
53
  - If the message starts with `[CHECKING]` (or your custom prefix), it **updates in-place** on a single line (loading-bar vibe).
54
54
  - Otherwise, it prints a **persistent result line** (won’t be overwritten).
55
55
 
56
+ ## Install (PyPI)
57
+
58
+ ```bash
59
+ python -m pip install statusline
60
+ ```
61
+
56
62
  ## Install (editable / dev)
57
63
 
58
64
  ```bash
59
- pip install -e .
65
+ git clone https://github.com/hunhee99/statusline.git
66
+ cd statusline
67
+ python -m pip install -e .
60
68
  ```
61
69
 
62
70
  Tip: If you're using a specific interpreter/venv, always install with that same Python:
@@ -65,6 +73,19 @@ Tip: If you're using a specific interpreter/venv, always install with that same
65
73
  python -m pip install -e .
66
74
  ```
67
75
 
76
+ ## Versioning / Release Notes
77
+
78
+ - PyPI publishes versioned releases. Install a specific version like:
79
+
80
+ ```bash
81
+ python -m pip install statusline==X.Y.Z
82
+ ```
83
+
84
+ - Git tags match released versions. Check tags or release notes on GitHub if you need
85
+ changelogs or want to pin a specific release.
86
+
87
+ - Note: `0.1.1` removes the `enabled` argument from `StatusLine` to simplify behavior.
88
+
68
89
  ## Usage
69
90
 
70
91
  ```python
@@ -85,39 +106,3 @@ your language server is probably using a different interpreter. Select the same
85
106
  you used to install this package and restart the language server.
86
107
 
87
108
  ---
88
-
89
- ## statusline (한국어)
90
-
91
- CLI에서 로그 찍는 게 귀찮아서 만든 초경량(의존성 없음) 상태 출력 유틸.
92
- 브루트포스/크롤링/긴 반복문 돌릴 때 `print()` 난사하기 싫어서 만들었음.
93
-
94
- ### 기능
95
-
96
- emit() 하나로 자동 분기됨:
97
- - 메시지가 [CHECKING](또는 커스텀 prefix)로 시작하면 한 줄에서 계속 갱신됨(로딩바 느낌)
98
- - 그 외 메시지는 결과 로그로 확정 출력되어 절대 안 지워짐
99
-
100
- ### 설치 (editable / 개발용)
101
-
102
- ```bash
103
- pip install -e .
104
- ```
105
-
106
- 팁: 인터프리터/venv를 쓰고 있다면, 항상 같은 파이썬으로 설치해야 함:
107
-
108
- ```bash
109
- python -m pip install -e .
110
- ```
111
-
112
- ### 사용법
113
-
114
- ```python
115
- from statusline import StatusLine
116
-
117
- st = StatusLine() # StatusLine(checking_prefix="[PROGRESS]") 처럼 prefix 변경도 가능
118
-
119
- st.emit("[CHECKING] 뭐시기...") # 같은 줄에서 계속 갱신됨
120
- st.emit("[CHECKING] 더 뭐시기...")
121
-
122
- st.emit("지워지지 말거라!") # 결과는 개행으로 확정 출력(안 사라짐)
123
- ```
@@ -10,10 +10,18 @@ Made because I got tired of spamming `print()` in brute-force / crawling / long
10
10
  - If the message starts with `[CHECKING]` (or your custom prefix), it **updates in-place** on a single line (loading-bar vibe).
11
11
  - Otherwise, it prints a **persistent result line** (won’t be overwritten).
12
12
 
13
+ ## Install (PyPI)
14
+
15
+ ```bash
16
+ python -m pip install statusline
17
+ ```
18
+
13
19
  ## Install (editable / dev)
14
20
 
15
21
  ```bash
16
- pip install -e .
22
+ git clone https://github.com/hunhee99/statusline.git
23
+ cd statusline
24
+ python -m pip install -e .
17
25
  ```
18
26
 
19
27
  Tip: If you're using a specific interpreter/venv, always install with that same Python:
@@ -22,6 +30,19 @@ Tip: If you're using a specific interpreter/venv, always install with that same
22
30
  python -m pip install -e .
23
31
  ```
24
32
 
33
+ ## Versioning / Release Notes
34
+
35
+ - PyPI publishes versioned releases. Install a specific version like:
36
+
37
+ ```bash
38
+ python -m pip install statusline==X.Y.Z
39
+ ```
40
+
41
+ - Git tags match released versions. Check tags or release notes on GitHub if you need
42
+ changelogs or want to pin a specific release.
43
+
44
+ - Note: `0.1.1` removes the `enabled` argument from `StatusLine` to simplify behavior.
45
+
25
46
  ## Usage
26
47
 
27
48
  ```python
@@ -42,39 +63,3 @@ your language server is probably using a different interpreter. Select the same
42
63
  you used to install this package and restart the language server.
43
64
 
44
65
  ---
45
-
46
- ## statusline (한국어)
47
-
48
- CLI에서 로그 찍는 게 귀찮아서 만든 초경량(의존성 없음) 상태 출력 유틸.
49
- 브루트포스/크롤링/긴 반복문 돌릴 때 `print()` 난사하기 싫어서 만들었음.
50
-
51
- ### 기능
52
-
53
- emit() 하나로 자동 분기됨:
54
- - 메시지가 [CHECKING](또는 커스텀 prefix)로 시작하면 한 줄에서 계속 갱신됨(로딩바 느낌)
55
- - 그 외 메시지는 결과 로그로 확정 출력되어 절대 안 지워짐
56
-
57
- ### 설치 (editable / 개발용)
58
-
59
- ```bash
60
- pip install -e .
61
- ```
62
-
63
- 팁: 인터프리터/venv를 쓰고 있다면, 항상 같은 파이썬으로 설치해야 함:
64
-
65
- ```bash
66
- python -m pip install -e .
67
- ```
68
-
69
- ### 사용법
70
-
71
- ```python
72
- from statusline import StatusLine
73
-
74
- st = StatusLine() # StatusLine(checking_prefix="[PROGRESS]") 처럼 prefix 변경도 가능
75
-
76
- st.emit("[CHECKING] 뭐시기...") # 같은 줄에서 계속 갱신됨
77
- st.emit("[CHECKING] 더 뭐시기...")
78
-
79
- st.emit("지워지지 말거라!") # 결과는 개행으로 확정 출력(안 사라짐)
80
- ```
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "statusline"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "Tiny single-line status updater for CLI"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -26,4 +26,4 @@ classifiers = [
26
26
  [project.urls]
27
27
  Homepage = "https://github.com/hunhee99/statusline"
28
28
  Repository = "https://github.com/hunhee99/statusline"
29
- Issues = "https://github.com/hunhee99/statusline/issues"
29
+ Issues = "https://github.com/hunhee99/statusline/issues"
@@ -0,0 +1,9 @@
1
+ from .core import StatusLine
2
+ from importlib.metadata import version, PackageNotFoundError
3
+
4
+ __all__ = ["StatusLine"]
5
+
6
+ try:
7
+ __version__ = version("statusline")
8
+ except PackageNotFoundError:
9
+ __version__ = "0.0.0"
@@ -1,20 +1,15 @@
1
1
  class StatusLine:
2
- def __init__(self, enabled=True, checking_prefix="[CHECKING]"):
3
- self.enabled = enabled
2
+ """Single-line progress/status logger for CLI scripts."""
3
+ def __init__(self, checking_prefix="[CHECKING]"):
4
4
  self.prev_len = 0
5
5
  self.checking_prefix = checking_prefix
6
6
 
7
7
  def update_log(self, msg: str):
8
- if not self.enabled:
9
- return
10
8
  width = max(self.prev_len, len(msg))
11
9
  print(f"\r{msg:<{width}}", end="", flush=True)
12
10
  self.prev_len = width
13
11
 
14
12
  def result_log(self, msg: str):
15
- if not self.enabled:
16
- print(msg)
17
- return
18
13
  width = max(self.prev_len, len(msg))
19
14
  print(f"\r{msg:<{width}}")
20
15
  self.prev_len = 0
@@ -23,4 +18,4 @@ class StatusLine:
23
18
  if msg.startswith(self.checking_prefix):
24
19
  self.update_log(msg)
25
20
  else:
26
- self.result_log(msg)
21
+ self.result_log(msg)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: statusline
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Tiny single-line status updater for CLI
5
5
  Author-email: Hunhee Choi <hunhee9982@gmail.com>
6
6
  License: MIT License
@@ -53,10 +53,18 @@ Made because I got tired of spamming `print()` in brute-force / crawling / long
53
53
  - If the message starts with `[CHECKING]` (or your custom prefix), it **updates in-place** on a single line (loading-bar vibe).
54
54
  - Otherwise, it prints a **persistent result line** (won’t be overwritten).
55
55
 
56
+ ## Install (PyPI)
57
+
58
+ ```bash
59
+ python -m pip install statusline
60
+ ```
61
+
56
62
  ## Install (editable / dev)
57
63
 
58
64
  ```bash
59
- pip install -e .
65
+ git clone https://github.com/hunhee99/statusline.git
66
+ cd statusline
67
+ python -m pip install -e .
60
68
  ```
61
69
 
62
70
  Tip: If you're using a specific interpreter/venv, always install with that same Python:
@@ -65,6 +73,19 @@ Tip: If you're using a specific interpreter/venv, always install with that same
65
73
  python -m pip install -e .
66
74
  ```
67
75
 
76
+ ## Versioning / Release Notes
77
+
78
+ - PyPI publishes versioned releases. Install a specific version like:
79
+
80
+ ```bash
81
+ python -m pip install statusline==X.Y.Z
82
+ ```
83
+
84
+ - Git tags match released versions. Check tags or release notes on GitHub if you need
85
+ changelogs or want to pin a specific release.
86
+
87
+ - Note: `0.1.1` removes the `enabled` argument from `StatusLine` to simplify behavior.
88
+
68
89
  ## Usage
69
90
 
70
91
  ```python
@@ -85,39 +106,3 @@ your language server is probably using a different interpreter. Select the same
85
106
  you used to install this package and restart the language server.
86
107
 
87
108
  ---
88
-
89
- ## statusline (한국어)
90
-
91
- CLI에서 로그 찍는 게 귀찮아서 만든 초경량(의존성 없음) 상태 출력 유틸.
92
- 브루트포스/크롤링/긴 반복문 돌릴 때 `print()` 난사하기 싫어서 만들었음.
93
-
94
- ### 기능
95
-
96
- emit() 하나로 자동 분기됨:
97
- - 메시지가 [CHECKING](또는 커스텀 prefix)로 시작하면 한 줄에서 계속 갱신됨(로딩바 느낌)
98
- - 그 외 메시지는 결과 로그로 확정 출력되어 절대 안 지워짐
99
-
100
- ### 설치 (editable / 개발용)
101
-
102
- ```bash
103
- pip install -e .
104
- ```
105
-
106
- 팁: 인터프리터/venv를 쓰고 있다면, 항상 같은 파이썬으로 설치해야 함:
107
-
108
- ```bash
109
- python -m pip install -e .
110
- ```
111
-
112
- ### 사용법
113
-
114
- ```python
115
- from statusline import StatusLine
116
-
117
- st = StatusLine() # StatusLine(checking_prefix="[PROGRESS]") 처럼 prefix 변경도 가능
118
-
119
- st.emit("[CHECKING] 뭐시기...") # 같은 줄에서 계속 갱신됨
120
- st.emit("[CHECKING] 더 뭐시기...")
121
-
122
- st.emit("지워지지 말거라!") # 결과는 개행으로 확정 출력(안 사라짐)
123
- ```
@@ -1,3 +0,0 @@
1
- from .core import StatusLine
2
-
3
- __all__ = ["StatusLine"]
File without changes
File without changes