chore: Phase 0 统一命名与仓库卫生
统一 daily-robots 命名、修正示例路径与 User-Agent,并清理 tmp 与 IDE 追踪文件。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -61,7 +61,7 @@ DAILY_CN_AI_NEWS=1
|
||||
# DAILY_REPORT_MODE=agent
|
||||
# CURSOR_API_KEY=cursor_...
|
||||
# CURSOR_MODEL=composer-2.5
|
||||
# DAILY_CURSOR_CWD=d:\LY\diy\skills-hot-daily
|
||||
# DAILY_CURSOR_CWD=.
|
||||
|
||||
# 新增榜对比(较昨日 Top15,供 Agent 导语/signals;列表展示 Top N)
|
||||
# DAILY_DELTA_COMPARE_DEPTH=15
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -6,3 +6,7 @@ bot/.env
|
||||
bot/.venv/
|
||||
bot/.cache/
|
||||
output
|
||||
__pycache__/
|
||||
*.pyc
|
||||
.idea/
|
||||
tmp_*
|
||||
|
||||
3
.idea/.gitignore
generated
vendored
3
.idea/.gitignore
generated
vendored
@@ -1,3 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
9
.idea/daily-robots.iml
generated
9
.idea/daily-robots.iml
generated
@@ -1,9 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" default="true">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
8
.idea/modules.xml
generated
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/daily-robots.iml" filepath="$PROJECT_DIR$/.idea/daily-robots.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
2
.idea/vcs.xml
generated
2
.idea/vcs.xml
generated
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -5,7 +5,7 @@ WECOM_BOT_SECRET=your-bot-secret
|
||||
|
||||
# Cursor SDK(@ 机器人后的通用任务由 Cursor 执行)
|
||||
CURSOR_API_KEY=cursor_...
|
||||
CURSOR_CWD=d:\LY\test\tech
|
||||
CURSOR_CWD=.
|
||||
CURSOR_MODEL=composer-2.5
|
||||
CURSOR_TIMEOUT=600
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ from daily.news.feeds_cn import CN_AI_TITLE_KEYWORDS, CN_NEWS_CATEGORIES
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
USER_AGENT = "Mozilla/5.0 (compatible; skills-hot-daily/1.0; +https://skills.sh)"
|
||||
USER_AGENT = "Mozilla/5.0 (compatible; daily-robots/1.0; +https://skills.sh)"
|
||||
BROWSER_USER_AGENT = (
|
||||
"Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
||||
"AppleWebKit/537.36 (KHTML, like Gecko) "
|
||||
|
||||
@@ -15,7 +15,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
Board = Literal["trending", "hot"]
|
||||
SKILLS_SITE = "https://www.skills.sh"
|
||||
USER_AGENT = "Mozilla/5.0 (compatible; skills-hot-daily/1.0; +https://skills.sh)"
|
||||
USER_AGENT = "Mozilla/5.0 (compatible; daily-robots/1.0; +https://skills.sh)"
|
||||
|
||||
_SKILL_RE = re.compile(
|
||||
r'\{"source":"(?P<source>[^"]+)","skillId":"(?P<skill_id>[^"]+)",'
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
import re
|
||||
|
||||
import certifi
|
||||
import httpx
|
||||
|
||||
url = "https://skills.sh/vercel-labs/skills/find-skills"
|
||||
r = httpx.get(url, headers={"User-Agent": "Mozilla/5.0"}, timeout=20, verify=certifi.where())
|
||||
chunks = re.findall(r'self\.__next_f\.push\(\[1,"(.*?)"\]\)', r.text, re.DOTALL)
|
||||
blob = "\n".join(chunks).encode("utf-8").decode("unicode_escape", errors="ignore")
|
||||
for needle in ("description", "Helps users", "SKILL.md", "summary"):
|
||||
print(needle, blob.count(needle))
|
||||
idx = blob.find("Helps users")
|
||||
if idx >= 0:
|
||||
print(blob[idx : idx + 300])
|
||||
Binary file not shown.
Reference in New Issue
Block a user