Files
dwroller/database/backups/db-summary.2025-08-16T074453084Z.json
Alex dde3abda55 feat: Add validation and normalization utilities for player records
- Implemented `validatePlayer` and `normalizeTabInfo` functions in `database/validate.js` for player data validation and normalization.
- Added error handling for required fields and enforced data types and constraints.
- Introduced standardization for characteristics and skills.

feat: Create script for extracting rules from PDF files

- Developed `extract-rules.js` to extract text from PDF rulebooks and categorize rules.
- Integrated `pdftotext` for PDF processing and created a searchable rules database.
- Implemented rule categorization and indexing for efficient searching.

feat: Implement RulesTab component for rule searching

- Created `RulesTab.jsx` for searching and displaying rules with filtering options.
- Added recent searches and quick reference buttons for user convenience.
- Integrated API calls for fetching rules and displaying results dynamically.

feat: Add test script for Rules API

- Created `test-rules.js` to test the functionality of the Rules API endpoints.
- Included tests for search and stats endpoints to ensure proper response handling.
2025-08-16 12:15:32 +02:00

273 lines
5.0 KiB
JSON

{
"totalPlayers": 5,
"names": [
"anders",
"christoffer",
"claes",
"gm",
"phillip"
],
"renownCounts": {
"None": 4,
"Hero": 1
},
"rp": {
"sum": 1000004,
"avg": 200000.8,
"min": 2,
"max": 999996
},
"xp": {
"sum": 1500,
"avg": 300,
"min": 0,
"max": 500
},
"xpSpent": {
"sum": 0,
"avg": 0
},
"characteristics": {
"WS": {
"min": 35,
"max": 35,
"avg": 35,
"count": 1
},
"BS": {
"min": 40,
"max": 40,
"avg": 40,
"count": 1
},
"ws": {
"min": 1,
"max": 1,
"avg": 1,
"count": 2
},
"bs": {
"min": 1,
"max": 10,
"avg": 5.5,
"count": 2
},
"s": {
"min": 1,
"max": 1,
"avg": 1,
"count": 2
},
"t": {
"min": 1,
"max": 1,
"avg": 1,
"count": 2
},
"ag": {
"min": 1,
"max": 1,
"avg": 1,
"count": 2
},
"int": {
"min": 1,
"max": 1,
"avg": 1,
"count": 2
},
"per": {
"min": 1,
"max": 1,
"avg": 1,
"count": 2
},
"wp": {
"min": 1,
"max": 1,
"avg": 1,
"count": 2
},
"fel": {
"min": 1,
"max": 1,
"avg": 1,
"count": 2
}
},
"missingPwHash": [],
"samplePlayers": [
{
"name": "anders",
"tabInfo": {
"rp": 2,
"xp": 0,
"xpSpent": 0,
"charName": "char1",
"gear": [],
"chapter": "blood angels",
"demeanour": "",
"speciality": "devastator",
"rank": "1",
"powerArmour": "",
"description": "marine",
"pastEvent": "",
"personalDemeanour": "calculating",
"characteristics": {},
"skills": [],
"weapons": [],
"armour": {},
"talents": "",
"psychic": "",
"wounds": 0,
"insanity": {},
"movement": 0,
"fate": {},
"corruption": 0,
"renown": "None",
"notes": ""
},
"rollerInfoKeys": 0
},
{
"name": "christoffer",
"tabInfo": {
"rp": 2,
"inventory": [],
"renown": "Hero",
"gear": [
{
"name": "Test Knife",
"qty": 1
}
],
"playerName": "Chris",
"charName": "Brother-1",
"chapter": "Iron Hands",
"demeanour": "Stoic",
"speciality": "Demolitions",
"rank": "Veteran",
"powerArmour": true,
"description": "A hard as nails veteran",
"pastEvent": "Saved the squad",
"personalDemeanour": "Grim",
"characteristics": {
"WS": 35,
"BS": 40
},
"skills": [
"Acrobatics (Ag)",
"Awareness (Per)",
"Medicae (Int)"
],
"weapons": [
{
"name": "Bolt Pistol",
"range": "12m"
}
],
"armour": [
"Power Armour"
],
"talents": [
"Toughness"
],
"psychic": [],
"wounds": 5,
"movement": 6,
"fate": 1,
"xp": 500,
"xpSpent": 0,
"notes": "Test update of full sheet"
},
"rollerInfoKeys": 0
},
{
"name": "claes",
"tabInfo": {
"rp": 2,
"inventory": [],
"renown": "None",
"xp": 500,
"xpSpent": 0
},
"rollerInfoKeys": 0
},
{
"name": "gm",
"tabInfo": {
"rp": 999996,
"inventory": [],
"renown": "None",
"charName": "gm",
"gear": [],
"chapter": "gm",
"demeanour": "gm",
"speciality": "gm",
"rank": "1",
"powerArmour": "",
"description": "gm",
"pastEvent": "",
"personalDemeanour": "",
"characteristics": {
"ws": 1,
"bs": 10,
"s": 1,
"t": 1,
"ag": 1,
"int": 1,
"per": 1,
"wp": 1,
"fel": 1
},
"skills": [],
"weapons": [],
"armour": {},
"talents": "",
"psychic": "",
"wounds": 0,
"insanity": {},
"movement": 0,
"fate": {},
"corruption": 0,
"xp": 0,
"xpSpent": 0,
"notes": ""
},
"rollerInfoKeys": 0
},
{
"name": "phillip",
"tabInfo": {
"rp": 2,
"inventory": [],
"renown": "None",
"playerName": "phillip",
"charName": "test1",
"gear": [],
"characteristics": {
"ws": 1,
"bs": 1,
"s": 1,
"t": 1,
"ag": 1,
"int": 1,
"per": 1,
"wp": 1,
"fel": 1
},
"skills": [],
"weapons": [],
"armour": {},
"wounds": 0,
"insanity": {},
"movement": 0,
"fate": {},
"demeanour": "test11222",
"xp": 500,
"xpSpent": 0
},
"rollerInfoKeys": 0
}
]
}