Re: Yarn documentation or source code

From: Lou Verdon (lverdon@julian.uwo.ca)
Date: Sun, 15 Feb 1998 20:12:40 -0500

In article <iR4508D5wuqe092yn@erols.com>, you wrote:
>>frankie@mundens.gen.nz (Frank G. Pitt) wrote:
>>>I want to write some utilities to assist me in exporting
>>>and archiving posts from the Yarn news base.
>>
>>You can save to files and folders directly from Yarn.
>>
>>>Are there specifications of the Yarn newsbase file, or even source
>>>code for accessing it, available somewhere ?

...

>The guy was asking specific questions for specific information. If you don't
>know, don't say anything...

...some previous posts

=============8<----------------

In article <DiDL0gHAA4xF092yn@y.z>,
tim@yarn.list (Tim Myddleton) wrote:
> i've put the news.dat format, as described by Chin, on my web site at
> http://www.vex.net/~x/yarn-9x-news.html

Perhaps you could also add documentation on the folder format?

The format for Yarn folders is quite similar to the SOUP "binary clean
mail" format, although with one small difference.

In the SOUP format mentioned above, before each message is its length,
as a four-byte unsigned value, in big-endian order. This means that
if the four bytes you read are "B0 B1 B2 B3", then the length of the
message is

B0 * 256 * 256 * 256 + B1 * 256 * 256 + B2 * 256 + B3

Yarn uses the little-endian order, probably because that's what DOS
and OS/2 use. This way, Yarn can read the length with one read call.
Similar to the previous example, if you now read "B0 B1 B2 B3" from
a Yarn mail folder, the length is

B2 * 256 * 256 * 256 + B3 * 256 * 256 + B0 * 256 + B1

--
E-mail: galactus@stack.nl      | PGP encrypt if you can (Key ID 0x416A1A35)
http://www.stack.nl/~galactus/ | To find out more about PGP, send mail

=============8<----------------

from Tim... Yarn/2 Bells & Whistles Page: http://www.vex.net/~x/bells2.phtml

>However, there are >times when I need to convert a whole folder to a text file and vice versa.

To a single text file? Or individual file for each message?

I could quickly change the sn2rnews.cmd script (soup-news 2 rnews) in the Yarn2Any rexx script collection to convert folders to rnews. Rnews is basically plain text with a little text divider/header between each message.

=============8<------------

From: brusberg@stud.uni-frankfurt.de (Oliver Brusberg) Subject: YARNUTIL 0.4 Date: 29.10.1995 X-Comment: Documentation YarnUtil 0.4 Lines: 60

YARNUTIL 0.4 ================

YARNUTIL is a collection of useful utilities for YARN. Mainly they are concerned with the handling of folders and recovery of broken folders and YARN databases. The package contains:

* AddLines 0.3 - add "Lines:" to Soup packet * CntFold 0.3 - counts messages in a folder * EditFold 1.2 - makes folders editable * MapFold 0.3a - maps messages in a folder * Revision 0.1 - adds "X-Revision:" to message * SelFold 0.1 - selects messages from a folder * SendFold 0.3 - converts folder to SOUP * SortFold 1.3 - sorts a folder keeping threads * SupsFold 0.2 - deletes superseeded messages * TFolder 0.3 - converts textfile to a folder * UnFolder 0.4 - converts folder to printable text * YARNUTIL.INI - the common configuration file * Batch files - some batch files using the utilities

There are no special hardware requirements, however some programs will require a 286. All programs display a short help when called with /?.

==================8<--------------

Lou

--