Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Preventing Citydesk updating destination files.

I would like citydesk to only update destination files that have an older timestamp compared to the source CD files(rather than files which have changed). Does anyone know whether it's possible to do this?? (perhaps modifying the cityesk.xml file produced in the destination directory?)

I've been playing about with PHP from the command line on my PC and have found that I can process PHP scripts within .htm files saving the output back to the original file, thus providing many of the scripting facilities that CD is lacking.

My problem comes when I run Citydesk again after processing my files. Naturally, it sees the changed files and insists on updating them...

Any ideas around the problem??

Thanks,

ShaunH

ShaunH
Sunday, February 09, 2003

I don't understand what function you are trying to accomplish by keying on dates rather than content.

tk
Monday, February 10, 2003

I am not sure how the update policy of citydesk works. Does it use the filestamps or does it trust the contents of the xml file?

May be you could set the timestamp from PHP (but to what? fileddate is not dynamic/automatic)

Adriaan van den Brand
Monday, February 10, 2003

As I understand it, when CityDesk publishes, it creates a checksum for each file and compares that to the values in the citydesk.xml file. If it finds a difference it copies the file. If it finds that the file isn't in the xml file, it copies it. And if it's in the xml file but not in the to-publish site, then it deletes it from the server.

John Conners
Monday, February 10, 2003

You might take a look at the rdist and rsync utilities.  They might do what you want; They might not.  Search through google.com for documentation.

David Burch
Monday, February 10, 2003

You can also look at my RTidy utility (at http://www.halostatue.ca). Tidy does the transformation in-place and then uploads the files on the basis of the citydesk.xml and that only.

I hope to have time to enhance it so that more than just Tidy can be done to make this a general post-publish processor.

-austin

Austin Ziegler
Monday, February 10, 2003

Thanks for the replies. It's a shame that CD doesn't have an 'Only update if destination files are older' option on the publishing menu :-(

It would mean that destination files could easily be processed on the server to parse for embedded scripts, or run htmltidy, or run html compactor scripts, etc without CD updating the destination files next time.

I'm still playing about with PHP embedded scripts which can be excecuted with a batch file. This works fine, but means that I need to keep two copies of the site on my local disk, and upload using another ftp program...

I don't suppose there is any way to generate new CRC numbers for my changed files?

The RTidy program looks interesting I'll have a go with this...

Might revisit this subject at a later point... ;-)

Thanks,


ShaunH

ShaunH
Wednesday, February 12, 2003

*  Recent Topics

*  Fog Creek Home