Locator 3.5

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

#21 Post by Geoffrey »

Argolance wrote: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..
I'm glad you like it, I really haven't had much to do with gettext, not sure how the Gui would look with the different length of words, as I did juggle with it to keep it symmetrical.

I guess I could give it a try, though it may take me awhile to do so, as I haven't been very active with puppy for some time now and at the moment I'm helping my son renovate his house, so slowly slowy :D .
[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:

#22 Post by Argolance »

Bonjour,
I'm glad you like it,
Thanks to Médor who drew our attention on, in the French part of the Forum!
not sure how the Gui would look with the different length of words, as I did juggle with it to keep it symmetrical.
Yes, I well understand... One English word often needs two/three French words to be correctly translated. All the same with Spanish and German. But this only concerns the main window and particularly the two red icons' Search' and 'Update' (respectively 'Chercher' et 'Mettre à jour' in French :oops:). Note that they are very explicit by themselves and might be with no label and just show their popup on mouse hovering?
I'm helping my son renovate his house, so slowly slowy
Good luck!

Cordialement.

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

#23 Post by Geoffrey »

I'm still playing with this script, I haven't done anything with language yet but have added a few features.

It now can view hybrid image as well as the plain map and satellite images.

The location text size and color can be changed.

When saved as a pdf or svg they now have a hyperlink added that opens the location in google maps, uses ghostscript to add the hyperlink to the pdf, svg is just a sed command that appends the svg file with the required code.

From the testing I've done it seems work as I planned.

If you wish to try it, the /root/.locator file will need to be deleted first

Sample svg with hyperlink

Sample pdf with hyperlink

edit grammar
Attachments
locator3.7.jpg
(56.77 KiB) Downloaded 457 times
locator.tar.gz
(8.85 KiB) Downloaded 284 times
Last edited by Geoffrey on Sun 06 May 2018, 21:22, edited 2 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]

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#24 Post by perdido »

Hi Geoffrey,

Never properly thanked you for this excellent little program.

THANK YOU!

Whenever I need to look up a city or address anywhere on earth this program
always comes through with excellent maps, satellite views and even google street views.

.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

#25 Post by mikeslr »

Hi Geoffrey,
perdido wrote: THANK YOU!

.
Ditto. And thanks you perdido for doing pelo's job --bringing to our attention excellent applications which otherwise might be forgotten.

mikesLr

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#26 Post by smokey01 »

@Geoffrey,

Nice app, although it doesn’t adjust the the GUI for dual screens.

The xwininfo command sees my screen as 3360 which it is if you add both screen together. (2 x 1680)

This dodgy fix at line 29 solve it for me.
#H=$(bc <<< "scale=2; 480 / 640 * $WIDTH")
H="700"

It does add a scroll bar to the mix but that's ok.

Cheers

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

#27 Post by Geoffrey »

smokey01 wrote:Nice app, although it doesn’t adjust the the GUI for dual screens.
Yea Smokey, how it displays isn't the best, I would of liked the UI and image resizeable on the fly, but the limitations of gtkdialog made that impossible, for me anyway :wink:
[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
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

#28 Post by Marv »

Hi Geoffrey,

I've been happily using and installing locator for quite a while now, mostly on X-slacko and earlier pups. Some time ago I noticed that the fixed map wasn't displaying on newer pups such as Tahr, Xenial or the various LxPupSc's. Pretty much ignored it as a click through opens the google map in the default browser just fine. Just now did a bit of chasing and made a little test file that only embeds a presaved png into a svg and saves that svg so I can look at it, and the librsvg version is almost certainly the culprit. X-slacko 4.2 has the 2.36.4 version and works. X-tahr 2.0 has the 2.40.2 and fails. Anything with newer libs yet also fails. Substituting the 2.36.4 libs into X-Tahr suceeds. The tag line that fails in the 3.7 locator is (older versions behave identically):

322: <image xlink:href="/tmp/locator/.png"
323: width="640" height="480" />

The text is always embedded correctly and play as I might with the image tag line, it always embeds in the older libs but never in the newer. I'm quite sure I've ruled out any hardware/display factors by the simple file generating test prog I used (I am an all intel shop though). Never any terminal errors, either in sucessful or unsucessful embeds.

I've searched for any changes in the svg tag line requirements that might make this happen and tried other examples posted online with the same result.. rectangles, circles, base64 images, text all work in both. embedding pngs doesn't. I don't see anything out of line with that tag line at all. Any svg gurus out there?

It's a small thing but It's so stunning when the lil map just pops up :)
X-slacko-4.2 is still my workhorse but in some users cases I've had to move beyond it for CUPS version/printer support and it'd be great to have the little critter working fully there too.

