mirror of
https://github.com/Snigdha-OS/package-browser.git
synced 2025-09-20 19:45:01 +02:00
Compare commits
3 Commits
0e824e3a04
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
0d1f1c5e74 | ||
![]() |
9b968adbff | ||
![]() |
751a77ac42 |
10
index.html
10
index.html
@@ -6,12 +6,12 @@
|
||||
<meta name="description" content="Browse and explore Snigdha OS packages easily with this lightweight package viewer." />
|
||||
|
||||
<!-- Author Metadata -->
|
||||
<meta name="author" content="Eshan Roy, d3v1l0n" />
|
||||
<meta name="author:website" content="https://www.eshanized.github.io/, https://www.d3v1l0n.github.io/" />
|
||||
<meta name="author:github" content="https://github.com/eshanized, https://github.com/d3v1l0n" />
|
||||
<meta name="author" content="Eshan Roy, d3v1l0n, XlebyllleK" />
|
||||
<meta name="author:website" content="https://www.eshanized.github.io/, https://www.d3v1l0n.github.io/, https://github.com/Xlebylllek/" />
|
||||
<meta name="author:github" content="https://github.com/eshanized, https://github.com/d3v1l0n, https://github.com/XlebyllleK" />
|
||||
<meta name="author:twitter" content="https://twitter.com/eshanized, https://twitter.com/d3v1l0n" />
|
||||
<meta name="author:bio" content="Eshan Roy is a software developer, open-source enthusiast, and the creator of Snigdha OS. d3v1l0n is a cybersecurity expert and open-source contributor working on various security-focused tools." />
|
||||
<meta name="author:email" content="m.eshanized@gmail.com, d3v1l0n@outlook.in" />
|
||||
<meta name="author:bio" content="Eshan Roy is a software developer, open-source enthusiast, and the creator of Snigdha OS. d3v1l0n is a cybersecurity expert and open-source contributor working on various security-focused tools. XlebyllleK is a software developer, open-source enthusiast, and the creator of Snigdha OS." />
|
||||
<meta name="author:email" content="m.eshanized@gmail.com, d3v1l0n@outlook.in, celestifyx@gmail.com" />
|
||||
|
||||
<!-- Open Graph Meta Tags for social media sharing -->
|
||||
<meta property="og:title" content="Snigdha OS Packages" />
|
||||
|
@@ -9,33 +9,27 @@ export const MIRRORS: Record<string, {
|
||||
repository: Repository;
|
||||
}> = {
|
||||
'core': {
|
||||
url: 'https://raw.githubusercontent.com/Snigdha-OS/snigdhaos-core/refs/heads/master/packages.txt',
|
||||
url: 'https://raw.githubusercontent.com/Snigdha-OS/snigdhaos-pkgbuilds/refs/heads/master/snigdhaos-core/packages.json',
|
||||
repository: ('core' as Repository)
|
||||
},
|
||||
|
||||
'extra': {
|
||||
url: 'https://raw.githubusercontent.com/Snigdha-OS/snigdhaos-extra/refs/heads/master/packages.txt',
|
||||
url: 'https://raw.githubusercontent.com/Snigdha-OS/snigdhaos-pkgbuilds/refs/heads/master/snigdhaos-extra/packages.json',
|
||||
repository: ('extra' as Repository)
|
||||
}
|
||||
}
|
||||
|
||||
// Fetch data from a single mirror (Core or Extra repository)
|
||||
// Fetch data from a single mirror
|
||||
async function fetchFromMirror(url: string, repository: Repository): Promise<Package[]> {
|
||||
const response = await fetch(url);
|
||||
const text = await response.text();
|
||||
|
||||
// Parse the text file content and return a list of packages
|
||||
return text.split('\n').filter(Boolean).map((line) => {
|
||||
const [
|
||||
name,
|
||||
version,
|
||||
...description
|
||||
] = line.split(' ');
|
||||
const data = await response.json();
|
||||
|
||||
// Parse the json file content and return a list of packages
|
||||
return data.map((item: any) => {
|
||||
return {
|
||||
name,
|
||||
version,
|
||||
description: description.join(' '),
|
||||
name: item.name,
|
||||
version: item.version,
|
||||
description: item.description,
|
||||
repository
|
||||
};
|
||||
});
|
||||
|
Reference in New Issue
Block a user