mvnForum Homepage Welcome Guest  | Guest Setting  |  Register  |   Login
  Search  
Index  | Recent Threads  | Unanswered Threads  | Who's Online  | User List  | Help


»

No member browsing this thread
Thread Status: Active
Total posts in this thread: 6
Post new Thread
Author
Previous Thread This topic has been viewed 2526 times and has 5 replies Next Thread
Male wwguo
Stranger



China
Joined: Apr 29, 2009
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
What is the command to retrieve text by args like "Genesis 1:1"

I want to write a Sword extension for Sphinx. The extension can help on Bible study by this way:

If I type
:bible:`Genesis 1:1`
in text, after compiling, the following line will be inserted:
 In the beginning God created the heavens and the earth.


So I need to know, is it possible to call a command generating the previous line with argument of "Genesis 1:1" or something similar? And if the command can select Bible texts module, such as ChiNCVs or ASV, it would be even better.

If there is no such convenient command, could you point me to some materials with which I can write a simple script. Except an API primer, I don't find any other document like man page or help file of Sword.
[Apr 29, 2009 7:02:03 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male mdbergmann
Inventory
Member's Avatar

Germany
Joined: Jun 12, 2008
Post Count: 640
Status: Offline
Reply to this Post  Reply with Quote 
Re: What is the command to retrieve text by args like "Genesis 1:1"

IMO there is no command line tool except diatheke that can do this right away.
In the sources are some simple examples of how to do what you like:

https://crosswire.org/svn/sword/trunk/examples/simple.cpp


Regards,
Manfred
[Apr 30, 2009 3:50:25 AM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Male wwguo
Stranger



China
Joined: Apr 29, 2009
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Re: What is the command to retrieve text by args like "Genesis 1:1"

Thank you very muchsmile

Best wishes,
Wei-Wei
[May 1, 2009 3:03:28 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male thurisaz
Stranger



Argentina
Joined: May 10, 2011
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: What is the command to retrieve text by args like "Genesis 1:1"

I installed the Darby module, and then successfully compiled the simple.cpp example using a Makefile I found at the examples directory. When I run it, it doesn't print anything at all. If the module wasn't properly installed I should be getting a segmentation fault, instead the program ends normally without printing anything to STDOUT (echo $? returns 0). I'm using ubuntu 10.04, and I compiled the project from source. Any help would be greatly appreciated.

regards,
Jonathan
[May 10, 2011 4:16:36 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Male thurisaz
Stranger



Argentina
Joined: May 10, 2011
Post Count: 4
Status: Offline
Reply to this Post  Reply with Quote 
Re: What is the command to retrieve text by args like "Genesis 1:1"

If I cast it to (const char *) as the API primer suggests as an alternative, I get garbage printed instead.
[May 10, 2011 4:22:57 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Female sancol52
Stranger



United States
Joined: May 14, 2011
Post Count: 2
Status: Offline
Reply to this Post  Reply with Quote 
Re: What is the command to retrieve text by args like "Genesis 1:1"

IMO there is no command line tool except diatheke that can do this right away.
In the sources are some simple examples of how to do what you like:

https://crosswire.org/svn/sword/trunk/examples/simple.cpp


Regards,
Manfred



Thanks for this one Manfred.
[May 15, 2011 2:53:02 PM] Show Printable Version of Post    View Member Profile    Send Private Message    Hidden to Guest [Link] Report threatening or abusive post: please login first  Go to top 
Show Printable Version of Thread  Post new Thread