Partners description, update docs

This commit is contained in:
tree 2022-01-14 17:31:55 +01:00
rodič 38d5e9c98d
revize f333e6cedf
4 změnil soubory, kde provedl 49 přidání a 1 odebrání

Zobrazit soubor

@ -20,6 +20,15 @@ speakers-table:
speakers-leads:
deno run --unstable --allow-read utils/update-docs.js speakersLeadsGen
partners-community:
deno run --unstable --allow-read utils/update-docs.js partnersGen community
partners-sponsor:
deno run --unstable --allow-read utils/update-docs.js partnersGen sponsor
partners-medium:
deno run --unstable --allow-read utils/update-docs.js partnersGen medium
faqs:
deno run --unstable --allow-read utils/update-docs.js faqsGen

Zobrazit soubor

@ -2,49 +2,58 @@
name: Gwei.cz
type: community
twitter: gweicz
desc: Ethereum/DeFi/Web3 komunita
- id: holky-v-kryptu
name: Holky v kryptu
type: community
twitter: holkyvkryptu
desc: Komunita pro začínající a mírně pokročilé uživatele
- id: bankless-cz
name: Bankless Czech
type: community
twitter: banklesscz
desc: Novinkový a vzdělávací web o kryptoměnách
- id: btcknl
name: Bitcoinovej Kanál komunita (BTCKNL)
type: community
web:
url: https://discord.gg/HWG9Erm
desc: Bitcoinová komunita
- id: czsk-nft-community
name: CZ/SK NFT Community
type: community
web:
url: https://discord.gg/X4MV9Pn5P8
desc: NFT komunita (RΞSISTANCΞ)
- id: kryptovlada-komunita
name: KryptoVláďa komunita
type: community
web:
url: https://discord.gg/RHmhNGN
desc: DeFi/Ethereum/Polkadot/NEAR komunita
- id: polkadotters-czsk
name: Polkadotters
type: community
twitter: PolkadottersS
desc: Polkadot komunita
- id: cardanians
name: Cardanians
type: community
twitter: Cardanians_io
desc: Cardano komunita
- id: kryptoherna
name: KryptoHerna
type: community
twitter: hernakrypto
desc: Blockchain gaming/metaverse komunita
- id: mitonc
name: MitonC
@ -58,6 +67,7 @@
type: medium
web:
url: https://podcasty.hn.cz/krypto-insider/
desc: Podcast o kryptoměnách (Petr Lukáč)
- id: kryptonovinky-sk
name: Kryptonovinky.sk (.cz)
@ -76,6 +86,7 @@
type: medium
web:
url: https://investree.cz/
desc: Vzdělávání okolo finanční svobody (Tomáš Zdražil)
- id: kryptoplatby
name: KryptoPlatby CZ/SK

Zobrazit soubor

@ -35,3 +35,5 @@ items:
format: uri
name:
type: string
desc:
type: string

Zobrazit soubor

@ -101,6 +101,31 @@ const methods = {
// TODO replace
await Deno.writeTextFile(docFile, output)
},
// PARTNERS
async partnersGen (type = 'community') {
const arr = [[ 'Název', 'Popis' ]]
for (const item of entry.specs.partners.filter(p => p.type === type)) {
arr.push([ `[**${item.name}**](${item.twitter ? 'https://twitter.com/'+item.twitter : item.web?.url})`, item.desc ])
}
const table = markdownTable(arr)
return table
},
async partnersBuild () {
const docFile = './docs/partneri.md'
const docText = await Deno.readTextFile(docFile)
let output = docText
output = output.replace(/## Spolupracující komunity([\s\S]+)## Mediální/m, `## Spolupracující komunity\n\n${await methods.partnersGen('community')}\n\n## Mediální`)
output = output.replace(/## Mediální partneři([\s\S]+)/m, `## Mediální partneři\n\n${await methods.partnersGen('medium')}\n\n`)
await Deno.writeTextFile(docFile, output)
const docFile2 = './docs/sponzori.md'
const docText2 = await Deno.readTextFile(docFile2)
let output2 = docText2
output2 = output2.replace(/## Seznam sponzorů([\s\S]+)/m, `## Seznam sponzorů\n\n${await methods.partnersGen('sponsor')}\n\n`)
await Deno.writeTextFile(docFile2, output2)
}
}
@ -109,8 +134,9 @@ if (!Deno.args[0]) {
await methods.speakersBuild()
await methods.tracksBuild()
await methods.faqsBuild()
await methods.partnersBuild()
console.log('done')
} else {
console.log(await methods[Deno.args[0]]())
console.log(await methods[Deno.args[0]](Deno.args[1]))
}