From: Felix W. <Fel...@gm...> - 2004-09-19 00:38:20
|
Beni Cherniavsky wrote: > I think a dependency scanner that is separate from the processing > program is generally a messy, suboptimal and unnecessary approach. > The trick is that until you have processed the document first time, > there is no need to know the exact dependencies -- you are going to > process it anyway. A doubt requiring to know the dependencies only > arises when you have processed it already and want to detect when the > output becomes out-of-date. I see. > All this dependency information can be generated as a by-product of > processing the source. I just added a --dependency-file option: ------------------------------------------------------------------------ ~/tmp $ cat dep.txt .. include:: a.txt .. raw:: html :file: b.txt .. csv-table:: :file: csv.txt .. image:: image.png ~/tmp $ touch a.txt b.txt image.png ~/tmp $ echo content for the csv-table > csv.txt ~/tmp $ rst2html.py --dependency-file=dep-file.txt dep.txt > /dev/null ~/tmp $ cat dep-file.txt a.txt b.txt csv.txt image.png ------------------------------------------------------------------------ Is the realization and implementation okay? If yes, I'll add tests and docs. -- When replying to my email address, please ensure that the mail header contains 'Felix Wiemann'. http://www.ososo.de/ |