Merge pull request #1555 from MasterEnoc/latex

Add get_latest_version to latex
pull/1561/head
Simon Legner 4 years ago committed by GitHub
commit 336377c249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,8 +1,10 @@
# coding: utf-8
module Docs module Docs
class Latex < UrlScraper class Latex < UrlScraper
self.name = 'LaTeX' self.name = 'LaTeX'
self.slug = 'latex' self.slug = 'latex'
self.type = 'simple' self.type = 'simple'
self.release = 'April 2021'
self.links = { self.links = {
home: 'https://ctan.org/pkg/latex2e-help-texinfo/' home: 'https://ctan.org/pkg/latex2e-help-texinfo/'
} }
@ -18,5 +20,12 @@ module Docs
Public Domain Software Public Domain Software
HTML HTML
def get_latest_version(opts)
body = fetch('https://latexref.xyz/', opts)
body = body.scan(/\(\w+\s\d+\)/)[0]
body.sub!('(', '')
body.sub!(')', '')
end
end end
end end

Loading…
Cancel
Save