forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Anyone interested in an RTF to HTML / HTML to RTF Project
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript Open Source Projects
View previous topic :: View next topic  
Author Message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2141
Location: A House

PostPosted: Sat May 22, 2004 12:34 am    Post subject: Anyone interested in an RTF to HTML / HTML to RTF Project Reply with quote

Post Updated:

Link for the project page: http://garrett.vdsworld.com/rtftohtml/rtftohtml.htm

End Update


I've been interested for many years now in doing a RTF to HTML / HTML
to RTF project. My original intent (Besides the "Why did the chicken
cross the road; because he wanted to see what was on the other side"
concept) was to create a standalone converter, gui based and command
line based, aswell, a RTF based semi-wysiwyg HTML editor for creating
simple but yet useful web page documents.

All the current offerings for this kind of conversion is either outdated,
buggy as all hell, or attached with a seriously rediculous price tag!

A few years back, I did start on this project myself and had some
barbaric bottom of the line code working. But that code is long since
lost.

I still have research documents available here and just a few days ago,
my interest in this was again renewed. So I've been sifting through the
RTF specifications and pulling out some of the basic needs/info to again
start this project.

But! I'm a bit older and wiser now than when I first attempted this project
and realize now that this is not going to be an easy task at all for me.
Basic conversion will not be so complicated, but I am talking about basic
formatting, such as font, font size, justification, bold, italic etc... Just the
basic stuff.

I would like to take it further than this limited ability and maybe work
with others to take this project to higher level, such as coverting tables,
bullets, images and more.

I must admit though, I may not be the best person to head such a
project.... I suffer from Attention Deficit Disorder and if a project begins
to look like a seriously long term project, or becomes too complicated,
my mind shuts down to the topic and wants to wanders off to find
something else to feed it's need for constant change. Of course, I am
now on medications and am now having some success with that, but I do
not want to head up any projects until I'm sure I can follow through on
them. I would love to find others who have a more take charge ability
and will be able to keep the project going and allow me to assist as much
as I can with the project.

Please understand, I do not want to do this for any commercial intent,
but am not opposed to the idea either if there is a market for such a
product as this. My intent here is just for the fun of it, and for personal
uses. I imagine that others here may be interested in using either the
standalone converter and or the Editor version also.

I have the time right now for such a project, but just do not have the
ability yet to take charge of it and insure that the project is completed...
If anyone also has the time, interest and the ability to help insure the
project is followed through with, drop your intents and idea's in a reply
here.

If anyone does respond, I'll setup a page with all the info and
documentation I currently have.

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996


Last edited by Garrett on Sun May 23, 2004 12:35 am; edited 2 times in total
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2141
Location: A House

PostPosted: Sat May 22, 2004 12:35 am    Post subject: Reply with quote

Oooo.... Forgot to mention this..... I planned on the conversion process to
be pure VDS Code.... No DLL to actually do the conversion.

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat May 22, 2004 8:46 am    Post subject: Reply with quote

Garrett, if you want to use the code to create a simple WYSIWYG HTML editor, I can also tell you a way to do this through HTML and Javascript itself. Only downside of this method is that I believe it only works with Internet Explorer (6) installed. Anyway, I would like to help with your project if needed... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2141
Location: A House

PostPosted: Sat May 22, 2004 9:06 am    Post subject: Reply with quote

Sounds good, but maybe for another project. I want to try and keep this
as VDS pure as possible. If we just use something like the VDSOBJ dll
for the richedit element, and we're just converting the RTF source to html
in VDS, then we won't have a need for JS or MSIE. If we need a html
viewer for like a preview window, then Tommy's old HTML viewer dll for
that. Speaking of that, I finally tracked down the full registered version
of the delphi component that I bought. It's the same component that
Tommy used, but this one is a version or two newer than the one he
used, plus, I bought this one, so it's the full component and not the free
one that is limited. Only thing is, I don't know how to make dlls at all.

I made a dual pane html editor/html previewr before, but it was not useing
the RTF conversion idea. It was just a text based editor with Tommy's
html viewer dll. I probably still have this around on the hd somewhere.

I've got everything we need at least for making an editor. I've got all the
button glyphs we'll need, I'm registered for the VDS OBJ, and I actually
have a couple of html editors I've started. Just need to make the RTF to
html conversion process, then we'll have a semi-wysiwyg editor/viewer.

Heck, we can even add ftp capabilities to it so the user can just one click
his updated pages to his server.

Last year, I started on a Blog program.. The user has no source code to
touch. Just fills out boxes and then clicks a button to upload it. It's not
complete, but even this idea can be applied to the RTF to HTML project.

Now, if we beat this project, then we can look at the JS/MSIE thing you
have also, and maybe these can even be tied in somehow.

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Sat May 22, 2004 9:10 am    Post subject: Reply with quote

Maybe you can upload the resources for HTML to RTF (and vice versa) you already have, so we can take a look at it? I just created a little RTF file with MS Word, and it doesn't look that hard to make a converter... Smile
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat May 22, 2004 1:57 pm    Post subject: Reply with quote

Garrett wrote:
Speaking of that, I finally tracked down the full registered version
of the delphi component that I bought. It's the same component that
Tommy used, but this one is a version or two newer than the one he
used, plus, I bought this one, so it's the full component and not the free
one that is limited.


