• Hello game master! Welcome to our growing community. Please take a moment to Register (top right button, see how: Slides).

    If you use Campaign Logger, you can use the same login details - we've linked the app to this forum for secure and easy single sign-on for you.

    And please drop by the Introductions thread and say hi.

How to convert markdown to CL format?

JohnnFour

Game Master
Staff member
Adamantium WoA
Wizard of Story
Wizard of Combat
Gamer Lifestyle
Demonplague Author
Borderland Explorer
Any suggestions on the easiest way to convert content in markdown to CL format?

I wonder if there is an online tool or app that can record a sequence of search/replace transformations, for example.

For example:
Code:
___
> ## Gladstone
>*Aarakocra(Male), High Mage/ Sage*
> ___
> - **Age** 194 (*Level:* 9)
> - **Armor Class** 10
> - **Hit Points** 57 (48 + 9)
> - **Movement** - **Walk** 30 ft, **Fly** 0 ft, **Swim** 0 ft
>___
>|STR|DEX|CON|INT|WIS|CHA|
>|:---:|:---:|:---:|:---:|:---:|:---:|
>|8 (-1)|12 (+1)|12 (+1)|15 (+2)|15 (+2)|13 (+1)|
>___
> ### Description/Background
> ***Appearance*** : Extra tall wide build, with green eyes and dreadlocks red hair. Their face is doe-eyed and their speech is crisp
>
> ***Characteristics*** :  Foams at mouth when excited/angry
>
> ***Personality*** :  Temperamental
>
> ***Trait*** : I can stare down a hellhound without flinching.
>
> ***Ideal*** : Respect. People deserve to be treated with dignity and respect. (Good)
>
>___
> - **Passive Perception** 16
> - **Flight** You have a flying speed of 50 feet. To use this speed, you can't be wearing medium or heavy armor.
> - **Talons** You are proficient with your unarmed strikes, which deal 1d4 slashing damage on a hit.
> - **Language** You can speak, read, and write Common, Aarakocra, and Auran.
>
> ### Trinkets Carried
> Use 1d8 for pick pockets
> 0. Crystal bowl   
> 1. Small Bone chest etched with runes   
> 2. Bone pipe
> 3. Crystal globe   
> 4. Tea, night (flower)
> 5. Tea, meditation salve in a vial
> 6. Dark Silver urchin on a Bronze necklace
> 7. Smoked Meat
>___
> ### Gossip
> > I have a magical Mace : with a Iron shaft and the grip is made of covered cotton and a Blue Steal spiked ball for sale.
 

ELF

Generator Sage
Wizard of Story
Wizard of Combat
Do you even need to do a conversion, with the experimental Markdown support now available?
https://campaign-community.com/index.php?threads/beta-markdown-and-form-code.91/
There is no complete match for every Markdown tag, but most content should work pretty nicely.

But if you need to convert something, you need to convert these Markdown strings:
https://github.com/open-campaign-lo...blob/developer/json/formatting.json#L161-L182
And replace each of the strings with the corresponding Campaign Logger string:
https://github.com/open-campaign-lo.../blob/developer/json/formatting.json#L93-L114
(That generator is an experimental converter I once made for outputting generator results in different formats, so it's not directly usable.)

Any advanced text editor with full macro support should be able to easily handle something like this. If you don't have such a beast at hand, you could try for example either of these online tools (haven't tested them myself):
https://www.joydeepdeb.com/tools/find-replace.html
https://www.joydeepdeb.com/tools/find-replace-csv.html

Hopefully Markdown support will become a standard feature, as supporting only a proprietary format means that any conversion tools must be created by the team themselves.
 
Last edited:
Top