Skip to content

Ilingu/cdp-downloader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cdp-downloader

➡️ 'Cahier de Prépa' Downloader

Purpose

  1. Have fun
  2. Learn Bun (since v1 just came out)
  3. Speed coding

Origin

I'm a french student in CPGE, and some of my professors use the tool 'Cahier de Prépa'.

In their we can download a lot a files (such as exercices, lectures...).

And I'd like to replicate the file tree in my local machine (to ease things out, and in case of an internet problem still have a copy)

Here is the problem, there is a lot of files and folders and nested files in folder... Such a pain in the ass to download and replicate all the folders and files in my system (because 'Cahier de Prépa' doesn't provide an "download all" option...)

As a consequence I spend 7 hours creating a script to do that for me instead of spending ~30 min doing by hand (classic behavior for a programmer).

But it works! And now I can write "expert in Bun" in my resume 😎

Install

!!! You must have Bun installed in your machine

!!! You must use linux

To install dependencies:

bun install

To run:

bun run index.ts
# or
npm build
bun ./build/index.js

Usage

bun run index.ts --verbose -i <folder name inside cdp> -o <local folder to save to result> -u <login identifier> -p <password>

ex:

bun run index.ts -i physique -o /home/me/School/CPGE/Physique -u ilingu -p ihad2CatsbutOnEisDeadsoNowitsOnly1

Made with:

  1. Elegance
  2. TypeScript ✨🦀
  3. Bun v1.0.0 ♥ (awesome btw, bun >> node)

Releases

No releases published

Packages

No packages published