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": "Robert Santana",
"title": "LiveTerm", "name": "Robert Santana",
"name": "John Doe",
"ascii": "liveterm",
"social": { "social": {
"github": "github", "linkedin": "robsanta"
"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"
}, },
"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": { "colors": {
"light": { "light": {
"background": "#FBF1C9", "background": "#151515",
"foreground": "#3C3836", "foreground": "#D0D0D0",
"yellow": "#D79921", "yellow": "#F4BF75",
"green": "#98971A", "green": "#90A959",
"gray": "#7C6F64", "gray": "#505050",
"blue": "#458588", "blue": "#75B5AA",
"red": "#CA2124" "red": "#AC4142"
}, },
"dark": { "dark": {
"background": "#2E3440", "background": "#151515",
"foreground": "#E5E9F0", "foreground": "#D0D0D0",
"yellow": "#5E81AC", "yellow": "#F4BF75",
"green": "#A3BE8C", "green": "#90A959",
"gray": "#88C0D0", "gray": "#505050",
"blue": "#EBCB8B", "blue": "#75B5AA",
"red": "#BF616A" "red": "#AC4142"
} }
} }
} }

@ -1,17 +1,4 @@
import axios from 'axios'; 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) => { export const getWeather = async (city: string) => {
try { try {
@ -23,7 +10,7 @@ export const getWeather = async (city: string) => {
}; };
export const getQuote = async () => { 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 { return {
quote: `${data.content}” — ${data.author}`, quote: `${data.content}” — ${data.author}`,
}; };

@ -1,31 +1,13 @@
// // List of commands that require API calls // // List of commands that require API calls
import { getProjects } from '../api';
import { getQuote } from '../api'; import { getQuote } from '../api';
import { getReadme } from '../api';
import { getWeather } 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> => { export const quote = async (args: string[]): Promise<string> => {
const data = await getQuote(); const data = await getQuote();
return data.quote; 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> => { export const weather = async (args: string[]): Promise<string> => {
const city = args.join('+'); const city = args.join('+');
if (!city) { 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 // About
export const about = async (args: string[]): Promise<string> => { export const about = async (args: string[]): Promise<string> => {
return `Hi, I am ${config.name}. return `Hello, I'm ${config.name}.
Welcome to my website! I'm an experienced software engineer.
More about me: More about me:
'sumfetch' - short summary. 'sumfetch' - short summary.
'resume' - my latest resume. 'resume' - my latest resume.`;
'readme' - my github readme.`;
}; };
export const resume = async (args: string[]): Promise<string> => { export const resume = async (args: string[]): Promise<string> => {
@ -43,27 +36,12 @@ export const resume = async (args: string[]): Promise<string> => {
return 'Opening resume...'; 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 // Contact
export const email = async (args: string[]): Promise<string> => { export const email = async (args: string[]): Promise<string> => {
window.open(`mailto:${config.email}`); window.open(`mailto:${config.email}`);
return `Opening 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> => { export const linkedin = async (args: string[]): Promise<string> => {
window.open(`https://www.linkedin.com/in/${config.social.linkedin}/`); 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(' ')}?`; 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 // Typical linux commands
export const echo = async (args: string[]): Promise<string> => { export const echo = async (args: string[]): Promise<string> => {
return args.join(' '); return args.join(' ');
@ -101,16 +74,14 @@ export const whoami = async (args: string[]): Promise<string> => {
}; };
export const ls = async (args: string[]): Promise<string> => { export const ls = async (args: string[]): Promise<string> => {
return `a if(args.length)
bunch return `ls: ${args.join(' ')}: Operation not permitted`;
of return `.
fake ..`;
directories`;
}; };
export const cd = async (args: string[]): Promise<string> => { export const cd = async (args: string[]): Promise<string> => {
return `unfortunately, i cannot afford more directories. return `cd: ${args}: Operation not permitted`;
if you want to help, you can type 'donate'.`;
}; };
export const date = async (args: string[]): Promise<string> => { 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.`; 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 // Banner
export const banner = (args?: string[]): string => { export const banner = (args?: string[]): string => {
return ` return `
Type 'help' to see the list of available commands. Type 'help' to see the list of available commands.
Type 'sumfetch' to display summary. 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'; import config from '../../../config.json';
const sumfetch = async (args: string[]): Promise<string> => { const sumfetch = async (args: string[]): Promise<string> => {
if (config.ascii === 'cveinnt') { return `
return ` ========================================================
@@@@@@@@@@@@@ sumfetch: summary display || . . .-. .-. .-. .-. ||
@@@@ @@@@ ----------- ||-( |------------| )---( )---( )---( )---( )-|| sumfetch: summary display
@@ @@ ABOUT || " " "-" "-" "-" "-" || -----------
@@ @@ ${config.name} || .-. .-. .-. .-. .-. || ABOUT
@@ @@ ${config.ps1_hostname} ||-( )----------------( )---( )---( )---( )-|| ${config.name}
@@ @@@ @@ <u><a href="${config.resume_url}" target="_blank">resume</a></u> || "-" "-" "-" "-" "-" || <u><a href="${config.resume_url}" target="_blank">resume</a></u>
@@ @@@ @@ <u><a href="${config.repo}" target="_blank">Github repo</a></u> || .-. . . .-. .-. .-. || <u><a href="https://wwww.${config.ps1_hostname}" target="_blank">website</a></u>
@@ @@ ----------- ||-( )---( |------------| )---( )---( )---( )-|| -----------
@@ .@@@@@@@@@@. @@ CONTACT || "-" " " "-" "-" "-" || CONTACT
@@ @@ @@ @@ <u><a href="mailto:${config.email}" target="_blank">${config.email}</a></u> || .-. .-. .-. .-. .-. || <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>
@@ @@@@@@ @@ <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>
`; `;
}
}; };
export default sumfetch; export default sumfetch;

Loading…
Cancel
Save