Callimachus offers the ability to compress the contents of any directory into what is called a Callimachus ARchive file, or CAR file (.car extension). CAR files are ZIP version 3 format compressions of all contents recursively down a folder tree. This allows for content in Callimachus to be moved around a single instance or transferred between multiple instances with ease. It is also an easy way to move code from development into a production environment without complex merging.
CAR files are the primary means of backing up Callimachus applications.
Callimachus also allows the importation of ZIP files into folders. A ZIP file cannot be used to import files without file extensions (such as OWL classes).
Export Folder Contents
Content can be exported from the View tab of any folder within Callimachus, including the top level Home folder.
-
Select "Export folder contents" from the Main Menu in the upper right.
-
A CAR file will be downloaded into your computers downloads/ directory.
To unpack a CAR file on your computer just change the extension from .car to .zip and unzip it using software that supports zip 3 format. Unpacking a .car may be useful for storing contents in a revision control system such as Git or SVN. You can see an example of this in action in the sample applications on GitHub.
Import Folder Contents
The same way that content can be exported from any folder in Callimachus, content can also be imported. This action can only be taken from the View template of a folder.
-
Select "Import folder contents" from the Main Menu in the upper right.
-
Click "Choose files" and select a previously exported .car file (or a .zip file in zip 3 format)
-
Click the "Import" button and contents will begin to be uploaded. Once the upload is complete the content will be loaded into that folder and you will be redirected back to the View template for the folder.
Importing a .car may be a common action in your workflow but it is a very powerful one. Importing a .car into a folder
permanently
deletes
all existing contents of the folder. Make sure to always review your actions and ensure there is nothing you will lose by overwriting the current contents of a folder.
Common "Gotchas"
-
Importing a folder
permanently deletes all
the current contents of the folder into which you are importing. Be sure of the action you are taking.
-
Importing folder contents is not the same as uploading a file. Uploading a .car will upload the file itself as a binary for hosting. Only importing will unpack it and absorb the contents of the .car.
-
When exporting the Home folder don't forget you're also including the /callimachus directory, which contains the files that Callimachus uses to run itself. This folder must remain in place at the top level and exporting and importing it is not the same as upgrading your Callimachus version. Upgrading must be done by following the instructions included in the RELEASE_NOTES.txt file with every distribution.
-
Be cogniscent of the paths (your/file/path) you've used in your Callimachus applications as they may break when you move an application. This is why we encourage the use of relative URIs wherever possible. For example, if you have /articles and /images and need to reference an image, use src="../images/your-image.png" instead of src="/images/your-image.png". If you used the latter, moving it to a subdirectory somewhere else would break the connection.