theos

How to create theos custom variables?


I would like to create custom variable for theos. In example @@DATECREATED@@ to print current date for my tweak deceptions (I'm soooo bored to edit it manually :D)

Like @@FULLPROJECTNAME@@ prints out tweak name in control and Makefile...

Edit: I did it with adding this to my nic.pl:

use DateTime;

$NIC->variable("DATECREATED") = DateTime->now->strftime('%d/%m/%Y');

Is it possible to do it without editing original nic.pl?

Thanks for suggestions!


Solution

  • I have found a solution for it!

    I had to put this code inside control.pl in my theos template:

    use DateTime;
    
    NIC->variable("DATECREATED") = DateTime->now->strftime('%d/%m/%Y');