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." />
|
<meta name="description" content="Browse and explore Snigdha OS packages easily with this lightweight package viewer." />
|
||||||
|
|
||||||
<!-- Author Metadata -->
|
<!-- Author Metadata -->
|
||||||
<meta name="author" content="Eshan Roy, d3v1l0n" />
|
<meta name="author" content="Eshan Roy, d3v1l0n, XlebyllleK" />
|
||||||
<meta name="author:website" content="https://www.eshanized.github.io/, https://www.d3v1l0n.github.io/" />
|
<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" />
|
<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: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: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" />
|
<meta name="author:email" content="m.eshanized@gmail.com, d3v1l0n@outlook.in, celestifyx@gmail.com" />
|
||||||
|
|
||||||
<!-- Open Graph Meta Tags for social media sharing -->
|
<!-- Open Graph Meta Tags for social media sharing -->
|
||||||
<meta property="og:title" content="Snigdha OS Packages" />
|
<meta property="og:title" content="Snigdha OS Packages" />
|
||||||
|
@@ -9,33 +9,27 @@ export const MIRRORS: Record<string, {
|
|||||||
repository: Repository;
|
repository: Repository;
|
||||||
}> = {
|
}> = {
|
||||||
'core': {
|
'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)
|
repository: ('core' as Repository)
|
||||||
},
|
},
|
||||||
|
|
||||||
'extra': {
|
'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)
|
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[]> {
|
async function fetchFromMirror(url: string, repository: Repository): Promise<Package[]> {
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
const text = await response.text();
|
const data = await response.json();
|
||||||
|
|
||||||
// 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(' ');
|
|
||||||
|
|
||||||
|
// Parse the json file content and return a list of packages
|
||||||
|
return data.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
name,
|
name: item.name,
|
||||||
version,
|
version: item.version,
|
||||||
description: description.join(' '),
|
description: item.description,
|
||||||
repository
|
repository
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user