Skip to content

Add link to the used file #129

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
guoyunhe opened this issue Sep 24, 2014 · 6 comments
Closed

Add link to the used file #129

guoyunhe opened this issue Sep 24, 2014 · 6 comments

Comments

@guoyunhe
Copy link

Page: http://processing.org/reference/shape_.html

The example uses a SVG file "bot.svg". When users want to run the example code, they must have a SVG file. If we provide a link to download, it will be convenient. Like this:

Example

PShape s;

void setup() {
  s = loadShape("bot.svg");
}

void draw() {
  shape(s, 10, 10, 80, 80);
}

Download used files:

@scotthmurray
Copy link
Member

Good point, but I don't think we have an easy facility for including external files in the reference. That said, I could see this being useful on other pages, such as the XML examples, where we discuss loading specific examples files.

This may be a longer-term planning issue. I'll leave this issue open for a bit in case others have input they'd like to add.

@benfry
Copy link
Contributor

benfry commented Sep 25, 2014

Another option would be to make sure they're included with the PDE examples (at least the ones that need files) and just point people to those from the online example.

Or this: processing/processing#73

@REAS
Copy link
Member

REAS commented Nov 5, 2014

I'm skeptical about this from the point of view of how much work is it to keep track of all of these files and modify the build scripts to include a download links vs. how much work it is for someone to grab a file to test in the example. Think about all of the reference entries that use images and the new reference entries that use sounds. The point of the reference is to "show how it's done" and examples are included with the software to provide examples to run and modify. All of the files are included as a part of the examples. If a person is looking at the reference for how to load an SVG file, it's likely she has an SVG.

@jkosoy
Copy link
Contributor

jkosoy commented Nov 5, 2014

I think there's a fair argument here, though -- there's the potential for confusion for minutes (or worse, hours) before one realizes you're simply missing a file. That seems especially true for anyone new to Processing.

Having said that, I agree with @REAS:: It certainly will not be easy to add that in to the existing reference utilities.

@REAS
Copy link
Member

REAS commented Nov 5, 2014

I'm very sympathetic to the desire of the original issue. I haven't been able to imagine a simple way to implement it yet that won't be fragile.

@scotthmurray
Copy link
Member

I'm closing this. Let's keep this on our dream wish list, in case we rebuild the site generation process from scratch, and a new, magical tool enables us to include external files. (For example, each example that includes an external file could auto-magically generate a link to a ZIP file that contains the whole thing, ready to go.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants