llm-api-scope 0.3.0__tar.gz → 0.3.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.
- {llm_api_scope-0.3.0/llm_api_scope.egg-info → llm_api_scope-0.3.1}/PKG-INFO +1 -1
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/commands/note/commands.py +6 -18
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1/llm_api_scope.egg-info}/PKG-INFO +1 -1
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/pyproject.toml +1 -1
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/LICENSE +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/README.md +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/__init__.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/cli.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/commands/__init__.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/commands/describe.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/commands/init.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/commands/list.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/commands/note/__init__.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/commands/note/constants.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/commands/note/core.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/commands/note/utils.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/commands/search.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/core/__init__.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/core/clustering.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/core/config.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/core/output.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/core/parser.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/apiscope/core/trie.py +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/llm_api_scope.egg-info/SOURCES.txt +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/llm_api_scope.egg-info/dependency_links.txt +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/llm_api_scope.egg-info/entry_points.txt +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/llm_api_scope.egg-info/requires.txt +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/llm_api_scope.egg-info/top_level.txt +0 -0
- {llm_api_scope-0.3.0 → llm_api_scope-0.3.1}/setup.cfg +0 -0
|
@@ -115,33 +115,21 @@ def write(ctx, author, note_type, context):
|
|
|
115
115
|
output.emit(to_stderr=True)
|
|
116
116
|
ctx.exit(1)
|
|
117
117
|
|
|
118
|
-
# 2d.
|
|
119
|
-
click.echo("Please start writing (multiple lines, Ctrl+D to finish):", err=True)
|
|
120
|
-
|
|
121
|
-
# 2e. read user input from stdin
|
|
122
|
-
try:
|
|
123
|
-
user_content = sys.stdin.read()
|
|
124
|
-
except KeyboardInterrupt:
|
|
125
|
-
output.error("Write operation cancelled by user.")
|
|
126
|
-
output.emit(to_stderr=True)
|
|
127
|
-
ctx.exit(1)
|
|
128
|
-
|
|
129
|
-
# 2f. parse timestamp to human-readable format
|
|
118
|
+
# 2d. parse timestamp to human-readable format
|
|
130
119
|
dt = datetime.strptime(timestamp, "%Y%m%d_%H%M%S")
|
|
131
120
|
human_time = dt.strftime("%Y-%m-%d %H:%M:%S")
|
|
132
121
|
|
|
133
|
-
#
|
|
122
|
+
# 2e. build content using template
|
|
134
123
|
template = TEMPLATES[note_type]["context_template"]
|
|
135
|
-
|
|
124
|
+
content = template.format(
|
|
136
125
|
author=author,
|
|
137
126
|
time=human_time,
|
|
138
127
|
context=context
|
|
139
128
|
)
|
|
140
129
|
|
|
141
|
-
#
|
|
130
|
+
# 2f. write content to file
|
|
142
131
|
with open(note_path, "w", encoding="utf-8") as f:
|
|
143
|
-
f.write(
|
|
144
|
-
f.write(user_content)
|
|
132
|
+
f.write(content + "\n")
|
|
145
133
|
|
|
146
134
|
# 2i. remove lock file
|
|
147
135
|
lock_path.unlink()
|
|
@@ -177,7 +165,7 @@ def write(ctx, author, note_type, context):
|
|
|
177
165
|
output.result(f"Author: {author}")
|
|
178
166
|
output.result(f"Note type: {note_type}")
|
|
179
167
|
question = TEMPLATES[note_type]["question_template"].format(context=context)
|
|
180
|
-
output.
|
|
168
|
+
output.note(question)
|
|
181
169
|
output.complete("Note Creation")
|
|
182
170
|
output.emit()
|
|
183
171
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|