-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.6.x 重構 #17
Comments
cli 我推薦用 yargs,蠻強大的 設定檔我覺得 yaml 可能更好,比 json 更適合人類讀 title: 搖曳露營
keywords:
- DHR
- 繁體
- 720
- Yuru
episodeParser: |
剛剛看了一下 我也覺得 yaml 不錯,只是之前沒玩過不知道會不會遇到什麼雷 (奇怪的字元之類的, |
目前發現的幾個問題和建議:
# 以 yaml 列出基本項
# 顯示用標題,同時會被加入 search
# 必須有值
title: 搖曳露營
# 符合關鍵字的 Thread 才會被加入 search
# 字串陣列
keywords:
- 喵萌
- 繁體
# 符合黑名單關鍵字的 Thread 在 search 後會直接被捨棄
# 字串陣列
unkeywords:
- 合集
# 使用 JS RegExp 寫法,`\`不用寫成`\\`,以第一個 group 來 parse
episodeParser: /第\s*(\d+(?:-\d+)?)\s*[話话]/
# 使用 JS RegExp 寫法
# 若 episodeParser 被定義,忽略此項
# 但這邊是過濾切開後的 tokens,一般使用者不會看到 tokens 被如何切開...
userBlacklistPatterns:
- /\d+月\d+日/
- /\d+\s*月新番/ |
@maple3142 |
這個之後讓 postinstall 來作吧,目前 Config#set 就會檢查了,你大概是 call 到 |
可能需要讓 downloader。直接變成函數來 require |
@maple3142 我剛剛才發現主函式 ( |
@maple3142 |
明天應該可以弄,還有我覺得可以在 NODE_ENV==='development' 的時候使用另一個 .dmhy-subscribe 資料夾比較好 |
剛又發現了一些奇怪的錯誤,0.5.10 版的在搜尋 然後去 0.6.x 搜尋了一次,直接有錯誤 dmhy-subscribe/src/dmhy/thread.js Line 96 in 7b02918
Thread.parseEpisodeFromTitle(t) 是 undefined
|
哇靠www 不要亂用 魔法少女有一堆錯蠻正常的,只要沒辦法被 parse 出 episode 就會噴 |
@maple3142 cb422dc 修正了 |
剛剛又推了一個讓 Error 看起來比較合理的版本了 也不會因為遞迴呼叫看不到到底錯在哪了ww
都是看起來可以用 |
感覺可以考慮直接把 |
剛剛去瞄了一下,感覺可以 XD 不過還是交給使用者決定好了 |
CLI
add
iniyamlJSON)Subscription
的 initial 項,再從~/.dmhy-subscribe/db.json
拉已存的 threads使用例
remove | rm
使用例
list | ls
使用例
download | dl
若為兩季以上的番,有些字幕組會先放出前半合集,這時下載單集會總是下載到該合集用 unkeywords 解決
search | find
update
- [ ] 保留?dmhy --no-dl
取代config | cfg
- [ ] 推播選項(Scheduling 應該很實用)之後開成 enhancement issue其他
clientd208665 之後
maple3142 建議&回報
rm --all 問題 (need more info)regex 錯誤會造成 crash (bug)add no argument message (enhancement)不存在的指令顯示 help (enhancement)The text was updated successfully, but these errors were encountered: