From 589aeb7f6e682f04fb4d9c704ec8dfab06ab6852 Mon Sep 17 00:00:00 2001 From: Enoc Date: Tue, 1 Jun 2021 01:14:03 -0600 Subject: [PATCH] Add get_latest_version to latex --- lib/docs/scrapers/latex.rb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/docs/scrapers/latex.rb b/lib/docs/scrapers/latex.rb index e603b72a..816f1d64 100644 --- a/lib/docs/scrapers/latex.rb +++ b/lib/docs/scrapers/latex.rb @@ -1,8 +1,10 @@ +# coding: utf-8 module Docs class Latex < UrlScraper self.name = 'LaTeX' self.slug = 'latex' self.type = 'simple' + self.release = 'April 2021' self.links = { home: 'https://ctan.org/pkg/latex2e-help-texinfo/' } @@ -18,5 +20,12 @@ module Docs Public Domain Software 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