git init of winget repo statistics and manager

This commit is contained in:
2024-06-06 13:47:07 +03:00
commit a71d124066
16 changed files with 814 additions and 0 deletions

26
html/ana.html Normal file
View File

@@ -0,0 +1,26 @@
<html>
<head>
<link rel="stylesheet" href="mod.css" type="text/css">
<title>HUJI Sap Analysis</title>
<script src="script.js"></script>
</head>
<body dir="rtl">
<div class="header">
<h3>מנהל החבילות של האוניברסיטה העברית</h3>
<strong>הדרכה:</strong>
<h4>אפשרות א'</h4>
<p>יש לפתוח את חלון ההתחל או את שורת החיפוש ולהקליד <abbr title="יוצג גם כcommand prompt">CMD</abbr>. יש ללחוץ עליו בלחצן הימני, ולבחור "הפעל כמנהל". כשיפתח, יש להדביק את הטקסט הבא (לחיצה על הטקסט כדי להעתיק), </p>
<div id="source" class="copyme" onclick="copyValue('source')">winget source add -n huji -t "Microsoft.Rest"
https://winget.cc.huji.ac.il/api/ & rmdir /s /q "%appdata%\SAP AG" & winget install sap.analysis -s huji </div>
</div>
<h4 style="width: 100%;">אפשרות ב'</h4>
<a href="/installers/UpgradeAna.bat" class="acopyme" style="width: 100%;" download>להורדה קובץ ההרצה. יש ללחוץ על הלחצן הימני ולפתוח כמנהל. במידה וייפתח חלון כחול, יש ללחוץ על פרטים נוספים -> אפשר </a>
<p style="width: 100%;"><strong>הערה:</strong> בדפדפן מיקרוסופט אדג' יש ללחוץ על Keep על הקובץ.</p>
<br><br><br>
<p>במידה ובשגיאה נכתב כי הפקודה 'winget' אינה מוכרת למערכת, יש להדביק את הפקודה הבאה:</p>
<div class="copyme" onclick="copyValue('help')" id="help">powershell -executionPolicy bypass -command "$progressPreference = 'silentlyContinue'; Write-Information 'Downloading WinGet and its dependencies...'; Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle; Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx; Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx -OutFile Microsoft.UI.Xaml.2.8.x64.appx; Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx; Add-AppxPackage Microsoft.UI.Xaml.2.8.x64.appx; Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle;"</div>
</div>
</body>
</html>

58
html/index.html Normal file
View File

@@ -0,0 +1,58 @@
<!DOCTYPE html>
<html>
<head>
<title>SQLite Data</title>
<link href="mod.css" rel="stylesheet" type="text/css">
</head>
<body class="m">
<div class="container">
<div class="column">
<h1>Download Statistics</h1>
<table>
<tr>
<th>Program</th>
<th>Version</th>
<th>Download Count</th>
</tr>
<% downloadData.forEach(function(row) { %>
<tr>
<td>
<%= row.program %>
</td>
<td>
<%= row.version %>
</td>
<td>
<%= row.download_count %>
</td>
</tr>
<% }); %>
</table>
</div>
<div class="column" id="totalus">
<h1>Total Download Statistics</h1>
<table>
<tr>
<th>Package</th>
<th>Search Count</th>
</tr>
<% searchData.forEach(function(row) { %>
<tr>
<td>
<%= row.program %>
</td>
<td>
<%= row.download_count %>
</td>
</tr>
<% }); %>
</table>
</div>
</div>
</body>
</html>

34
html/main.html Normal file
View File