Cheers,

edited for typo. one svc should have been svg.
Last edited by Marv on Sun 06 Aug 2017, 21:36, edited 2 times in total.
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#29 Post by perdido »

Marv wrote:Hi Geoffrey,

I've been happily using and installing locator for quite a while now, mostly on X-slacko and earlier pups. Some time ago I noticed that the fixed map wasn't displaying on newer pups such as Tahr, Xenial or the various LxPupSc's. Pretty much ignored it as a click through opens the google map in the default browser just fine. Just now did a bit of chasing and made a little test file that only embeds a presaved png into a svg and saves that svg so I can look at it, and the librsvc version is almost certainly the culprit. X-slacko 4.2 has the 2.36.4 version and works. X-tahr 2.0 has the 2.40.2 and fails. Anything with newer libs yet also fails. Substituting the 2.36.4 libs into X-Tahr suceeds. The tag line that fails in the 3.7 locator is (older versions behave identically):

322: <image xlink:href="/tmp/locator/.png"
323: width="640" height="480" />

The text is always embedded correctly and play as I might with the image tag line, it always embeds in the older libs but never in the newer. I'm quite sure I've ruled out any hardware/display factors by the simple file generating test prog I used (I am an all intel shop though). Never any terminal errors, either in sucessful or unsucessful embeds.

I've searched for any changes in the svg tag line requirements that might make this happen and tried other examples posted online with the same result.. rectangles, circles, base64 images, text all work in both. embedding pngs doesn't. I don't see anything out of line with that tag line at all. Any svg gurus out there?

It's a small thing but It's so stunning when the lil map just pops up :)
X-slacko-4.2 is still my workhorse but in some users cases I've had to move beyond it for CUPS version/printer support and it'd be great to have the little critter working fully there too.

Cheers,
Hello Marv,

Thanks for pointing that out.

I get the same not displaying map in Locator window with Puppy Tahr 6.0.5., hardware is a Dell laptop with Nvidia graphics.
I always click the Locator window to open the defaultbrowser but I agree it is neat having the map pop up in the Locator
window first.

It works fine for me in Puppy Precise 5.7.1 - to mean it shows the map in the Locator window and opens the browser when
clicking the map. Puppy Precise 5.7.1 has the librsvg-2.so.2.36.1

If one were to permanently substitute the older librsvg-2.36 package into Tahr & Xenial would that necessarily cause issues
in those OS's, or maybe just not be noticeable?

.

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#30 Post by perdido »

So just playing with the librsvg substitution and I confirm it fixes the Locator window map display in 32-bit Tahrpup 6.0.5, 32-bit puppy Xenial or 32-bit puppy Stretch to show the map.

Subsituted /usr/lib/librsvg libs from 32-bit precise into 32-bit tahr, xenial and stretch.

So in 32-bit Puppy Tahr, 32-bit puppy Xenial or 32-bit puppy Stretch
Renamed /usr/lib/librsvg-2.so to librsvg-2.so.old
Renamed /usr/lib/librsvg-2.so.2 to librsvg-2.so.2.old

Then copied the following from 32-bit Puppy Precise 5.7.1 to Puppy Tahr 6.0.5. 32-bit puppy Xenial or 32-bit puppy Stretch
Copied /usr/lib/ librsvg-2.so to /usr/lib/
Copied /usr/lib/ librsvg-2.so.2 to /usr/lib/
Copied /usr/lib/ librsvg-2.so.2.36.1 to /usr/lib/

