rendered paste body<?xml version="1.0" encoding="UTF-8" ?>
<!-- Book XML plugin -->
<ItemTmpl version="1.0">
<Script language="JScript">
<![CDATA[
// Convert LibraryThing/DeliciousLibrary tags to Library format.
function ExtractLibraryThingTags(szTags)
{
// LibraryThing uses ',' to delim tags, while Library uses '$;'
if (szTags.length > 0){
szTags += ',';
return szTags.replace(/,/g, '$;');
}else
return '';
}
// Convert DeliciousLibrary \n delimited to '$;' delimited
function ExtractDeliciousLibraryInfo(input)
{
if (input.length>0) {
input += '\n';
return input.replace(/\n/g, '$;');
} else
return '';
}
]]>
</Script>
<Item class="CItemBook" name="Books" name_single="Book">
<Property name="Author" db="authors" type="text_multi"
attr="default,txtsearch,impt" sort="Creator"/>
<Property name="Edition" db="edt" type="text" attr="display,edit,impt"/>
<Property name="Binding" db="bind" type="text" attr="display,edit,redraw"/>
<Property name="Dewey Number" db="dewey" type="float"
attr="default,index,impt"/>
<Property name="Pages" db="pages" type="int" attr="default"/>
<Property name="Published" db="published" type="date" attr="default,impt"
sort="Release Date"/>
<Property name="Publisher" db="publisher" type="text"
attr="default,impt,txtsearch"/>
<Property name="Level" db="level" type="text" attr="display,edit"/>
<DataSrc name="Amazon" class="Books">
<!--Book Specific Property-->
<Property name="Author"/>
<Property name="Edition"/>
<Property name="Binding"/>
<Property name="Dewey Number" dataSrcFields="DeweyDecimalNumber"/>
<Property name="Pages" dataSrcFields="NumberOfPages"/>
<Property name="Published" dataSrcFields="PublicationDate"
code="ExtractAmazonDate('%1');" />
<Property name="Publisher"/>
<Property name="Level" dataSrcFields="ReadingLevel"/>
</DataSrc>
<DataSrc name="LibraryThing" class="Books">
<!--Book Specific Property-->
<Property name="Author"
dataSrcFields="AUTHOR F-L|author (first, last)+other authors"/>
<Property name="Binding" dataSrcFields="PUBLICATION|publication"
code="ExtractList('%1',1,',');"/>
<Property name="Pages" dataSrcFields="PUBLICATION|publication"
code="ExtractList('%1',2,',');"/>
<Property name="Published" dataSrcFields="DATA|DATE|date"/>
<Property name="Publisher" dataSrcFields="PUBLICATION|publication"
code="ExtractList('%1',0,',');"/>
<!--Base Property-->
<Property name="Title" dataSrcFields="TITLE|title"/>
<Property name="ISBN" dataSrcFields="ISBN" code="Trim('%1','[]');"/>
<Property name="Description" dataSrcFields="COMMENTS|review|comments"/>
<!-- LibraryThing format does specify the item tags -->
<Tags dataSrcFields="TAGS|tags|your tags" code="ExtractLibraryThingTags('%1');"/>
</DataSrc>
<DataSrc name="DeliciousLibrary" class="book">
<!--Book Specific Property-->
<Property name="Author" dataSrcFields="author"
code="ExtractDeliciousLibraryInfo('%1');"/>
<Property name="Binding" dataSrcFields="aspect"/>
<Property name="Pages" dataSrcFields="pages"/>
<Property name="Published" dataSrcFields="published"/>
<Property name="Publisher" dataSrcFields="publisher"/>
<!--Base Property-->
<Property name="Amazon ID" dataSrcFields="asin"/>
<Property name="Title" dataSrcFields="fullTitle"/>
<Property name="UPC" dataSrcFields="upc"/>
<Property name="Description" dataSrcFields="description"
code="Rtf2Txt('%1');"/>
<!--Tag information Extract from shelves-->
<Tags dataSrcFields="tag" code="ExtractLibraryThingTags('%1');"/>
</DataSrc>
<!-- Skinning -->
<Skin class="CItemBookSoft">
<!-- Use a different skin for paperback books -->
<Property name="Binding" value="Paperback"/>
<!-- Always apply skin even if skin's aspect differs from book.
Skin will be adjusted to wrap around the book. -->
<Aspect mismatch="wrap"/>
</Skin>
<Skin class="CItemBook">
<!-- Always apply skin even if skin's aspect differs from book.
Skin will be adjusted to wrap around the book. -->
<Aspect mismatch="wrap"/>
</Skin>
</Item>
</ItemTmpl>