Additional Blogs by SAP
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member181879
Active Contributor
0 Kudos

In the past few days, a number of people have expressed interest in writing a weblog (I wonder why:), and had some reservations about the complexity in getting the weblog online. Some stopped by, and asked me for a detailed description of everything that I do. Let me take a few minutes to quickly describe how complex this can be! The first step is brewing a cup of coffee. One moment….hmm!

Step 1: Writing

Some people prefer to write their weblogs using Notepad, and manually adding arcane HTML markup sequences. They can spell perfectly, type blind and know HTML better than the W3C committee. Then there are the meister of writing weblogs: VI or nix.

Mere mortals, like me, prefer to use Microsoft Word! Its good editor supports me with good onscreen formatting, a spell checker and most important, a thesaurus. This allows me to express my pleasure in writing this text as a delight, an enjoyment, state of happiness or even pure satisfaction. Must be the coffee.

The only rule that I follow is to flag all text with a special set of paragraph classes. Later on, the Word document will be converted into an SDN weblog. These classes are: sdn_heading1 for the title text, sdn_heading2 for section headings, sdn_normal for paragraphs of text, sdn_bullet as a clone of the bullet class and sdn_code to list bits of source code (using Courier font and indented). This paragraph is flagged as sdn_normal.

The exact formatting of each class isnot important. Do not pay any attention to things such as fonts, and spacing. All of this is later handled by the style sheets used in SDN. Important is to flag the text correctly, so that later accurate (“correct” improved on by thesaurus) HTML can be generated.

If you wish, you can use my template.

Coffee is finished, so we can start writing. Within Word, the following features are used:

FeatureDescription
TextThis is the fluff to fill the page. All text is flagged with one of the sdn_* paragraph classes.
ImagesImages are screen grabbed using any tool available. Thereafter they are pasted into a bitmap editor ( ) and cropped. All unnecessary detail is deleted, and only the essence is left. This is important to reduce bandwidth. Very important: for SDN the maximum picture size is 600 by 400 pixels. Do not exceed this. Cut away as much clutter as much as possible. Also, do not scale the picture smaller. It really makes it more difficult to enjoy later on. Just cut away not needed detail. Thereafter, the picture is placed into the Word document with cut-and-paste. Do not worry about things such as JPEG or PNG formatting, with separate files, or anything. Just paste the picture into the document and continue.
BulletsUse the paragraph class sdn_bullet.
CodeVery important part of any document. This is a developer network, and the best way for a developer to express himself is with source code. Source code is also pasted into the document and just completely flagged as paragraph class sdn_code.
TablesUse only very simple tables. For this table, I just defined a new table of 2 columns. The first row is the heading row. The text is not flagged in any special way. Just bold it. Nothing more.

Do not worry about the onscreen formatting in Word. For example, for source code (sdn_code) a Courier 9 point font is used with about 1cm indentation. All of this formatting will be stripped later, and in the published weblog will only be the source code in a

sequence.

So the time flies, the page counter jumps, the coffee is already long forgotten and the pleasure is in the creative work. Just use Word and let the fingers fly!

Step 2: Proof Reading

Although not often though about, proof reading is a very important step in the production step. Keep in mind that the hours invested in writing stand in no relationship to the hours that other people spend in reading.

Recommended are two levels of proof reading. For the use of language, ask somebody that speaks native English (the more official language for use in SDN). SDN has an open offer to help with the English aspects. This small step alone on my weblogs has finally convinced everyone that I am English native speaker. This is far from the truth!

At the same time, also ask a colleague to proof read the document for technical content. It helps to catch simple mistakes.

Often during the proof reading steps, changes are made in the Word document, with “Track Changes” active. You can review the changes (and at the same time learn more English!). Thereafter, accept all changes (I usually do) and then switch off this feature again. In addition, delete all comments from the document after reading and following the suggestions. This information should not be published!

Step 3: Publishing

Publishing is the simplest and easiest step.

As a first step, save the document to have the .DOC version of the weblog still available.

Immediately thereafter, save the document a second time in an HTML version. Use the menu sequence “File->Save as Web Page”. A new .HTM version of the document is written to disk, and all the pictures are exported in .JPG, .GIF or .PNG format into a subdirectory.

Most important, immediately close Word afterwards. Otherwise, all new changes will land in the .HTM version of the document.

Now we have on disk both the .DOC and the .HTM versions of the document. In addition, we also have all the exported pictures.

The problem with this .HTM content is that it contains a lot of styles and other markup information that does not work very well with SDN. What we would like to do is strip the file down to an absolute minimum of HTML without any style information.

The first time I did this was by hand. It took a few hours. Thereafter, I developed a small program in a well-chosen language to do this work quickly. (Just so that there are no disappointments among all NetWeaver hackers, ABAP is still alive and in use by a few of us!)

Just download the program, paste it into SE38 and run it quickly. (For SAP internal users, the program is available on our sandbox system B6M under the name SDN_DOC_TO_HTML.) One small warning: this program is the result of only one weekend of tinkering. It works for me, but there are no guarantees. Feel free to adapt it to your requirements. If you should sell it, send my share of the profits to my manager!

The program asks for the SDN weblog user number. This will be used to generate URLs that already point directly into SDN. If the field is left empty, the pictures will be loaded directly from disk.

What the program does is to load the HTM file from disk, strip it down, and write it under a new name. The new name consists of only the camels in the CamelCase name! For example, from the title of this document “The-123-Steps-To-Producing-A-Weblog” the short name “T123STPAW” will be constructed. The new .HTM file is saved. In addition, only the used images are copied over and supplied with new names. This is important, as image names must be unique, and using image001 as the name will cause problems when the second weblog is published. (There will be a second weblog!)

The final step in publishing the Weblog, is just to upload all of this quickly. When you registered as a blogger, you received an URL that is to be used for creating new weblogs.

Just select the Create option. Enter the title of the Weblog, select a category and type in a small description. Finally load the converted text into Notepad (from the short named HTML file) and paste it into the Text editor. Leave the status at draft. Submit the Weblog.

The last step is to quickly upload all the images. Just select the Upload option. Each image is selected and submitted. Only upload the images that the conversion program has changed the names of. For this example, I uploaded all the T123STPAW_nnn.* files.

One small warning: The names of the images are case sensitive! The name format used in the document must match exactly the name format used for uploading. The conversion program will do this correctly.

As the final step, list your draft Weblogs, quickly check that everything is fine, and Mark as Final. Your first Weblog is done!

In Summary

See also the interesting Weblog from Mark: Weblog formatting Tips and Tricks

Even although this step-by-step description is slightly long, it is only because of the detailed description. These few steps always take less than fifteen minutes!

  • Write using Word and a few selected sdn_* paragraph classes. Use images as they add spice. Just crop them to maximum 600x400 pixels.
  • Proof read!
  • Save, Save as Web Page and then Exit!
  • Run conversion program
  • Paste text into SDN and upload pictures.

That is all there is to it. Although this weblog has contained no technical information, I do hope that it has taken away any last reservations about blogging! It is simple and immense fun!

11 Comments