Locator now showing its map as expected.
So far no problems in 32-bit Tahrpup, 32-bit puppy Xenial or 32-bit puppy Stretch from the librsvg switch. Will report back if something gets broken.

If you want to play around with this the libs from ubuntu Precise 12.04 can be found at the following links.
Of course this is a use at your own risk experiment :!:

The 32-bit version of librsvg-2.36 can be found at http://ibm-pc.org/puppy/precise/librsvg ... 2_36.1.pet

The 64-bit version of librsvg-2.36 from ubuntu can be found at http://security.ubuntu.com/ubuntu/pool/ ... _amd64.deb
Note that have not been able to substitute the libs in a 64-bit puppy and make it work....yet.
If you find a way for 64-bit please post here!

edit: added some info & changed link to 32-bit pet because of missing symlink in ubuntu deb
Last edited by perdido on Mon 21 Aug 2017, 19:44, edited 9 times in total.

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

#31 Post by Geoffrey »

Thanks guys, I tried to find the problem with Tahr a while back but gave up as I thought it was the way I was doing things, as MochiMoppel pointed out here.
MochiMoppel wrote:Everything is fine as long as you use absolute paths for your image. Relative paths seem to work only in browsers. Inkscape has the same limitation. Hardly a "bug", and definitely not a Tahr issue.
http://murga-linux.com/puppy/viewtopic.php?t=98133
[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
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

#32 Post by Marv »

I'm back in LxPupSc 17.08.1 which has librsvg 2.40.18, pretty much represents the current woof-ce, and has the failed embedding. Checked all of the dependencies listed on the librsvg site for that version and they are present, woof-installed, and the version numbers are exactly what is called for. Quickly tried a direct sub. of the older libraries and not unsurprisingly that wouldn't display any of the system icons. Alas, no progress, just a bit of additional data.
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#33 Post by perdido »

Just an update about librsvg libs substitutions in 32 & 64 bit Xenialpup.

In 32-bit Xenialpup 7.0.8.1 substituting the librsvg libs from 32-bit precise fixes the Locator window map display in 32-bitXenialpup with no ill system effects so far.

In 64-bit Xenialpup 7.0.8.4 substituting the librsvg libs from 64-bit ubuntu precise does not fix the Locator window map display in 64-bit Xenialpup.

.

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#34 Post by perdido »

Udate about librsvg substitution in ttuuxxx 32-bit debian stretch-7.0.0a1

Works fine with no ill affects so far.

hamoudoudou

discovered in Green Puppy XFCE Chloe This Morning.

#35 Post by hamoudoudou »

discovered in Green Puppy XFCE Chloe This Morning. Good Idea to include it In your builds.
By Moat, April 2017 "Tahr is just my fat, amateur-ish, heavily re-mastered X-Tahr 2.0, by the Master Xfce Pup guru, rg66 - "
Does it really need translation ? Words are French words, Latin words
map = carte
save = sauver (Jpg 6x less than PNG)
Attachments
capture11008.jpg
Does it really need translation ?
(99.32 KiB) Downloaded 714 times

User avatar
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

#36 Post by Marv »

Here is a modified Locator 3.7 I use now. The embedded map displays in newer pups with it. It is Geoffreys 3.7 with perdidos library substitution (THANKS!) incorporated using LD_PRELOAD so the older libraries are used only by Locator (see lines 10 through 12 in the script). LD_PRELOAD will accept entries as a (: or space) delimited list but separate entries are easier to read IMO. At this point I have used this in enough different 'modern' pups over enough time with no problems so I'll post it. 32 bit pups only at this time. The icon etc can obviously be changed to suit. It is just the one I use cross-pup at the moment.
Attachments
locator-3.7.1.pet
Patched for embedding in newer 32b pups.
(106.21 KiB) Downloaded 358 times
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

User avatar
perdido
Posts: 1528
Joined: Mon 09 Dec 2013, 16:29
Location: ¿Altair IV , Just north of Eeyore Junction.?

#37 Post by perdido »

Marv wrote:Here is a modified Locator 3.7 I use now. The embedded map displays in newer pups with it. It is Geoffreys 3.7 with perdidos library substitution (THANKS!) incorporated using LD_PRELOAD so the older libraries are used only by Locator (see lines 10 through 12 in the script). LD_PRELOAD will accept entries as a (: or space) delimited list but separate entries are easier to read IMO. At this point I have used this in enough different 'modern' pups over enough time with no problems so I'll post it. 32 bit pups only at this time. The icon etc can obviously be changed to suit. It is just the one I use cross-pup at the moment.
Hi Marv!
Outstanding!!!
This is working fine in UPUP Bionic Beaver :)

