Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 12 Dec 2018, 03:33
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to make MS .URL files open in your default browser
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [21 Posts]   Goto page: Previous 1, 2
Author Message
arizonagroove

Joined: 17 Aug 2007
Posts: 2

PostPosted: Fri 17 Aug 2007, 11:21    Post subject:  

Oh hang on - line endings? But they could be stripped off with not much more code couldn't they?
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6867
Location: Auckland, New Zealand

PostPosted: Fri 17 Aug 2007, 20:15    Post subject:  

Quote:
Having read this thread I'm left thinking that the method of extracting the url from the .url file is overly complicated and that one could just use

Code:
url=`grep ^URL "$i" | sed 's/URL=//'`


I don't have any examples to show you anymore, but there are a lot of .url files (mostly in Windows favourites folders) that contain a variety of extra information, and can have a number of lines that look like URL=address, so the additional code is needed to ensure that the script picks the right line. My third post in this thread mostly relates to this.

I don't think the code to strip line endings is actually necessary.
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6867
Location: Auckland, New Zealand

PostPosted: Sat 08 Mar 2008, 08:30    Post subject:  

OK, I found what seem to be freakish files that don't work. Here is one. If anybody can figure out what is different about it, please enlighten me. It is 3 bytes larger than if I copy the same text into another file (which then works).

The reason it doesn't work is because of outputing a line (with number), fgrep says "Binary file PuppyL.URL matches"
PuppyL.URL.gz
Description 
gz

 Download 
Filename  PuppyL.URL.gz 
Filesize  111 Bytes 
Downloaded  292 Time(s) 
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6867
Location: Auckland, New Zealand

PostPosted: Sat 08 Mar 2008, 08:53    Post subject:  

OK, I thought maybe I made those files in Linux, and that was why it didn't work, so for testing I made three files with the same content, with LF, CR and both encoding types, and the CR one doesn't work, but doesn't have the extra three bytes, and fails at the first url=... line instead.
I don't get it Sad
Still, this is the first time I've had any trouble, so I suspect it is just files made in Linux that can cause problems.
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6867
Location: Auckland, New Zealand

PostPosted: Sat 16 Jul 2011, 20:26    Post subject:  

For reference, there's also nsurl:
v 0.1 in c
v 0.2 in perl
And some scripts over at ubuntu:
some in bash
eventually in Python.

_________________
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6867
Location: Auckland, New Zealand

PostPosted: Fri 24 Aug 2018, 00:59    Post subject:  

Note that recent versions of Internet Explorer have both Favourites (stored somewhere like "C:\Users\your_name\Favorites") and "Pinned Sites" (stored somewhere like "C:\Users\your_name\AppData\Local\Microsoft\Internet Explorer\Pinned Sites").

The "Pinned Sites" are in newfangled "*.website" files. These look like a fairly simple extension of the old *.url files, and they are also now the default if you drag and drop a page into windows explorer (you need to hold shift to get a *.url). The point in the new format is supposed to be to support things like jumplists and push notifications and favicons, although it seems to me that the latter were already supported.

I haven't tested (or looked back at any of the code), but tools for dealing with *.url files are likely to work for *.website files without modification.

_________________
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [21 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0628s ][ Queries: 13 (0.0327s) ][ GZIP on ]