Hi Ihor

Thanks for your quick reply

> What you can do instead is creating a named Org paragraph with macro,
> like
> 
> #+name: year
> {{{year}}}

I tried this approach but it does not seem to work either:

"template.org":

   #+TITLE: Report
   #+NAME: year
   {{{year}}}

   * My headline

   #+BEGIN_SRC bash :var year=year
     ./get_log_file --start=$year-01-01 --end=$year-12-31
   #+END_SRC

   #+BEGIN_SRC python :var year=year
     log = pd.read_csv(f"log_{year}.csv")
   #END_SRC

"report_2019.org":

    #+TITLE: Report 2019
    #+MACRO: year 2019

    #+INCLUDE: "template.org" :lines "2-"

Cheers,
Reza

Attachment: OpenPGP_0xC375C6AF05125C52.asc
Description: application/pgp-keys

Attachment: OpenPGP_signature
Description: PGP signature

Reply via email to