Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
50 lines (37 sloc) 1.55 KB
# Notepad++ file
# Licensed under the Apache License, Version 2.0
meta title="Notepad++"
meta namespace="npp"
meta name="notepadplusplus"
using turbo/turboscript-tools:2016.3.17
cmd mkdir c:\Workspace
workdir c:\Workspace
echo from bs4 import BeautifulSoup >
echo import requests >>
echo parser = 'html.parser' >>
echo host = '' >>
echo headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0'} >>
echo content = requests.get("{0}/download".format(host), timeout=10, headers=headers).text >>
echo soup = BeautifulSoup(content, parser) >>
echo links = [downloadLink.get('href') for downloadLink in soup.find_all("a", recursive=True) if downloadLink.get('href').startswith('/repository')] >>
echo print(host + links[0]) >>
cmd python
var url = last
cmd "echo import re >"
cmd "echo print(re.findall('npp.(.*)\.[Ii]nstaller.exe','%url%')[0]) >>"
cmd python
var tag = last
cmd "wget --no-check-certificate -O installer.exe %url%"
cmd "installer.exe /S /D=C:\Notepad++"
cmd powershell -NoProfile -ExecutionPolicy Unrestricted -Command "Import-Module Turbo; Remove-BuildTools"
workdir c:\
cmd rmdir c:\Workspace /s /q
cmd rmdir c:\TurboBuildTools /s /q
cmd rmdir c:\Notepad++\updater /s /q
meta tag=tag
startup file ("c:\Notepad++\notepad++.exe")