My name is Pratik Shrivastava and I’m the intern working on the Project 4: Extending Libmagic for Identification of Science Resources. The goal of this project is to extend the capabilities of the Linux (or equivalents on OS X and Windows) file command to allow automatic identification of common science metadata and data formats.
This is my first week, and I’ll be posting my project updates weekly using this blog. In this week, I got to meet my mentor Dave Vieglais (virtually) and we setup a Project Plan for achieving the goals of the project. The daily progress and updates are also posted on the hpad and we have a daily call for the updates. For this week, I spent time on understanding working of the file command and libmagic. What are the magic numbers, and how they are used by the file command for identification of the file type and tried my hands on by creating toy examples. Dave, also shared some of the example files as well, which needs to be identified using the file command by creating the magic files for them.
For testing purpose, a python script is also created which identifies the file type using custom magic files with the help of the magic library in python. We were able to create the custom magic files for identifying the 7 examples file correctly out of 12. Below are the file formats that we are trying to correctly identify.
In the coming weeks, I’ll continue to create the magic files for the rest of the examples and setting up the environment for the packaging our magic files. This will help in easy installation and usage for the users. We will be developing the unit tests in python too, using the unittest library for functional testing.
That’s all for now, see you all next week!
Have a great weekend!