I'm not entirely sure what you're asking, but here're my best guesses. One of tup's commands is tup monitor <http://gittup.org/tup/manual.html>, which automatically triggers a build once anything that affects the build changes. I believe this solvesyour first question.
The second is a little more difficult. I'm also not an expert, so someone else may correct me. One of the design principles behind tup is that it knows the whole execution DAG and can therefore very easily determine the minimum steps to execute. For most cases, this makes it difficult for a command to generate arbitrary files and have tup understand what it creates in a way that it can still build effectively. I vaguely remember talk of potentially allowing wildcards and output bins as a way to compensate for this shortcoming, but I'm not sure what the status of that is. Alternatively, you could use something like run or the lua api to first compute how many pages the index is going to be, and then generate the output files accordingly. The downside is that you will now trigger reparsing the tupfile after every time the inputs to that computation change. Likely that's not that big of a problem, but it's something to be aware of. On Thu, Oct 4, 2018 at 1:16 PM Alex Davies <[email protected]> wrote: > I'd like to use tup to build static websites. Part of this would be > building an index for a folder. Is there any way to have tup trigger a > command when the contents of a folder change? My other problem is that it > might need to paginate the index, which would result in a number of files > being output in the form of "index-0.html, index-1.html, index-2.html", etc. > > -- > -- > tup-users mailing list > email: [email protected] > unsubscribe: [email protected] > options: http://groups.google.com/group/tup-users?hl=en > --- > You received this message because you are subscribed to the Google Groups > "tup-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- -- tup-users mailing list email: [email protected] unsubscribe: [email protected] options: http://groups.google.com/group/tup-users?hl=en --- You received this message because you are subscribed to the Google Groups "tup-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
