- Have fun
- Learn Bun (since v1 just came out)
- Speed coding
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 😎
!!! 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
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
- Elegance ✅
TypeScript
✨🦀- Bun v1.0.0 ♥ (awesome btw, bun >> node)