Code Monkey home page Code Monkey logo

graze's Introduction

graze's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

graze's Issues

Replace the `~/graze` with `{app_data_folder}/graze`

This issue addresses the concern of where to put app/package data.
It resulted in the proposal of the
get_app_data_folder
function.

We should use this function to replace the ~/graze with {app_data_folder}/graze.

We need to figure out a good transition protocol too. For example, if the old folder exists, use that, but issue a warning telling the user they can move it to the new place to stop the warnings. Also let them know that the current package will then function as usual, but if they have anything else that depends on the old location, they should refactor there too.

Add the ability to notify the user that content is being downloaded.

Sometimes it can be useful to notify the user when content is being downloaded, since this can take some time, and we might not want to leave the user waiting, wondering what the wait is about.

Might as well abstract and generalize this immediately, including a preget argument, which, when not None, should be a function that will be called on the key before a url's content is downloaded from the internet (or whatever source[url] says to do).

We should have the default be preget=None to keep previous behavior the same.

url to local file mapping

Imagine you're grazing these, in that order:

https://github.com/thorwhalen
https://github.com/thorwhalen/graze  # can't write here since thorwhalen is already a file and now needs to be a directory
https://github.com/thorwhalen/graze/issues  # same issue

or in a different order:

https://github.com/thorwhalen/graze/issues
https://github.com/thorwhalen/graze  # can't write to graze as a file since it's already a directory
https://github.com/thorwhalen  # same problem

It's an actual puzzle, and I just went through the same "there's three incompatible requirements" thinking that this guy went through: https://www.w3.org/DesignIssues/HTTPFilenameMapping.html

Freakn annoying.

Simplest, cleanest map everything to something like

url -> root + url_with_out_http + "/content"

but then I loose the extension, for example:

http://www.audio.com/birds/coocoo.wav -> ~/graze/http/www.audio.com/birds/coocoo.wav/content

which is a shame, since .wav could be read directly by different apps of the local system, but if we loose the extension, the apps can't function normally.

But then if you start trying to include the extension, it becomes quite convoluted.
For example, is .com a file extension? No? So then we need to have a list of extensions to treat that way, and that list might change, so we have version problems etc.

We could:

https://github.com/thorwhalen
https://github.com/thorwhalen/graze  # move thorwhalen to thorwhalen/_content only if and when we need thorwhalen to be a folder
https://github.com/thorwhalen/graze  
https://github.com/thorwhalen  # just write to thorwhalen/_content

But in this case, we have a url-to-localfile mapping that depends on time. Does that matter? Do we give several choices?

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.