Skip to content

Commit

Permalink
💖 add love
Browse files Browse the repository at this point in the history
  • Loading branch information
xrkffgg committed Nov 23, 2020
1 parent 29b76a4 commit 3d2a93b
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 10 deletions.
22 changes: 20 additions & 2 deletions README.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,28 @@ People distribution charts: https://zoo-js.github.io/zoo-charts/

If your favorite pet is not in the following list, please raise it in the [issue][issue-new].

## ✨ Cute list ( 123 )
## ✨ Cute list ( 129 )

<!-- START -->

<table><tr>
<table>
<tr>
<td align="center"><a href="https://github.com/family-lovey" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909267?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/dad-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909002?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/mom-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909025?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/son-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909162?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/girl-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909206?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/js-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909967?s=200&v=4" width="50" /></a></td>
</tr>
<tr>
<td width="160" align="center">family<br />家</td>
<td width="160" align="center">dad<br />爸爸</td>
<td width="160" align="center">mom<br />妈妈</td>
<td width="160" align="center">son<br />儿子</td>
<td width="160" align="center">girl<br />女儿</td>
<td width="160" align="center">js<br />JS</td>
</tr>
<tr>
<td align="center"><a href="https://github.com/acorn-js" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74277347?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/alpaca-js" target="_blank"><img src="https://avatars0.githubusercontent.com/u/70752315?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/angel-ts" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74403136?s=200&v=4" width="50" /></a></td>
Expand Down Expand Up @@ -341,6 +358,7 @@ If your favorite pet is not in the following list, please raise it in the [issue
## 💖 Purpose

- 🎁 For fun and good-looking!
- 💖 For Love!
- 🙂 Animals are our friends, please cherish!
- 🌏 We only have one world!

Expand Down
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,28 @@

若您心仪的萌物没在以下列表内,欢迎在 [issue][issue-new] 中提出。

## ✨ 萌物列表 ( 123 )
## ✨ 萌物列表 ( 129 )

<!-- START -->

<table><tr>
<table>
<tr>
<td align="center"><a href="https://github.com/family-lovey" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909267?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/dad-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909002?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/mom-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909025?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/son-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909162?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/girl-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909206?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/js-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909967?s=200&v=4" width="50" /></a></td>
</tr>
<tr>
<td width="160" align="center">family<br />家</td>
<td width="160" align="center">dad<br />爸爸</td>
<td width="160" align="center">mom<br />妈妈</td>
<td width="160" align="center">son<br />儿子</td>
<td width="160" align="center">girl<br />女儿</td>
<td width="160" align="center">js<br />JS</td>
</tr>
<tr>
<td align="center"><a href="https://github.com/acorn-js" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74277347?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/alpaca-js" target="_blank"><img src="https://avatars0.githubusercontent.com/u/70752315?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/angel-ts" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74403136?s=200&v=4" width="50" /></a></td>
Expand Down Expand Up @@ -341,6 +358,7 @@
## 💖 目的

- 🎁 为了好玩、好看!
- 💖 为了爱!
- 🙂 动物是我们的朋友,请爱惜!
- 🌏 我们只有一个世界!

Expand Down
22 changes: 16 additions & 6 deletions active-script/update-readme.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,24 @@ const { stripIndent } = require('common-tags');

const url = 'https://raw.githubusercontent.com/zoo-js/zoo-data/main/json/organizations.json';
var organizations = [];
var orgs = [];

function main() {
const baseReadme = readFileSync('./base/README.base.md', { encoding:'utf8', flag:'r' });
const baseReadmeEn = readFileSync('./base/README.en-US.base.md', { encoding:'utf8', flag:'r' });

for (let i = 0; i< orgs.length; i++) {
let name = orgs[i].name
if (name != 'dad' && name != 'mom' && name != 'son' && name != 'girl' && name != 'family' && name != 'js') {
organizations.push(orgs[i])
}
}

if (organizations.length == 0) {
console.log(`❌ Get organizations error`);
console.log(`organizations 0`);
return false;
}

let content = '';
let row = organizations.length / 6;
const lastNo = organizations.length % 6;
Expand Down Expand Up @@ -41,16 +51,16 @@ function main() {
content += data
}

let newReadme = baseReadme.replace('UPDATE_README_NUMBER', organizations.length);
newReadme = newReadme.replace('UPDATE_README_TABLE', `<table>${content}</table>`);
let newReadme = baseReadme.replace('UPDATE_README_NUMBER', orgs.length);
newReadme = newReadme.replace('UPDATE_README_TABLE', `${content}</table>`);
const newReadmeFormatted = format(newReadme, {
parser: 'markdown',
});
writeFileSync('./README.md', newReadmeFormatted);
console.log(`🎉 Done readme`);

let newReadmeEn = baseReadmeEn.replace('UPDATE_README_NUMBER', organizations.length);
newReadmeEn = newReadmeEn.replace('UPDATE_README_TABLE', `<table>${content}</table>`);
let newReadmeEn = baseReadmeEn.replace('UPDATE_README_NUMBER', orgs.length);
newReadmeEn = newReadmeEn.replace('UPDATE_README_TABLE', `${content}</table>`);
const newReadmeEnFormatted = format(newReadmeEn, {
parser: 'markdown',
});
Expand All @@ -75,7 +85,7 @@ function getCnName(pet) {
async function getOrganizations() {
try {
const res = await axios.get(url);
organizations = res.data.data.sort((a, b) => a.name.localeCompare(b.name));
orgs = res.data.data.sort((a, b) => a.name.localeCompare(b.name));
} catch(err) {
console.log(err);
}
Expand Down
18 changes: 18 additions & 0 deletions base/README.base.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,23 @@

<!-- START -->

<table>
<tr>
<td align="center"><a href="https://github.com/family-lovey" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909267?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/dad-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909002?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/mom-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909025?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/son-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909162?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/girl-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909206?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/js-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909967?s=200&v=4" width="50" /></a></td>
</tr>
<tr>
<td width="160" align="center">family<br />家</td>
<td width="160" align="center">dad<br />爸爸</td>
<td width="160" align="center">mom<br />妈妈</td>
<td width="160" align="center">son<br />儿子</td>
<td width="160" align="center">girl<br />女儿</td>
<td width="160" align="center">js<br />JS</td>
</tr>
UPDATE_README_TABLE

<!-- Created by update-readme.js. -->
Expand All @@ -26,6 +43,7 @@ UPDATE_README_TABLE
## 💖 目的

- 🎁 为了好玩、好看!
- 💖 为了爱!
- 🙂 动物是我们的朋友,请爱惜!
- 🌏 我们只有一个世界!

Expand Down
18 changes: 18 additions & 0 deletions base/README.en-US.base.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,23 @@ If your favorite pet is not in the following list, please raise it in the [issue

<!-- START -->

<table>
<tr>
<td align="center"><a href="https://github.com/family-lovey" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909267?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/dad-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909002?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/mom-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909025?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/son-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909162?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/girl-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909206?s=200&v=4" width="50" /></a></td>
<td align="center"><a href="https://github.com/js-love" target="_blank"><img src="https://avatars0.githubusercontent.com/u/74909967?s=200&v=4" width="50" /></a></td>
</tr>
<tr>
<td width="160" align="center">family<br />家</td>
<td width="160" align="center">dad<br />爸爸</td>
<td width="160" align="center">mom<br />妈妈</td>
<td width="160" align="center">son<br />儿子</td>
<td width="160" align="center">girl<br />女儿</td>
<td width="160" align="center">js<br />JS</td>
</tr>
UPDATE_README_TABLE

<!-- Created by update-readme.js. -->
Expand All @@ -26,6 +43,7 @@ UPDATE_README_TABLE
## 💖 Purpose

- 🎁 For fun and good-looking!
- 💖 For Love!
- 🙂 Animals are our friends, please cherish!
- 🌏 We only have one world!

Expand Down

0 comments on commit 3d2a93b

Please sign in to comment.