Ported from Heckfer/almanac-tibia#157.
What
The wiki's Infobox_Object template documents item facts the generated DB has no column/attribute for. Of the four fields in the original issue, two are already covered in the current codebase (v8.0.1+):
secondarytype — already stored as the type_secondary column on item and parsed by ItemParser.
regenseconds — already stored as the food_time entry in item_attribute.
Remaining to add (both verified present in live wiki articles):
slot — equipment slot for wearables (e.g. Neck on Ruby Necklace, Finger, Body).
basepower — rune base power (e.g. 150 on Sudden Death Rune). Note: upstream's unreleased base_power is for spells (Infobox_Spell); this one is the rune item field.
How
Follow the existing pattern for scalar per-item facts (same as vocation/elemental_bond, commit fa928e5): add entries to ItemParser.item_attributes in tibiawikisql/parsers/item.py so they land in the item_attribute table:
"slot": "slot"
"base_power": "basepower"
Acceptance
slot and base_power rows appear in item_attribute after generate.
- Parser tests cover both fields with real wiki fixtures.
- CHANGELOG updated.
Ported from Heckfer/almanac-tibia#157.
What
The wiki's
Infobox_Objecttemplate documents item facts the generated DB has no column/attribute for. Of the four fields in the original issue, two are already covered in the current codebase (v8.0.1+):— already stored as thesecondarytypetype_secondarycolumn onitemand parsed byItemParser.— already stored as theregensecondsfood_timeentry initem_attribute.Remaining to add (both verified present in live wiki articles):
slot— equipment slot for wearables (e.g.Neckon Ruby Necklace,Finger,Body).basepower— rune base power (e.g.150on Sudden Death Rune). Note: upstream's unreleasedbase_poweris for spells (Infobox_Spell); this one is the rune item field.How
Follow the existing pattern for scalar per-item facts (same as
vocation/elemental_bond, commit fa928e5): add entries toItemParser.item_attributesintibiawikisql/parsers/item.pyso they land in theitem_attributetable:"slot": "slot""base_power": "basepower"Acceptance
slotandbase_powerrows appear initem_attributeaftergenerate.