Thanks a lot for fixing this for the later pups!!!

.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#38 Post by BarryK »

Hi guys,
Locator is nice, but I hit that same problem with librsvg.

As far as I can make out, librsvg no longer supports xlink:href="file://". Instead, you have to embed the image, in base64, and use xlink:href="data:".

base64 utility is a busybox applet, and should be in most/all pups and dogs.

I edited version 3.5, as that is the latest in the first page. /usr/bin/locator, line 274:

Code: Select all

#20180911 librsvg no longer supports xlink:href="file:, need to embed image...
base64 /tmp/locator/.png > /tmp/locator/base64.txt
echo "<svg width=\"640\" height=\"${IMAGE_HEIGHT}\">
   <image width=\"640\" height=\"480\" xlink:href=\"data:image/png;base64," > /tmp/locator/map.svg
cat /tmp/locator/base64.txt >> /tmp/locator/map.svg
echo '" />' >> /tmp/locator/map.svg

echo   '<text x="50%" y="'$TXT_LINE1'%"
	  style="text-anchor: middle; fill: '$FILL'; stroke: none; font-weight: bold; font-family: serif; font-size: '$FONT_SIZE'px;">
      '$ADDRESS'    
</text>
<text x="50%" y="'$TXT_LINE2'%"
	  style="text-anchor: middle; fill: '$FILL'; stroke: none; font-weight: bold; font-family: serif; font-size: '$FONT_SIZE'px;">
      '$ADDRESS2'    
</text>
<text x="50%" y="'$TXT_LINE3'%"
      style="text-anchor: middle; fill: '$FILL'; stroke: none; font-weight: bold; font-family: serif; font-size: 18px;">
     Latitude: '$LATITUDE' Longitude: '$LONGITUDE'
</text>     
</svg> ' >> /tmp/locator/map.svg
Works!
Well, the above could be improved, can remove that intermediate "base64.txt".

Script attached, remove the .gz, set executable:
Attachments
locator.gz
false .gz, just rename to 'locator'
(38.77 KiB) Downloaded 235 times
[url]https://bkhome.org/news/[/url]

User avatar
Marv
Posts: 1264
Joined: Wed 04 May 2005, 13:47
Location: SW Wisconsin

#39 Post by Marv »

Thanks!
Tested in upupcc-18.09alpha1 and lxpupsc64-18.06 +6 for now as those are what I'm running most. Also applied BarryKs patch to Geoffreys 3.70 and tested it in the above pups. It is working well in both.
Last edited by Marv on Tue 11 Sep 2018, 22:25, edited 1 time in total.
Pups currently in kennel :D Older LxPupSc and X-slacko-4.4 for my users; LxPupSc, LxPupSc64 and upupEF for me. All good pups indeed, and all running savefiles for look'n'feel only. Browsers, etc. solely from SFS.

roadkill13
Posts: 154
Joined: Wed 10 Aug 2011, 21:41
Location: United States
Contact:

#40 Post by roadkill13 »

@Marv wrote:
Tested in upupcc-18.09alpha1 and lxpupsc64-18.06 +6 for now as those are what I'm running most. Also applied the patch to Geoffreys 3.70 and tested it in the above pups. It is working well in both.
I successfully tested the patch with Marv's version 3.7.1 in Quirky Xerus 8.6 as well. Thank you for that version Marv. Geoffrey had a great idea!

@BarryK

Thank you for the patch.

Post Reply