Re: [pollen] getting the filename of current input source in pollen.rkt

2019-03-28 Thread Ifeoluwapo Eleyinafe
Great advice. Thanks so much. So I've defined an arbitrary function: (define (output-filename meta-source) (path->string (car (reverse (explode-path (string->path (select-from-metas 'here-path meta-source))) Then I call it from within a tag function like so: (output-filename

Re: [pollen] getting the filename of current input source in pollen.rkt

2019-03-28 Thread Sorawee Porncharoenwase
Can we see your pollen.rkt? Anyhow, it’s very likely that you call (current-metas) outside of tag functions. (current-metas) is “undefined” outside of tag functions, which make sense if you think about it: pollen.rkt can be used by several Pollen markup files, and each markup file can define

Re: [pollen] getting the filename of current input source in pollen.rkt

2019-03-28 Thread Ifeoluwapo Eleyinafe
Thanks so much for the quick reply. So I tried to access (current-metas) from the pollen.rkt but I keep getting false. I tried creating a test meta with (define-meta ...) but it was not accessible and it wasn't visible on (current-metas). Tried running (select-from-metas) from pollen.rkt but

Re: [pollen] getting the filename of current input source in pollen.rkt

2019-03-28 Thread Matthew Butterick
> On Mar 28, 2019, at 6:23 AM, Ifeoluwapo Eleyinafe > wrote: > I think I can pull from metas using 'here-path but I don't know how to > access metas from pollen.rkt. I can do so from the template file but then I > won't be able to use the data in my tag

Re: [pollen] Enthusiastic thank you and beginner question about metas

2019-03-28 Thread Matthew Butterick
> On Mar 28, 2019, at 12:42 AM, Zach Mandeville > wrote: > > And below this I wanted a function to turn ◊author into that details element > by referencing ◊author text against that 'scuttlebutts' meta...but, I can't > get it to work. The closest I got is this: FWIW though you call

Re: [pollen] Enthusiastic thank you and beginner question about metas

2019-03-28 Thread Sorawee Porncharoenwase
You might want to try this pollen.rkt #lang racket (provide (all-defined-out)) (define scuttlebutts (hash "Gillis" "@a;lksjd2j3j1k2j.sha256f" "Brenda" "@s8/sj31l13j2k32.sha256")) (define (author name) `(details (summary ,name) (p ,(hash-ref scuttlebutts name And here’s the

[pollen] Enthusiastic thank you and beginner question about metas

2019-03-28 Thread Zach Mandeville
Hello! Thank you v. much for dreaming up and creating pollen (and thanks to all y'all making cool things with it!). I discovered it through an article about medium, from practical typography, that was shared with me. Pollen represents exactly what I want for a web publishing tool.