Skip to content

Commit

Permalink
Added Kdocs (Homebrew#109451)
Browse files Browse the repository at this point in the history
* Added Kdocs by zuisong

* Update kdocs.rb

* Update kdocs.rb

* Update kdocs.rb

Co-authored-by: chenjian <[email protected]>
Co-authored-by: Miccal Matthews <[email protected]>
  • Loading branch information
3 people authored Aug 4, 2021
1 parent 9b656ca commit d893dc9
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions Casks/kdocs.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
cask "kdocs" do
version "2.13.0,1001"
sha256 "cc0aa869986ff7302b1743d3deb34a0f9cf801a5e0bb5e6060209269efb12419"

url "https://qn.cache.wpscdn.cn/kdocs/apk/kdesktopmac/KDocs_#{version.after_comma}_v#{version.before_comma}.dmg",
verified: "qn.cache.wpscdn.cn/kdocs/apk/kdesktopmac/"
name "金山文档"
desc "Online collaborate editor for Word, Excel and PPT documents"
homepage "https://www.kdocs.cn/"

livecheck do
url "https://www.kdocs.cn/kd/api/configure/list?idList=appOfficial"
strategy :page_match do |page|
match = page.match(/kdocs[._-](\d+(?:\.\d+)*)[._-]v?(\d+(?:\.\d+)*)\.dmg/i)
"#{match[2]},#{match[1]}"
end
end

app "金山文档.app"

zap trash: [
"~/Library/Preferences/com.kingsoft.kdocs.mac.plist",
"~/Library/Saved Application State/com.kingsoft.kdocs.mac.savedState",
]
end

0 comments on commit d893dc9

Please sign in to comment.