ebullient / ttrpg-convert-cli

Utility to convert JSON data (for content you own) from 5etools or pf2etools into Obsidian-friendly Markdown.
https://www.ebullient.dev/projects/ttrpg-convert-cli/
Apache License 2.0
204 stars 42 forks source link

πŸ› Background text missing #205

Closed mclearc closed 1 year ago

mclearc commented 1 year ago

Importing a homebrew background only imports the first heading and source, without any of the text.

I expected to see something like this:

Screenshot 2023-09-02 at 17 50 17

Instead I got this:

Screenshot 2023-09-02 at 17 49 44

Configuration

Sources:

Here's the json:

{
    "$schema": "https://raw.githubusercontent.com/TheGiddyLimit/5etools-utils/master/schema/brew-fast/homebrew.json",
    "_meta": {
        "sources": [
            {
                "json": "ermis-bg",
                "abbreviation": "EB",
                "full": "Ermis Backgrounds",
                "authors": [
                    "LichLife"
                ],
                "version": "1.0.0"
            }
        ],
        "dateAdded": 0,
        "dateLastModified": 0
    },

    "background": [
        {
            "name": "Renegade",
            "source": "ermis-bg",
            "skillProficiencies": [
                {
                    "survival": true,
                    "choose": {
                        "from": [
                            "arcana",
                            "deception",
                            "insight",
                            "persuasion",
                            "religion"
                        ],
                        "count": 1
                    }
                }
            ],
            "toolProficiencies": [
                {
                    "anyArtisansTool": 1,
                    "choose": {
                        "from": [
                            "disguise kit",
                            "forgery kit",
                            "thieves' tools"
                        ],
                        "count": 1

                    }
                }
            ],
            "languageProficiencies": [
                {
                    "anyStandard": 1
                }
            ],
            "entries": [
                {
                    "type": "list",
                    "style": "list-hang-notitle",
                    "items": [
                        {
                            "type": "item",
                            "name": "Skill Proficiencies:",
                            "entry": "{@skill Survival} and another of your choice from {@skill Arcana}, {@skill Deception}, {@skill Insight}, {@skill Persuasion}, or {@skill Religion}."
                        },
                        {
                            "type": "item",
                            "name": "Languages:",
                            "entry": "Two of your choice"
                        },
                        {
                            "type": "item",
                            "name": "Tool Proficiencies:",
                            "entry": "Any {@item Artisan's tools|phb} and one from {@item Disguise Kit|phb}, {@item Forgery Kit|phb}, or {@item Thieves' Tools|phb}."
                        }
                    ]
                },
                {
                    "name": "Life on the Run",
                    "type": "entries",
                    "entries": [
                        "You have lived your life on the run, constantly avoiding capture by the group or association you escaped years ago. Adopting false identities has become second nature to you. Few know your real name or your past. You may be seeking to undermine the group you came from. Or you may simply be trying to live out your life unperturbed by their interference."
                    ]
                }
            ],
            "hasFluff": true
        }
    ]
}
mclearc commented 1 year ago

Oh and --debug provides nothing informative; no mention of background at all there.

ebullient commented 1 year ago

Thanks. This is helpful. Support for homebrew is new.. and there is a much broader variety of content that may not quite match what the main repo had.

Since time is a thing, can you just paste the output when you run with --version ?

ebullient commented 1 year ago

I think I found/squashed it.

mclearc commented 1 year ago

Alas, still seems not to be working?

here is the version info:

ttrpg-convert version 299-SNAPSHOT
Git commit: be72c3a
Build time: 2023-09-02T23:02:50-0400
ebullient commented 1 year ago

Thank you for pasting the version stuff!! YAY! That helps a lot.

Let me double check. I was hopeful that would fix it (one of those.. "WTF was I thinking when I wrote that" moments).

ebullient commented 1 year ago
image

I've added your homebrew to my tests, and it seems to come out ok. Are all of your backgrounds like this? Or just this one? You've added the homebrew json as input, and enabled it in from?

mclearc commented 1 year ago

huh -- here's my config and the command I use. I've only the one custom background.

