Skip to content

Commit 589aeb7

Browse files
committed
Add get_latest_version to latex
1 parent 5d966ea commit 589aeb7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/docs/scrapers/latex.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
# coding: utf-8
12
module Docs
23
class Latex < UrlScraper
34
self.name = 'LaTeX'
45
self.slug = 'latex'
56
self.type = 'simple'
7+
self.release = 'April 2021'
68
self.links = {
79
home: 'https://ctan.org/pkg/latex2e-help-texinfo/'
810
}
@@ -18,5 +20,12 @@ class Latex < UrlScraper
1820
Public Domain Software
1921
HTML
2022

23+
def get_latest_version(opts)
24+
body = fetch('https://latexref.xyz/', opts)
25+
body = body.scan(/\(\w+\s\d+\)/)[0]
26+
body.sub!('(', '')
27+
body.sub!(')', '')
28+
end
29+
2130
end
2231
end

0 commit comments

Comments
 (0)