Skip to content

Commit

Permalink
update(0.0.6): Create config file and social media list
Browse files Browse the repository at this point in the history
  • Loading branch information
berkaltiok committed Jan 6, 2021
1 parent 7645675 commit 9dd9540
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 6 deletions.
30 changes: 27 additions & 3 deletions berk.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,40 @@
process.stdout.write("\u001b[3J\u001b[2J\u001b[1J\u001b[3J");
console.clear();

const config = require("./berk.json");

const terminalImage = require('terminal-image');
const chalk = require('chalk');
const got = require('got');
const ww = require('word-wrap');

const inquirer = require('inquirer');
const open = require('open');

console.log("")
got('https://avatars3.githubusercontent.com/u/17373485?s=600&v=4', { responseType: 'buffer' })
got(config.avatar, { responseType: 'buffer' })
.then((image) => terminalImage.buffer(image.body, { width: '26%' }))
.then((image) => image.split("\n").forEach((line) => console.log(" " + line)))
.then(() => {
console.log(ww(chalk`Hello, this is {bold.blue Berk ALTIOK!}`, { width: 200, trim: true }));
console.log(ww(eval(`chalk\`${config.title}\``), { width: 200, trim: true }))
// config.about.forEach(text => console.log(ww(eval(`chalk\`${text}\``), { width: 200, trim: true })))
})
.then(() => {
console.log("\n")
inquirer.prompt([
{
type: 'list',
message: 'For other things...',
name: 'open',
choices: [
{ name: chalk.bold.hex('#888888')(`💻 GitHub`), value: 'https://github.com/berkaltiok' },
{ name: chalk.bold.hex('#1DA1F2')(`🐦 Twitter`), value: 'https://twitter.com/berkpw' },
{ name: chalk.bold.hex('#D7CBFD')(`💼 Portfolio`), value: 'https://berkaltiok.github.io' },
{ name: chalk.bold.hex('#f04a45')('👋 Nope. Bye.'), value: false }
]
}
])
.then((link) => { open(link.open); process.exit(); })
.catch(() => {});
})
.catch((e) => console.log(e));
.catch((e) => console.log(e));
9 changes: 8 additions & 1 deletion berk.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"title": "Hello, this is {bold.blue Berk ALTIOK!}"
"avatar": "https://avatars3.githubusercontent.com/u/17373485",
"title": "Hello, this is {bold.hex('#3b9aff') Berk Altıok!}",
"about": [
"Test 123",
"Test 123",
"Test 123",
"Test 123"
]
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "berk",
"version": "0.0.5",
"version": "0.0.6",
"description": "Berk ALTIOK About",
"main": "berk.js",
"bin": {
Expand Down

0 comments on commit 9dd9540

Please sign in to comment.