Skip to content

Commit

Permalink
remove fb
Browse files Browse the repository at this point in the history
  • Loading branch information
azukaar committed Nov 7, 2023
1 parent 26f0b4a commit 1599c88
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
3 changes: 3 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"url": "https://azukaar.github.io/cosmos-servapps-official/servapps.json"
}
20 changes: 14 additions & 6 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const fs = require('fs')
const { config } = require('process')
const configFile = require('./config.json')

// list all directories in the directory servapps and compile them in servapps.json

Expand Down Expand Up @@ -31,7 +33,17 @@ for (const file of servapps) {
servappsJSON.push(servapp)
}

fs.writeFileSync('./servapps.json', JSON.stringify(servappsJSON, null, 2))
// add showcase
const _sc = ["Jellyfin", "Home Assistant", "Nextcloud"];
const showcases = servappsJSON.filter((app) => _sc.includes(app.name));

let apps = {
"source": configFile.url,
"showcase": showcases,
"all": servappsJSON
}

fs.writeFileSync('./servapps.json', JSON.stringify(apps, null, 2))

for (const servapp of servappsJSON) {
servapp.compose = `http://localhost:3000/servapps/${servapp.id}/cosmos-compose.json`
Expand All @@ -44,8 +56,4 @@ for (const servapp of servappsJSON) {
}
}

fs.writeFileSync('./servapps_test.json', JSON.stringify({
source: "",
showcase: [],
all: servappsJSON,
}, null, 2))
fs.writeFileSync('./servapps_test.json', JSON.stringify(apps, null, 2))

0 comments on commit 1599c88

Please sign in to comment.