Opened 10 years ago
Last modified 10 years ago
#11812 new enhancement
cannot nest Include macro in CSV
Reported by: | Owned by: | Alec Thomas | |
---|---|---|---|
Priority: | normal | Component: | CsvMacro |
Severity: | normal | Keywords: | nest |
Cc: | Trac Release: |
Description (last modified by )
I want to auto-generate tables in csv form, and have them show up in the wiki as soon as they're checked in. The CsvMacro and IncludeMacro have the two functions I need, but won't nest. Here's a test:
trac tests
bracket form Include doesn't work in brace-bracket CSV
{{{ #!CSV [[Include(http://www.andrewpatton.com/countrylist.csv)]] }}}
next: CSV works in bracket form
[[CSV(hi, there)]]
but: bracket Include in bracket CSV doesn't work
[[CSV([[Include(source:python/systemTests/weakSignal.csv)]])]]
although bracket form Include works on its own
[[Include(http://www.andrewpatton.com/countrylist.csv)]]
Attachments (1)
Change History (7)
comment:1 Changed 10 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 10 years ago by
Description: | modified (diff) |
---|
comment:3 Changed 10 years ago by
Component: | IncludeMacro → CsvMacro |
---|---|
Keywords: | csv removed |
Owner: | changed from Ryan J Ollos to Alec Thomas |
comment:4 Changed 10 years ago by
Ah, I guess I see the issue. Borrowing heavily from your code and that of CSVMacro, I hacked together a CSVInclude macro that works for me; but I wouldn't call it shippable software, and I'm not a good enough coder that I should volunteer to maintain it. Maybe I'll get brave and figure out how to publish it and run away.
comment:5 Changed 10 years ago by
Feel free to just attach your code to this ticket. We have too many projects on trac-hacks already that are unmaintained.
comment:6 Changed 10 years ago by
Ok, done. Thanks for your time, and for the open-source code that let me get what I needed done.
It might have been more tasteful for me to teach Include about text/csv, but I doubt I'd ever have debugged that.
I'd close the ticket, but "anonymous" doesn't seem to have the power.
Macro's content usually cannot be written wiki text except some macros. Especially,
CsvMacro
's content is comma-separated values and the macro never parse the content as wiki text.