I’m wondering if it’s possible to create a Dataviewjs script that would be able to output a markdown table, so that the resulting markdown file could be run through Pandoc and styled easily in a word processor without a lot of CSS tweaking.
Pretty good! But now the question is getting this into a form to share with students. I can export to PDF, but it’s not quite right and I’d rather tweak in a word processor than via CSS. I’m pretty familiar with using a docx reference file in Pandoc, so that’s my thinking right now, although I’d certainly be interested in other folks’ ideas along these lines.
Ok @Christian , I had a chance to tinker already and it works! Thanks. However, one question. How can I change the query to look in a particular folder instead? I’d like to have something like this, but it’s throwing an error:
In the code, it’s assumed that every page in pages has a day, week, theme, and readings property. So if, like you mentioned, a page is incomplete in its properties, the code fails.
I used const pages = dv.pages('"teaching/65011 - Reading & Interpreting"').where(f => f.theme && f.readings) to make sure that every page found has both the theme and readings properties - and even that may fail in the case that those pages don’t have a day and week property.