{
    "from": [

        "PHB",
        "ES",
        "EB",
        "pdcleric",
        "Kinemancer",
        "Orimancer",
        "Tinkerer",
        "Psion",
        "Auton",
        "Doloi",
        "Haemin",
        "faeir-folk"

    ],
    "template": {
        "background": "/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-cli-compendium/background.txt",
        "spell": "/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-cli-compendium/spell.txt",
        "race": "/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-cli-compendium/race.txt",
        "item": "/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-cli-compendium/item.txt"
    },
    "include": [

        "background|renegade|ermis-bg",

        "psionic|amodal cognition|psion",
        "psionic|anti-divination|psion",
        "psionic|blink|psion",
        "psionic|communion|psion",
        "psionic|counterpsionics|psion",
        "psionic|cryo/pyrokinetic blast|psion",
        "psionic|density control|psion",
        "psionic|dispel magic|psion",
        "psionic|elemental resistance|psion",
        "psionic|elemental shift|psion",
        "psionic|empathic insight|psion",
        "psionic|energy drain|psion",
        "psionic|energy shield|psion",
        "psionic|fusion|psion",
        "psionic|life transference|psion",
        "psionic|mental image|psion",
        "psionic|mental insinuation|psion",
        "psionic|mental shadow|psion",
        "psionic|mind blast|psion",
        "psionic|mind hammer|psion",
        "psionic|mind link|psion",
        "psionic|mind meld|psion",
        "psionic|mind reading|psion",
        "psionic|portal|psion",
        "psionic|power nullification|psion",
        "psionic|precognition|psion",
        "psionic|psionic disguise|psion",
        "psionic|psychic command|psion",
        "psionic|psychic presence|psion",
        "psionic|psychometry|psion",
        "psionic|pyro/cryokinesis|psion",
        "psionic|remote viewing|psion",
        "psionic|retrocognition|psion",
        "psionic|shaping|psion",
        "psionic|spatial swap|psion",
        "psionic|telekinetic barrier|psion",
        "psionic|telekinetic strike|psion",
        "psionic|teleport|psion",
        "psionic|third eye|psion",
        "psionic|thought intrusion|psion",
        "psionic|vitality surge|psion"

    ],
    "exclude": [

        "background|acolyte|phb",
        "background|anthropologist|toa",
        "background|archaeologist|toa",
        "background|astral drifter|aag",
        "background|athlete|mot",
        "background|augen trust (spy)|egw",
        "background|azorius functionary|ggr",
        "background|baldur's gate acolyte|bgdia",
        "background|baldur's gate charlatan|bgdia",
        "background|baldur's gate criminal|bgdia",
        "background|baldur's gate entertainer|bgdia",
        "background|baldur's gate folk hero|bgdia",
        "background|baldur's gate guild artisan|bgdia",
        "background|baldur's gate hermit|bgdia",
        "background|baldur's gate noble|bgdia",
        "background|baldur's gate outlander|bgdia",
        "background|baldur's gate sage|bgdia",
        "background|baldur's gate sailor|bgdia",
        "background|baldur's gate soldier|bgdia",
        "background|baldur's gate urchin|bgdia",
        "background|black fist double agent|alcurseofstrahd",
        "background|boros legionnaire|ggr",
        "background|caravan specialist|alelementalevil",
        "background|celebrity adventurer's scion|ai",
        "background|charlatan|phb",
        "background|city watch|scag",
        "background|clan crafter|scag",
        "background|cloistered scholar|scag",
        "background|cobalt scholar (sage)|egw",
        "background|cormanthor refugee|alrageofdemons",
        "background|courtier|scag",
        "background|criminal|phb",
        "background|dimir operative|ggr",
        "background|dissenter|psa",
        "background|dragon casualty|alcurseofstrahd",
        "background|earthspur miner|alelementalevil",
        "background|entertainer|phb",
        "background|faceless|bgdia",
        "background|faction agent|scag",
        "background|failed merchant|ai",
        "background|far traveler|scag",
        "background|feylost|wbtw",
        "background|fisher|gos",
        "background|folk hero|phb",
        "background|gambler|ai",
        "background|gate urchin|alrageofdemons",
        "background|gate warden|ua2022wondersofthemultiverse",
        "background|giant foundling|ua2022wondersofthemultiverse",
        "background|golgari agent|ggr",
        "background|grinner|egw",
        "background|gruul anarch|ggr",
        "background|guild artisan|phb",
        "background|harborfolk|alelementalevil",
        "background|haunted one|vrgr",
        "background|hermit|phb",
        "background|hillsfar merchant|alrageofdemons",
        "background|hillsfar smuggler|alrageofdemons",
        "background|house agent|erlw",
        "background|inheritor|scag",
        "background|initiate|psa",
        "background|inquisitor|psi",
        "background|investigator|vrgr",
        "background|iron route bandit|alcurseofstrahd",
        "background|izzet engineer|ggr",
        "background|knight of solamnia|dsotdq",
        "background|knight of solamnia|ua2022heroesofkrynn",
        "background|knight of solamnia|ua2022heroesofkrynnrevisited",
        "background|knight of the order|scag",
        "background|lorehold student|scc",
        "background|luxonborn (acolyte)|egw",
        "background|mage of high sorcery|dsotdq",
        "background|mage of high sorcery|ua2022heroesofkrynn",
        "background|mage of high sorcery|ua2022heroesofkrynnrevisited",
        "background|marine|gos",
        "background|mercenary veteran|scag",
        "background|mulmaster aristocrat|alelementalevil",
        "background|myriad operative (criminal)|egw",
        "background|noble|phb",
        "background|orzhov representative|ggr",
        "background|outlander|phb",
        "background|phlan insurgent|alcurseofstrahd",
        "background|phlan refugee|alelementalevil",
        "background|plaintiff|ai",
        "background|planar philosopher|ua2022wondersofthemultiverse",
        "background|prismari student|scc",
        "background|quandrix student|scc",
        "background|rakdos cultist|ggr",
        "background|revelry pirate (sailor)|egw",
        "background|rival intern|ai",
        "background|rune carver|ua2022wondersofthemultiverse",
        "background|sage|phb",
        "background|sailor|phb",
        "background|secret identity|alrageofdemons",
        "background|selesnya initiate|ggr",
        "background|shade fanatic|alrageofdemons",
        "background|shipwright|gos",
        "background|silverquill student|scc",
        "background|simic scientist|ggr",
        "background|smuggler|gos",
        "background|soldier|phb",
        "background|stojanow prisoner|alcurseofstrahd",
        "background|ticklebelly nomad|alcurseofstrahd",
        "background|trade sheriff|alrageofdemons",
        "background|urban bounty hunter|scag",
        "background|urchin|phb",
        "background|uthgardt tribe member|scag",
        "background|variant city watch (investigator)|scag",
        "background|variant criminal (spy)|phb",
        "background|variant entertainer (gladiator)|phb",
        "background|variant guild artisan (guild merchant)|phb",
        "background|variant noble (knight)|phb",
        "background|variant noble (retainers)|phb",
        "background|variant sailor (pirate)|phb",
        "background|vizier|psa",
        "background|volstrucker agent|egw",
        "background|waterdhavian noble|scag",
        "background|wildspacer|aag",
        "background|witchlight hand|wbtw",
        "background|witherbloom student|scc",

        "subclass|ambition domain (psa)|cleric|phb|psa",
        "subclass|arcana domain|cleric|phb|scag",
        "subclass|arcane trickster|rogue|phb|",
        "subclass|artificer (ua)|wizard|phb|uaeberron",
        "subclass|assassin|rogue|phb|",
        "subclass|bladesinging|wizard|phb|tce",
        "subclass|chronurgy magic|wizard|phb|egw",
        "subclass|city domain (ua)|cleric|phb|uamodernmagic",
        "subclass|death domain|cleric|phb|dmg",
        "subclass|fate domain (ua)|cleric|phb|ua2022wondersofthemultiverse",
        "subclass|forge domain (ua)|cleric|phb|uaclericdivinedomains",
        "subclass|forge domain|cleric|phb|xge",
        "subclass|grave domain (ua)|cleric|phb|uaclericdivinedomains",
        "subclass|grave domain|cleric|phb|xge",
        "subclass|graviturgy magic|wizard|phb|egw",
        "subclass|inquisitive (ua)|rogue|phb|uagothicheroes",
        "subclass|inquisitive|rogue|phb|xge",
        "subclass|knowledge domain (psa)|cleric|phb|psa",
        "subclass|knowledge domain|cleric|phb|",
        "subclass|life domain|cleric|phb|",
        "subclass|light domain|cleric|phb|",
        "subclass|lore mastery (ua)|wizard|phb|uawarlockandwizard",
        "subclass|love domain (ua)|cleric|phb|ua2020subclassespt2",
        "subclass|mage of lorehold (ua)|wizard|phb|ua2021magesofstrixhaven",
        "subclass|mage of prismari (ua)|wizard|phb|ua2021magesofstrixhaven",
        "subclass|mage of quandrix (ua)|wizard|phb|ua2021magesofstrixhaven",
        "subclass|mage of silverquill (ua)|wizard|phb|ua2021magesofstrixhaven",
        "subclass|mastermind|rogue|phb|xge",
        "subclass|nature domain|cleric|phb|",
        "subclass|onomancy (ua)|wizard|phb|uaclericdruidwizard",
        "subclass|order domain (ua)|cleric|phb|uaorderdomain",
        "subclass|order domain|cleric|phb|tce",
        "subclass|order of scribes (ua)|wizard|phb|ua2020subclassesrevisited",
        "subclass|order of scribes|wizard|phb|tce",
        "subclass|peace domain|cleric|phb|tce",
        "subclass|phantom (ua)|rogue|phb|ua2020subclassesrevisited",
        "subclass|phantom|rogue|phb|tce",
        "subclass|protection domain (ua)|cleric|phb|uaclericdivinedomains",
        "subclass|psionics (ua)|wizard|phb|uafighterroguewizard",
        "subclass|runecrafter (ua)|wizard|phb|ua2022giantoptions",
        "subclass|school of abjuration|wizard|phb|",
        "subclass|school of conjuration|wizard|phb|",
        "subclass|school of divination|wizard|phb|",
        "subclass|school of enchantment|wizard|phb|",
        "subclass|school of evocation|wizard|phb|",
        "subclass|school of illusion|wizard|phb|",
        "subclass|school of invention (ua)|wizard|phb|uathreesubclasses",
        "subclass|school of necromancy|wizard|phb|",
        "subclass|school of transmutation|wizard|phb|",
        "subclass|scout (ua)|rogue|phb|uarangerandrogue",
        "subclass|scout|rogue|phb|xge",
        "subclass|solidarity domain (psa)|cleric|phb|psa",
        "subclass|soulknife (ua)|rogue|phb|ua2020psionicoptionsrevisited",
        "subclass|soulknife (ua)|rogue|phb|uafighterroguewizard",
        "subclass|soulknife|rogue|phb|tce",
        "subclass|strength domain (psa)|cleric|phb|psa",
        "subclass|swashbuckler|rogue|phb|xge",
        "subclass|technomancy (ua)|wizard|phb|uamodernmagic",
        "subclass|tempest domain|cleric|phb|",
        "subclass|the revived (ua)|rogue|phb|uafighterrangerrogue",
        "subclass|theurgy (ua)|wizard|phb|uawizardrevisited",
        "subclass|thief|rogue|phb|",
        "subclass|trickery domain|cleric|phb|",
        "subclass|twilight domain (ua)|cleric|phb|uaclericdruidwizard",
        "subclass|twilight domain|cleric|phb|tce",
        "subclass|unity domain (ua)|cleric|phb|ua2020subclassespt2",
        "subclass|war domain|cleric|phb|",
        "subclass|war magic (ua)|wizard|phb|uawizardrevisited",
        "subclass|war magic|wizard|phb|xge",
        "subclass|zeal domain (psa)|cleric|phb|psa"
    ]

}

