How to bulk import text information from URLs?

Using the CSV Import plugin, I can successfully create items with metadata. I can pass URLs to the JPG images and these import fine.
I also have transcribed text that I want to display with the images and hope to import via either a metadata field or description.
However, Omeka displays the text as a thumbnail instead of importing the .txt content directly into the field. Is this possible? I have hundreds of files to import, all with transcribed text ready to accompany each image.
Thanks -


Insert your text in a cell of your spreadsheet and import it as any other data. If you choose the item type "Text", you will be able to use the "Text" field.


Daniel Berthereau
Infodoc & Knowledge management

Sorry I was not clear on the issue. I have hundreds of short paragraphs in .txt files available via a link/URL such as doc123.txt. I can easily enter sequenced URLs into a CSV, but instead of the text content being presented as text, it is shown in a preview 'image'. If one clicks on the image of text, the actual text is shown as I want. I'm hoping to have the plain text display instead of the generated thumbnail of it. Thanks.


So this is not a issue of CsvImport, because it imports all files as File
and doesn't care about content, and only creates a thumbnail with this content. So you can change your theme to not display the thumbnail, but the content.


Daniel Berthereau
Infodoc & Knowledge management

Yes, that would solve my issue.

If there is a resource/reference you can point me to on that approach I would appreciate it. My PHP skills are minimal but with some documentation I can accomplish quite a bit.

Thank you.


Find the items/show.php of your theme and replace:

$file = get_current_record('file');
if ($file->hasThumbnail()):
    echo file_markup($file,array('imageSize'=>'fullsize'));


$file = get_current_record('file');
$uriFile = $file->getWebPath('original');
echo file_get_contents($uriFile);


Daniel Berthereau
Infodoc & Knowledge management

I'll work on this tonight.

I spoke too soon. Cannot find that code anywhere.
The closest I found was located at this path:


<!-- The following returns all of the files associated with an item. -->
<?php if (metadata('item', 'has files')): ?>
<div id="itemfiles" class="element">
    <h3><?php echo __('Files'); ?></h3>
    <?php if (get_theme_option('Item FileGallery') == 1): ?>
    <div class="element-text"><?php echo item_image_gallery(); ?></div>
    <?php else: ?>
    <div class="element-text"><?php echo files_for_item(); ?></div>
    <?php endif; ?>
<?php endif; ?>

I finally found a solution that works and am posting in case others find it useful. In this case, I wanted the text from the linked file to appear in the browse items page.
To this code...

<?php if ($description = metadata('item', array('Dublin Core', 'Description'), array('snippet'=>250))): ?>

I added this:

<?php $deed = file_get_contents($description);
	echo $deed; ?>

$deed being a temporary variable I created to echo with. I suspect variations of this are needed depending on other pages source.

Can these contents be automatically entered into a field (such as text/description), so that they become searchable.