Skip to content

Commit

Permalink
Merge pull request #63 from nishant0708/main
Browse files Browse the repository at this point in the history
modules req
  • Loading branch information
dinxsh authored Aug 5, 2024
2 parents 5db7c10 + 991619c commit 4988140
Show file tree
Hide file tree
Showing 3,408 changed files with 553,466 additions and 14 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"login": "sanjay-kv",
"name": "Sanjay Viswanathan",
"avatar_url": "https://avatars.githubusercontent.com/u/30715153?v=4",
"ScreenShot":"https://raw.githubusercontent.com/nishant0708/awesome-github-profiles/main/screenshots/sanjay-kv.png",
"profile": "https://recodehive.com",
"contributions": [
"review"
Expand Down
41 changes: 27 additions & 14 deletions .github/workflows/capture-screenshot.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
const puppeteer = require('puppeteer');
const puppeteer = require('puppeteer-core');
const fs = require('fs');
const path = require('path');

async function takeScreenshot(username) {
const url = `https://github.com/${username}`;
const browser = await puppeteer.launch();
const browser = await puppeteer.launch({
headless: true,
executablePath: '/usr/bin/google-chrome-stable', // Path to Chrome executable
args: ['--no-sandbox', '--disable-setuid-sandbox']
});
const page = await browser.newPage();
await page.goto(url);

await page.setViewport({ width: 1280, height: 800 });
const screenshotPath = path.join('screenshots', `${username}.png`);
await page.screenshot({ path: screenshotPath, fullPage: true });

await browser.close();
return screenshotPath;
try {
await page.goto(url, { waitUntil: 'networkidle2' });
await page.setViewport({ width: 1280, height: 800 });
const screenshotPath = path.join('screenshots', `${username}.png`);
await page.screenshot({ path: screenshotPath, fullPage: true });
await browser.close();
return screenshotPath;
} catch (error) {
await browser.close();
throw error;
}
}

async function main() {
Expand All @@ -22,13 +30,18 @@ async function main() {
console.error('No username provided');
process.exit(1);
}

if (!fs.existsSync('screenshots')) {
fs.mkdirSync('screenshots');

const screenshotDir = path.resolve(__dirname, 'screenshots');
if (!fs.existsSync(screenshotDir)) {
fs.mkdirSync(screenshotDir);
}

const screenshotPath = await takeScreenshot(username);
console.log(`Screenshot taken for ${username}: ${screenshotPath}`);
try {
const screenshotPath = await takeScreenshot(username);
console.log(`Screenshot taken for ${username}: ${screenshotPath}`);
} catch (error) {
console.error(`Error taking screenshot for ${username}:`, error);
}
}

main();
16 changes: 16 additions & 0 deletions node_modules/.bin/browsers

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

17 changes: 17 additions & 0 deletions node_modules/.bin/browsers.cmd

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

28 changes: 28 additions & 0 deletions node_modules/.bin/browsers.ps1

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

16 changes: 16 additions & 0 deletions node_modules/.bin/escodegen

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

17 changes: 17 additions & 0 deletions node_modules/.bin/escodegen.cmd

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

28 changes: 28 additions & 0 deletions node_modules/.bin/escodegen.ps1

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

16 changes: 16 additions & 0 deletions node_modules/.bin/esgenerate

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

17 changes: 17 additions & 0 deletions node_modules/.bin/esgenerate.cmd

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

28 changes: 28 additions & 0 deletions node_modules/.bin/esgenerate.ps1

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

16 changes: 16 additions & 0 deletions node_modules/.bin/esparse

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

17 changes: 17 additions & 0 deletions node_modules/.bin/esparse.cmd

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

28 changes: 28 additions & 0 deletions node_modules/.bin/esparse.ps1

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

16 changes: 16 additions & 0 deletions node_modules/.bin/esvalidate

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

17 changes: 17 additions & 0 deletions node_modules/.bin/esvalidate.cmd

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

28 changes: 28 additions & 0 deletions node_modules/.bin/esvalidate.ps1

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

Loading

0 comments on commit 4988140

Please sign in to comment.