diff --git a/general_application.txt b/general_application.txt new file mode 100644 index 0000000..c2a6b30 --- /dev/null +++ b/general_application.txt @@ -0,0 +1,27 @@ +Dear [Company Name] Team, + +I’m excited to apply for the [specific position] at [Company Name]. With a background in [your field] and experience in [mention 1-2 relevant skills], I’m eager to bring my skills to your projects. + +Currently completing my degree in [your degree] at [your university], I’ve developed a strong foundation in [mention 1-2 relevant academic skills]. My experience at [Company 1] and [Company 2] has further honed my abilities in [mention 1-2 key skills] and collaboration. + +I’m particularly drawn to [mention something specific about the company], which aligns with my passion for [mention your passion]. I’d welcome the opportunity to discuss how my skills can benefit your team. + +Thank you for your time and consideration. + +Best regards, +[Your Name] + + +Spoštovani ekipa [ime podjetja], + +z velikim navdušenjem se prijavljam na razpisano delovno mesto [konkretno delovno mesto] v podjetju [ime podjetja]. Glede na moje izobrazbo na področju [vaše področje] in izkušnje z [navajajte 1–2 ustrezne veščine] se veselim, da bom lahko svoje znanje in veščine vključil v vaše projekte. + +Trenutno zaključujem študij [vaš študijski program] na [vaša univerza], kjer sem si pridobil trdne temelje v [navajajte 1–2 relevantne akademske veščine]. Moje izkušnje v podjetjih [Podjetje 1] in [Podjetje 2] so dodatno izostrile moje sposobnosti na področju [navajajte 1–2 ključne veščine] in sodelovanja. + +Posebej me privlači [navajajte nekaj konkretnega o podjetju], kar se ujema z mojo strastjo za [navajajte svojo strast]. Z veseljem bi se pogovoril o tem, kako lahko moje veščine koristijo vaši ekipi. + +Hvala za vaš čas in pozornost. + +S spoštovanjem, +[Vaše ime] + diff --git a/general_reach_out.txt b/general_reach_out.txt new file mode 100644 index 0000000..07a6729 --- /dev/null +++ b/general_reach_out.txt @@ -0,0 +1,28 @@ +Dear [Company Name] Team, + +I’m reaching out to express my admiration for [Company Name] and my interest in exploring potential opportunities to contribute to your team. With a background in [your field] and experience in [mention 1-2 relevant skills], I’m eager to bring my skills to your projects. + +Currently completing my degree in [your degree] at [your university], I’ve developed a strong foundation in [mention 1-2 relevant academic skills]. My experience at [Company 1] and [Company 2] has further honed my abilities in [mention 1-2 key skills] and collaboration. + +I’m particularly drawn to [mention something specific about the company], which aligns with my passion for [mention your passion]. I’d welcome the opportunity to discuss how my skills can benefit your team. + +Thank you for your time and consideration. + +Best regards, +[Your Name] + + +Spoštovani člani ekipe [ime podjetja], + +pišem vam, da bi izrazil svoje spoštovanje do podjetja [ime podjetja] in zanimanje za morebitne priložnosti, da bi prispeval k delu vaše ekipe. Z izobrazbo na področju [vaše področje] in izkušnjami v [navajajte 1–2 ustrezne veščine] sem vesel, da bom lahko svoje znanje in veščine vključil v vaše projekte. + +Trenutno zaključujem študij [vaš študijski program] na [vaša univerza], kjer sem si pridobil trdne temelje v [navajajte 1–2 relevantne akademske veščine]. Moje izkušnje v podjetjih [Podjetje 1] in [Podjetje 2] so dodatno izostrile moje sposobnosti na področju [navajajte 1–2 ključne veščine] in sodelovanja. + +Posebej me privlači [navajajte nekaj konkretnega o podjetju], kar se ujema z mojo strastjo za [navajajte svojo strast]. Z veseljem bi se pogovoril o tem, kako lahko moje veščine koristijo vaši ekipi. + +Hvala za vaš čas in pozornost. + +S spoštovanjem, +[Vaše ime] + +Translated with DeepL.com (free version) \ No newline at end of file diff --git a/get_company.sh b/get_company.sh new file mode 100755 index 0000000..4a44694 --- /dev/null +++ b/get_company.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# $1 is file with companys list +# template of file is +# " +# Company name +# company url +# --- +# company name +# company url +# --- +# " +# I want to read this file get get urls of the compani end run the prompt below + +PROMPT="Research $1, identify their focus areas, and draft a tailored job application using the template from @general_application.txt and my details from @knowledge_base.md. Include contact information for submission. Save the application and contact details to applications/[company name].txt" + +vibe -p "$PROMPT" \ No newline at end of file diff --git a/knowledge/knowledge_base.md b/knowledge_base.md similarity index 100% rename from knowledge/knowledge_base.md rename to knowledge_base.md diff --git a/prompt.md b/prompt.md new file mode 100644 index 0000000..e929bee --- /dev/null +++ b/prompt.md @@ -0,0 +1,3 @@ + +Research http://www.marand.com/, identify their focus areas, and draft a tailored job application using the template from @general_application.txt and my details from @knowledge_base.md. Include contact information for submission. Save the application and contact details to applications/[company name].txt + diff --git a/scrap/README.md b/scrap/README.md deleted file mode 100644 index cfa69ec..0000000 --- a/scrap/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# job - -To install dependencies: - -```bash -bun install -``` - -To run: - -```bash -bun run index.ts -``` - -This project was created using `bun init` in bun v1.3.6. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime. diff --git a/scrap/index.ts b/scrap/index.ts deleted file mode 100644 index 819c300..0000000 --- a/scrap/index.ts +++ /dev/null @@ -1,36 +0,0 @@ -import playwright from 'playwright'; - -function sleep(ms: number | undefined) { - return new Promise((resolve) => { - setTimeout(resolve, ms); - }); -} - -(async () => { - const browser = await playwright.chromium.launch({headless : false}); - const context = await browser.newContext(); - const page = await context.newPage(); - - await context.route('**.jpg', route => route.abort()); - await page.goto('https://www.google.com/maps/search/Software+company/@46.0463511,14.5023435,14z'); - - await page.click('span:has-text("Sprejmi")'); - await page.waitForLoadState('networkidle'); - console.log(await page.title()); - -// for div role="article" -// div class fontHeadlineSmall -// a contains spletno mesto get htef -// print name and url -// when you get to bottom scrool down with mouse to load more articles - -for await (const line of console) { - console.log(line); - // wait for user enter to continue - break; -} - - await context.close(); - await browser.close(); -})(); - diff --git a/scrap/.gitignore b/scrape/.gitignore similarity index 100% rename from scrap/.gitignore rename to scrape/.gitignore diff --git a/scrap/bun.lock b/scrape/bun.lock similarity index 100% rename from scrap/bun.lock rename to scrape/bun.lock diff --git a/scrape/index.ts b/scrape/index.ts new file mode 100644 index 0000000..d299aff --- /dev/null +++ b/scrape/index.ts @@ -0,0 +1,94 @@ +import playwright from 'playwright'; + +function sleep(ms: number) { + return Bun.sleep(ms); +} + +async function waitUser() { + for await (const line of console) { + console.log(line); + // wait for user enter to continue + break; + } +} + + +const browser = await playwright.chromium.launch({ headless: false }); +const context = await browser.newContext(); +const page = await context.newPage(); +const page2 = await context.newPage(); + +await context.route('**.jpg', route => route.abort()); +await page.goto('https://www.google.com/maps/search/Software+company/@46.0463511,14.5023435,14z'); + + +await page.click('span:has-text("Sprejmi")'); +await page.waitForLoadState('networkidle'); + +// Scroll and extract company information + + + +// Get all article elements +const articles_l = page.locator('div[role="article"]'); + + +// while (article_count < 30) { +// await page.evaluate((element) => { +// element.scrollTop = element.scrollHeight; +// }, await page.locator('div[role="feed"]').elementHandle()); +// await page.waitForLoadState('networkidle'); +// article_count = await page.locator('div[role="article"]').count(); +// } + +await waitUser(); + +const articles = await articles_l.all(); + +let map = new Map(); +let map_e = new Map(); +// Extract information from each article +for (const article of articles) { + try { + // Get company name + const nameElement = article.locator('div.fontHeadlineSmall').first(); + const name_tt = nameElement ? await nameElement.textContent() : 'N/A'; + const name = name_tt?.trim(); + + if (!name) continue; + // Get website URL + const linkElement = article.locator('a[data-value="Spletno mesto"]'); + let url: string | null = 'N/A'; + if (await linkElement.count() > 0) { + url = await linkElement.first().getAttribute('href'); + if(!url) continue; + if(url[0] == '/'){ + await page2.goto(`https://www.google.com${url}`); + await page2.waitForLoadState('networkidle'); + url = page2.url() + } + } + if (url != 'N/A') + map.set(name, url); + else + map_e.set(name, url); + + } catch (error) { + console.error('Error processing article:', error); + } +} + +let smap = JSON.stringify(Array.from(map.entries()), null, 2); +Bun.write("company.json", smap); + +let smap_e = JSON.stringify(Array.from(map_e.entries()), null, 2); +Bun.write("company_e.json", smap_e); + +console.log(`Num of company ${map.size}`); +console.log(`Num of company_e ${map_e.size}`); +console.log('Finished scraping.'); + + +await context.close(); +await browser.close(); + diff --git a/scrape/main.ts b/scrape/main.ts new file mode 100644 index 0000000..0652f3b --- /dev/null +++ b/scrape/main.ts @@ -0,0 +1,32 @@ + + +const file_map = Bun.file("company.json"); +const file_map_d = Bun.file("company_d.json"); + +let smap = "[]"; +if(await file_map.exists()) + smap = await file_map.text(); + +let smap_d = "[]"; +if(await file_map_d.exists()) + smap_d = await file_map_d.text(); + + + +let map = new Map(JSON.parse(smap)) +let map_d = new Map(JSON.parse(smap_d)); + +for (const [name, url] of map) { + if(map_d.has(name)) continue; + + const res = await Bun.$`./get_company.sh ${url}`.text(); + console.log(res); + map_d.set(name, 1); + break; +} + +let smap_e = JSON.stringify(Array.from(map_d.entries()), null, 2); +Bun.write("company_d.json", smap_e); + + + diff --git a/scrap/package.json b/scrape/package.json similarity index 100% rename from scrap/package.json rename to scrape/package.json diff --git a/scrap/tsconfig.json b/scrape/tsconfig.json similarity index 100% rename from scrap/tsconfig.json rename to scrape/tsconfig.json