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

signatures-iut-limoges

v2.1.2

Published

Fetch your averages for each semester of the IUT (University Institute of Technology) of Limoges in a very simple way.

Downloads

42

Readme

Wrapper for IUT Signatures (Limoges)

Fetch your averages for each semester of the IUT (University Institute of Technology) of Limoges in a very simple way.

Note that this module is only usable for students of the IUT of Limoges, and that is because you need to authenticate using your Biome (Unilim) credentials.

Installation

You can use whatever package manager you want, here are some examples.

# NPM
npm install signatures-iut-limoges

# Yarn
yarn add signatures-iut-limoges

# pnpm
pnpm add signatures-iut-limoges

Important note

readSignaturesPage()

When you're using this function, you must be connected to the University's VPN or the Eduroam network.

Since you might have SSL issues due to self-signed certificate (only when the website is not publicly available), you have to use process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; on Node.js to avoid errors.

If you want to avoid doing this, you'd have to import yourself the certificate in your project and Node.

If you don't want to import the certificate AND/OR you're not using the VPN/Eduroam network, you should look into the Web VPN method below.

If you're a student and want to learn more about the University's VPN, you can read this article from Unilim support - you have to be logged in to read it.

readSignaturesPageFromWebVPN()

There's no need for the machine to be connected to either the VPN or the Eduroam network. You just run this function and it works out of the box.

The only constraint is that three more requests are done in the process to login to the University's Web VPN.

If you're a student and want to learn more about the University's Web VPN, you can read this article from Unilim support - you have to be logged in to read it.

Usage

// If you're on the VPN/Eduroam network
import { readSignaturesPage } from "signatures-iut-limoges";
// or if you want to use the Web VPN
import { readSignaturesPageFromWebVPN } from "signatures-iut-limoges";

const html = await readSignaturesPage("username", "password");
// or if you want to use the Web VPN
const html = await readSignaturesPageFromWebVPN("username", "password");

// Now, we have to dump the HTML into something readable.
import { dumpSignatureResponse } from "signatures-iut-limoges";
const dump = dumpSignatureResponse(html);

// Do whatever you want with the dump !
console.log(dump);

Output

Return type of dumpSignatureResponse is SignaturesDump, let's see what you can do with this.

Note that everything written below is just extracted from the source code itself, you can look at the types directly here: types.ts.

interface SignaturesDump {
  firstName: string
  familyName: string
  className: string
  semesters: Array<SignaturesSemesterDump>
}

interface SignaturesSemesterDump {
  name: string
  skills: Array<SignaturesSkillDump>
}

interface SignaturesSkillDump {
  id: string
  name: string
  globalAverage: number
  absences: number
  coefficient: number
  modules: Array<SignaturesModuleDump>
}

interface SignaturesModuleDump {
  id: string
  name: string
  average: number
  absences: number
  coefficient: number
}

You might have to use IntelliSense to have accurate description (JSDoc) about the types, or just read the code of types as mentioned previously.