Additional Project arguments

In the main definition file, (*.do.txt) for your project, the very first instruction is a proj(...) instruction. It has exactly one argument; which is a string list. The very first member of that list is the name of the file. I had already explained this to you. What does the other members of that list do? You can write any number of such string elements in that list. Only the first element is used inside a comment at the head of each file that is generated. But the other elements are parsed in some clever ways as explained below:

  1. If the element starts with "https://" then it will be regarded as a URL that you want Pocket Specs to open after it has built the code

  2. If the element ends with an extension of .cmd or .bat or .exe then it is considered as an executable file that needs to be run after the build process is over.

Once the parsing is complete; then the entire list of executable files you may have specified would be run one after another; in the order you specified in the list. Then once that is done, it will open each of the specified urls in the default browser of your computer. Once the URLs are opened in the browser, it makes a text file called "urls.txt" in the current working folder. That file is used as a "flag" -- so that in the next iteration of the build process; it will first check if a file called "urls.txt" is already existing in the current working folder. If it is indeed existing then the same set of urls are not opened once again in the browser. This ensures that your browser is not repeatedly opening those urls multiple times.

What would be the use of this? This capability of Pocket Specs to run external programs and open Urls would be very useful to smoothly dove-tail the use of Pocket Specs with other additional processes you may want to continue with for your project (Kind of a poor-man's "Continuous Integration") For e.g. You could invoke a command line FTP program to actually transfer the generated final output files to your server on the cloud, etc.

Last updated