@@ -0,0 +1,34 @@
{{define "body"}}
<body>
<a href="/" class="lang"><img src="/heb" width="20px" height="20px"></a>
<div>
<div class="header">
<h3>{{ .Header }}</h3>
<p style="font-size: 12;">{{ .Help }}</p>
<p>{{ .Explain }}</p>
<div id="source" class="copyme" onclick="copyValue('source')">winget source add -n huji -t "Microsoft.Rest"
https://winget.cc.huji.ac.il/api/</div>
</div>
<ul>
<% pkgs.forEach(function(row, i) { %>
<li id="<%= i %>">
<div id="program-<%= i %>" onclick="showAndHide('id-<%= i %>','<%= i %>')">
Package Name: <strong>
<%= row.package %>
</strong>
</div>
<div id="version-<%= i %>" onclick="showAndHide('id-<%= i %>','<%= i %>')">
Package Version: <%= row.version %>
</div>
<div id="tag-<%= i %>" onclick="showAndHide('id-<%= i %>','<%= i %>')">Allowed use by <%= row.tag %>
</div>
<script>insertWarning("<%= row.warning %>","<%= i %>")</script>
<div class="copyme hiddencopy" id="id-<%= i %>" onclick="copyValue('id-<%= i %>')"><script>scriptPackage("<%= row.id %>", "<%= row.extra_commands %>", "<%= i %>")</script></div>
</li>
<% }); %>
</ul>
</div>
</body>
{{end}}

14
html/master.html Normal file
View File

@@ -0,0 +1,14 @@
{{define "master"}}
<!DOCTYPE html>
<html>
<head>
<title>{{ .Title }}</title>
<link href="/public/mod.css" rel="stylesheet" type="text/css">
<script src="/public/script.js"></script>
</head>
<body>
{{template "body" .}}
</body>
</html>
{{end}}

42
html/mrkzi.html Normal file
View File

@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html>
<head>
<title>HUJI Packages</title>
<link href="mod.css" rel="stylesheet" type="text/css">
<script src="script.js"></script>
</head>
<body dir="rtl">
<a href="/en" class="lang"><img src="/eng" width="20px" height="20px"></a>
<div>
<div class="header">
<h3>מנהל החבילות של האוניברסיטה העברית</h3>
<p style="font-size: 12;">הדרכה:</p>
<p>יש לפתוח את חלון ההתחל או את שורת החיפוש ולהקליד<abbr title="יוצג גם כcommand prompt">CMD</abbr>. יש ללחוץ עליו בלחצן הימני, ולבחור "הפעל כמנהל". כשיפתח, יש להדביק את הטקסט הבא (לחיצה על הטקסט כדי להעתיק), </p>
<div id="source" class="copyme" onclick="copyValue('source')">winget source add -n huji -t "Microsoft.Rest"
https://winget.cc.huji.ac.il/api/</div>
</div>
<ul class="r">
<% pkgs.forEach(function(row, i) { %>
<li id="<%= i %>">
<div id="program-<%= i %>" onclick="showAndHide('id-<%= i %>','<%= i %>')">
שם התוכנה: <strong>
<%= row.package %>
</strong>
</div>
<div id="version-<%= i %>" onclick="showAndHide('id-<%= i %>','<%= i %>')">
גרסאת התוכנה <%= row.version %>
</div>
<div id="tag-<%= i %>" onclick="showAndHide('id-<%= i %>','<%= i %>')"><script>replaceHebrew("tag-<%= i %>",'<%= row.tag %>')</script>
</div>
<script>insertWarning("<%= row.warning %>","<%= i %>",'he')</script>
<div class="copyme hiddencopy" id="id-<%= i %>" onclick="copyValue('id-<%= i %>')"><script>scriptPackage("<%= row.id %>", "<%= row.extra_commands %>", "<%= i %>")</script></div>
</li>
<% }); %>
</ul>
</div>
</body>
</html>

26
html/sap.html Normal file
View File

