Coder Social home page Coder Social logo

luminus-downloader's Issues

Luminus Folder Names With Slashes

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:

  1. Creating the folders locally, even though they don't exist on Luminus - possibly a hacky solution
  2. Adding an additional check in parent folder 'Tutorial Readings' to check if sub-folders have slashes, and if they do, to replace them with some other character for Unix systems

Any ideas on how to resolve this?

Missing npm package

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!

Downloaded .zip files in are in Windows format instead of Unix

problem

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.

Thank you.

No issues. Works incredibly well. Thanks for making this!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.