Contents Member Sign in |
Exporting Data from Sermons OnlineThere are two ways your sermon information can be exported from Sermons Online. The easiest and most complete method is to use the Sermons Archiver command-line utility to create a complete archival backup copy. This method exports both metadata (information about your sermons such as title, author, etc.) and all the associated multimedia and attachment files. The Sermons Archiver is a separately installed and launched application. The second method, described below, only exports metadata, and uses a web interface. You could use this, for example, to integrate your sermons with other applications and services. The syntax is: https://www.sermonsonline.com/util_pub.php?action=export_sermons&export options Where export options are the following URL name/value pairs:
Examples: ../util_pub.php?action=export_sermons&custid=mychurch Result: exports all sermons on record for "mychurch", as a .CSV file
../util_pub.php?action=export_sermons&custid=mychurch&format=xml&startdate=2010-10-16&disposition=stream Result: exports all sermons preached since October 16, 2010 by "mychurch", as a stream of XML data.
XML OutputThe character set of the XML file is UTF-8. The root element of the XML is named <customers>. It contains at least one <customer> element. <customers> <customer>
<custid> customer identifier </custid>
</customer>
:
: for each customer passed in custid URL option
:
</customers> Required elements shown in red Within each <customer> is a list of <sermons>, each containing one <sermon> element for each sermon which was preached on or before the startdate URL option. The sermons are listed in reverse date order. <customer> <sermons>
<sermon>
<date> date sermon was preached </date>
<timeofday> time sermon was preached; one of "Morning", "Evening", or "Other" </timeofday>
<creator> name of the person who preached the sermon </creator>
<title> title of the sermon </title>
<description> description of the sermon </description>
<body> notes associated with the sermon, in HTML format </body>
<subject> sermon series/topic </subject>
<rights> copyright notice </rights>
<scriptures> see below...
<hymns> see below...
<multimedia> see below...
<attachments> see below...
</sermon>
:
: for each sermon preached after startdate
:
</sermons>
Required elements shown in red Optional Sermon Sub-ElementsThe following optional sub-elements may be enclosed with the <sermon> element. Hymns<sermon> <hymns>
<hymn>
<title> the title of the hymn </title>
</hymn>
:
: for each associated hymn
:
</hymns>
</sermon> Scripture References<sermon> <scriptures>
<scripture>
<book> the Book name of the reference (e.g., "Genesis", etc.) </book>
<passage> the chapter and verse of the reference </passage>
</scripture>
:
: for each Scripture reference
:
</scriptures>
</sermon> Sermon Multimedia<sermon> <multimedia>
<media>
<format> format of the media, one of "Audio" or "Video" </format>
<type> encoding type of the media, one of "MP3", "Real Media", "Windows Media", or "Quicktime" </type>
<bandwidth> encoded bandwidth of media, expressed as KBytesPerSecond </bandwidth>
<filesize> size of the media file, in bytes </filesize>
<enclosure> download URL of the media file </enclosure>
</media>
:
: for each item of multimedia
:
</multimedia>
</sermon> File Attachment<sermon> <attachments>
<attachment>
<title> title of the attached file </format>
<filesize> size of the attached file, in bytes </filesize>
<enclosure> download URL of the attached file </enclosure>
</attachment>
</attachments>
</sermon> XML Example<?xml version="1.0"?> <customers>
<customer>
<custid>nhpca</custid>
<sermons>
<sermon>
<date>2011-08-07</date>
<timeofday>Morning</timeofday>
<creator>David Coffin, Jr.</creator>
<title>Remember the Rebellion of the Angels</title>
<description>Jude 6</description>
<body></body>
<subject>Jude</subject>
<rights>Copyright 2011, David Coffin, Jr., New Hope Presbyterian Church. All rights reserved. Powered by SermonsOnline.com.</rights>
<hymns/>
<scriptures>
<scripture>
<book>Jude</book>
<passage>6</passage>
</scripture>
</scriptures>
<multimedia>
<media>
<format>MP3</format>
<type>Audio</type>
<bandwidth>32K</bandwidth>
<filesize>10474626</filesize>
</media>
</multimedia>
<attachments/>
</sermon>
</sermons>
</customer>
</customers>
JSON OutputSermons exported in JSON follow the same structure as XML, but serialized according to the rules of JSON formatting. CSV OutputSermons exported in CSV format are structured for editing with a spreadsheet application. Each row in the output represents a sermon, and the columns, its metadata. HTML OutputSermons exported in HTML are formatted for viewing on the web. Each sermon is displayed within a table, with a link to the sermon's multimedia and file attachments. |