I have multiple .opml files (that list rss feeds I subscribe to in xml i.g.) with different contents on different devices. How can I merge them without duplicates? Are there tools for this?

  • Auster@thebrainbin.org
    link
    fedilink
    arrow-up
    1
    ·
    25 days ago

    If still needed, I have some ideas though only partially automated.

    If I remember correctly, OPML files’ syntax is pretty straight forward so you could merge them manually.

    If feeds are divided in groups, you probably need to merge per group.

    With a text editor that has both line sorting and regex replacing functions (e.g. Sublime Text), select each the range to be sorted and sort them one selection at a time (F9 on Sublime Text), then with regex, replace ^(.*)(\r?\n\1)+$ for \1 (remember to activate regex search if needed).

    And explaining the regex, I can’t remember how I got to that, but it finds lines that appear immediately after the ones they repeat and replace for the first case of the repeated lines. However, if line 1 is repeated on line 50, as an example, and all lines between them are miscellaneous ones, the regex won’t pick them.