Jump to content


Photo

dash problems


  • Please log in to reply
5 replies to this topic

#1 ChristianB

ChristianB

    Bronze

  • Active Members
  • PipPip
  • 73 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 21 November 2010 - 06:07 PM

Unfortunately I don't have a slovene bible inside Accordance. So what I do is copy the reference and send it via launchbar to the website of the slovene bible.

But somewhere on the way between Accordance, LaunchBar and the website there is an issue with dashes.
The long dash Accordance uses causes trouble. On the website it looks like this. http://cl.ly/3LYv

Doesn't happen with a short dash so I wonder if there is an option to get that instead.
Might be related to LaunchBar but still would like to have the option ?

#2 jpkang

jpkang

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 580 posts
  • Twitter:MyMacHero
  • Gender:Male
  • Location:Seattle, WA
  • Interests:Comparative Semitics; ancient Hebrew semantics; Hebrew syntax; history and religion of ancient Israel; history of interpretation.
  • Accordance Version:11.x
  • Platforms:Mac OS X, iOS

Posted 22 November 2010 - 01:01 AM

Hm... what's the site, and did you define the search template in LaunchBar as using UTF-8 (vs. ISO Latin 1)?
J. P. Kang, Ph.D. (Bible)

#3 ChristianB

ChristianB

    Bronze

  • Active Members
  • PipPip
  • 73 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 23 November 2010 - 08:41 AM

Hm... what's the site, and did you define the search template in LaunchBar as using UTF-8 (vs. ISO Latin 1)?

I did … tried both ways.
This is my search template
http://www.biblija.n...os=0&set=2&l=sl

Edited by ChristianB, 23 November 2010 - 08:42 AM.


#4 jpkang

jpkang

    Platinum

  • Active Members
  • PipPipPipPipPip
  • 580 posts
  • Twitter:MyMacHero
  • Gender:Male
  • Location:Seattle, WA
  • Interests:Comparative Semitics; ancient Hebrew semantics; Hebrew syntax; history and religion of ancient Israel; history of interpretation.
  • Accordance Version:11.x
  • Platforms:Mac OS X, iOS

Posted 26 November 2010 - 12:54 PM

Looks like it's an entity conversion issue (bug?) with the Bible site; so maybe the thing to do is to write a script to search and replace en-dashes with hyphens before passing it to the URL?
J. P. Kang, Ph.D. (Bible)

#5 ChristianB

ChristianB

    Bronze

  • Active Members
  • PipPip
  • 73 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 26 November 2010 - 05:37 PM

Looks like it's an entity conversion issue (bug?) with the Bible site; so maybe the thing to do is to write a script to search and replace en-dashes with hyphens before passing it to the URL?

Yeah. Will try that if it keeps bugging me?

#6 ChristianB

ChristianB

    Bronze

  • Active Members
  • PipPip
  • 73 posts
  • Gender:Male
  • Accordance Version:10.x

Posted 27 November 2010 - 04:43 PM

Ok, got it.
Thats how it looks like:

on handle_string(theString)
	-- set theString to "John 14,2–4"
	
	-- Zahlen & Zeilenumbrüche entfernen
	set badChars to {"–"} -- and whatever else you want in here
	
	set newString to ""
	set iChar to 1
	repeat until iChar > (count of theString)
		if badChars contains (item iChar of theString) then
			set newString to newString & "-" as string -- what you'd like to replace it with
		else
			set newString to newString & (item iChar of theString) as string
		end if
		set iChar to iChar + 1
	end repeat
	
	set badChars to string id {32} -- and whatever else you want in here
	
	set _newString to ""
	set iChar to 1
	repeat until iChar > (count of newString)
		if badChars contains (item iChar of newString) then
			set _newString to _newString & "+" as string -- what you'd like to replace it with
		else
			set _newString to _newString & (item iChar of newString) as string
		end if
		set iChar to iChar + 1
	end repeat
	
	
	set _url to "http://www.biblija.net/biblija.cgi?m=" & _newString & "&compact=1&id13=1&pos=0&set=2&l=sl"
	open location _url
	
end handle_string

Edited by ChristianB, 28 November 2010 - 10:49 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users