Publishing a MyMedia Card for an image file

require 'mymedia-card'
   
mmc = MyMediaCard.new(config: '/home/james/jamesrobertson.eu/s1/mymedia.conf', 
                                                         public_type: 'images')
mmc.auto_copy_publish()

Observations after execution:

  1. The ~/jamesrobertson.eu/s1/images/2015/may/04/arduino-pro-mini.xml file was created from the script
  2. The arduino-pro-mini.xml file contained the following:
<?xml version='1.0' encoding='UTF-8'?>
<kvx type='images' created='2015-05-04 17:54:50 +0100'>
  <summary>
    <title>Arduino Pro Mini</title>
    <tags>arduino promini</tags>
    <original_source>meta040515T1548.txt</original_source>
    <source>1754hrs.txt</source>
    <xslt/>
  </summary>
  <body>
    <file>arduino-pro-mini.jpg</file>
  </body>
</kvx>

Note: MyMedia-card#auto_copy_publish doesn't copy across or publish the actual media file, it simply copies and publishes the Kvx file (XML metadata file) which contains information about the media file.

See also