Skip to content

niblyx-malnus/surf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 

Repository files navigation

surf

control your current url

Opens an iframe in your browser whose url can be set and controlled from your urbit. Navigate around the web directly from your urbit command line. (Or at least those portions of the web which allow themselves to be displayed in an iframe...)

Why?

Just a simple toy with several shortcomings, but seems effective enough that it could be a jumping off point to build some other cool little toys.

  • Leverage regular patterns in urbit app urls to build tools to give you fine grained control over how you navigate around your ship's frontend interface.
  • Navigate around the regular web using patterns you've saved and tools you've built on your urbit.
  • ...

Installation

  1. Clone this repo.
  2. Boot up a ship (fakezod or moon or whatever you use).
  3. |new-desk %surf to create a new desk called %surf.
  4. |mount %surf to access the %surf desk from the unix command line.
  5. At the unix command line rm -rf [ship-name]/surf/* to empty out the contents of the desk.
  6. cp -r surf/* [ship-name]/surf to copy the contents of this repo into your new desk.
  7. At the dojo command line |commit %surf.
  8. Install with |install our %surf.
  9. Link the command line app with |link %surf.
  10. Switch through command line apps with Ctrl+X until you see the ~zod:surf prompt.
  11. Type ;printer and hit ENTER to see the currently saved url.
  12. Open your browser to [your-domain-name]/apps/surf.
  13. Type ;set-url 'http[s]://[your-domain-name]' and hit ENTER from the CLI to navigate to your urbit's frontend.

More Resources

  • To learn more about building urbit command line interfaces you can go here.
  • To learn more about using urbit's http-api you can go here.

Basic Documentation

Pokes

mark: %surf-action
poke-as-noun: [%set-url url=cord]

poke with http-api:
  poke('surf', 'surf-action', {
    "set-url": "https://urbit.org/"
  })

Scries

Dojo:    .^([%url cord] %gx /=surf=/url/noun)
Browser: [your-domain-name]/~/scry/surf/url.json

Subscription Paths

/url

About

control your current url

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published