Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
amanraox authored May 11, 2024
1 parent 7493eeb commit dd979b1
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 0 deletions.
128 changes: 128 additions & 0 deletions card.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
#!/usr/bin/env node

'use strict'

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:[email protected]");
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://amanraox.me/api/resume').pipe(fs.createWriteStream('./amanraox-resume.html'));
pipe.on("finish", function () {
let downloadPath = path.join(process.cwd(), 'amanraox-resume.html')
console.log(`\nResume Downloaded at ${downloadPath} \n`);
open(downloadPath)
loader.stop();
});
}
},
{
name: `Schedule a ${chalk.redBright.bold("Meeting")}?`,
value: () => {
open('https://calendly.com/amanumrao333/30min');
console.log("\n See you at the meeting \n");
}
},
{
name: "Just quit.",
value: () => {
console.log("Hasta la vista.\n");
}
}
]
}
];

const data = {
name: chalk.bold.green(" Aman Umrao"),
handle: chalk.white("@amanraox"),
work: `${chalk.white("Aspiring Software Engineer ")} ${chalk
.hex("#2b82b2")
.bold("student")}`,
twitter: chalk.gray("https://twitter.com/") + chalk.cyan("amanraoxx"),
github: chalk.gray("https://github.com/") + chalk.green("amanraox"),
linkedin: chalk.gray("https://linkedin.com/in/") + chalk.blue("amanraox"),
web: chalk.cyan("https://amanraox.me"),
npx: chalk.red("npx") + " " + chalk.white("amanraox"),

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());
37 changes: 37 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"name": "amanraox",
"version": "1.0.0",
"description": "A personal card for Aman Umrao (@amanraox)",
"main": "card.js",
"bin": {
"amanraox": "./card.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/amanraox/raox-npx.git"
},
"scripts": {
"test": "node card.js",
"pub": "npm version major & npm publish"
},
"dependencies": {
"boxen": "^4.2.0",
"chalk": "^4.1.0",
"clear": "^0.1.0",
"cli-spinners": "^2.5.0",
"inquirer": "^7.3.2",
"open": "^7.0.4",
"ora": "^5.1.0",
"request": "^2.88.2"
},
"keywords": [
"card",
"npm",
"npm card",
"npx",
"npx card",
"business card"
],
"author": "Aman Umrao <[email protected]> (https://linkedin.com/in/amanraox/)",
"license": "ISC"
}

0 comments on commit dd979b1

Please sign in to comment.