Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JJB- 001 - Rebake for Self #29

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 16 additions & 15 deletions bin/output
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@

 ╭────────────────────────────────────────────────────────────╮
 │ │
 │  Tierney Cyren / bitandbang / bnb │
 │ │
 │  Work: Principal Developer Advocate at Twilio (::) │
 │  Twitter: https://twitter.com/bitandbang │
 │ Mastodon: https://mastodon.social/@bnb │
 │  npm: https://npmjs.com/~bnb │
 │  GitHub: https://github.com/bnb │
 │ LinkedIn: https://linkedin.com/in/bitandbang │
 │  Web: https://bnb.im │
 │ │
 │  Card: npx bitandbang │
 │ │
 ╰────────────────────────────────────────────────────────────╯
 ╭──────────────────────────────────────────────────────────────────────╮
 │ │
 │  🐝 / Jarret Bryan / jaybeekeeper │
 │ │
 │  Work: Creative Technologist + Software Engineer at Unite Us │
 │  Bluesky: https://bsky.app/profile/jaybeekeeper.bsky.social │
 │ Mastodon: https://mastodon.social/@jaybeekeeper │
 │  GitHub: https://github.com/jarretbryan │
 │ LinkedIn: https://linkedin.com/in/jarretbryan │
 │  Web: https://jarretbryan.online │
 │ │
 │  Card: npx jaybeecard │
 │ │
 │  Last Updated 1 days ago. │
 │ │
 ╰──────────────────────────────────────────────────────────────────────╯

54 changes: 34 additions & 20 deletions build.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,51 +13,65 @@ const options = {
borderStyle: 'round'
}

// DateTime Stuff

const dateCalculator = {
dateDifference: function dateDifference (date) {
let difference = new Date().getTime() - new Date(date).getTime();
let TotalDays = Math.ceil(difference / (1000 * 3600 * 24));
return TotalDays;
}
}

const dates = {
updateDate: new Date('07/01/2023')
}

// Text + chalk definitions
const data = {
name: chalk.white(' Tierney Cyren'),
handle: chalk.white('bitandbang'),
shorthandle: chalk.white('bnb'),
work: chalk.white('Principal Developer Advocate at Twilio (::)'),
twitter: chalk.gray('https://twitter.com/') + chalk.cyan('bitandbang'),
mastodon: chalk.gray('https://mastodon.social/') + chalk.magenta('@bnb'),
npm: chalk.gray('https://npmjs.com/') + chalk.red('~bnb'),
github: chalk.gray('https://github.com/') + chalk.green('bnb'),
linkedin: chalk.gray('https://linkedin.com/in/') + chalk.blue('bitandbang'),
web: chalk.cyan('https://bnb.im'),
npx: chalk.red('npx') + ' ' + chalk.white('bitandbang'),
name: chalk.white(' 🐝 / Jarret Bryan'),
handle: chalk.white('jaybeekeeper'),
work: chalk.white('Creative Technologist + Software Engineer at Unite Us'),
bsky: chalk.gray('https://bsky.app/profile/') + chalk.cyan('jaybeekeeper.bsky.social'),
mastodon: chalk.gray('https://mastodon.social/') + chalk.magenta('@jaybeekeeper'),
github: chalk.gray('https://github.com/') + chalk.green('jarretbryan'),
linkedin: chalk.gray('https://linkedin.com/in/') + chalk.blue('jarretbryan'),
web: chalk.cyan('https://jarretbryan.online'),
npx: chalk.red('npx') + ' ' + chalk.white('jaybeecard'),
dates: chalk.blue.bold(` Last Updated ${dateCalculator.dateDifference(dates.updateDate)} days ago.`),
labelWork: chalk.white.bold(' Work:'),
labelTwitter: chalk.white.bold(' Twitter:'),
labelBsky: chalk.white.bold(' Bluesky:'),
labelMastodon: chalk.white.bold('Mastodon:'),
labelnpm: chalk.white.bold(' npm:'),
labelGitHub: chalk.white.bold(' GitHub:'),
labelLinkedIn: chalk.white.bold('LinkedIn:'),
labelWeb: chalk.white.bold(' Web:'),
labelCard: chalk.white.bold(' Card:')
labelCard: chalk.white.bold(' Card:'),

}

// Actual strings we're going to output
const newline = '\n'
const heading = `${data.name} / ${data.handle} / ${data.shorthandle}`
const heading = `${data.name} / ${data.handle} `
const working = `${data.labelWork} ${data.work}`
const twittering = `${data.labelTwitter} ${data.twitter}`
const bskying = `${data.labelBsky} ${data.bsky}`
const mastodoning = `${data.labelMastodon} ${data.mastodon}`
const npming = `${data.labelnpm} ${data.npm}`
const githubing = `${data.labelGitHub} ${data.github}`
const linkedining = `${data.labelLinkedIn} ${data.linkedin}`
const webing = `${data.labelWeb} ${data.web}`
const carding = `${data.labelCard} ${data.npx}`
const dating = `${data.dates}`

// Put all our output together into a single variable so we can use boxen effectively
const output = heading + // data.name + data.handle
newline + newline + // Add one whole blank line
working + newline + // data.labelWork + data.work
twittering + newline + // data.labelTwitter + data.twitter
bskying + newline + // data.labelTwitter + data.twitter
mastodoning + newline + // data.labelTwitter + data.twitter
npming + newline + // data.labelnpm + data.npm
githubing + newline + // data.labelGitHub + data.github
linkedining + newline + // data.labelLinkedIn + data.linkedin
webing + newline + newline + // data.labelWeb + data.web
carding // data.labelCard + data.npx
carding + newline + newline + // data.labelCard + data.npx
dating


fs.writeFileSync(path.join(__dirname, 'bin/output'), chalk.green(boxen(output, options)))
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "bitandbang",
"version": "3.0.1",
"description": "A personal card for Tierney Cyren (@bitandbang)",
"name": "jaybeecard",
"version": "1.0.0",
"description": "A personal card for Jarret Bryan (@jaybeekeeper)",
"main": "/bin/card.js",
"bin": {
"bitandbang": "./bin/card.js"
"jaybeecard": "./bin/card.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/bnb/bitandbang.git"
"url": "git+https://github.com/jarretbryan/jaybeecard.git"
},
"homepage": "https://bnb.im",
"homepage": "https://jarretbryan.online",
"scripts": {
"prepublish": "npm run build",
"build": "node build.js",
Expand All @@ -37,7 +37,7 @@
"standard": "^12.0.1"
},
"bugs": {
"url": "https://github.com/bnb/bitandbang/issues"
"url": "https://github.com/jarretbryan/jaybeecard/pulls"
},
"dependencies": {}
}