shambhavee
Version:
A personal card for Shambhavee Srivastava (@shambhaveesrivastava12)
120 lines (110 loc) • 4.04 kB
JavaScript
const boxen = require("boxen");
const chalk = require("chalk");
const inquirer = require("inquirer");
const clear = require("clear");
const open = require("open");
const fs = require('fs');
const request = require('request');
const path = require('path');
const ora = require('ora');
const cliSpinners = require('cli-spinners');
clear();
const prompt = inquirer.createPromptModule();
const questions = [
{
type: "list",
name: "action",
message: "What you want to do?",
choices: [
{
name: `Send me an ${chalk.green.bold("email")}?`,
value: () => {
open("mailto:shambhaveesrivastava12@gmail.com");
console.log("\nDone, see you soon at inbox.\n");
}
},
// {
// name: `Download my ${chalk.magentaBright.bold("Resume")}?`,
// value: () => {
// // cliSpinners.dots;
// const loader = ora({
// text: ' Downloading Resume',
// spinner: cliSpinners.material,
// }).start();
// let pipe = request('https://anmolsingh.me/api/resume').pipe(fs.createWriteStream('./anmol-resume.html'));
// pipe.on("finish", function () {
// let downloadPath = path.join(process.cwd(), 'anmol-resume.html')
// console.log(`\nResume Downloaded at ${downloadPath} \n`);
// open(downloadPath)
// loader.stop();
// });
// }
// },
{
name: "Just quit.",
value: () => {
console.log("Hasta la vista.\n");
}
}
]
}
];
const data = {
name: chalk.bold.green(" Shambhavee Srivastava"),
handle: chalk.white("@shambhaveesrivastava12"),
work: `${chalk.white("DevOps Engineer Intern at")} ${chalk
.hex("#2b82b2")
.bold("Cerebrone.ai")}`,
// twitter: chalk.gray("https://twitter.com/") + chalk.cyan("misteranmol"),
github: chalk.gray("https://github.com/") + chalk.green("shambhaveesrivastava12"),
linkedin: chalk.gray("https://linkedin.com/in/") + chalk.blue("shambhavee-srivastava-973494278"),
// web: chalk.cyan("https://anmolsingh.me"),
npx: chalk.red("npx") + " " + chalk.white("shambhavee"),
labelWork: chalk.white.bold(" Work:"),
// labelTwitter: chalk.white.bold(" Twitter:"),
labelGitHub: chalk.white.bold(" GitHub:"),
labelLinkedIn: chalk.white.bold(" LinkedIn:"),
// labelWeb: chalk.white.bold(" Web:"),
labelCard: chalk.white.bold(" Card:")
};
const me = boxen(
[
data.name,
`${data.labelWork} ${data.work}`,
// `${data.labelTwitter} ${data.twitter}`,
`${data.labelGitHub} ${data.github}`,
`${data.labelLinkedIn} ${data.linkedin}`,
// `${data.labelWeb} ${data.web}`,
``,
`${data.labelCard} ${data.npx}`,
``,
`${chalk.italic(
"I am currently looking for new opportunities,"
)}`,
`${chalk.italic("my inbox is always open. Whether you have a")}`,
`${chalk.italic(
"question or just want to say hi, I will try "
)}`,
`${chalk.italic(
"my best to get back to you!"
)}`
].join("\n"),
{
margin: 1,
float: 'center',
padding: 1,
borderStyle: "single",
borderColor: "green"
}
);
console.log(me);
const tip = [
`Tip: Try ${chalk.cyanBright.bold(
"cmd/ctrl + click"
)} on the links above`,
'',
].join("\n");
console.log(tip);
prompt(questions).then(answer => answer.action());