halfwhole / luminus-downloader Goto Github PK
View Code? Open in Web Editor NEWDownloads files and folders from LumiNUS
License: MIT License
Downloads files and folders from LumiNUS
License: MIT License
My friend came across this rare problem where if the folder name contains forward slashes, the code breaks (on MacOS and Linux, not sure for Windows).
For example, a path on Luminus can look like this:
My Modules > PS2240 > Files > Tutorial Readings > Tutorial 1-Admin affairs/grouping/case discussion > Tutorial.pdf
'Tutorial 1-Admin affairs/grouping/case discussion' is a permissible folder name on Luminus.
However, when fs
parses the path, the path looks like this: 'PS2240/Tutorial Readings/Tutorial 1-Admin affairs/grouping/case discussion', so the program thinks that 'grouping' and 'case discussion' are additional folders to be created.
More specifically, the code stops working at line 68 in downloader.js, when writeFile()
call is made in downloadFolder()
.
Possible solutions:
Any ideas on how to resolve this?
For lacking directory_path
in configuration settings, or for timeout.
Hi, just tried out this luminus-downloader (good stuff btw). I noticed that I was missing the yargs
package even after npm install
. This was solved by running an additional command in terminal to install it: npm i yargs
. Maybe it would be good to add this to README.md under the "Running the script" section in case others encounter this issue? Cheers!
Backslashes in Windows paths screw up the downloaded .zip file, and so it can't be extracted properly. This also happens when you download the .zip file as a folder from LumiNUS directly; it gives the same bad result. Dammit, LumiNUS. ๐ก
Sigh, have to find some way to either write the downloaded buffer as a Unix-formatted .zip file, or convert it after it's been written.
No issues. Works incredibly well. Thanks for making this!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.