Ignore:
Timestamp:
2012-08-16T20:55:03+12:00 (12 years ago)
Author:
ak19
Message:

Changes for GS3: updating the Building a multimedia collection tutorial for GS3. Mainly to do with format statements. A few of the other steps don't work yet (Collage browser, issues with Phind browser, perhaps no support yet for collection-specific language strings).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentation/trunk/tutorials/xml-source/tutorial_en.xml

    r26110 r26122  
    27752775<Path>sample_files &rarr; beatles &rarr; advbeat_small</Path>
    27762776<Text id="0555">into your new collection. Do this by opening up <Path>advbeat_small</Path>, selecting the eight items within it (from <Path>discography</Path> to <Path>beatles_midi.zip</Path>), and dragging them across. Because some of these files are in MP3 and MARC formats you will be asked whether to include <AutoText text="MP3Plugin" /> and <AutoText text="MARCPlugin" /> in your collection. Click <AutoText key="glidict::CDM.PlugInManager.QuickAdd" type="button"/>.</Text>
     2777<MajorVersion number="2">
    27772778<Text id="0555a">A window may pop up explaining that the import documents contain css files, which none of Greenstone's plugins are expected to process directly. CSS files normally belong to a web page and we don't need to process them directly. Click <AutoText key="glidict::General.OK" type="button"/> button.</Text>
     2779</MajorVersion>
    27782780</NumberedItem>
    27792781<NumberedItem>
     
    28372839</Bullet>
    28382840<Bullet>
    2839 <Text id="0582">Ensure that <AutoText text="VList"/> is selected, and make the changes that are highlighted below. You need to insert five lines into the first line, and delete the second line. (Note, the changes are available in a text file, see below.)</Text>
     2841<Text id="0582">Ensure that <MajorVersion number="2"><AutoText text="VList"/></MajorVersion><MajorVersion number="3">the <AutoText text="browse"/> format feature</MajorVersion> is selected, and make the changes that are highlighted below<MajorVersion number="3"> to its <AutoText text="documentNode"/> template</MajorVersion>.<MajorVersion number="2"> You need to insert five lines into the first line, and delete the second line. (Note, the changes are available in a text file, see below.)</MajorVersion> </Text>
    28402842<Text id="0582a">Change:</Text>
    28412843<Format>
     2844<MajorVersion number="2">
    28422845&lt;td valign=top&gt;<highlight>[link][icon][/link]</highlight>&lt;/td&gt;<br/>
    28432846<highlight>&lt;td valign=top&gt;[ex.srclink]{Or}{[ex.thumbicon],[ex.srcicon]}[ex./srclink]&lt;/td&gt; </highlight><br/>
     
    28452848{Or}{[dc.Title],[exp.Title],[ex.Title],Untitled} <br/>
    28462849[/highlight]{If}{[ex.Source],&lt;br&gt;&lt;i&gt;([ex.Source])&lt;/i&gt;}&lt;/td&gt;
     2850</MajorVersion>
     2851<MajorVersion number="3">
     2852    &lt;td valign=&quot;top&quot;&gt;<br />
     2853      <Tab n="1"/><highlight>&lt;gsf:link type=&quot;document&quot;&gt;<br />
     2854        <Tab n="2"/>&lt;gsf:icon type=&quot;document&quot;/&gt;<br />
     2855      <Tab n="1"/>&lt;/gsf:link&gt;<br />
     2856    &lt;/td&gt;<br />
     2857    &lt;td valign=&quot;top&quot;&gt;<br />
     2858      <Tab n="1"/>&lt;gsf:link type=&quot;source&quot;&gt;<br />
     2859        <Tab n="2"/>&lt;gsf:choose-metadata&gt;<br />
     2860          <Tab n="3"/>&lt;gsf:metadata name=&quot;thumbicon&quot;/&gt;<br />
     2861          <Tab n="3"/>&lt;gsf:metadata name=&quot;srcicon&quot;/&gt;<br />
     2862        <Tab n="2"/>&lt;/gsf:choose-metadata&gt;<br />
     2863      <Tab n="1"/>&lt;/gsf:link&gt;</highlight><br />
     2864    &lt;/td&gt;
     2865</MajorVersion>
    28472866</Format>
    28482867<Text id="0583">to this:</Text>
    28492868<Format>
     2869<MajorVersion number="2">
    28502870&lt;td valign=top&gt;<br/>
    28512871<highlight>{If}{[dc.Format] eq 'Audio', </highlight><br/>
     
    28592879{Or}{[dc.Title],[exp.Title],[ex.Title],Untitled}<br/>
    28602880[/highlight]{If}{[ex.Source],&lt;br&gt;&lt;i&gt;([ex.Source])&lt;/i&gt;}&lt;/td&gt;
     2881</MajorVersion>
     2882<MajorVersion number="3">
     2883&lt;td valign=&quot;top&quot;&gt;<br />
     2884  <Tab n="1"/><highlight>&lt;gsf:switch&gt;<br />
     2885    <Tab n="2"/>&lt;gsf:metadata name=&quot;dc.Format&quot;/&gt;<br />
     2886    <Tab n="2"/>&lt;gsf:when test='equals' test-value='Audio'&gt;<br />
     2887      <Tab n="3"/>&lt;gsf:link type=&quot;source&quot;&gt;&lt;gsf:metadata name=&quot;srcicon&quot;/&gt;&lt;/gsf:link&gt;<br />
     2888    <Tab n="2"/>&lt;/gsf:when&gt;<br />
     2889    <Tab n="2"/>&lt;gsf:when test='equals' test-value='Images'&gt;<br />
     2890      <Tab n="3"/>&lt;gsf:link type=&quot;source&quot;&gt;&lt;gsf:metadata name=&quot;thumbicon&quot;/&gt;&lt;/gsf:link&gt;<br />
     2891    <Tab n="2"/>&lt;/gsf:when&gt;<br />
     2892    <Tab n="2"/>&lt;gsf:when test='equals' test-value='Supplementary'&gt;<br />
     2893      <Tab n="3"/>&lt;gsf:link type=&quot;source&quot;&gt;&lt;gsf:metadata name=&quot;srcicon&quot;/&gt;&lt;/gsf:link&gt; &lt;gsf:link type=&quot;document&quot;&gt;&lt;gsf:icon type=&quot;document&quot;/&gt;&lt;/gsf:link&gt;<br />
     2894    <Tab n="2"/>&lt;/gsf:when&gt;<br />
     2895    <Tab n="2"/>&lt;gsf:otherwise&gt;<br />
     2896      <Tab n="3"/>&lt;gsf:link type=&quot;document&quot;&gt;&lt;gsf:icon type=&quot;document&quot;/&gt;&lt;/gsf:link&gt;<br />
     2897    <Tab n="2"/>&lt;/gsf:otherwise&gt;<br />
     2898  <Tab n="1"/>&lt;/gsf:switch&gt;</highlight><br />
     2899&lt;/td&gt;
     2900</MajorVersion>
    28612901</Format>
    28622902</Bullet>
    28632903</BulletList>
    28642904<Text id="0585">To make this easier for you we have prepared a plain text file that contains the new text. In WordPad open the following file:</Text>
    2865 <Path>sample_files &rarr; beatles &rarr; format_tweaks &rarr; audio_tweak.txt</Path>
    2866 <Text id="0586">(Be sure to use WordPad rather than Notepad, because Notepad does not display the line breaks correctly.) Place it in the copy buffer by highlighting the text in WordPad and selecting <Menu>Edit &rarr; Copy</Menu>. Now move back to the Librarian Interface, highlight all the text that makes up the current <AutoText text="VList"/> format statement, and use <Menu><AutoText key="glidict::Menu.Edit"/> &rarr; <AutoText key="glidict::Menu.Edit_Paste"/></Menu> to transform the old statement to the new one.</Text>
     2905<Path>sample_files &rarr; beatles &rarr; format_tweaks &rarr; audio_tweak<MajorVersion number="3">_3</MajorVersion>.txt</Path>
     2906<Text id="0586">(Be sure to use WordPad rather than Notepad, because Notepad does not display the line breaks correctly.) Place it in the copy buffer by highlighting the text in WordPad and selecting <Menu>Edit &rarr; Copy</Menu>. Now move back to the Librarian Interface, <MajorVersion number="2">highlight all the text that makes up the current <AutoText text="VList"/> format statement</MajorVersion><MajorVersion number="3">highlight the portion of the existing <AutoText text="documentNode"/> template of the <AutoText text="browse"/> format statement that needs to be replaced</MajorVersion>, and use <Menu><AutoText key="glidict::Menu.Edit"/> &rarr; <AutoText key="glidict::Menu.Edit_Paste"/></Menu> to transform the old statement to the new one.</Text>
    28672907<Text id="0589"><b>Preview</b> the result. You may need to click the browser's &lt;<b>Reload</b>&gt; button to force it to re-load the page.</Text>
    28682908</NumberedItem>
     
    28712911<BulletList>
    28722912<Bullet>
     2913<MajorVersion number="2">
    28732914<Text id="0594">In the <AutoText text="VList"/> format feature, delete the text that is highlighted below:</Text>
    2874 <Format>
     2915</MajorVersion>
     2916<MajorVersion number="3">
     2917<Text id="0594-3">In the <AutoText text="documentNode"/> template of the <AutoText text="browse"/> format feature, delete the following text:</Text>
     2918</MajorVersion>
     2919<Format>
     2920<MajorVersion number="2">
    28752921&lt;td valign=top&gt;<br/>
    28762922{If}{[dc.Format] eq 'Audio',<br/>
     
    28832929&lt;td valign=top&gt;[highlight]<br/>
    28842930{Or}{[dc.Title],[exp.Title],[ex.Title],Untitled}<br/>
    2885 [/highlight]<highlight>{If}{[ex.Source],&lt;br&gt;&lt;i&gt;([ex.Source])&lt;/i&gt;}</highlight>&lt;/td&gt;</Format>
     2931[/highlight]<highlight>{If}{[ex.Source],&lt;br&gt;&lt;i&gt;([ex.Source])&lt;/i&gt;}</highlight>&lt;/td&gt;
     2932</MajorVersion>
     2933<MajorVersion number="3">
     2934      &lt;gsf:switch&gt;<br />
     2935        <Tab n="1"/>&lt;gsf:metadata name=&quot;Source&quot;/&gt;<br />
     2936        <Tab n="1"/>&lt;gsf:when test=&quot;exists&quot;&gt;<br />
     2937          <Tab n="2"/>&lt;br/&gt;<br />
     2938          <Tab n="2"/>&lt;i&gt;(&lt;gsf:metadata name=&quot;Source&quot;/&gt;)&lt;/i&gt;<br />
     2939        <Tab n="1"/>&lt;/gsf:when&gt;<br />
     2940      &lt;/gsf:switch&gt;
     2941</MajorVersion>
     2942</Format>
    28862943</Bullet>
    28872944</BulletList>
     
    29162973</Heading>
    29172974<NumberedItem>
     2975<MajorVersion number="2">
    29182976<Text id="0606">Make the bookshelves show how many documents they contain by inserting a line in the <AutoText text="VList"/> format statement in the <AutoText key="glidict::CDM.GUI.Formats"/> section of the <AutoText key="glidict::GUI.Format"/> panel. The added line is shown highlighted below. The complete format statement can be copied from <Path>sample_files &rarr; beatles &rarr; format_tweaks &rarr; show_num_docs.txt</Path>.</Text>
    29192977<Format>
     
    29302988{Or}{[dc.Title],[exp.Title],[ex.Title],Untitled}<br/>
    29312989[/highlight]&lt;/td&gt;</Format>
     2990</MajorVersion>
     2991<MajorVersion number="3">
     2992<Text id="0606-3">Make the bookshelves show how many documents they contain by modifying the <AutoText text="VList classifierNode"/> template of the <AutoText text="browse"/> format feature in the <AutoText key="glidict::CDM.GUI.Formats"/> section of the <AutoText key="glidict::GUI.Format"/> panel. Remove the portion highlighted below:</Text>
     2993<Format>
     2994      <Tab n="1"/>...<br />
     2995      <Tab n="1"/>&lt;xsl:call-template name=&quot;choose-title&quot;/&gt;<br />
     2996      <Tab n="1"/><highlight>&lt;gsf:switch&gt;<br />
     2997        <Tab n="2"/>&lt;gsf:metadata name=&quot;Source&quot;/&gt;<br />
     2998        <Tab n="2"/>&lt;gsf:when test=&quot;exists&quot;&gt;<br />
     2999          <Tab n="3"/>&lt;br/&gt;<br />
     3000          <Tab n="3"/>&lt;i&gt;(&lt;gsf:metadata name=&quot;Source&quot;/&gt;)&lt;/i&gt;<br />
     3001        <Tab n="2"/>&lt;/gsf:when&gt;<br />
     3002      <Tab n="1"/>&lt;/gsf:switch&gt;<br />
     3003    &lt;/td&gt;</highlight>
     3004</Format>
     3005And replace it with the statements highlighted here:
     3006<Format>
     3007      <Tab n="1"/>...<br />
     3008      <Tab n="1"/>&lt;xsl:call-template name=&quot;choose-title&quot;/&gt;<br />
     3009    <highlight>&lt;/td&gt;<br />
     3010    &lt;td&gt;<br />
     3011       <Tab n="1"/>(&lt;gsf:metadata name=&quot;numleafdocs&quot;/&gt;)<br />
     3012    &lt;/td&gt;</highlight>
     3013</Format>
     3014<Text id="0606-3a">The complete format statement for the <AutoText text="VList classifierNode"/> template of the <AutoText text="browse"/> format feature can be copied from <Path>sample_files &rarr; beatles &rarr; format_tweaks &rarr; show_num_docs_3.txt</Path>.</Text>
     3015</MajorVersion>
    29323016<Text id="0609"><b>Preview</b> the result (you don't need to build the collection.) Bookshelves in the titles and browse classifiers should show how many documents they contain.</Text>
    29333017</NumberedItem>
     
    29943078</Bullet>
    29953079</BulletList>
    2996 <Text id="0638"><b>Build</b> the collection and <b>preview</b> the result. Observe how many more times similar titles have been amalgamated under the same bookshelf. Test your understanding of regular expressions by trying to rationalize the amalgamations. (Note: <AutoText text="[[:punct:]]" type="italics"/> stands for any punctuation character.) The icons beside the Word and PDF documents are not the correct ones, but that will be fixed in the next format statement.</Text>
     3080<Text id="0638"><b>Build</b> the collection and <b>preview</b> the result. Observe how many more times similar titles have been amalgamated under the same bookshelf. Test your understanding of regular expressions by trying to rationalize the amalgamations. (Note: <AutoText text="[[:punct:]]" type="italics"/> stands for any punctuation character.)<MajorVersion number="2"> The icons beside the Word and PDF documents are not the correct ones, but that will be fixed in the next format statement.</MajorVersion></Text>
    29973081</NumberedItem>
    29983082<Comment>
     
    30003084</Comment>
    30013085<Heading>
    3002 <Text id="0643">Using non-standard macro files</Text>
     3086<MajorVersion number="2"><Text id="0643">Using non-standard macro files</Text></MajorVersion>
     3087<MajorVersion number="3"><Text id="0647">Using different icons for different media types</Text></MajorVersion>
    30033088</Heading>
    30043089<Comment>
     
    30183103</NumberedItem>
    30193104<NumberedItem>
     3105<MajorVersion number="2">
    30203106<Text id="0646">Using the file browser, copy the <Path>images</Path> and <Path>macros</Path> folders from the <Path>advbeat_large</Path> folder into the <Path>smallbea</Path> folder. (It's OK to overwrite the existing <Path>images</Path> folder: the image in it is included in the folder being copied.) The <Path>images</Path> folder includes some useful icons, and the <Path>macros</Path> folder defines some macro names that use these images.</Text>
     3107</MajorVersion>
     3108<MajorVersion number="3">
     3109<Text id="0646-3">Using the file browser, copy the <Path>images</Path> folder from the <Path>advbeat_large</Path> folder into the <Path>smallbea</Path> folder. (It's OK to overwrite the existing <Path>images</Path> folder: the image in it is included in the folder being copied.) The <Path>images</Path> folder includes some useful icons.</Text>
     3110</MajorVersion>
     3111<MajorVersion number="2">
    30213112<Text id="0646a">To see the macro definitions, open the collection in the Librarian Interface (<Menu><AutoText key="glidict::Menu.File"/> &rarr; <AutoText key="glidict::Menu.File_Open"/></Menu>) and view the <AutoText key="glidict::CDM.GUI.Macros"/> section in the <AutoText key="glidict::GUI.Format"/> panel.</Text>
    3022 </NumberedItem>
     3113</MajorVersion>
     3114</NumberedItem>
     3115<MajorVersion number="2">
    30233116<Heading>
    30243117<Text id="0647">Using different icons for different media types</Text>
    30253118</Heading>
    3026 <NumberedItem>
    3027 <Text id="0648">Re-edit your <AutoText text="VList" /> format statement to be the following (in <AutoText key="glidict::CDM.GUI.Formats"/> on the <AutoText key="glidict::GUI.Format"/> panel). You can copy this text from the file <Path>sample_files &rarr; beatles &rarr; format_tweaks &rarr; multi_icons.txt</Path>.</Text>
    3028 <Format><highlight>&lt;td valign=top&gt;</highlight><br/>
     3119</MajorVersion>
     3120<NumberedItem>
     3121<Text id="0648">Re-edit <MajorVersion number="2"><AutoText text="VList" /> your format statement</MajorVersion><MajorVersion number="3">the previously edited portion of the <AutoText text="documentNode"/> format statement of the <AutoText text="browse"/> format feature</MajorVersion> (in <AutoText key="glidict::CDM.GUI.Formats"/> on the <AutoText key="glidict::GUI.Format"/> panel) to be the following. You can copy this text from the file <Path>sample_files &rarr; beatles &rarr; format_tweaks &rarr; multi_icons<MajorVersion number="3">_3</MajorVersion>.txt</Path>.</Text>
     3122<Format>
     3123<MajorVersion number="2">
     3124<highlight>&lt;td valign=top&gt;</highlight><br/>
    30293125&nbsp;&nbsp;<highlight>{If}{[numleafdocs],[link][icon][/link]}</highlight><br/>
    30303126&nbsp;&nbsp;<highlight>{If}{[dc.Format] eq 'Lyrics',[link]_iconlyrics_[/link]}</highlight><br/>
     
    30433139{Or}{[dc.Title],[Title],Untitled}<br/>
    30443140[/highlight]<br/>
    3045 &lt;/td&gt;</Format>
    3046 </NumberedItem>
    3047 <NumberedItem>
    3048 <Text id="0651"><b>Preview</b> your collection as before. Now different icons are used for discography, lyrics, tablature, and MARC metadata. Even MP3 and MIDI audio file types are distinguished. If you let the mouse hover over one of these images a "tool tip" appears explaining what file type the icon represents in the current interface language (note: <Path>extra.dm</Path> only defines English and French).</Text>
     3141&lt;/td&gt;
     3142</MajorVersion>
     3143<MajorVersion number="3">
     3144  &lt;td valign=&quot;top&quot;&gt;<br />
     3145     <Tab n="1"/>&lt;gsf:switch&gt;<br />
     3146        <Tab n="2"/>&lt;gsf:metadata name=&quot;dc.Format&quot;/&gt;<br />
     3147    <Tab n="2"/>&lt;gsf:when test=&quot;equals&quot; test-value=&quot;Lyrics&quot;&gt;<br />
     3148          <Tab n="3"/>&lt;gsf:link type=&quot;document&quot;&gt;<br />
     3149            <Tab n="4"/>&lt;gsf:icon file=&quot;lyrics.gif&quot;/&gt;<br />
     3150          <Tab n="3"/>&lt;/gsf:link&gt;<br />
     3151        <Tab n="2"/>&lt;/gsf:when&gt;<br />
     3152    <Tab n="2"/>&lt;gsf:when test=&quot;equals&quot; test-value=&quot;Discography&quot;&gt;<br />
     3153          <Tab n="3"/>&lt;gsf:link type=&quot;document&quot;&gt;<br />
     3154            <Tab n="4"/>&lt;gsf:icon file=&quot;disc.gif&quot;/&gt;<br />
     3155          <Tab n="3"/>&lt;/gsf:link&gt;<br />
     3156        <Tab n="2"/>&lt;/gsf:when&gt;<br />
     3157    <Tab n="2"/>&lt;gsf:when test=&quot;equals&quot; test-value=&quot;Tablature&quot;&gt;<br />
     3158          <Tab n="3"/>&lt;gsf:link type=&quot;document&quot;&gt;<br />
     3159            <Tab n="4"/>&lt;gsf:icon file=&quot;tab.gif&quot;/&gt;<br />
     3160          <Tab n="3"/>&lt;/gsf:link&gt;<br />
     3161        <Tab n="2"/>&lt;/gsf:when&gt;<br />
     3162    <Tab n="2"/>&lt;gsf:when test=&quot;equals&quot; test-value=&quot;MARC&quot;&gt;<br />
     3163          <Tab n="3"/>&lt;gsf:link type=&quot;document&quot;&gt;<br />
     3164            <Tab n="4"/>&lt;gsf:icon file=&quot;marc.gif&quot;/&gt;<br />
     3165          <Tab n="3"/>&lt;/gsf:link&gt;<br />
     3166        <Tab n="2"/>&lt;/gsf:when&gt;<br />
     3167        <Tab n="2"/>&lt;gsf:when test=&quot;equals&quot; test-value=&quot;Images&quot;&gt;<br />
     3168          <Tab n="3"/>&lt;gsf:link type=&quot;source&quot;&gt;<br />
     3169            <Tab n="4"/>&lt;gsf:metadata name=&quot;thumbicon&quot;/&gt;<br />
     3170          <Tab n="3"/>&lt;/gsf:link&gt;<br />
     3171        <Tab n="2"/>&lt;/gsf:when&gt;<br />
     3172        <Tab n="2"/>&lt;gsf:when test=&quot;equals&quot; test-value=&quot;Supplementary&quot;&gt;<br />
     3173          <Tab n="3"/>&lt;gsf:link type=&quot;source&quot;&gt;<br />
     3174            <Tab n="4"/>&lt;gsf:metadata name=&quot;srcicon&quot;/&gt;<br />
     3175          <Tab n="3"/>&lt;/gsf:link&gt;<br />
     3176        <Tab n="2"/>&lt;/gsf:when&gt;<br />
     3177    <Tab n="2"/>&lt;gsf:when test=&quot;equals&quot; test-value=&quot;Audio&quot;&gt;<br />
     3178          <Tab n="3"/>&lt;gsf:link type=&quot;source&quot;&gt;<br />
     3179          <Tab n="4"/>&lt;gsf:switch&gt;<br />
     3180        <Tab n="5"/>&lt;gsf:metadata name=&quot;FileFormat&quot;/&gt;<br />
     3181        <Tab n="5"/>&lt;gsf:when test=&quot;equals&quot; test-value=&quot;MIDI&quot;&gt;<br />
     3182              <Tab n="6"/>&lt;gsf:icon file=&quot;midi.gif&quot;/&gt;<br />
     3183            <Tab n="5"/>&lt;/gsf:when&gt;<br />
     3184        <Tab n="5"/>&lt;gsf:otherwise&gt;<br />
     3185              <Tab n="6"/>&lt;gsf:metadata name=&quot;srcicon&quot;/&gt;<br />
     3186        <Tab n="5"/>&lt;/gsf:otherwise&gt;<br />
     3187          <Tab n="4"/>&lt;/gsf:switch&gt;<br />
     3188          <Tab n="3"/>&lt;/gsf:link&gt;<br />
     3189        <Tab n="2"/>&lt;/gsf:when&gt;<br />
     3190      <Tab n="1"/>&lt;/gsf:switch&gt;<br />
     3191    &lt;/td&gt;
     3192</MajorVersion>
     3193</Format>
     3194</NumberedItem>
     3195<NumberedItem>
     3196<Text id="0651"><b>Preview</b> your collection as before. Now different icons are used for discography, lyrics, tablature, and MARC metadata. Even MP3 and MIDI audio file types are distinguished.<MajorVersion number="2"> If you let the mouse hover over one of these images a "tool tip" appears explaining what file type the icon represents in the current interface language (note: <Path>extra.dm</Path> only defines English and French).</MajorVersion></Text>
    30493197</NumberedItem>
    30503198<Heading>
Note: See TracChangeset for help on using the changeset viewer.