pull/49/head
Rob Santana 12 months ago
parent 1f2e543bdb
commit 3b536f7e70

@ -1,39 +1,31 @@
{
"readmeUrl": "https://raw.githubusercontent.com/cveinnt/cveinnt/master/README.md",
"title": "LiveTerm",
"name": "John Doe",
"ascii": "liveterm",
"title": "Robert Santana",
"name": "Robert Santana",
"social": {
"github": "github",
"linkedin": "linkedin"
},
"email": "contact@email.com",
"ps1_hostname": "liveterm",
"ps1_username": "visitor",
"repo": "https://github.com/Cveinnt/LiveTerm",
"resume_url": "https://upload.wikimedia.org/wikipedia/commons/c/cc/Resume.pdf",
"donate_urls": {
"paypal": "https://paypal.me/cveinnt",
"patreon": "https://patreon.com/cveinnt"
"linkedin": "robsanta"
},
"email": "rob@santana.io",
"ps1_hostname": "santana.io",
"ps1_username": "recruiter",
"resume_url": "https://drive.google.com/file/d/1LGg66XeFfk-NTiyk29r4nLfUKQIlhNcc/view?usp=sharing",
"colors": {
"light": {
"background": "#FBF1C9",
"foreground": "#3C3836",
"yellow": "#D79921",
"green": "#98971A",
"gray": "#7C6F64",
"blue": "#458588",
"red": "#CA2124"
"background": "#151515",
"foreground": "#D0D0D0",
"yellow": "#F4BF75",
"green": "#90A959",
"gray": "#505050",
"blue": "#75B5AA",
"red": "#AC4142"
},
"dark": {
"background": "#2E3440",
"foreground": "#E5E9F0",
"yellow": "#5E81AC",
"green": "#A3BE8C",
"gray": "#88C0D0",
"blue": "#EBCB8B",
"red": "#BF616A"
"background": "#151515",
"foreground": "#D0D0D0",
"yellow": "#F4BF75",
"green": "#90A959",
"gray": "#505050",
"blue": "#75B5AA",
"red": "#AC4142"
}
}
}
}

