• Willkommen im Geoclub - dem größten deutschsprachigen Geocaching-Forum. Registriere dich kostenlos, um alle Inhalte zu sehen und neue Beiträge zu erstellen.

Export HTML > Bilder futsch ?

DJTOMCAT

Geocacher
Hallo

GSAK ist ja wirklich ein nettes Tool, aber wenn ich das ganze dann auf Export HTML auf den PDA spiele sind alle Bilder weg. Gibts da nicht ne möglichkeit wie bei YaGcU dass die bilder mitkopiert werden, die URL angepasst wird und dann auf den PDA auch angezeigt werden ?

Habe zwar was in Englisch gefunden

Code:
Convert, Copy images (File=>Export=>HTML)

GSAK allows you to add any graphic picture on your hard drive to your user notes (see the picture button). When you do this GSAK inserts the HTML code to show this picture in any offline HTML that GSAK uses. For example if you add the picture "spoiler.jpg" that resides in the folder c:\temp GSAK will insert the following code in your user notes <img src="file://C:\temp\spoiler.jpg" alt="picture">

This works great while the HTML code is run on your computer with the pictures in the various folders. The problem arises when you do html generation (File=>Export=>HTML) and then copy the generated html files (usually the folder "cache") over to another computer or your pocket PC. The html files copy over fine, but because all the user note images have the link to the files on your computer, they will not show in your browser view.

Checking this option now addresses this issue. If you select this option GSAK will copy all the images it finds links to in your user notes to the "cache" folder and converts the links to reflect the image in the current folder. Taking the example above the link <img src="file://C:\temp\spoiler.jpg" alt="picture"> would be converted to <img src="spoiler.jpg" alt="picture">

These pictures should now show on your destination computer or pocket PC.

Warning: If you have many pictures at high resolution this will dramatically increase the size of your exported "cache" folder.

Aber da mein English nicht mehr ganz so gut ist ... aber ich glaube dass st auch nicht das was ich wirklich gesucht habe...

Hoffe ihr könnt mir da ein wenig helfen

Grüße
Björn
 

whitesun

Geowizard
Für das Problem suche ich auch schon länger eine Lösung. Es soll irgendwo ein Makro geben, mit dem das gehen soll. Den Pfad aus der englischen Anleitung habe ich auch schon eingegeben und angepasst wie verrückt, aber komischerweise klappt das nicht bei allen. Bei einem Kollegen gehts, bei mir, mit den gleichen Einstellungen, nicht. :?: :?: :?: :?:

Ein anderer Ansatz wäre die Möglichkeit mit GPX-Sonar und SpoilerSync. Nur sind dann die Bilder der Beschreibungen nicht mit drin. :cry: Halt nur die Spoilerbilder.

Gruß

Armin
 

delta4

Geocacher
Mit der Version 7 geht das.

Im Dialog von "Export HTML Files" hast Du unter "Advanced" die Möglichkeit "Convert and Copy file://images... zu aktivieren.

Das Erzeugen der HTML-Files dauert dann aber etwas länger. Einfach mal ausprobieren, ob das für Deine Zwecke reicht. Ich benutzte eine Palm, deshalb habe ich mich nicht weiter damit beschäftigt. :wink:

Gruß
Dirk
 
Man muss aber die Bilder auf den pc haben damit man die mit exportiert auf dem pda. Ich benutze ein palm und das Programm Spoilersync SunriseXP oder Plucker. Mit Spoilersync bekomme ich nur die Spoiler Bilder. Um auch die Bilder zu bekommen die in die Beschreibung steht muss Plucker bei die Konvertierung von HTML zu palm Datei die Bilder Spidern.

Mit Spoilersync bekomme ich nur die spoierbilder. Die bleiben auf mein pc stehen, bis ich den Cache oder er archiviert wert. Ich brauche also nur nach zu laden.
 
OP
DJTOMCAT

DJTOMCAT

Geocacher
delta4 schrieb:
Im Dialog von "Export HTML Files" hast Du unter "Advanced" die Möglichkeit "Convert and Copy file://images... zu aktivieren.

Der Haken war bei mir gesetzt, dennoch keine Chance die Bilder zu übertragen. Any Ideas ?
 

Ztein

Geocacher
Ich verwende immer dieses Macro:

Code:
###########################################################
#
# Transfer SpoilerSync picture to GSAK user notes
#
# 1. Run spoiler sync (make sure you check the box "create web pages for spoilers and index"
# 2. Run this macro, and enter the folder where you spoilersync files are
#
# Change History:
#  29th Jan, 2006 - Updated code to be compatible with the upcoming new release of the macro engine
#
############################################################

#Debug Status=on

# 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 = " "
EndIf

# 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

# 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
Set $Message = "$NumberFound" + " caches updated from spoiler sync folder." + $_NewLine + "$NumberPics" + " pictures found in total. "  
Pause msg=$Message
Damit sind die Bilder in den Usernotes eingebunden und ich muss nix extra syncronisieren.
Ich verwende noch GSAK 6.6.4

Gruß, Ztein
 

Ztein

Geocacher
Als Datei SpoilerSync.txt (oder so) im \Programme\GSAK\Macros Ordner abspeichern
und in GSAK in Macro->run starten.
Die Spoiler solltest Du mit Spoilersync aktualisiert haben. Das Macro fragt Dich nach dem Pfad der Bilder und pflegt sie dann ein. Fertich. In GSAK siehst Du dann in der Spalte Usernotes, dass da Einträge zu den Caches sind.

Ztein
 
Oben