URL (vuo.url)

Nodes for breaking down a URL into its components.

Working with URL input ports

Many of Vuo’s Fetch nodes take a URL as input. These nodes can either load a file from the local system, or download a file from an Internet server.

To download a file from the Internet, copy the file’s URL from your browser. Example:

To load a file on the computer running the composition, create a URL from the file’s path. Examples:

Relative paths

If the file’s location doesn’t start with file:// or /, then it’s treated as a relative path. This is the option you’d typically want when sharing the composition with others. Vuo interprets relative paths differently depending on how the composition is run:

If you drag a file from Finder onto a URL port, Vuo will use a relative path to the file.

Absolute paths

If the file’s location starts with file:// or /, then it’s treated as an absolute path. If running the composition on a different computer than it was created on, the file needs to exist in the same location on that computer. To get the file’s path in the correct format, open the TextEdit application, go to Format > Make Plain Text, drag the file onto the TextEdit window, and copy the path that appears in the TextEdit window.

If you drag a file from Finder onto a URL port while holding (Option), Vuo will use the file’s absolute path.

User home directory paths

If the file’s location starts with ~/, then it’s expanded using the current macOS user’s home directory. For example, if the current username is lynn, the location ~/Documents/example.png is interpreted as /Users/lynn/Documents/example.png.

Data URIs

You can embed images and other data directly into a Vuo composition (without requiring any external files or web servers) by using the data: URI scheme. For example, if you paste this into the Fetch Image node’s URL port:

…it will output a red dot. This works for any Fetch * node’s URL port.

To convert a file into a Data URI, you can either use a web-based conversion tool such as datauri.vuo.org, or launch Terminal.app and enter this command: echo -n 'data:;base64,' ; base64 <path to image file> then paste the output into one of Vuo’s URL ports.



Example compositions:



Nodes: