Code Monkey home page Code Monkey logo

Comments (4)

Epicpkmn11 avatar Epicpkmn11 commented on August 22, 2024

Added (though in a slightly different way) in e1f665b

What I did is put the JSON right into the QR itself as my goal in this is to a very simplistic downloader and that's simpler imo.

It supports either arrays or objects, with arrays simply being a list of URLs that it prompts the user for location/name like normal and objects allowing you to set both the URL and the output path. Examples:

[
    "It'll print anything that doesn't start 'http'",
    "https://example.com",
    "http://uwu.xn--rck9c.xn--tckwe",
    "Thanks for downloading!"
]

{
    "sd:/example.html": "https://example.com",
    "": "Comments still work",
    "sd:/uwu.html": "http://uwu.xn--rck9c.xn--tckwe"
}

from dsidl.

Epicpkmn11 avatar Epicpkmn11 commented on August 22, 2024

Added external scripts in cc5b3a4, I did it a little differently as I don't particularly like relying on file extensions so to start one you put this in a QR:

{"dsidl:src": "https://example.test/script.json"}

("dsidl:src" was chosen since : makes it an invalid FAT path)

then the script file is:

{
    "dsidl": 1,
    "script": {
        "/program.nds": "http://example.test/data/program.nds"
    }
}

or such, with "dsidl" being a version number as a sanity check and incase it changes significantly in the future and "script" being the same as above, an object or array.

I did "script" instead of "files" since if I add unzipping I'll probably do it with either "sd:/file.zip": "unzip:/destination/path" or so or maybe making the items into objects so you can specify an action like in UU, imo works better together as then they can be mixed together in any order, download unzip download unzip or so.

from dsidl.

Merith-TK avatar Merith-TK commented on August 22, 2024

Id say this is an fair compromise,

so you can have

{
   "/game.nds":"https://example.com/roms/game.nds",
   "dsidl:src":"https://example.com/roms/game.json",
}

and have game.json pont out an series of other files needed as well that may or may not update at some point?

EDIT: I am also working on making release-workflows for you so you can just write an new release and have an QR code that points to the latest release always

from dsidl.

Merith-TK avatar Merith-TK commented on August 22, 2024

testing dsidl:src and it appears to work, however it does not prompt the user where they wish to have the file saved, and instead defaults to sd:/

opening new issue specifically for this

from dsidl.

Related Issues (20)

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.