Open satyanash opened 6 years ago
The text file will need to have a well defined structure so that it can be read and written by a program. You may use any one of the following formats:
INI
YAML
JSON
XML
Does metadata file needs to be generated automatically ?
No. The metadata will be a part of the input. Our program will not generate the metadata. It will simply read it and then display it inside the generated HTML files.
so we will provide the publication month & year.
Yes, the metadata files will be written by us for now.
separate meta data file for each issue.it will contain the publication month&year, total number of pages.
Yes. We will manually hand-write this data into the metadata files. For now we will keep the filename same as the issue for which it contains the data. Only the extension will be different.
For testing you need to do this only for a few files since our program should still generated the output even if the metadata file does not exist as mentioned above.
Update on this.
I wrote metadata files having fields issuemonth, issueyear, maxpages in json syntax.I use jq to parse through the json file for a particular issue.
Please push code before commenting. I don't see anything related to this issue.
code is pushed along with metafiles.
If the metadata file for a given input file does not exist, your program will give the following warning:
jq: error: Could not open file META_FILES/Dec.1991-Aank9.json: No such file or directory
As I had mentioned in the first comment:
The metadata may or may not be present in the form of a text file with the same name as the TIFF/PDF file. If this file exists, the data inside the file should be read and displayed inside the generated HTML pages.
You need to handle both the cases.
Update on this?
not worked on it. Should we make meta files for other years publications too ?
For now, let us not. We need to be handle both cases anyway. :)
I have fixed the issue. 1.Error message which was shown when meta file is not present is suppressed using 2>/dev/null. 2.earlier when error occurred ISSUEMONTH and ISSUEYEAR variables where left empty.Now I have put some general text in it.
We need a way to add extra metadata to an issue manually. This will allow us to add things like publication dates, issue names etc without having to parse the PDF/TIFF using a program.
The metadata may or may not be present in the form of a text file with the same name as the TIFF/PDF file. If this file exists, the data inside the file should be read and displayed inside the generated HTML pages.
Initially this text file may contain the following metadata for every issue:
publication_month
publication_year
issue_no
Your program will parse this file and display the publication date and issue number at the top of the page that shows all the pages in a given issue.