Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/niblyx-malnus/surf
control your current url
https://github.com/niblyx-malnus/surf
Last synced: about 1 month ago
JSON representation
control your current url
- Host: GitHub
- URL: https://github.com/niblyx-malnus/surf
- Owner: niblyx-malnus
- Created: 2023-02-17T04:28:13.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-24T13:47:53.000Z (almost 2 years ago)
- Last Synced: 2024-08-03T01:13:30.816Z (5 months ago)
- Language: hoon
- Size: 60.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-urbit - Surf
README
# surf
control your current urlOpens 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.
- ...![](https://nyc3.digitaloceanspaces.com/s3.burtonjernigan/dev/surf/surf-ui.png)
![](https://nyc3.digitaloceanspaces.com/s3.burtonjernigan/dev/surf/surf-cli.png)
## Installation
1. Clone this repo.
2. Boot up a ship (fakezod or moon or whatever you use).
4. `|new-desk %surf` to create a new desk called `%surf`.
5. `|mount %surf` to access the `%surf` desk from the unix command line.
6. At the unix command line `rm -rf [ship-name]/surf/*` to empty out the contents of the desk.
7. `cp -r surf/* [ship-name]/surf` to copy the contents of this repo into your new desk.
8. At the dojo command line `|commit %surf`.
9. Install with `|install our %surf`.
10. Link the command line app with `|link %surf`.
11. Switch through command line apps with `Ctrl+X` until you see the `~zod:surf` prompt.
12. Type `;printer` and hit `ENTER` to see the currently saved `url`.
13. Open your browser to `[your-domain-name]/apps/surf`.
14. 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](https://github.com/niblyx-malnus/clibox).
- To learn more about using urbit's http-api you can go [here](https://github.com/niblyx-malnus/hapibox).## 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
```