Skip to content

Commit

Permalink
Merge pull request #3555 from gregchapman-dev/gregc/moreMetadataFixes
Browse files Browse the repository at this point in the history
More metadata fixes
  • Loading branch information
craigsapp authored Dec 13, 2023
2 parents f51c97b + 6f8683e commit f274619
Show file tree
Hide file tree
Showing 4 changed files with 331 additions and 123 deletions.
5 changes: 5 additions & 0 deletions include/vrv/doc.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,11 @@ class Doc : public Object {
*/
pugi::xml_document m_back;

/**
* The music@decls value
*/
std::string m_musicDecls;

/** The current page height */
int m_drawingPageHeight;
/** The current page width */
Expand Down
18 changes: 16 additions & 2 deletions include/vrv/iohumdrum.h
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,17 @@ struct DateWithErrors {
std::string secondError; // error of the second ("", "approximate", "uncertain")
};

struct DateConstruct {
// constructType can be any of "" (invalid), "DateSingle" (one date), "DateRelative"
// (one date, qualifier="before" or "after"), "DateBetween" (two dates), "DateSelection"
// (N dates, qualifier="and" or "or"), or "DateConstructRange" (two DateConstructs).
std::string constructType; // if type is "", ignore everything here, the date construct was not parseable.
std::string dateConstructError; // error of the entire DateConstruct
std::string qualifier;
std::vector<DateWithErrors> dates; // empty for "DateConstructRange"
std::vector<DateConstruct> dateConstructs; // only used for "DateConstructRange" (has two elements in that case)
};

//----------------------------------------------------------------------------
// HumdrumInput
//----------------------------------------------------------------------------
Expand Down Expand Up @@ -893,15 +904,19 @@ class HumdrumInput : public vrv::Input {
void createEncodingDesc(pugi::xml_node meiHead);
void createWorkList(pugi::xml_node meiHead);
void createHumdrumVerbatimExtMeta(pugi::xml_node meiHead);
void createBackMatter();
void createSimpleTitleElement();
void createSimpleComposerElements();
void createTitleElements(pugi::xml_node element);
void createComposerElements(pugi::xml_node element);
void fillInIsoDate(pugi::xml_node element, const std::string &dateString);
std::map<std::string, std::string> isoDateAttributesFromHumdrumDate(
const std::string &inHumdrumDate, bool edtf = false);
DateConstruct dateConstructFromHumdrumDate(const std::string &dateString);
std::map<std::string, std::string> isoDateAttributesFromDateConstruct(
const DateConstruct &dateConstruct, bool edtf, bool isEdgeOfDateConstructRange = false);
std::string isoDateFromDateWithErrors(const DateWithErrors &dateWithErrors, bool edtf);
DateWithErrors dateWithErrorsFromHumdrumDate(const std::string &dateString);
std::string isoDateFromDateWithErrors(const DateWithErrors &date, bool edtf);
bool sanityCheckDate(int year, int month, int day, int hour, int minute, int second);
std::string stripDateError(std::string &value);
std::string getTextListLanguage(const std::vector<HumdrumReferenceItem> &textItems);
Expand All @@ -912,7 +927,6 @@ class HumdrumInput : public vrv::Input {
bool isStandardHumdrumKey(const std::string &key);
void appendText(pugi::xml_node element, std::string text);


/// Templates ///////////////////////////////////////////////////////////
template <class ELEMENT> void verticalRest(ELEMENT rest, const std::string &token);
template <class ELEMENT>
Expand Down
Loading

0 comments on commit f274619

Please sign in to comment.