And the cli command.

java -jar /Users/roambot/bin/ttrpg-convert-cli/target/ttrpg-convert-cli-299-SNAPSHOT-runner.jar \
     --index \
     -c '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-cli-compendium/homebrew-config.json' \
     -o '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-cli-compendium/my-homebrew.nosync' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5etools-mirror.nosync/data/class/class-cleric.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5etools-mirror.nosync/data/class/class-rogue.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5etools-mirror.nosync/data/class/class-wizard.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5etools-mirror.nosync/data/backgrounds.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-personal-homebrew/kinemancer.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-personal-homebrew/orimancer.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-personal-homebrew/psion.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-personal-homebrew/power-domain-cleric.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-personal-homebrew/ermis-spells.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-personal-homebrew/ermis-backgrounds.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-personal-homebrew/auton.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-personal-homebrew/doloi.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-personal-homebrew/haemin.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-personal-homebrew/tinkerer.json' \
     '/Users/roambot/Documents/DocLibrary/Games/Dungeons & Dragons/D&D 5th Edition/5e-personal-homebrew/faeir-folk.json' 
ebullient commented 1 year ago

"from" needs to include the json value: "ermis-bg" (not the abbreviation).

  "json": "ermis-bg",
mclearc commented 1 year ago

Yep! sorry to waste your time! 😞 πŸ™ˆ πŸ˜Άβ€πŸŒ«οΈ

ebullient commented 1 year ago

You found something I'd done wrong, so... not a waste. ;)