@@ -0,0 +1,26 @@
<html>
<head>
<link rel="stylesheet" href="mod.css" type="text/css">
<title>HUJI Sap</title>
<script src="script.js"></script>
</head>
<body dir="rtl">
<div class="header">
<h3>מנהל החבילות של האוניברסיטה העברית</h3>
<strong>הדרכה:</strong>
<h4>אפשרות א'</h4>
<p>יש לפתוח את חלון ההתחל או את שורת החיפוש ולהקליד <abbr title="יוצג גם כcommand prompt">CMD</abbr>. יש ללחוץ עליו בלחצן הימני, ולבחור "הפעל כמנהל". כשיפתח, יש להדביק את הטקסט הבא (לחיצה על הטקסט כדי להעתיק), </p>
<div id="source" class="copyme" onclick="copyValue('source')">winget source add -n huji -t "Microsoft.Rest"
https://winget.cc.huji.ac.il/api/ & winget install sap.gui.upgrade -s huji </div>
</div>
<h4 style="width: 100%;">אפשרות ב'</h4>
<a href="/installers/UpgradeSap.bat" class="acopyme" style="width: 100%;" download>להורדה קובץ ההרצה. יש ללחוץ על הלחצן הימני ולפתוח כמנהל. במידה וייפתח חלון כחול, יש ללחוץ על פרטים נוספים -> אפשר </a>
<p style="width: 100%;"><strong>הערה:</strong> בדפדפן מיקרוסופט אדג' יש ללחוץ על Keep על הקובץ.</p>
<br><br><br>
<p>במידה ובשגיאה נכתב כי הפקודה 'winget' אינה מוכרת למערכת, יש להדביק את הפקודה הבאה:</p>
<div class="copyme" onclick="copyValue('help')" id="help">powershell -executionPolicy bypass -command "$progressPreference = 'silentlyContinue'; Write-Information 'Downloading WinGet and its dependencies...'; Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle; Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx; Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx -OutFile Microsoft.UI.Xaml.2.8.x64.appx; Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx; Add-AppxPackage Microsoft.UI.Xaml.2.8.x64.appx; Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle;"</div>
</div>
</body>
</html>

33
html/up.html Normal file
View File

@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>File Upload</title>
<link href="mod.css" rel="stylesheet" type="text/css">
<script src="script.js"></script>
</head>
<body>
<!-- <div> -->
<form action="/upload" method="post" enctype="multipart/form-data">
<input type="text" name="filename" placeholder="Selected file" readonly>
<input type="file" name="file" id="file" onchange="document.forms[0].filename.value = this.files[0].name">
<button class="btn" type="submit">Upload</button>
</form>
<!---
</div>
-->
<script>
// Ensure the file input is not empty before submitting the form
document.forms[0].addEventListener('submit', function(event) {
var fileInput = document.getElementById('file');
if (fileInput.files.length === 0) {
alert('Please select a file to upload.');
event.preventDefault();
}
});
</script>
</body>
</html>

26
html/wsb.html Normal file
View File

@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<title>HUJI Packages</title>
<link href="/public/mod.css" rel="stylesheet" type="text/css">
<script src="/public/script.js"></script>
</head>
<div>
<div id='fubar' class="copyme" onclick="copyValue('fubar')">$progressPreference = 'silentlyContinue'<br>
Write-Information "Downloading WinGet and its dependencies..."<br>
Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle<br>
Invoke-WebRequest -Uri https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx -OutFile Microsoft.VCLibs.x64.14.00.Desktop.appx <br>
Invoke-WebRequest -Uri https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx -OutFile Microsoft.UI.Xaml.2.8.x64.appx <br>
Add-AppxPackage Microsoft.VCLibs.x64.14.00.Desktop.appx <br>
Add-AppxPackage Microsoft.UI.Xaml.2.8.x64.appx<br>
Add-AppxPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle<br>
Set-ItemProperty -Path "Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name HideFileExt -Value 0<br>
Set-ItemProperty -Path "Registry::HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name Hidden -Value 1<br>
winget source add -n huji -t "Microsoft.Rest" https://winget.cc.huji.ac.il/api/<br>
if((Test-Path -LiteralPath "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\huji.ac.il\winget.cc") -ne $true) { New-Item "HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\huji.ac.il\winget.cc" -force -ea SilentlyContinue };<br>
New-ItemProperty -LiteralPath 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\huji.ac.il\winget.cc' -Name '*' -Value 1 -PropertyType DWord -Force -ea SilentlyContinue;<br>
New-ItemProperty -LiteralPath 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\huji.ac.il\winget.cc' -Name 'https' -Value 1 -PropertyType DWord -Force -ea SilentlyContinue;<br>
</div>
</div>
</html>