forked from jaketmp/ePub-quicklook
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This has two benefits. The first is that we can create custom attributes for things we can extract (e.g. illustrators) that Spotlight has no concept of (i.e. the kMDItemFoo things) So this creates attributes for illustrators and translators. Note the name is reverse DNS style with "." replaced with "_". Note also that "-" needs to be replaced or the schema file will be unparseable at runtime - I used "_" for that too. The second benefit is that this allows us to customize the "More info" panel in the Finder "Get Info" window. This is quite cool. It would be nice if the More info panel could display our custom attributes, but it doesn't seem to. There's no obvious way for it to map the attribute name org_idpf_foo to a friendly label. I commented out the "Indexed nnnn characters" things.
- Loading branch information
Showing
3 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<schema version="1.0" xmlns="http://www.apple.com/metadata" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.apple.com/metadata | ||
file:///System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Resources/MetadataSchema.xsd"> | ||
<note> | ||
Custom attributes indexed by this EPUB metadata importer. | ||
</note> | ||
<attributes> | ||
<attribute name="org_idpf_epub_container_metadata_illustrators" multivalued="true" type="CFString"/> | ||
<attribute name="org_idpf_epub_container_metadata_translators" multivalued="true" type="CFString"/> | ||
</attributes> | ||
<types> | ||
<type name="org.idpf.epub-container"> | ||
<allattrs> | ||
kMDItemDisplayName | ||
kMDItemAuthors | ||
kMDItemPublishers | ||
kMDItemContributors | ||
kMDItemEditors | ||
org_idpf_epub_container_metadata_illustrators | ||
org_idpf_epub_container_metadata_translators | ||
kMDItemHeadline | ||
kMDItemIdentifier | ||
kMDItemDueDate | ||
kMDItemSecurityMethod | ||
kMDItemComment | ||
kMDItemTextContent | ||
</allattrs> | ||
<displayattrs> | ||
kMDItemDisplayName | ||
kMDItemAuthors | ||
kMDItemPublishers | ||
kMDItemDueDate | ||
kMDItemSecurityMethod | ||
</displayattrs> | ||
</type> | ||
</types> | ||
</schema> |