sshaw / ddex Goto Github PK
View Code? Open in Web Editor NEWDDEX metadata serialization for Ruby
Home Page: https://metadatagui.com
DDEX metadata serialization for Ruby
Home Page: https://metadatagui.com
I have a friend who works for a non profit in Puerto Rico who has been cataloging music from the island. Pandora is asking for a DDEX file and he is not sure if he needs to create them by hand, or if there is a better way. They are very limited in resources so I'm trying to help out. I am wondering if there are any public apps or services that could help.
Not sure how this became is_credited
. Was it due to jaxb2ruby? The convention is to use Ruby conventions which is credited?
.
There are some tests, but nothing that will catch #10.
Hi @sshaw - Any idea of when DSR will be implemented? I could help with it, if you give me the path
Hi,
I'm working on parsing through DDEX files and found your gem. It doesn't appear to work as the README.md states, but there is a ton of code and the majority of the tests pass. I would love to contribute to this if I could, but I can't seem to get going with the gem. Is there something I need to do to make it work? Thanks for you assistance, I hope I can help you progress this gem forward.
Hi,
Getting this error when trying to update to Rails 7
In Gemfile:
ddex (~> 0.0.8) was resolved to 0.0.8, which depends on
activesupport (>= 3.0, < 7)
rails (~> 7.0.2.3) was resolved to 7.0.2.3, which depends on
activesupport (= 7.0.2.3)
Are there any tasks that need doing before you can bump activesupport version on the gem?
Thanks.
ERN v3.2 XSD defines XML sequences for some elements (enforcing order of elements), I bet later versions of the standard do it as well.
DDEX.write
generates XML with the elements in the wrong order, for example:
<DisplayArtist>
<ArtistRole>MainArtist</ArtistRole>
<PartyName>
<FullName>Bruno Mars</FullName>
</PartyName>
</DisplayArtist>
however, the valid XML is:
<DisplayArtist>
<PartyName>
<FullName>Bruno Mars</FullName>
</PartyName>
<ArtistRole>MainArtist</ArtistRole>
</DisplayArtist>
or
<ImageDetailsByTerritory>
<TechnicalImageDetails>
<TechnicalResourceDetailsReference>T12345</TechnicalResourceDetailsReference>
<ImageCodecType>JPEG</ImageCodecType>
<ImageHeight>800</ImageHeight>
<ImageWidth>800</ImageWidth>
<File>
<FileName>ABCDEF_T12345.jpg</FileName>
<FilePath>resources/</FilePath>
<HashSum>
<HashSum>aBcDeFgH12345XyZ</HashSum>
<HashSumAlgorithmType>SHA1</HashSumAlgorithmType>
</HashSum>
</File>
</TechnicalImageDetails>
<TerritoryCode>Worldwide</TerritoryCode>
</ImageDetailsByTerritory>
while the valid XML is:
<ImageDetailsByTerritory>
<TerritoryCode>Worldwide</TerritoryCode>
<TechnicalImageDetails>
<TechnicalResourceDetailsReference>T12345</TechnicalResourceDetailsReference>
<ImageCodecType>JPEG</ImageCodecType>
<ImageHeight>800</ImageHeight>
<ImageWidth>800</ImageWidth>
<File>
<FileName>ABCDEF_T12345.jpg</FileName>
<FilePath>resources/</FilePath>
<HashSum>
<HashSum>aBcDeFgH12345XyZ</HashSum>
<HashSumAlgorithmType>SHA1</HashSumAlgorithmType>
</HashSum>
</File>
</TechnicalImageDetails>
</ImageDetailsByTerritory>
The root of the issue is in classes that inherit from other classes that define xml_accessors like:
# file: "lib/ddex/v20100712/ddexc/display_artist.rb"
class DDEX::V20100712::DDEXC::DisplayArtist < DDEX::V20100712::DDEXC::PartyDescriptor
...
xml_accessor :artist_roles, :as => [DDEX::V20100712::DDEXC::ArtistRole], :from => "ArtistRole", :required => false
...
end
# file: " lib/ddex/v20100712/ddexc/party_descriptor.rb"
class DDEX::V20100712::DDEXC::PartyDescriptor < Element
...
xml_accessor :party_names, :as => [DDEX::V20100712::DDEXC::PartyName], :from => "PartyName", :required => false
...
end
# file: "lib/ddex/ern/v32/image_details_by_territory.rb"
class DDEX::ERN::V32::ImageDetailsByTerritory < DDEX::V20100712::DDEXC::ImageDetailsByTerritory
...
xml_accessor :technical_image_details, :as => [DDEX::ERN::V32::TechnicalImageDetails], :from => "TechnicalImageDetails", :required => false
...
end
# file: "lib/ddex/v20100712/ddexc/image_details_by_territory.rb"
class DDEX::V20100712::DDEXC::ImageDetailsByTerritory < Element
...
xml_accessor :excluded_territory_codes, :as => [], :from => "ExcludedTerritoryCode", :required => false
xml_accessor :territory_codes, :as => [], :from => "TerritoryCode", :required => false
...
end
XML elements defined in the parent classes are written in the XML output after the elements defined in the child class, however this is not what the XSD defines.
I'm not quite sure how to fix this issue. The only idea I have right now is define each XML element in a single class without inheritance from other XML elements. Not an small change.
Hi @sshaw,
We have to read the following XML:
<ern:NewReleaseMessage xmlns:ern="http://ddex.net/xml/2010/ern-main/312"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ddex.net/xml/2010/ern-main/312 http://ddex.net/xml/2010/ern-main/312/ern-main.xsd"
MessageSchemaVersionId="2010/ern-main/312">
As you can see, the MessageSchemaVersionId is 2010/ern-main/312
.
How much work do you think it'd be for us to write support for this version, and which steps should we follow in doing so?
Thanks!
Phil
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.