Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Define variables in YAML to apply them in the text?

A topic by jamesgeek created Jun 22, 2021 Views: 356 Replies: 3
Viewing posts 1 to 3

Hello Billiam,

I purchased Deepdwn today and writing with it is really a lot of fun. The clear layout and structure is so centralized and tidy. It's an incredible enhancement to my daily notes and the design document that I'm in the process of converting to Markdown. You really created a very cool piece of software there! Thumbs up!

I know you must have a lot of work to do, but how do you like the idea to define variables in YAML besides Title, Category, Tags and Dir to apply them in the text afterwards. Below I have attached an image that I spontaneously found on the subject.

It would be extremely ingenious and could almost automate numerous daily tasks for me. Of course, this could also be solved with search and replace. But variables would be more comfortable.

If you would then also add functions of a simple spreadsheet, I wouldn't even need Excel anymore *haha*.

Well, these are just suggestions and if it doesn't fit your vision of this software it doesn't matter.

Have a nice day and stay healthy :)

I’m glad you’re enjoying it!

That’s an interesting request, and not something I’d considered.

Just curious: How would you use the output? It would likely only affect the preview version, so you’d be limited to copy/pasting the content somewhere else, or using PDF/html exports with the variables replaced.

I guess it’s hard for me to imagine how that would be useful to you (or other people), or fit into your workflow. Do you have any example use cases you can share?

(1 edit)

Yes, of course! :)

Sorry, I should have been more specific. I meant only the output in the preview window and the export.

Variables would be useful everywhere where you want to use placeholders. E.g. for renting real estate I very often create documents where the first name/last name of a person, the amount of rent, service charges and deposit as well as the date have to be changed in many different places in the text. Normally I always search the document for the last value and replace it with the new one (or I work with placeholders like XXX, YYY,...). With variables, this would be defined and done within a few seconds and very clearly in the first few lines. I wouldn't have to do more than change the variables and click export. This is a lot faster and less error prone than the copy and paste method *haha*.

Another use for me would be source references or a bibliography, which could be clearly placed in the YAML header. Especially if you cite the same author or work several times.

Now that I think about it, maybe my suggestion is actually a bit special and probably not relevant for most users of Deepdwn :)

Thanks! That’s an interesting usage that I (obviously) hadn’t considered.

I’ll put more thought to it, and other people can see this post and chime in if they have similar needs.