Locator 3.5

Miscellaneous tools
Message
Author
User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

Locator 3.5

#1 Post by Geoffrey »

New version 3.5
Added option for larger map image.
Settings for zoom, map or satellite, text position and image size saved.
Fixed image not shown if there is a ampersand "&" in the location text, now replaces the "&" with "and".

New version 3.4
Added preference settings to select default save directory and file type, added more zoom levels

New version 3.3

Locator now only uses rsvg-convert to save the image as either PNG, PDF, EPS, PS, SVG, depending on the version of rsvg-convert used all these save formats may not be available.
Added error messaging and click on image to view location with Google Maps.

New version 3.2

Latest update, now the location text can be edited and positioned beneath the image.
The search now works a little better with the inclusion of comma's "," between each word within the script search string.
fixed a few annoyances, now functions cleanly, clearing the gui image and text on non searchable terminology.

New version 3.1

Latest version now has the location and coordinate text on the image, this can be saved as a PDF or PNG, PDF text is selectable.
The PDF save uses rsvg-convert, I think that's standad on most pups, the PNG save requires gst-launch-0.10, that's gstreamer with plugin-bad from what I gather.
To create a save just name the file something.pdf or something.png, if it don't work then you are missing the needed applications, to check if you have them

Code: Select all

# which gst-launch-0.10
/usr/bin/gst-launch-0.10
# which rsvg-convert
/usr/bin/rsvg-convert
The image text is black on the map and white for the sat image, long text strings are folded to a second line, that should be enough from the tests I've done.
Hope this is found to be of some use :)

New version 3.0
bug fixes
Reworked the GUI, no custom font's, enabled maximize, image now is resized to suit screen resolution, tested at 640x480, not that anyone would use that lower res.
changed zoom spinbutton to combobox, this makes it easier and quicker to specify a zoom level.
should be able to add gettext to this now,

New version 2.0, now views map image or satellite image with zoom.

I used the entry input as in pfind, just input the search text and hit enter on the keyboard. I found zoom works best with the scroll wheel, the mouse button sometimes jumps two steps.

I'm not at all proficient with scripting so others may like to do more to this.

If you have installed the older versions remove them first, as I have renamed the script "locator", it was "locator.sh".

New version 1.1, smaller GUI, larger font, will only run the one instance and can view the location on Google maps.
Attachments
locator-3.5.pet
(10.7 KiB) Downloaded 608 times
locator3.5.jpg
(120.24 KiB) Downloaded 765 times
locator-3.4.pet
(10.09 KiB) Downloaded 427 times
locator3.4.jpg
(37.71 KiB) Downloaded 816 times
locator-3.3.pet
(9.54 KiB) Downloaded 462 times
locator3.3.jpg
(57.34 KiB) Downloaded 883 times
Last edited by Geoffrey on Wed 06 May 2015, 11:37, edited 12 times in total.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

Jasper

#2 Post by Jasper »

Hi Geoffrey,

It's brilliant and lightning fast.

One aspect, which may be of interest, is if I enter my home address as:

House No, Street Name, Village, Town

xxxx xxx my full 7 character postcode is accurately displayed.

However, if my village is omitted, I get

xxxx (the first four characters of my postcode).

My regards and thanks

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#3 Post by Geoffrey »

Jasper wrote:xxxx xxx my full 7 character postcode is accurately displayed.

However, if my village is omitted, I get

xxxx (the first four characters of my postcode).
I find that some aren't shown correctly unless it's give more info, a Google thing, other than a few minor glitches it works ok.

I was looking for a way to get coordinates, everywhere I looked it said that a key was required for the Google maps api, apparently not.

I've made a few changes, set the display font size, tightened the GUI, it was a bit big, now only one instance will run and you can view the location on Google maps.

New version 1.1 first post
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#4 Post by Geoffrey »

Updated to version 2.0, now views maps and satellite images with zoom, see first post.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
neerajkolte
Posts: 516
Joined: Mon 10 Feb 2014, 07:05
Location: Pune, India.

#5 Post by neerajkolte »

Thanks Geoffrey

Works Fine in Fatdog64-700.
Thanks.

- Neeraj.
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson

“We tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run.â€￾
- Amara’s Law.

User avatar
josejp2424
Posts: 556
Joined: Sun 01 Aug 2010, 22:35
Contact:

netbook

#6 Post by josejp2424 »

Very good program, but gives problems in netbook screen with 10.

Not allows you to maximize.
Sorry for my english

Image

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

Re: netbook

#7 Post by Geoffrey »

josejp2424 wrote:Very good program, but gives problems in netbook screen with 10.

Not allows you to maximize.
Sorry for my english
The reason the gui don't fit your screen is that the font's other than the buttons are of a fixed size, the image is also fixed at 640x480.

I'll have a look at it and see what I can do, might have to scale the image to suit screen resolution.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#8 Post by Geoffrey »

Updated to version 3.0, it's now a more conventional GUI layout, see first post.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
josejp2424
Posts: 556
Joined: Sun 01 Aug 2010, 22:35
Contact:

locator

#9 Post by josejp2424 »

Now yes Thanks

Image

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

Re: locator

#10 Post by Geoffrey »

josejp2424 wrote:Now yes Thanks
Here's a new version 3.1 with text on image, see first post.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#11 Post by Geoffrey »

Updated to version 3.2, see first post.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#12 Post by Geoffrey »

Updated to version 3.3, see first post.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#13 Post by Moat »

