Is it possible to 'pipe' something into omniweb from the command line?
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!
|
|
FAQ | Members List | Calendar | Today's Posts | Search |
Is it possible to 'pipe' something into OmniWeb | Thread Tools | Search this Thread | Display Modes |
Member
2006-09-21, 08:47 PM
Is it possible to 'pipe' something into omniweb from the command line?
Post 1
|
Quote:
grep http://www.somesite.com index.html | open Alternately, you should be able to pipe it to the actual Omniweb binary file. The path to this is (assuming you have it in Applications) /Applications/OmniWeb.app/Contents/MacOS/OmniWeb You can do this with any app. I used to do it with Firefox (when I wanted Bluefish, a superb gnome html editor, to launch the html preview in a non-x11 browser), but the problem with Firefox was that calling the binary directly from the command line would launch an entirely new instance of the app, instead of opening a new window or tab. I'm ASSUMING that OW will behave the same way, but it may not. HTW. P
Post 2
|
Member
2006-09-21, 09:51 PM
Thanks for the suggestions,
Quote:
Code:
cat index.html | open Code:
cat index.html | open -a OmniWeb Quote:
Post 3
|
Because we ship our own copy of WebKit and we need it to load instead of the system one, you can't directly run OmniWeb as you showed--if you do you will end up with an OmniWeb window but no Menu (the previous app's menu will still be there).
This is because the executable specified in the Info.plist is actually OmniWeb-Launcher. I haven't had much luck launching that directly either.
Post 4
|
Quote:
For example, if you simply try open http://www.omniweb.com you get the desired outcome. I tried the following: echo http://www.omniweb.com | open and then I got the error that you got. Open seems to be an OS X thing, and not a standard Unix command. The man pages say that it "first appeared in Nextstep". I defer to the OG people on this one. Now, what x11 apps (like Bluefish) do is that they echo something like "open %s", where %s is, of course, the string value of the s variable, which contains the name of the html file. So, if you know any shell scripting, maybe you can try storing the value of the URI into a string variable, and then piping the string value to the open command. This should work, damnit, even though it's a bit of work! Hopefully open will become more Unix-like in the future. Perhaps something to bother Apple with? :) P
Post 5
|
Member
2006-09-22, 01:12 PM
I think that are two reasons
+ When I pipe something the 'open' command can't determine what kind of data is sent to it ... should it for example open BBEdit, Mail or OmniWeb ... so unless I specify the app, open doesn't know what to do. If I use a file the it can use the file extension to figure out what to do (the same if I use an url) + OmniWeb doesn't understand that it should read data from stdin The man page for open seems to support my first guess, as for the second I have no idea if it's correct or not
Post 6
|
Quote:
echo http://www.yahoo.com | lynx the command fails, even though lynx http://www.yahoo.com works. In the former case (the failure), what happens is that the letters are executed as lynx commands after lynx has launched. So, the problem does seem to be how commands like lynx and open handle parameters that are piped to them. I think that the workaround is to use some scripting to construct the correct expression using open, and executing that single expression. P
Post 7
|
It sounds like 'jem' wants to open arbitrary html without writing it to a file first--this isn't supported. You can do
Code:
cat index.html | open -f
Post 8
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Thank you for OmniWeb | Cady | OmniWeb General | 1 | 2011-04-23 04:47 AM |
OmniWeb 5.5.3 now available. | Forrest | OmniWeb General | 0 | 2007-01-09 06:26 PM |