[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] For the SAQ: How to integrate an article from deja into a leafnode spool.



OK: "SAQ" = "Seldomly asked questions" :-)

Suppose in the middle of a contentious thread your ISP's news server
misses a critical post. DAMN! You look it up on deja, read what it says,
but wish you could integrate it into your own local leafnode spool:
HERE'S HOW!

1. Download the original article from deja in the "original text" format.
Assume, for illustration, that the article was from the newsgroup
news.servers.leafnode.

2. Edit the appropriate line in the file .../leaf.node/groupinfo: in:
news.servers.leafnode 189 1 954825731 Discussions about leafnode.
the "189" should be updated to "190", giving:
news.servers.leafnode 190 1 954825731 Discussions about leafnode.

190 will become the article number of the new article.

3. Move the article file to ../news/servers/leafnode/190. Edit it as
follows:

(a) Insert a path header as the first line. (It doesn't really matter
where it comes from. Probably best is the path header from another
article by the same author.)  Without the Path header, the article would
later get deleted on starting the news reader :-(

(b) Insert the appropriate Xref: header after the other headers, e.g.
Xref: my.news.server news.servers.leafnode:190

(c) Delete the article's last line, which contains a deja URL.

(d) Insert (e.g. after the Date: header) a Lines: header, e.g.:
Lines: 64
This is the number of lines in the article's body (including any .sig);
it _doesn't_ include the blank line between the headers and the body.

4. With your trusty editor, append an entry for the new article to the
file ../news/servers/leafnode/.overview. It is fairly straightforward, if
tedious, to copy the format of the previous entry in .overview. Essential
here is that the fields are separated by TABs, not spaces. (The key
sequence [C-Q <tab>] can be useful in emacs :-).

For clarification, the elements of the References: entry are separated by
a single space, but the entire entry is separated from its neighbours by
TABs. There is a TAB between the Msg-Id and the References, although this
might not be obvious to the eye.

The two numbers after the references are the "size" of the article (in
characters) and the number of body lines in the article. Here, the "size"
of the article means the total size it _would_ have if the line separator
used were <CR><LF> rather than the standard Unix <LF>. To calculate this
number, get the file size with ls -l, then add the total number of lines
in the article (headers + blank line + body lines) to it.

5. Make sure the article's owner is news.

That's all (??) there is to it. Well, not quite all. To finish the job
properly, you would need to make a message-id hard-link to this file.
This would involve emulating the hash algorithm in the file ??? [which
file is it again?] in (say) an awk script so as to locate the correct
directory for the link.

If I have to do this with any sort of regularity, I'm going to write a
script for it :-(

Have fun!

-- 
Alan Mackenzie (Munich, Germany)
acm@xxxxxx



-- 
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list