@nomadamas/k-skill 0.2.0 → 0.2.2
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/bin/k-skill.js +0 -0
- package/package.json +1 -1
- package/skills/fine-dust-location/instruction.md +1 -1
- package/skills/fine-dust-location/scripts/fine_dust.py +549 -0
- package/skills/fine-dust-location/skill.json +7 -1
- package/skills/gangnamunni-clinic-search/instruction.md +16 -8
- package/skills/hankookilbo-news/instruction.md +143 -0
- package/skills/hankookilbo-news/skill.json +8 -0
- package/skills/k-skill-setup/instruction.md +1 -1
- package/skills/k-skill-setup/scripts/check-setup.sh +29 -0
- package/skills/k-skill-setup/skill.json +7 -1
- package/skills/kosis-stats/instruction.md +24 -3
- package/skills/kosis-stats/references/kosis-openapi-guide.md +5 -1
- package/skills/kosis-stats/scripts/run_kosis_stats.py +1 -1
- package/skills/ktx-booking/instruction.md +15 -15
- package/skills/ktx-booking/scripts/ktx_booking.py +1316 -0
- package/skills/ktx-booking/skill.json +7 -1
- package/skills/naver-blog-research/scripts/naver_search.py +6 -1
- package/src/assemble.js +1 -0
|
@@ -6,5 +6,11 @@
|
|
|
6
6
|
"browser",
|
|
7
7
|
"action:booking"
|
|
8
8
|
],
|
|
9
|
-
"frontmatter": "name: ktx-booking\ndescription: Search, reserve, inspect, and cancel KTX or Korail tickets in Korea with the korail2 + pycryptodome Python packages. Use when the user asks for KTX seats, Korail bookings, train changes, reservation status, remaining seat numbers, car-by-car seats, or power-outlet/good-seat tips. 돌쇠에서는 공식 표면을 통한 후속 액션까지 진행한다.\nlicense: MIT\nmetadata:\n category: travel\n locale: ko-KR\n phase: v1"
|
|
9
|
+
"frontmatter": "name: ktx-booking\ndescription: Search, reserve, inspect, and cancel KTX or Korail tickets in Korea with the korail2 + pycryptodome Python packages. Use when the user asks for KTX seats, Korail bookings, train changes, reservation status, remaining seat numbers, car-by-car seats, or power-outlet/good-seat tips. 돌쇠에서는 공식 표면을 통한 후속 액션까지 진행한다.\nlicense: MIT\nmetadata:\n category: travel\n locale: ko-KR\n phase: v1",
|
|
10
|
+
"bundle": [
|
|
11
|
+
{
|
|
12
|
+
"from": "scripts/ktx_booking.py",
|
|
13
|
+
"to": "scripts/ktx_booking.py"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
10
16
|
}
|
|
@@ -33,9 +33,14 @@ BLOG_ANCHOR_PATTERN = re.compile(
|
|
|
33
33
|
re.DOTALL,
|
|
34
34
|
)
|
|
35
35
|
|
|
36
|
+
# 검색 결과 앵커마다 시각적으로 숨겨진 접근성 라벨
|
|
37
|
+
# <span class="fender-ui_해시">새 창 열림</span>이 들어 있다. 클래스명은
|
|
38
|
+
# CSS 모듈 해시라 안정적이지 않으므로 라벨 텍스트 기준으로 span째 제거한다.
|
|
39
|
+
NEW_WINDOW_LABEL_RE = re.compile(r"<span[^>]*>\s*새\s*창\s*열림\s*</span>")
|
|
40
|
+
|
|
36
41
|
|
|
37
42
|
def strip_html(text: str) -> str:
|
|
38
|
-
return unescape(TAG_RE.sub("", text)).strip()
|
|
43
|
+
return unescape(TAG_RE.sub("", NEW_WINDOW_LABEL_RE.sub("", text))).strip()
|
|
39
44
|
|
|
40
45
|
|
|
41
46
|
def build_search_params(query: str, start: int = FIRST_PAGE_START, sort: str = "sim") -> dict[str, str]:
|
package/src/assemble.js
CHANGED
|
@@ -251,6 +251,7 @@ function bundledFiles(skillName) {
|
|
|
251
251
|
while (stack.length) {
|
|
252
252
|
const currentDir = stack.pop();
|
|
253
253
|
for (const entry of fs.readdirSync(currentDir, { withFileTypes: true })) {
|
|
254
|
+
if (entry.name === "__pycache__" || entry.name.startsWith(".") || entry.name.endsWith(".pyc")) continue;
|
|
254
255
|
const full = path.join(currentDir, entry.name);
|
|
255
256
|
if (entry.isDirectory()) stack.push(full);
|
|
256
257
|
else results.push(full);
|