This program helps you to edit files by seperating the things that stay the same for every time you edit it from those that may differ each time. The files of the following examples are included in examples/introduction.
You have a text file with bookmarks:
File: bookmarks.txt http://kwitte.dyndns.org/~kwitte/ http://www.uni-kiel.de
To add a new line you could use a normal text editor, but i guess
you know already how to do that. So let me tell you how to do it with
Into our project file we write the few things that always stay the same for each new bookmark:
File: bookmarks.prj # just a name entry1=new bookmark # the name of the file to edit entry1.file=bookmarks.txt
Now we start html-form and open the project file. (The file bookmarks.txt must exist, but it may be empty.) We will see something like this:
We enter the new bookmark into the text field, then press return (to make it appear in a new line rather than left of the current top bookmark). Then we press the modify button. Our bookmark file (bookmarks.txt) now has the new bookmark on the top.
In the first example htmlform did not really make our work any easier, because there was only one thing that stays the same each time we add a new bookmark: The bookmark file. But now we want to add the bookmarks to html-files and make them links. Our bookmark-file now looks like this:
File: bookmarks.html <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title> Bookmarks </title> </head> <body> </body> </html>
Again we create a project file which contains the information that we otherwise would have to do for each new bookmark entry again:
File: bookmarks2.prj # First the link itself. The name after the = is just a name. entry1=link # First thing that stays the same: The file. entry1.file=bookmarks.html # Second thing that stays the same: The position for the new bookmark. # It shall be right before the </body>-tag. entry1.mark=</body> # Third thing that shall always stay the the same: the html-code # before and after the link. entry1.prefix=<a href=" entry1.postfix="> # Now the link description. The name after the = is just a name. entry2=description # Fourth thing that stays the same: The ending html-code. # \n means "new line" entry2.postfix=</a><br>\n
We launch html-form again and open bookmarks2.prj. This time we see two text fields: One for the link (e. g. http://localhost/) and one for the description (e. g. my local website). We enter both and press the modify button. The link is now on the html-site. To add more links simply change the text in the link and the description text field and press the modify button again. The resulting html page simply contains a list of links.
entry1=Überschrift entry1.file=examples/simple example 1/links_wetter.htm entry1.mark=<!-- next entry --> entry1.prefix=\ <b> entry1.postfix=</b><br>\n entry1.content= entry1.alignment=4,60 entry2=Beschreibung entry2.prefix=\ entry2.postfix=<br>\n entry2.content= entry2.alignment=4,60 entry3=Link entry3.prefix=\ <a href=" entry3.postfix=" target="_blank"> entry3.content= entry4=Link Text entry4.content= entry4.postfix=</a>\n\n <p>\n
This was a very simple example. To see what this program can really do have a look at the included examples.