Jump to content
Ketarin forum

More built-in variables


appyface
 Share

Recommended Posts

Hi Flo,

 

I have a regular download with the same download name over and over, and no versions to scrape for this file. The version is really only that the author mentions on another webpage, an updated date like "Updated: November 12, 2008". This is the only way I know the file has been updated. (I use WatchThatPage to monitor my webpages for updates. Great service with few outages over the years, I'm very glad to give these guys a plug. Unpaid and unsolicited endorsement, I'm just a happy customer.)

 

Right now I manually download this "versionless file" and I add a sortable date to the downloaded name, e.g. I save "utilities.zip" as "utilities_20081112.zip" since I can see "November 12, 2008" on the webpage with the change information.

 

For Ketarin, I know I can fiddle with variables to do this. But since Ketarin also preserves the server's modified date on the downloaded file when possible (thank you!!! thank you!!!), could Ketarin have a built-in variable with the modified date?

 

I would like to pick that variable apart with the typical date formatting sub-variables:

 

YYYY and YY (with and without century)

MM and MMM (numeric with leading zero or 3-char month name)

DD and DDD (numeric with leading zero or 3-char day name)

 

For me the modified time field is not required but if it is easy to do it could be useful, if someone is trying to construct a date/time stamp for the filename, such as:

 

yyyymmdd_hhmmss

 

 

While I'm here asking, it would be handy to have the receiving PC's system's date (and possibly time) available with subformatting variables as well... Sometimes that's the only "version" available to use for the file.

 

Thanks as always for consideration of the ever-growing wish list for Ketarin. Best,

--appyface

Link to comment
Share on other sites

Neat article, thanks Flo!

 

Just to make sure I understand the use of the implementation in Ketarin.

 

I refer to the constructs shown in the article, with {} (curly braces) around them, same as I would a variable I defined myself in Ketarin? (With the f: prefix if I want to refer to file's modified date rather than the system date)

 

So my constructed file save path, for the example I referenced in above post, is this (if I wanted to save the file to my t:\somedir directory):

 

t:\somedir\utilities_{f:yyyyMMdd.zip

 

and the actual file name saved on disk becomes:

 

t:\somedir\utilities_20081112.zip

 

???? Please correct my understanding of how to use the new constructs if this is incorrect.

 

Thanks!!! and regards,

--appyface

 

Edit: Whoops it occurs to me I might instead need to use:

 

t:\somedir\utilities_{f:yyyy}{f:MM}{f:dd}.zip

 

True? TIA :-)

Edited by appyface
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.