npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

autofill-with-resume

v1.0.3

Published

A package to extract resume details from PDF using Gemini API.

Downloads

19

Readme

Autofill With Resume

autofill-with-resume is a powerful Node.js package designed to extract structured data from resumes in PDF format and convert it into a JSON format. Leveraging the Gemini API, it enhances accuracy in extracting detailed information, making it a useful tool for developers building resume parsing systems.

Installation

To install autofill-with-resume, ensure you have Node.js installed, and run the following command:

npm install autofill-with-resume

API Key Setup

To use this package, you need a Gemini API key. You can obtain this key by signing up or logging into Google AI Studio. Once you have the key, it can be integrated into your application as shown in the usage examples.

Basic Usage

Simple Use Case

Here is a basic example demonstrating how to use autofill-with-resume to extract data from a PDF resume:

const AutofillWithResume = require('autofill-with-resume');

const processor = new AutofillWithResume('YOUR_GEMINI_API_KEY', './Resume_name.pdf');

processor.extractResumeDetails()
  .then(details => {
    console.log(details);
  })
  .catch(error => {
    console.error("Error processing resume:", error);
  });

Replace 'YOUR_GEMINI_API_KEY' with your actual API key and ensure the PDF file path is correct.

Server Use Case

If you're building a server application using Node.js and Express, you can implement the following pattern to handle resume uploads and extractions dynamically:

const express = require('express');
const multer = require('multer');
const AutofillWithResume = require('autofill-with-resume');
const fs = require('fs');
const path = require('path');

const app = express();
const upload = multer({ dest: 'uploads/' });

const API_KEY = 'YOUR_GEMINI_API_KEY';

app.post('/upload', upload.single('resume'), (req, res) => {
  const filePath = req.file.path;

  const processor = new AutofillWithResume(API_KEY, filePath);

  processor.extractResumeDetails()
    .then(details => {
      res.json(details);
      fs.unlinkSync(filePath); // Clean up the uploaded file
    })
    .catch(error => {
      console.error("Error processing resume:", error);
      res.status(500).json({ error: "Error processing resume" });
      fs.unlinkSync(filePath); // Clean up the uploaded file
    });
});

const PORT = process.env.PORT || 3000;
app.listen(PORT, () => {
  console.log(`Server is running on port ${PORT}`);
});

Make sure to replace 'YOUR_GEMINI_API_KEY' with your actual key. The server code handles file uploads, processes the resume, and returns the JSON response while also cleaning up temporary files.

JSON Response Structure

The JSON response from the extraction contains structured details including:

  • Personal Details: Name, website, email, phone, and social media links.
  • Education: A list of educational qualifications, institutes, and related details.
  • Skills: An array of skill sets extracted from the resume.
  • Experience: Employment history including job titles, companies, durations, and descriptions of roles.
  • Projects: Information on projects, the technologies used, descriptions, and links.
  • Certifications: Certifications with their names, platforms, years obtained, and links.
  • Achievements: Detailing titles, competitions, prizes, organizations, locations, and years.

This structured format allows for easy integration into systems that require organized and detailed resume information.

License

This project is licensed under the MIT License - see the LICENSE file for details.

For further information, contributions, or issues, please visit the GitHub repository and check the documentation there.