Page 1 of 1

[SOLVED] Update Package Miktex

Published: February 14, 2024 - 10:30 AM
by vnatton
Hi everyone,
I noticed that the miktex Windows package remained at version 22.10 even though version 24.1 was released.

I created this update_package which returns the latest version if you're interested, so you can then download it

Code: Select all

def update_package():
    import requests
    from bs4 import BeautifulSoup

    url_html = "https://ctan.tetaneutral.net/systems/win32/miktex/setup/windows-x64/"
    bin_begin = "basic-miktex-"
    bin_end = "-x64.exe"

    site = requests.get(url_html)
    HTML = site.text
    soup = BeautifulSoup(HTML,'html.parser').find_all('a')[1:]

    for a in soup:
        if a.text.startswith(bin_begin):
            checked_version = Version(a.text.split("-")[2])

            try: version
            except NameError: last_version = checked_version
            else:
                if checked_version > version:
                    last_version = checked_version

    last_version = bin_begin+str(last_version)+bin_end

    print(last_version)
    

Re: Update Miktex Package

Published: February 15, 2024 - 4:29 PM
by dcardon
Hi Vianney,

thanks for the feedback :-)! Jordan has taken the code to update the package; it should be available soon on wapt-testing and then on the store.

Denis