You can retrieve properties of every text file in those folders with PATH reader. A Python script can also be used of course. What do you need to validate? Find same name files?
You can retrieve properties of every text file in those folders with PATH reader. A Python script can also be used of course. What do you need to validate? Find same name files?
Hi Takashi.
There is a tool which validates the GTFS data according to certain set of specs.
Does GTFS mean this (Wikipedia: General Transit Feed Specification)? FME should transform every txt into html?
You can retrieve properties of every text file in those folders with PATH reader. A Python script can also be used of course. What do you need to validate? Find same name files?
Does GTFS mean this (Wikipedia: General Transit Feed Specification)? FME should transform every txt into html?
You can retrieve properties of every text file in those folders with PATH reader. A Python script can also be used of course. What do you need to validate? Find same name files?
Ah, perhaps you need to compare the contents of "validated.html" and the text files saved in the multiple folders. Is it right?
If so, you can use the HTMLToXHTMLConverter to convert the HTML doc to an XHTML doc which can be parsed as an XML doc. Then, parse the XML and compare with the text files. The concrete way would be different depending on the schemas of the html and text, but I believe that it's possible using some FME transformers.
Sounds like you have an external command line tool that you want to run on all these input files. I presume it is a command line tool.
As @takashi suggests, you can use the Path reader in FME to get you one 'Feature' per input file. Then you could use the SystemCaller to run your command line tool, with the right arguments, to produce its output.
It sounds like it always produces the same filename as the output file. Once you return from the SystemCaller, perhaps the next thing in your workflow could be to use another SystemCaller to Rename your files (or a TclCaller or a PythonCaller). You could use FME to help you compute a unique name for your output file based on the original input file's name, which would be available on the feature flowing through.
Ah, perhaps you need to compare the contents of "validated.html" and the text files saved in the multiple folders. Is it right?
If so, you can use the HTMLToXHTMLConverter to convert the HTML doc to an XHTML doc which can be parsed as an XML doc. Then, parse the XML and compare with the text files. The concrete way would be different depending on the schemas of the html and text, but I believe that it's possible using some FME transformers.
Hi. @takashi. I do not need to compare the output from each file. I need to verify which input files are good to be processed further by validating the data from that tool. And since, all the validation results give the same output, the files will be overwritten, so I need to renames all the files.
Sounds like you have an external command line tool that you want to run on all these input files. I presume it is a command line tool.
As @takashi suggests, you can use the Path reader in FME to get you one 'Feature' per input file. Then you could use the SystemCaller to run your command line tool, with the right arguments, to produce its output.
It sounds like it always produces the same filename as the output file. Once you return from the SystemCaller, perhaps the next thing in your workflow could be to use another SystemCaller to Rename your files (or a TclCaller or a PythonCaller). You could use FME to help you compute a unique name for your output file based on the original input file's name, which would be available on the feature flowing through.
Hi @daleatsafe. I am not sure of using SystemCaller. Can you guide me with that.
Hi. @takashi. I do not need to compare the output from each file. I need to verify which input files are good to be processed further by validating the data from that tool. And since, all the validation results give the same output, the files will be overwritten, so I need to renames all the files.
How can you check if an input file has been processed correctly by the tool? If the resulting HTML document contains the information about successfully processed file paths, just retrieve the paths from the HTML and then compare them with the original file paths which can be read by the PATH reader.
How can you check if an input file has been processed correctly by the tool? If the resulting HTML document contains the information about successfully processed file paths, just retrieve the paths from the HTML and then compare them with the original file paths which can be read by the PATH reader.
So, for that I have to check each HTML output manually and then see which inputs have to be taken forward according to the validation results (if no errors, inputs to be processed further, else not).
How can you check if an input file has been processed correctly by the tool? If the resulting HTML document contains the information about successfully processed file paths, just retrieve the paths from the HTML and then compare them with the original file paths which can be read by the PATH reader.
sorry, I'm unclear your requirement. Could you please explain more clearly with some concrete examples?