[sword-devel] Diatheke formatting options

Raphaël Pinson raphink at gmail.com
Tue Mar 26 06:21:48 MST 2013


Hello,

For some time, I've been struggling with Diatheke's output, piping it
into sed and other string editors when I need to grab simple verses.

To make things easier, I'm attaching a patch to this email which adds
3 flags to Diatheke:

      * --no-refs suppresses reference printing in output
      * --no-mod-name suppresses the module name in output
      * --no-newlines replaces new lines with a space in output

When combining the 3 flags, Diatheke outputs the all the verses as a
single paragraph without references or module name.

Here are a few examples:

$ diatheke -b KJV -k Jn 3:16-17
John 3:16:
For God so loved the world, that he gave his only begotten Son, that
whosoever believeth in him should not perish, but have everlasting
life.

John 3:17: For God sent not his Son into the world to condemn the
world; but that the world through him might be saved.

(KJV)

$ diatheke -b KJV --no-mod-name -k Jn 3:16
John 3:16:
For God so loved the world, that he gave his only begotten Son, that
whosoever believeth in him should not perish, but have everlasting
life.

John 3:17: For God sent not his Son into the world to condemn the
world; but that the world through him might be saved.


$ diatheke -b KJV --no-refs -k Jn 3:16-17

For God so loved the world, that he gave his only begotten Son, that
whosoever believeth in him should not perish, but have everlasting
life.

For God sent not his Son into the world to condemn the world; but that
the world through him might be saved.

(KJV)

$ diatheke -b KJV --no-refs --no-mod-name --no-newlines -k Jn 3:16-17

For God so loved the world, that he gave his only begotten Son, that
whosoever believeth in him should not perish, but have everlasting
life.
 For God sent not his Son into the world to condemn the world; but
that the world through him might be saved.




Blessings,


Raphaël
-------------- section suivante --------------
Une pi?ce jointe autre que texte a ?t? nettoy?e...
Nom: diatheke_opts.patch
Type: application/octet-stream
Taille: 7653 octets
Desc: non disponible
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20130326/5c7fd8bd/attachment.obj>


More information about the sword-devel mailing list