Friday, May 29, 2020

Autosave File Naming


Artisan v2.4 introduces a powerful new capability to create custom data driven file names.

Artisan has always had the ability to automatically save a profile to disk at the end of a roast, or on a keystroke during the roast.  This is handy to prevent losing a profile due to forgetfulness or other accidents.  The file name auto-generated for saving included the roast title or a text string and the date for identification but was otherwise not very descriptive. 

Most roasters who retain their profile logs use a structured format for file names that is tailored to their personal needs.  That means the roaster needed to manually rename their autosaved files for later use.  The alternative has been to manually save the profile at the end of the roast giving it an appropriate name at that time.  Neither approach is optimal, and now there is a better way.

Artisan now provides the capability to autosave profiles with customized file names based on real time data from that roast's properties.  This eliminates the need to manually enter a file name and can completely eliminate the need to remember to save  profiles at the end of the roast.  It all happens automatically!

New Capabilities


Before diving into the detail let's take a look at some examples of possible autosave file names.






You can see from these few examples that a wide range of powerful file names can be created, each with information specific to that roast.

Artisan has long allowed saving a second file in a different format at the same time.  Now it is possible to save the additional file to a different folder than the folder used to save the profile.

The Autosave Window


Let's take a look in detail at the autosave window.  This is the default condition when Artisan is first started.  If you have used Artisan before and made some changes in the fields they will still be shown here.




At the top is a check box labeled 'Autosave [a]'.  Check the box to turn autosave ON.  The '[a]' is a reminder that autosave is active while a roast is being recorded.  Hitting the 'a' key on the keyboard during a roast will cause a copy of the profile at that moment to be saved.  More on this later.

Next is the 'File Name Prefix' field.  This is where the customized file name will be entered.  Below that is an area used to preview the file name so you can see what it looks without having to save a file.  In this default situation where the Prefix field is empty, Artisan automatically inserts the date and time to be used as the file name so it is not blank.

The upper 'Path' field is used to set the path to a folder where the autosaved profiles will be saved.  If you want a second file to be created at the same time, check the "Save also" box and choose the file type from the pull down.  The default file type is 'PDF' but you can select from a variety of image formats, CSV, or JSON.  The lower 'Path' field allows this second file to be saved to a different folder from the profile.  If left blank it will be saved to the same folder as the profile.

The 'Help' button will open a window that has complete information about the fields that can be used in a custom file name and some additional notes on usage.  This will be a handy resource as you create file names to suit your own needs.

Creating File Names


Now that we understand the fields in this window let's create some file names.  The first thing to know is that custom fields that will insert data into the file name all begin with the tilde character '~', without the quotes of course.  Any other text typed in the Prefix field will be used as typed except they might be illegal in a file name.  To maintain cross platform compatibility Artisan profile file names may only contain letters, numbers, spaces, and the following special characters:
 _ - . ( )

Examples


The first example creates a simple file name based on the title and roast date.  The Preview field shows how the file name will appear when the file is saved.  The first entry '~title' is replaced by the roast title from the roast properties,  Next is some plain text 'Roasted on' which is followed by '~date' which is substituted in the file name by the roast's date.


~title Roasted on ~date


It is helpful to refer to this picture of the Roast Properties used to create these examples.  The data in the roast properties fields is used by the autosave fields to build the file name.




Note:  The autosave window shows a live preview of the generated file name.  It is best to load a previously saved profile so the data used in the preview is meaningful.  If you do not have any saved profiles then simply open the Roast>>Properties page from the main menu and enter some data there.

Here is a slightly more complex example.  Here the file name is based on the batch number, title, date and time.  The first entry '~batchcounter' is substituted with the counter from the roast information. In this case it is '1380'.  Next is '~title' and this is the roast title, which is followed by '~datetime_long', the roast's date and time with four numbers used for the year.  Notice that each field is separated from the others by a space character.  This is not required.  However using spaces makes the file name more readable.

~batchcounter ~title ~datetime_long


Maybe more information is needed in the file name.  Here is an example that uses many of the roast properties fields.  Notice how units are added for some of the fields.  The text 'RPM' was added after the '~drumspeed' field and 'PCT' added after the moisture content.  For some fields the units can change so they need to be retrieved from Artisan.  Look at the field '~weight' which is followed by '~weightunits'.  The weight is '10.3' and the units 'Kg'.  Refer to the autosave Help for a list of units fields that can be used.


~beans ~machine ~drumspeedRPM ~weight~weightunits ~poisturePCT ~operator ~date ~batch(~batchposition)


Recall that hitting 'a' on the keyboard will autosave the profile at that moment during recording. It is often desirable to use a slightly different file name for files saved that are not complete roasts. We do this by putting text and fields inside a set of single quotes.  When Artisan is OFF anything between single quotes will not be shown in the file name.  However, when Artisan is ON or STARTed whatever is between the single quotes will be used in the file name.  Similarly, double quotes can be used for text and fields that should be used only when Artisan is OFF.

This example shows one way to use this capability.  First notice that we now have a second line of preview.  It shows the file name to be used during recording (and while ON).  While recording the file name begins with 'Recording' and the batch counter number.  When the roast is complete the profile will be saved automatically, whether it was saved during recording or not.  The file name now uses the batch field from the roast properties.

'Recording ~batchcounter' "~batch" ~title ~datetime_long

Suggested File Name


The autosave file name definition is now presented as the suggested file name for the menu operations File>> Save, File>> Save As and File>> Save a Copy As.


This new flexibility in file naming allows the roast master exceptional control over the way files are named so they may be more productively accessed after the roast is complete.

For a complete list of available fields and additional information please refer to the Autosave Help page or visit the Artisan Quick Start Guide.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.