內容簡介
如果您製作了許多圖像、圖形、音頻剪輯或視頻剪輯,您可能會花費一些功夫將元數據(標題、版權、軌道名稱、日期等等)放入它們中。您可能還會將標記和評級(一到五星)放在您的媒體文件上。
JPEG圖像文件具有EXIF元數據。
MP3音頻剪輯具有ID3元數據。
PNG文件具有其自己的元數據。
Adobe正在推動一個名為XMP的互操作標準,用於保存元數據。
如果您使用像Acrobat、Adobe Bridge或Audacity這樣的製作工具,您可能會將此類元數據放入您的文件中。然後,您可能需要在將文件放入WordPress站點時重新輸入它。
現在,此「媒體元數據工作流程嚮導」外掛可以讓您免於這樣做。現在,您可以在上傳媒體時自動將元數據轉移到媒體庫中。
您可以選擇使用媒體文件中的創建日期作為WordPress中的「上傳」日期。因此,例如,您的照片可以按拍攝日期和時間的順序排序在媒體庫中,而您的pdf可以按掃描順序排列。
您可以指定模板,定義應使用哪些元數據項來創建每個WordPress附件文章的字段:標題、標題說明、替代文字和說明。
對於音頻文件,MMWW可以自動創建由Jetpack提供的shortcode。選擇Link To Media File,shortcode將為您生成。WordPress 3.6及更高版本具有集成的音頻播放器,因此您可能不需要此功能。設置頁面可讓您關閉此行為。
如果您與此插件一起使用[Media Tags] [https://wordpress.org/plugins/media-tags/]插件,您將能夠將元數據標籤作為分類處理。您還可以將元數據評級(一到五星)用作分類。
元數據模板
一旦安裝並激活了該插件,它將使用您上傳的媒體文件中的元數據填充站點附件的文本字段。
附件的文本字段
附件文本文件是標題、說明、標題說明和替代文字。附件的標題也用於創建slug。
描述是描述媒體項目的自由文字。
標題說明顯示在文章中照片下方。
替代文字嵌入在帖子中的IMG標記中。它有兩個用途:為使用屏幕閱讀器的人以文本形式描述圖像,因為他們無法看到圖像,並為搜索引擎描述圖像。
使用元數據模板
許多媒體編輯程序,例如Photoshop、Paint Shop Pro、Acrobat和Audacity,都有將元數據加載到媒體中的方法。這些通常可以在名為“屬性”,“圖像信息”或類似名稱的對話框中找到。
MMWW的設置頁面可讓您指定用於填充文本字段的模板。例如,您可以為智能手機的圖像文件設置描述模板,如下所示:
({description} )({shutter}--{fstop} )({latitude}/{longitude} )({created_time})
您將在描述中看到有關拍攝照片的詳細信息
您可以使用括號來分隔元數據模板字符串的可選部分。例如,並非所有媒體文件都包含{copyright}元數據。如果您將其放入元數據模板字符串中,則如果沒有{copyright}元數據,它將省略整個版權子句。注意,在結束括號之前,有一個尾隨的空格。
外掛標籤
開發者團隊
原文外掛簡介
If you create lots of images, graphics, audio clips, or video clips you probably go to some trouble to put metadata (titles, copyrights, track names, dates, and all that) into them. You may also put tags and ratings (one to five stars) on your media files.
JPEG image files have EXIF metadata.
MP3 audio clips have ID3 metadata.
PNG files have their own kind of metadata.
Adobe is pushing an interoperable standard called XMP to hold metadata as well.
If you use a production tool like Acrobat, Adobe Bridge or Audacity, you probably put this kind of metadata into your files. And then you probably rekey it when you put the files into your WordPress site.
This Media Metadata Workflow Wizard plugin will get you out of doing that. Now you can have that metadata transferred into the Media Library automatically when you upload your media.
You can choose to have the creation date in your media file used as the “Uploaded” date in WordPress. So, for example, your photos can be ordered in the media library in order of the date and time they were taken, and your pdfs in the order they were scanned.
You can specify templates defining what metadata items should be used to create each WordPress attachment post’s fields: title, caption, alt text, and description.
For audio files, MMWW can automatically create the shortcode provided by Jetpack. Choose Link To Media File and the shortcode will be generated for you. WordPress 3.6 and later has an integrated audio player, so you may not need this feature. The Settings page lets you turn this behavior off.
If you use the [Media Tags][https://wordpress.org/plugins/media-tags/] plugin together with this one, you’ll be able to handle metadata tags as a taxonomy. You can also use metadata ratings (one to five stars) as a taxonomy.
Metadata templates
Once the plugin is installed and activated, it will populate the text fields in your site’s attachment
posts using metadata from the media files you upload.
Text fields for attachments
The attachment text files are Title, Description, Caption and Alternate Text. The Title of the attachment is also used to create the slug.
The Description is free text describing the media item.
The Caption is displayed underneath photos in posts.
The Alternate Text is embedded in the IMG tag in the post. It serves two purposes: describing the image in textual form
for people who use screen readers because they cannot see the images, and for describing the image to search engines.
Using metadata templates
Many media editor programs, such as Photoshop, Paint Shop Pro, Acrobat and Audacity have ways of loading metadata into media. These usually can be found in a dialog box named “Properties,” “Image Information,” or something similar.
MMWW’s settings page lets you specify the templates to use for populating the text fields. For example, you can set the Description template for an image file from a smartphone to
({description} )({shutter}--{fstop} )({latitude}/{longitude} )({created_time})
and you’ll see some details about how, where, and when the photo was taken in your Description.
You can use parentheses to delimit optional parts of a metadata template string. For example, not all media files contain {copyright} metadata. If you put this into your metadata template string, it will omit the whole copyright clause if there’s no {copyright} metadata. Notice that there’s a trailing space before the closing parenthesis. This separates this clause (if it appears) from the next one.
(Copyright © {copyright} )
The parentheses denote the whole clause as optional, and omitted if the metadata mentioned in it is not available.
Similarly, you can create a URL that will display a map centered on the spot your photo was taken, but only if latitude and longitude are available in the photo’s metadata, like one of these:
(\(Open Street Map {title}\))
(\(Google Maps {title}\))
If you want literal parentheses or curly braces to appear in your metadata, use the backslash character to escape them in your template data.
JPEG image files
JPEG photo files have lots of possible metadata. Not every photograph has all these items of metadata, but most have some of them.
{title} Title of the file.
{filename} Filename of the file. e.g. "DSC_5007" (without .jpg)
{credit} Author.
{copyright} Copyright notice if any is included.
{description} Narrative description.
{tags} One or more keyword tags, separated by semicolons.
{rating} 0 - 5, set by various image browsers
{workflowlabel} A text string like "Discard" or "Keep," set by various image browsers
{camera} Camera model
{shutter} Shutter speed, such as 1/200
{shutter_speed} Shutter time in sec, such as 0.05
{fstop} Aperture, like f/5.6
{aperture} Raw aperture, like 5.60
{flash} Flash setting, such as "No Flash" or "Fired, Red-eye reduction"
{focal_length} Lens's focal length in mm.
{focal_length35} Lens's 35mm film focal length equivalent in mm.
{lightsource} Kind of light detected, such as "Daylight" or "Tungsten"
{meteringmode} Type of metering the camera used, such as "Spot," "Average," or "Unknown"
{sensingmethod} Type of image sensor, such as "One-chip color area sensor."
{exposuremode} Exposure mode, such as "Auto" or "Manual"
{exposureprogram} Exposure-setting program, such as "Aperture Priority" or "Normal Program."
{exposurebias} Selected exposure bias.
{brightness} A number indicating how bright the scene is
{scene_capture_type} Scene capture type. Standard, Landscape, Portrait, Night
{sharpness} Image's sharpness. Normal, Soft, Hard
{latitude} GPS latitude reading, shown in degrees and decimals.
{longitude} GPS longitude reading, showin in degrees and decimals.
{altitude} GPS altitude in meters above sea level
{direction} Direction of photograph. 270M means magnetic west, 180T means true south.
{subject_distance} Distance to subject from autofocus or other means.
{created_time} Timestamp when the photograph was taken.
IPTC metadata in JPEG image files
The International Press Telecommunications Council has defined many items of metadata to go in photo files. This metadata helps photojournalists and publications do business efficiently. Various tools, such as Adobe Bridge, allow this metadata to be inserted. MMWW can retrieve it, with these tags
{iptc:creator} The creator's name.
{iptc:creator:jobtitle} The creator's job title.
{iptc:creator:address} The creator's address.
{iptc:creator:city} The creator's city.
{iptc:creator:state} The creator's state or province.
{iptc:creator:postcode} The creator's post / zip code.
{iptc:creator:country} The creator's country.
{iptc:creator:phone} The creator's phone(s).
{iptc:creator:email} The creator's email(s).
{iptc:creator:website} The creator's web site(s).
{iptc:headline} Headline.
{iptc:description} Description.
{iptc:keywords} Keywords, separated with comma or semicolon.
{iptc:iptcsubjectcode} IPTC subject code.
{iptc:descriptionwriter} Author of the description.
{iptc:datecreated} Creation date.
{iptc:genre} Intellectual genre.
{iptc:scenecode} IPTC scene code.
{iptc:datecreated} Creation date.
{iptc:sublocation} Location within city.
{iptc:city} City.
{iptc:state} State/Province.
{iptc:country} Country.
{iptc:iscocountrycode} Country code per ISO 3166.
{iptc:title} Title.
{iptc:jobidentifier} Job Identifier.
{iptc:instructions} Instructions.
{iptc:creditline} Credit line.
{iptc:source} Source.
{iptc:copyright} Copyright Notice.
{iptc:copyrightstatus} Copyright Status.
{iptc:rightsusageterms} Terms of usage.
PNG image files
PNG image files have a few items of metadata. Most creators of PNG files don’t know this metadata exists so it isn’t often present.
{title} Title of the file.
{credit} Author.
{copyright} Copyright notice if any is included.
{description} Narrative description.
{created_time} The timestamp describing the time the PNG was made.
{filename} Filename of the file. e.g. "icon" (without .png)
PDF
PDF files, created by Adobe Acrobat and other programs, have a few items of metadata. The most generally useful of these are the title and credit.
{title} Title of the file.
{credit} Author.
{copyright} Copyright notice if any is included.
{description} Narrative description.
{tags} One or more keyword tags, separated by semicolons.
{rating} 0 - 5
{created_time} The timestamp describing the time the PDF was made.
{software} Program used to create PDF.
{filename} Filename of the file. e.g. "scan1234" (without .pdf)
Audio
MP3 Audio files can have lots of metadata, defined by the ID3 standard. The first few items are by far more common than the others.
{title} Title of the song.
{album} Title of the album.
{credit} Author or performer.
{artist} See {credit}
{year} Year of recording.
{copyright} Copyright notice if any is included.
{description} Narrative description.
{genre} Genre.
{rating} 0 - 5.
{filename} Filename of the file. e.g. "TRACK_003" (without .mp3).
{fileformat} "mp3", "aac"
{duration} Length of audio, for example 1:03:22.
{mime_type} "audio/mpeg" or similar.
These metadata items are in the ID3 standard for MP3 files, but most files don’t have them. MMWW handles them
in case your particular media workflow needs them.
{tempo}
{grouptitle}
{keysignature}
{DDMM} Day and month of recording
{HHMM} Hour and minute of recording
{duration}
{creditlead}
{creditconductor}
{creditproducer}
{writer}
{creditorganization}
{mediatype}
{creditoriginal}
WordPress information for all files
{wp:attachmentid} gives the post id of the present post.
{wp:parentid} gives the post id of the post to which this media file is attached.
{wp:parenttitle} gives the title of the post to which this media file is attached.
{wp:parentslug} gives the slug (url fragment) of the post to which this media file is attached.
These may be missing if those values are unknown at the time of media creation. Reloading the media metadata will
insert them.
A note about timestamps
MMWW has a setting that allows attachment dates to be set using the timestamp in the media’s metadata. For example, the upload date for a photo can be set to the moment the photo was taken. That way, photos in your Media Library tab will appear in the order they were taken (if that’s what you want).
There’s a detail to this: The timestamps in the media files need to be interpreted relative to a time zone to make this work correctly. Consider the example of a photo taken in September in New York City and uploaded in November. The timestamp in the photo is recorded in Eastern Daylight Time, but the current timezone setting is Eastern Standard Time. MMWW does the right thing by interpreting the photo’s timestamp relative to the timezone chosen on WordPress’s General Settings page. If you’re getting strange times of day in your attachment dates, please check that the timezone setting on the General Settings page is correct.
Metadata Standards Reference
Adobe XMP
ID3 for MP3 files
The ID3 Popularimeter — music file ratings
EXIF for JPEG files
IPTC Photo Metadata
To Do
Figure out how to put keywords into a taxonomy if that’s what the user wants.
Add support for the Yet Another Photo Blog (YAPB) [plugin]{https://wordpress.org/extend/plugins/yet-another-photoblog/}
Improve the syntax of the templates.
Add support for video file metadata.
Ask for and receive lots of sample files from users, and use them to test.
Figure out a taxonomy to handle the media ratings in XMP.
Support TIFF files. (Please let the author know if you need TIFF support.)
Credits
Ognjen Djuraskovic of firstsiteguide.com has generously provided Serbian and Spanish translations of MMWW. Хвала / Gracias / Thanks Ognjen!
This plugin incorporates the Zend Media Framework by Sven Vollbehr and Ryan Butterfield which they generously made available under the BSD license. It comes in handy for retrieving and decoding the ID3 tags from audio files. See the LICENSE.txt file in this distribution. Copyright (c) 2005-2009 Zend Technologies USA Inc. (https://www.zend.com) Thanks, Sven and Ryan!