Ooh! Nice! Make sure you talk to Tommy about that, and maybe he would somehow someday be able to pull together a newer version of that dll! That was one of my favorites. Smile

On another note, I really like the sound of this project and could be good
for everyone to have. Smile Although I barely have time to actually use VDS
right now, I will have some time in a few weeks, so I'll help out as soon
as I can. Smile

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2141
Location: A House

PostPosted: Sat May 22, 2004 7:01 pm    Post subject: Reply with quote

FreezingFire wrote:
Ooh! Nice! Make sure you talk to Tommy about that, and maybe he would somehow someday be able to pull together a newer version of that dll! That was one of my favorites. Smile

On another note, I really like the sound of this project and could be good
for everyone to have. Smile Although I barely have time to actually use VDS
right now, I will have some time in a few weeks, so I'll help out as soon
as I can. Smile


Really, I do not want to bother Tommy with this. He lost the source code
to his dll, and these days he has been very busy with school. I'd rather
not take his attention away from school to make dll.

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat May 22, 2004 7:39 pm    Post subject: Reply with quote

I know he's busy Smile That's why I said sometime, someday Wink
_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2141
Location: A House

PostPosted: Sat May 22, 2004 8:24 pm    Post subject: Reply with quote

Well, Skit3000 seems to have dropped offline. So I'm going to toss
together a simple page with all the info and stuff that I have already
for this.

I'll drop a link later in the evening Pacific Time.

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2141
Location: A House

PostPosted: Sun May 23, 2004 12:36 am    Post subject: Reply with quote

Ok, made a little page for this:

http://garrett.vdsworld.com/rtftohtml/rtftohtml.htm

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Jun 09, 2004 4:17 pm    Post subject: Reply with quote

Garrett,
We first need to list the vocabulary of both RTF and HTML. Also you will probaly need to settle on which version of RTF and HTML you will want to use. I would go with the latest. Once you have that info it should be just a matter of parsing both with VDS and transforming one into the other. Sort of like this..

RTF to HTML
Build a list of RTF tags.
Build a list of HTML tags.
Build rules to match the RTF tag to the HTML tag
Load the RTF file into a VDS list
Do read each line in the VDS list parseing from left to right as you go applying the rules defined above to each RTF tag.
Write the HTML equivalent TAG to another VDS list.
Save the HTML VDS list to a file.
Done.

HTML to RTF
Build a list of RTF tags.
Build a list of HTML tags.
Build rules to match the HTML tag to the RTF tag
Load the HTML file into a VDS list
Do read each line in the VDS list parseing from left to right as you go applying the rules defined above to each HTML tag.
Write the RTF equivalent TAG to another VDS list.
Save the RTF VDS list to a file.
Done.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Jun 09, 2004 7:18 pm    Post subject: Reply with quote

Hi All,
Here is a start for the RTF syntax. http://www.logictran.com/RTF/RTF114_t.htm take a look. Lots of stuff here about RTF. In Appendix A: there is some sample C code for an RTF reader. Natuarlly you don't want to figure out the C code but what should be of interest is the RTFACTN.C file which has Arrays defined with all the RTF keywords and phrases that should help you build a VDS list from.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Wed Jun 09, 2004 7:36 pm    Post subject: Reply with quote

Hi All,
Here is a link to MSDN's information about RTF specification version 1.6... Basicly it is the same as the link above but has some Micro$oft specific control words.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2141
Location: A House

PostPosted: Thu Jun 10, 2004 4:48 am    Post subject: Reply with quote

Dragonsphere, did you check out the page I setup for this? It already has
the information that you're posting. I have 2 or 3 versions of the RTF
specifications documentation posted for download.

-Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Necroprogramming FTW! - "Wait.. Is necroprogramming legal?"
http://www.freewarehome.com <-- Freeware listings since 1996
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Jun 10, 2004 12:54 pm    Post subject: Reply with quote

Garrett wrote:
Dragonsphere, did you check out the page I setup for this? It already has
the information that you're posting. I have 2 or 3 versions of the RTF
specifications documentation posted for download.

-Garrett


Yeah I noticed it after I uploaded Embarassed

I guess now we need more information about HTML. I really want to make this work because if we can get it working it will open some things that have been denied from us VDS users. Also check out http://forum.vdsworld.com/viewtopic.php?t=2779 this post where I wrote a quick and dirty XML parser. It may be of interest to ya.
Anyway I know this can be done with VDS. Translators are usually easier to write than interpreters since you really don't have to perform the actions of the keywords just find the equivalent keywords between the 2 languages.
I forgot to add above that there also needs to be a VDS list for the symbols (ie.. ~!@#$%^&*(Wink?/:'<>,."{}[]|\)... From the documentation I have read about RTF everyone seems to parse it character by character applying rules as they go. I think we should look at making a generic parser that we can just pass it the Table of keywords for both languages, Table of symbols, and the function name for the rules for it to follow. Make a simple intermediate language to parse the 2 languages and match them up. I wish we had a table that showed the 2 languages and which keywords did the same as the other. I will go and see if I can find such a beast.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript Open Source Projects All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group