-
Notifications
You must be signed in to change notification settings - Fork 256
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,22 @@ def grouped? | |
self.has_key? "grouped" | ||
end | ||
|
||
# Exports the entire list of #documents as an EndNote document; | ||
# that is, the individual endnote documents separated by newlines. | ||
# | ||
# Only documents that can be exported to endnote format are included. | ||
def to_endnote | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jrochkind
Author
Member
|
||
documents.select {|d| d.export_formats.keys.include?(:endnote)}.collect {|d| d.export_as(:endnote)}.join("\n") | ||
end | ||
|
||
# Exports the entire list of #documents as "Refworks tagged MARC" format, | ||
# that is individual documents separated by newlines. | ||
# | ||
# Only documents that can be exported in this format are included. | ||
def to_refworks_marc_txt | ||
documents.select {|d| d.export_formats.keys.include?(:refworks_marc_txt)}.collect {|d| d.export_as(:refworks_marc_txt)}.join("\n") | ||
end | ||
|
||
private | ||
|
||
def force_to_utf8(value) | ||
|
I wonder if we can do this in a generic way that is reusable for other types of document export formats. I guess the trick is knowing if the export format is text and can just be concatenated together or not. Too bad the MIME type for endnote is
application/x-endnote-refer
or we could just key off that somehow.