• Renumber articles by posting date?

    From Jesse Rehmer@21:1/5 to All on Sat Aug 6 17:37:32 2022
    Is there a way one can renumber articles contained on a INN tradspool in chronological order?

    I've been pulling in articles over time from various sources, so I have a wide range of article numbers and posting dates that are out of sequence. When a newsreader fetches X number of headers it may get some articles from 2003 and some from 2022, but be missing a lot in between until all headers are loaded and the reader sorts by the Date header.

    I've been thinking that INN stores the posting date as one of the values in
    the history file, there may be some way to do this, perhaps not in place, but I'm not sure how to sort the input for innxmit. I am thinking if I can figure out how to do that I could seed another server and then retire the current
    one.

    I do not have any readers besides myself at the moment, still getting everything "just right", so I'm not worried about article renumbering issues from that angle.

    Cheers,

    Jesse

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_=c3=89LIE?=@21:1/5 to All on Sat Aug 6 21:47:26 2022
      sort -t '~' -k3n | cut -f 3 < history > tokens.sorted

    It will be better with parenthesis, sorry... (I had tested with "head
    history | sort -t '~' -k3n | cut -f 3" but not what I wrote).

    (sort -t '~' -k3n | cut -f 3) < history > tokens.sorted

    --
    Julien ÉLIE

    « – Heureusement, nous aurons bientôt le TGV !
    – C'est quoi le tégévé ?
    – C'est le Transport Gaulois Véloce. » (Astérix)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Julien_=c3=89LIE?=@21:1/5 to All on Sat Aug 6 21:34:22 2022
    Hi Jesse,

    Is there a way one can renumber articles contained on a INN tradspool in chronological order?

    I've been thinking that INN stores the posting date as one of the values in the history file, there may be some way to do this, perhaps not in place, but I'm not sure how to sort the input for innxmit.

    Exactly!
    The third timestamp in the history file (1632832725 in the example
    below) is the posting time.

    [8FEB593A03B03416C6AD1CED669BC442] 1632832728~-~1632832725 @030346523100000000000000002800000001@

    I would suggest to sort the history file with that field, and keep the
    token in the output

    sort -t '~' -k3n | cut -f 3 < history > tokens.sorted

    will do that I think.
    You'll obtain an ordered list of article storage tokens by posting time.

    This file is a suitable entry for innxmit. If present in
    <pathoutgoing>, then run "innxmit your.news.server tokens.sorted" and
    they will be fed to your new news server in the expected order.

    --
    Julien ÉLIE

    « – Alors j'ai eu une idée géniale : ramener à César un des Gaulois
    irréductibles de la région !
    – Mais, préfet, ces Gaulois irréductibles ont un grand défaut !
    – Ah ? Lequel ?
    – C'est qu'ils sont irréductibles justement ! » (Astérix)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)