Re: Could this be done?
- Posted by DB James <larch at adelphia.net> Sep 03, 2005
- 453 views
D. Newhall wrote: > > DB James wrote: > > > > > > Hi all, > > > > Some time ago Ward Turner replied to a query of Kat's with some code to > > extract the > > text from an MS Word file. I liked the idea, so wrote a simple program that > > uses his > > idea. It works, so I began thinking of other files to extract text from, > > such as Outlook > > Express .dbx files, and others. That led to thinking about text extraction > > in general, > > and to the next step: file conversion. > > > > And that led to the idea of "Vertex", from conVERT EXtract which is merely > > an idea > > at the moment (and if I have to code it it will probably remain an idea). > > > > Is it possible to write a Windows program that could have a conversion or > > extraction > > feature added just by plopping an include file in its directory? If so, > > then anyone > > could add a specialized function to the "shell program", either for personal > > use, or > > to share with everyone. This would amount to a collaboration without the > > need to communicate > > about it. The author of the "shell" would give a format for the include > > files that > > everyone could follow. Painless "add-ins" or "plug-ins", is the idea. > > > > A way of thinking about this is to imagine a FROM and a TO menu item. The > > TO would > > show options according to what was chosen in the FROM, e.g. if a user chose > > JPG in > > FROM, then BMP, PNG, etc. would show in the TO. If TEXT were chosen in > > FROM, then > > HTML would be an option in TO. > > > > I like the idea of a program's capability growing constantly as people have > > new ideas > > and needs. > > > > --Quark > > Hello, and thanks for the reply. I was beginning to wonder if I hadn't suggested something so loony that no one was going to respond. > Yes, it's possible. However, you'd need to have a documented internal > structure/format > for the program so that everything can translate to a universal format that > the other > translators can use to output their files. I don't quite follow this. I would understand and agree that it would be useful with image files to be able to translate every other type to, say, BMP format, and from there to other types. This would reduce the number of translations. Does the same idea apply to other types of extractions or conversions? >You would probably also need to make an API for the converter includes to >make >it usable. Perhaps you could elaborate on this. I was imagining a limited conformity with the needs of the shell program that would be explicit and be followed by the authors of the includes. For example, there might be rigidly formatted comments in the include that would be readable by the shell to establish what capability the include offers. Perhaps the only call would have the same name as the name of the include: text2html.e, so the call would be text2html(fullPath)or text2html(lines) or whatever. >This would be a very useful program if you could get it to work and I've >>thought about writting one many times but don'thave the time. Yes, it might be useful in that it would grow with the efforts of each individual who has a good idea and adds that functionality. Perhaps the same idea could be used for a tutorial program where an author lays out the shell and sets up the general format for the presentation of the lessons. Then any one, whether an intermediate or advanced level programmer, could write a module for it. It does seem obvious that a lot of good ideas have not seen the light of day because too much work was needed to do the whole job. But just doing one part might get done. --Quark