Přejít na obsah


Fotka

GSAK stahování obrázků


  • Pokud chcete vložit odpověď, přihlašte se
4 odpovědí na toto téma

#1 PLAJ family

PLAJ family

    Advanced Member

  • Members
  • PipPipPip
  • 1 104 příspěvků(y)

Publikováno 30 červenec 2007 - 12:58

Nevíte někdo o makru pro GSAK, které by stáhlo obrázky z listingů pro offline prohlížení. Jde to samozřejmě ručně, najedu na kešku, počkám, až se dotáhnou obrázky a jdu dál. Pak už se mi zobrazí i když nejsem na netu. Ale nikdy nemám jistotu, že je to vše. Tohle by přece mohlo jít nějak zautomatizovat.
  • 0

#2 Honzik&Pavlinka

Honzik&Pavlinka

    Advanced Member

  • Members
  • PipPipPip
  • 270 příspěvků(y)

Publikováno 30 červenec 2007 - 14:17

Přesně stejný problém jsem již řešil na fóru GSAKu. Bohužel bez úspěchu. Také bych se přimlouval, kdyby GSAK uměl stahovat foto k logu a následně je zobrazovat offline.
  • 0
GPS: Garmin Oregon 550, Garmin-Asus M10, SW: GSAK 7.x.x, OziExplorer 3.95n, SmartMaps 3.x, OziExplorer CE 2.3x, BeelineGPS 1.9x

#3 SHANTI Team

SHANTI Team

    Advanced Member

  • Members
  • PipPipPip
  • 115 příspěvků(y)

Publikováno 30 červenec 2007 - 14:37

Podle mne hledate toto: http://gsak.net/boar...hl=offline foto je to ono?
  • 0

#4 suplere

suplere

    Advanced Member

  • Members
  • PipPipPip
  • 408 příspěvků(y)

Publikováno 30 červenec 2007 - 17:57

SHANTI Team napsal/a:
Podle mne hledate toto:
http://gsak.net/boar...hl=offline foto

je to ono?


Timto makrem se to resit da, ale ja jsem si ho jeste trochu upravil, sice je moje uprava dost amaterska, ve zkratce to popisu:

DATABASE Name="PQ_CZ" Action=select *vyber databaze kterou pouzivam

FILTER Name="Nenalezeny_30km" *filtr ve kterem chci vygenerovat HTML s obrazky

EXPORT Type=GPX Settings="Spoilersync" * generovani GPX pro Spoiler sync

RUNPGM pgm="C:\Program Files\SpoilerSync\spoilersync.exe" parms="-a" Wait=Yes * automaticke spusteni Spoilersync na dany fitr

Pote jiz je text vyse uvedene makro:
# get folder from saved settings if file exists
If FileExists($_Install + "\Macros\SpoilerSync.dat")
Set $pics = GetFile($_Install + "\Macros\SpoilerSync.dat")
# Just in case file permission error or something test for error
IF Left($Pics,7) = "*Error*"
Pause Msg="$Pics"
Cancel
EndIf
else
Set $pics = " "
# get the folder where the spoilers pics are
Input Msg="Enter the folder where the spoilder pics can be found" Default=$Pics VarName=$pics Browse="Folder"
If .not. FolderExists($pics)
Pause Msg="Error: Folder does not exist, Macro will now abort"
Cancel
Endif
EndIf



# Save the folder so don't have to key if same next time
Set $error = PutFile($_Install + "\Macros\SpoilerSync.dat",$pics)
# Just in case file permission error or something test for error
IF Left($Error,7) = "*Error*"
Pause Msg="$Error"
Cancel
EndIf
Set $ThisRecord = 0
Set $NumberFound = 0
Set $NumberPics = 0
Goto Position=Top


# now loop through the current subset to find corresponding spoilder HTML files
While .not. $_EOL
# set up totals to show status to user
Set $ThisRecord = $ThisRecord + 1
Set $status = "Now processing: " + "$ThisRecord" + " of " + "$_Count"
ShowStatus msg="$status"

Set $HtmFile = $Pics + "\" + $d_Code + ".html"
If FileExists($HtmFile)
# we have found a matching spoiler file so interrogate the HTML for pictures
Set $data = GetFile($HtmFile)
# remove all double quotes from data
Set $data = replace($_Quote,"",$data,false)
# get the number of pictures in the file
Set $Images = RegExCount("<img src=.*?>",$data)
Set $x = 0
Set $NumberFound = $NumberFound + 1
Set $Link = " "
While $Images > $x
Set $NumberPics = $NumberPics + 1
Set $x = $x + 1
Set $Image = RegExData("<img src=.*?>",$data,$x)
# Get everthing after the =
Set $image = Extract($Image,"=",2)
# remove the terminating > tag
Set $image = Extract($Image,">",1)
# genrate the required URL syntax to add to GSAK user notes
Set $image = $image + $_NewLine + "<img src='file://" + $pics + "\" + $image + "'><br><br>"
Set $Link = $link + $image + $_NewLine
EndWhile
Set $Link = "*Spoiler Pictures*" + $_NewLine + $Link + "*End Spoilers*"
Set $UserNote = $d_UserNote

# now if alredy spoiler pictures in user notes we must remove them and replace
# with he ones just found
if RegEx("\*Spoiler Pictures\*",$UserNote)
# preserve any notes before the spoilers
Set $Part1 = Extract($d_UserNote,"*Spoiler Pictures*",1)
# preserve any notes after the spoilers
Set $Part2 = Extract($d_UserNote,"*End Spoilers*",2)
# now insert then new spoiler links
Set $UserNote = $Part1 + $Link + $Part2
Else
# else part - No spoiler pictures, but we must put them in before the User logs
If RegEx("\$~",$UserNote)
# User losgs found, so seperate the user notes from the logs
Set $User = Extract($UserNote,"$~",1)
Set $Log = Extract($UserNote,"$~",2)
# now put in the spoiler links between the two
Set $UserNote = $User + $link + "$~" + $Log
else
# else there are no user logs, so just add the spoilers to any user notes
Set $UserNote = $UserNote + $Link
EndIf
EndIf
Set $d_UserNote = $UserNote
EndIf
Goto Position=Next
EndWhile
Goto Position=Top

a naposledy udelam HTML export:

EXPORT Type=HTML Settings="HTML"
(v ulozenem HTML exportu je dulezite nastavit na karte Advanced zaskrtnout Convert and Copy file a dale Remove picture.

Zkuste uvidite, pokud bude chtit makro, tak mi poslete mail a ja vam ho poslu, ale jak rikam delal jsem to narychlo........
  • 0

#5 XiXi_team

XiXi_team

    Advanced Member

  • Members
  • PipPipPip
  • 656 příspěvků(y)
  • LocationKladno

Publikováno 01 listopad 2007 - 12:16

Zkouším spoilersync a nějak mě nesedí. Třeba u ComputerCache #5 mi stáhne 4 obrázky. Z toho 3 z hlavní stránky a jeden z galerie. Přitom v galerii jich je více. Jaký je princip toho programu? Přišel na to někdo? Takhle si nejsem jistý, že se mi fakt stáhli všechny obrázky.
  • 0

Garmin Oregon 650 + Topo Czech 2013 Pro & GSAK v8 & Android Locus PRO
GSAK - Google mapy pro Colorado/Oregon, Export pro GeoKuk
Android - Šifrovací pomůcky, Keškoměrka





0 uživatel(ů) prochází toto téma

0 uživatelů, 0 návštěvníků 0 anonymních uživatelů

Reklama