chore(readme): add apps count

This commit is contained in:
Nicolas Meienberger 2024-05-11 12:10:40 +02:00
parent 373c91a7f4
commit 143e59ca36
2 changed files with 5 additions and 4 deletions

View File

@ -43,12 +43,13 @@ const appToReadme = async (app: App) => {
return `| <img src="apps/${app.id}/metadata/logo.jpg" style="border-radius: 10px;" height="auto" width=50> | [${app.name}](${app.source}) | ${app.description} | ${app.port} |`;
};
const writeToReadme = (appsList: string) => {
const writeToReadme = (appsList: string, count: number) => {
const baseReadme = fs.readFileSync(
__dirname + "/../../templates/README.md",
"utf8"
);
const finalReadme = baseReadme.replace("<!appsList>", appsList);
let finalReadme = baseReadme.replace("<!appsList>", appsList);
finalReadme = finalReadme.replace("<!appsCount>", count.toString());
fs.writeFileSync(__dirname + "/../../README.md", finalReadme);
};
@ -62,7 +63,7 @@ const main = async () => {
appsList = appsList + (appFinal + "\n");
}
writeToReadme(appsList);
writeToReadme(appsList, appKeys.length);
exec(
`npx prettier ${__dirname + "/../../README.md"} --write`,
(stdout, stderr) => {

View File

@ -10,7 +10,7 @@ If you want to see new apps on Tipi you can either:
- [Join the Discord](https://discord.gg/Bu9qEPnHsc) members of the community will add it.
- Fork this repo and create the necessary files for a Tipi app. Follow this [guide](https://www.runtipi.io/docs/contributing/adding-a-new-app)`
## Apps available
## Apps available (<!appsCount>)
| Icon | Name | Description | Port |
| ---- | ---- | ----------- | ---- |