mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Implement CSV / TSV import (#45)
- add csv/tsv importer - add `make_map` script function - add `alt name` field property - add `construction script` field property - add `construction script` game property
This commit is contained in:
@@ -137,6 +137,15 @@ void uncanonical_name_form_in_place(String& str) {
|
||||
}
|
||||
}
|
||||
|
||||
String unified_form(String& str) {
|
||||
str = trim(str);
|
||||
for (String::iterator it = str.begin(); it != str.end(); ++it) {
|
||||
if (*it == ' ') *it = '_';
|
||||
else *it = toLower(*it);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
String name_to_caption(const String& str) {
|
||||
String ret;
|
||||
ret.reserve(str.size());
|
||||
|
||||
+4
-1
@@ -241,7 +241,10 @@ void uncanonical_name_form_in_place(String&);
|
||||
inline String uncanonical_name_form(String s) {
|
||||
uncanonical_name_form_in_place(s);
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
/// Convert a field name to canonical form, then to lower case, then trim it
|
||||
String unified_form(String&);
|
||||
|
||||
/// Convert a field name to a string that can be shown to the user
|
||||
String name_to_caption(const String&);
|
||||
|
||||
@@ -108,6 +108,9 @@ enum ChildMenuID {
|
||||
ID_CARD_ROTATE_270,
|
||||
// CardList
|
||||
ID_SELECT_COLUMNS,
|
||||
ID_CARD_ADD_CSV,
|
||||
ID_CARD_ADD_CSV_SEP,
|
||||
ID_CARD_ADD_CSV_BROWSE,
|
||||
|
||||
// Keyword menu
|
||||
ID_KEYWORD_ADD = 6101,
|
||||
|
||||
Reference in New Issue
Block a user