Open Photography Forums  
HOME FORUMS NEWS FAQ SEARCH

Go Back   Open Photography Forums > Digital Darkroom > Image Processing and Workflow

Image Processing and Workflow RAW, DNG , TIFF and JPG. From Capture to Ready for Publish/Display. All software and techniques used within an image workflow, (except extensive retouching and repair or DAM).

Reply
 
Thread Tools Display Modes
  #31  
Old April 14th, 2015, 09:24 PM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,194
Default

Hi, Bart,

Thanks for the good scoop.

Best regards,

Doug
Reply With Quote
  #32  
Old April 15th, 2015, 11:50 AM
Doug Kerr Doug Kerr is offline
Senior Member
 
Join Date: May 2006
Location: Alamogordo, New Mexico, USA
Posts: 8,194
Default

On the Pig Latin of programming languages

One effect of our reintroduction to Bart's wondrous "batch file" for image resizing with ImageMagick (you'll see in a minute why I put that in quotes) is that I have had to revive and bring up-to-date my understanding of the syntax of (to use its proper name) the Microsoft command line script language, which I think of as the Pig Latin of programming languages.

Of course the presenting interest is my making modifications of Bart's file to give a file that will automatically do my most common resizing tasks without requiring input from me, and follow my conventions for the naming of modified files. (Working fine, bu the way.)

Now we often hear of this language as the "batch file" language, and of script files written in it as "batch files'. In fact that name is given credence by the filetype extension of the script files, "BAT".

This comes about because one of the early uses of such script files, especially in DOS days, was to mechanize the performance of two or more operations (perhaps from such possibilities as "copy", "rename", and "delete") upon several files - a "batch".

But in fact most uses of this script language have been for files that do no such thing, but rather give a string of commands (perhaps complex) to a "command-line driven" program that may have nothing to do with files, or which may have implications only on a single file.

Bart's script file is, in its present state, in no sense a "batch file" (although I know there are aspirations for it to perhaps become such).

For those not familiar with this language, I can give some sense of its horror by discussing the keyword "ECHO".

When followed by "on" or "off", it turns on or off the feature in which a command read from the script file is sent to the screen. By the way, when echoing is off, the command prompt itself is now longer presented on the screen.

When used alone, it causes a report to be sent to the screen as to whether echoing is on or off.

When followed by a string (other than "on" or "off"!), it sends that string to the screen.

Now, when we start, echoing is on. We may want to, as the first act of the script file, turn it off. So we make our first command "ECHO off".

But since echoing is not turned off until this command has been processed, it is echoed to the screen "on the way in", which we may find nikulturniy.

So we must make that first command "@ECHO off". The "@" means, "do not echo this command to the screen even if echoing is on."

Now it can be argued that there is a sort of perverse logic to this. Whatever.

Aren't you glad you asked.

Best regards,

Doug
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 09:21 PM.


Posting images or text grants license to OPF, yet of such remain with its creator. Still, all assembled discussion 2006-2017 Asher Kelman (all rights reserved) Posts with new theme or unusual image might be moved/copied to a new thread!