@ -1,17 +1,4 @@
import axios from 'axios';
import config from '../../config.json';
export const getProjects = async () => {
const { data } = await axios.get(
`https://api.github.com/users/${config.social.github}/repos`,
);
return data;
};
export const getReadme = async () => {
const { data } = await axios.get(config.readmeUrl);
return data;
};
export const getWeather = async (city: string) => {
try {
@ -23,7 +10,7 @@ export const getWeather = async (city: string) => {
};
export const getQuote = async () => {
const { data } = await axios.get('https://api.quotable.io/random');
const { data } = await axios.get('http://api.quotable.io/random');
return {
quote: `${data.content}” — ${data.author}`,
};

@ -1,31 +1,13 @@
// // List of commands that require API calls
import { getProjects } from '../api';
import { getQuote } from '../api';
import { getReadme } from '../api';
import { getWeather } from '../api';
export const projects = async (args: string[]): Promise<string> => {
const projects = await getProjects();
return projects
.map(
(repo) =>
`${repo.name} - <a class="text-light-blue dark:text-dark-blue underline" href="${repo.html_url}" target="_blank">${repo.html_url}</a>`,
)
.join('\n');
};
export const quote = async (args: string[]): Promise<string> => {
const data = await getQuote();
return data.quote;
};
export const readme = async (args: string[]): Promise<string> => {
const readme = await getReadme();
return `Opening GitHub README...\n
${readme}`;
};
export const weather = async (args: string[]): Promise<string> => {
const city = args.join('+');
if (!city) {

@ -22,20 +22,13 @@ Type 'sumfetch' to display summary.
`;
};
// Redirection
export const repo = async (args: string[]): Promise<string> => {
window.open(`${config.repo}`);
return 'Opening Github repository...';
};
// About
export const about = async (args: string[]): Promise<string> => {
return `Hi, I am ${config.name}.
Welcome to my website!
return `Hello, I'm ${config.name}.
I'm an experienced software engineer.
More about me:
'sumfetch' - short summary.
'resume' - my latest resume.
'readme' - my github readme.`;
'resume' - my latest resume.`;
};
export const resume = async (args: string[]): Promise<string> => {
@ -43,27 +36,12 @@ export const resume = async (args: string[]): Promise<string> => {
return 'Opening resume...';
};
// Donate
export const donate = async (args: string[]): Promise<string> => {
return `thank you for your interest.
here are the ways you can support my work:
- <u><a class="text-light-blue dark:text-dark-blue underline" href="${config.donate_urls.paypal}" target="_blank">paypal</a></u>
- <u><a class="text-light-blue dark:text-dark-blue underline" href="${config.donate_urls.patreon}" target="_blank">patreon</a></u>
`;
};
// Contact
export const email = async (args: string[]): Promise<string> => {
window.open(`mailto:${config.email}`);
return `Opening mailto:${config.email}...`;
};
export const github = async (args: string[]): Promise<string> => {
window.open(`https://github.com/${config.social.github}/`);
return 'Opening github...';
};
export const linkedin = async (args: string[]): Promise<string> => {
window.open(`https://www.linkedin.com/in/${config.social.linkedin}/`);
@ -86,11 +64,6 @@ export const bing = async (args: string[]): Promise<string> => {
return `Wow, really? You are using bing for ${args.join(' ')}?`;
};
export const reddit = async (args: string[]): Promise<string> => {
window.open(`https://www.reddit.com/search/?q=${args.join(' ')}`);
return `Searching reddit for ${args.join(' ')}...`;
};
// Typical linux commands
export const echo = async (args: string[]): Promise<string> => {
return args.join(' ');
@ -101,16 +74,14 @@ export const whoami = async (args: string[]): Promise<string> => {
};
export const ls = async (args: string[]): Promise<string> => {
return `a
bunch
of
fake
directories`;
if(args.length)
return `ls: ${args.join(' ')}: Operation not permitted`;
return `.
..`;
};
export const cd = async (args: string[]): Promise<string> => {
return `unfortunately, i cannot afford more directories.
if you want to help, you can type 'donate'.`;
return `cd: ${args}: Operation not permitted`;
};
export const date = async (args: string[]): Promise<string> => {
@ -133,25 +104,20 @@ export const emacs = async (args?: string[]): Promise<string> => {
return `you know what? just use vscode.`;
};
export const sudo = async (args?: string[]): Promise<string> => {
window.open('https://www.youtube.com/watch?v=dQw4w9WgXcQ', '_blank'); // ...I'm sorry
return `Permission denied: with little power comes... no responsibility? `;
};
// Banner
export const banner = (args?: string[]): string => {
return `
Type 'help' to see the list of available commands.
Type 'sumfetch' to display summary.
Type 'repo' or click <u><a class="text-light-blue dark:text-dark-blue underline" href="${config.repo}" target="_blank">here</a></u> for the Github repository.
Type 'resume' or click <u><a class="text-light-blue dark:text-dark-blue underline" href="${config.resume_url}" target="_blank">here</a></u> to download my resume.
`;
};

@ -1,46 +1,22 @@
import config from '../../../config.json';
const sumfetch = async (args: string[]): Promise<string> => {
if (config.ascii === 'cveinnt') {
return `
@@@@@@@@@@@@@ sumfetch: summary display
@@@@ @@@@ -----------
@@ @@ ABOUT
@@ @@ ${config.name}
@@ @@ ${config.ps1_hostname}
@@ @@@ @@ <u><a href="${config.resume_url}" target="_blank">resume</a></u>
@@ @@@ @@ <u><a href="${config.repo}" target="_blank">Github repo</a></u>
@@ @@ -----------
@@ .@@@@@@@@@@. @@ CONTACT
@@ @@ @@ @@ <u><a href="mailto:${config.email}" target="_blank">${config.email}</a></u>
@@ @@ @@ @@ <u><a href="https://github.com/${config.social.github}" target="_blank">github.com/${config.social.github}</a></u>
@@ @@@@@@ @@ <u><a href="https://linkedin.com/in/${config.social.linkedin}" target="_blank">linkedin.com/in/${config.social.linkedin}</a></u>
@@@ @@@ -----------
@@@ @@@ @@ DONATE
@| @@@@@@@@@@@@@@@@ @@ <u><a href="${config.donate_urls.paypal}" target="_blank">${config.donate_urls.paypal}</a></u>
@| @@ <u><a href="${config.donate_urls.patreon}" target="_blank">${config.donate_urls.patreon}</a></u>
`;
} else {
return `
  sumfetch
    -----------
      ABOUT
  ${config.name}
        <u><a href="${config.resume_url}" target="_blank">resume</a></u>
<u><a href="${config.repo}" target="_blank">Github repo</a></u>
  -----------
  > L I V E T E R M CONTACT
  <u><a href="mailto:${config.email}" target="_blank">${config.email}</a></u>
<u><a href="https://github.com/${config.social.github}" target="_blank">github.com/${config.social.github}</a></u>
        <u><a href="https://linkedin.com/in/${config.social.linkedin}" target="_blank">linkedin.com/in/${config.social.linkedin}</a></u>
  -----------
        DONATE
   <u><a href="${config.donate_urls.paypal}" target="_blank">${config.donate_urls.paypal}</a></u>
  <u><a href="${config.donate_urls.patreon}" target="_blank">${config.donate_urls.patreon}</a></u>
return `
========================================================
|| . . .-. .-. .-. .-. ||
||-( |------------| )---( )---( )---( )---( )-|| sumfetch: summary display
|| " " "-" "-" "-" "-" || -----------
|| .-. .-. .-. .-. .-. || ABOUT
||-( )----------------( )---( )---( )---( )-|| ${config.name}
|| "-" "-" "-" "-" "-" || <u><a href="${config.resume_url}" target="_blank">resume</a></u>
|| .-. . . .-. .-. .-. || <u><a href="https://wwww.${config.ps1_hostname}" target="_blank">website</a></u>
||-( )---( |------------| )---( )---( )---( )-|| -----------
|| "-" " " "-" "-" "-" || CONTACT
|| .-. .-. .-. .-. .-. || <u><a href="mailto:${config.email}" target="_blank">${config.email}</a></u>
||-( )---( )----------------( )---( )---( )-|| <u><a href="https://linkedin.com/in/${config.social.linkedin}" target="_blank">linkedin.com/in/${config.social.linkedin}</a></u>
|| "-" "-" "-" "-" "-" ||
========================================================
`;
}
};
export default sumfetch;

Loading…
Cancel
Save