Neat little app - very fast and light way to access Google maps!

But these eyes are gettin' old, so - hope you don't mind a little feedback...

1) I can't re-size or maximize the window - the titlebar's maximize button is non-functional, and there are no drawn window borders to "grab" (Locator v3.3 on Precise 5.7.1 with Openbox as the WM). 1280x800 pix screen laptop.

Not sure if the actual image would/should resize larger, anyways...? Probably an Openbox-specific thing. Tried fiddling around with the size parms in the script, but found it to be a bit over this noob's head... :oops:

2) In using, I find I'm wishing the zoom went out further - like maybe another 5 steps (i.e. 15-ish steps total) - out to, say, 500 kilometers or thereabouts. 25, 50, 100, 250, 500 km steps, maybe. That'd be nicer for quickly saving a "how do I get to that town?" map as a traveling/trip planning reference.

3) Also would be pretty slick if the image last saved directory (i.e. Pictures directory) and format (.png, .pdf, etc...) were saved between uses - or some way to at least set defaults for those.

In any case, a sweet little app - and a great lightweight addition to Puppy! Thanks,

Bob

Rangan Masti
Posts: 37
Joined: Tue 01 Jan 2013, 19:23
Location: Germany, Berlin

#14 Post by Rangan Masti »

I find this app good :lol:

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#15 Post by Geoffrey »

Updated to version 3.4, see first post.
Moat wrote: 1) I can't re-size or maximize the window - the titlebar's maximize button is non-functional, and there are no drawn window borders to "grab" (Locator v3.3 on Precise 5.7.1 with Openbox as the WM). 1280x800 pix screen laptop.
No the GUI is not resizable, the image determines the size, the image from google is a maximum of 640x640, the size downloaded is 640x480 then reduced to ⅓ for the display, this is so the GUI fits the screen in different resolutions.
Tried fiddling around with the size parms in the script, but found it to be a bit over this noob's head
You can set the displayed image to ½ size, that might work for you ok, just edit the script at line number 29 change the 3 to a 2

Code: Select all

WIDTH=$(( $W / 3 ))
2) In using, I find I'm wishing the zoom went out further - like maybe another 5 steps (i.e. 15-ish steps total) - out to, say, 500 kilometers or thereabouts. 25, 50, 100, 250, 500 km steps, maybe. That'd be nicer for quickly saving a "how do I get to that town?" map as a traveling/trip planning reference.
Done added extra zoom levels.
3) Also would be pretty slick if the image last saved directory (i.e. Pictures directory) and format (.png, .pdf, etc...) were saved between uses - or some way to at least set defaults for those.
Also done, thanks for the feedback.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
Moat
Posts: 955
Joined: Tue 16 Jul 2013, 06:04
Location: Mid-mitten

#16 Post by Moat »

Geoffrey wrote:Also done...
Lol! :D Fantastic! Thanks much, Geoffrey. This application just became 10x more useful, for me.

Preferences working just as they should, here.

And yes - setting the displayed image to 1/2 via the line 29 tweak does the trick on this monitor.

Great app! Just too cool... 8)

Thanks again,

Bob

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#17 Post by Geoffrey »

Updated to version 3.5, see first post.
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
vovchik
Posts: 1507
Joined: Tue 24 Oct 2006, 00:02
Location: Ukraine

#18 Post by vovchik »

Dear Geoffrey,

Thanks very much for Locator. It is very slick and requires very little, which is great. I took the trouble of optimizing the Google maps svg, and it is now clearer, to me anyway, and 1/3 the size. Maybe you can make use of it.

With kind regards,
vovchik
Attachments
google-maps.svg.tar.gz
(3.39 KiB) Downloaded 248 times

User avatar
Geoffrey
Posts: 2355
Joined: Sun 30 May 2010, 08:42
Location: Queensland

#19 Post by Geoffrey »

vovchik wrote:Dear Geoffrey,

Thanks very much for Locator. It is very slick and requires very little, which is great. I took the trouble of optimizing the Google maps svg, and it is now clearer, to me anyway, and 1/3 the size. Maybe you can make use of it.

With kind regards,
vovchik
Glad you like it, I was going to add more features, but opted not to, it works fine as is and doing so would of made it overly complex, your svg works fine, though I had to change all the single quotes(') to double(") for it to work in the script.

Here is a tar.gz with your svg for anyone that wants it, just extract it to /usr/bin to replace the existing file, or if you don't have the pet installed the script can be run from anywhere you like as a standalone.

I'm running this in X-Slacko 4.1, the only function that doesn't work is the save as eps, this version of rsvg-convert wasn't compiled with the support for it.
Attachments
locator-3.6.tar.gz
(8.46 KiB) Downloaded 281 times
locator.jpg
(42.49 KiB) Downloaded 574 times
[b]Carolina:[/b] [url=http://smokey01.com/carolina/pages/recent-repo.html]Recent Repository Additions[/url]
[img]https://dl.dropboxusercontent.com/s/ahfade8q4def1lq/signbot.gif[/img]

User avatar
Argolance
Posts: 3767
Joined: Sun 06 Jan 2008, 22:57
Location: PORT-BRILLET (Mayenne - France)
Contact:

#20 Post by Argolance »

Bonjour Geoffrey,
Thank you for this!
Do you think it would be possible to internationalize your application (using gettext - Note that I eventually could do it and make the French mo file in the wake...)?

Cordialement..

Post Reply