kevboh / longform

A plugin for Obsidian that helps you write and edit novels, screenplays, and other long projects.
Other
610 stars 30 forks source link

Compile Step: Remove dataview queries #252

Open devinat1 opened 2 months ago

devinat1 commented 2 months ago

What should this step do? I have dataview queries for my maps of content. However, within a map of content that has these queries, there are also notes defining the current document. For example:

Understanding Interface

Maps of Content

TABLE
date as Date, status as Status
FROM [[]] AND #MOC
WHERE file.name != "Web Agent"
SORT status ASC, date DESC

Zettels

TABLE
date as Date, status as Status, length(file.inlinks) AS Count
FROM [[]] AND -#MOC AND -#literature
SORT status ASC, date DESC

Literature

TABLE 
aliases as Aliases,
date as Date,
status as Status,
authors as Authors,
synthesis as Synthesis,
middleware as Middleware,
length(file.inlinks) AS Count
FROM [[]] AND #literature
WHERE file.name != "Zotero Paper"
SORT status ASC, read DESC

References

I would like to strip out the dataview queries from the document.

Should this step affect scenes, manuscripts, or join the two? Whatever makes the dataview queries go away would be ok!

kevboh commented 2 months ago

Should be fairly straightforward to do as a user step, if you're interested. It's a regex. I would want to bundle a step that removed code fences entirely, not just dataview, but likely won't get to it any time soon.

devinat1 commented 2 months ago

How may I do so via regex?

kevboh commented 2 months ago

See user script steps