[Typo3-dev] introducing the fileConversion service

Robert Fink robert.fink at gmx.net
Thu Jan 6 21:04:26 CET 2005


Hi!

>> I want to suggest a new service type called "fileConversion". It should 
>> define an API to extensions for converting files between different formats 
>> (for example doc2pdf, sxw2pdf, sxw2doc, etc.). Becaue this might become a 
>> fundamental service for many extensions (DAM, General Office Displayer, 
>> ...), 
>> i want to share my suggestions and start a discussion about the 
>> fileConversion-API.
>> 
>> Any comments are welcome!
> 
> subtype naming:
> 
> how abot "from:to"? A colon is an unlikely character to appear in a file 
> format. And I'd drop the three char conventoin. So something like 
> "bz2:gzip" would be valid.

Right. I just wanted to prohibit "microsoftword2acrobat" or similar.
I would stick to the "2" instead of ":" because it illustrates the conversion 
direction and (at least on *nix-systems) is also a standard for naming 
utilities (pdf-utils, ...).

> input:
> 
> I guess "data" means the converter will get a blob in a PHP variable. 

Right.

> "filePath" will mean a path to a file to read from. How about making 
> this a "url"? So we could read from arbitrary sources not just the 
> filesystem.

Good idea. The svbase-class doesn't say sth about this. The setInputFile 
simply calls

			$this->inputFile = $absFile;

, so the intelligence must take place in the actual implementation (wgetting 
files and caching them locally or similar). Still, i would require this 
feature in the fileConversion standard.

I will prepare a new sxw-file with these changes included.

		Robert





More information about the TYPO3-dev mailing list