Skip to content

feat(import): accept .txt URL lists alongside OPML/JSON/ZIP - #8818

Merged
Alkarex merged 3 commits into
FreshRSS:edgefrom
polybjorn:feat/import-txt-urls
May 12, 2026
Merged

Alkarex merged 3 commits into
FreshRSS:edgefrom
polybjorn:feat/import-txt-urls

Conversation

@polybjorn

Copy link
Copy Markdown
Contributor

Adds plain-text URL lists as a recognised import format. Files with a .txt extension are wrapped into an OPML document and handed to the existing OPML import path, so dedup, category assignment and feed limits work the same as they do for OPML. Available through both cli/import-for-user.php and the web import form.

Reworks #5268 along the lines suggested in that thread: no new CLI file, integrated into import-for-user.php and the web form, detected by extension.

Format

One URL per line. Blank lines and # comments are skipped. A leading UTF-8 BOM is stripped. CRLF and LF both work. Lines that don't parse as a URL are logged and skipped; the rest are imported.

Test plan

Tested on a live instance (SQLite, PHP 8.5):

  • CLI with a mixed file (valid URLs, blanks, comments, malformed URL, URL with a space): valid feeds inserted into the default category, invalid lines on stderr, exit 0
  • CLI rerun on the same file: no duplicate rows
  • CLI on an empty file: exit 0, no error
  • Web path ($isCli = false): warnings go to the user log file instead of stderr
  • Generated OPML round-trips through LibOpml::parseString with &, ", <, > in URLs intact
  • composer run-script phpcs, phpstan and phpunit (624 tests) pass

Detects .txt by extension and wraps the URL list into a minimal OPML
document so the existing import pipeline handles dedup, categories and
feed limits unchanged. Blank lines, `#` comments and a UTF-8 BOM are
skipped; lines that don't parse as URLs are logged and dropped without
aborting the batch.

Works through both `cli/import-for-user.php` and the web import form.
@polybjorn
polybjorn force-pushed the feat/import-txt-urls branch from f1cf177 to 2c11c38 Compare May 11, 2026 21:20
@polybjorn
polybjorn marked this pull request as ready for review May 11, 2026 21:22
@Alkarex Alkarex added this to the 1.30.0 milestone May 12, 2026
@Alkarex

Alkarex commented May 12, 2026

Copy link
Copy Markdown
Member

I have made a couple of minor changes. Please double-check

@polybjorn

Copy link
Copy Markdown
Contributor Author

Pulled both commits and re-tested locally - BOM stripping, comments, blanks, invalid URLs, and &/"/' escaping all still produce valid XML. Had a look for similar nits in the rest of the PR and didn't spot any.

@Alkarex
Alkarex merged commit 8863cdc into FreshRSS:edge May 12, 2026
1 check passed
@polybjorn
polybjorn deleted the feat/import-txt-urls branch May 12, 2026 10:20
@Alkarex Alkarex modified the milestones: 1.30.0, 1.29.1 May 14, 2026
Alkarex added a commit that referenced this pull request May 15, 2026
Discard lines starting with `<` for e.g. HTML/XML comments, tags
Compatibility with TXT format of https://atlasflux.saynete.net
Follow-up of #8818
doonga pushed a commit to greyrock-labs/home-ops that referenced this pull request May 20, 2026
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [freshrss/freshrss](https://freshrss.org/) ([source](https://github.com/FreshRSS/FreshRSS)) | patch | `1.29.0-alpine` → `1.29.1-alpine` |

---

> ⚠️ **Warning**
>
> Some dependencies could not be looked up. Check the [Dependency Dashboard](issues/34) for more information.

---

### Release Notes

<details>
<summary>FreshRSS/FreshRSS (freshrss/freshrss)</summary>

### [`v1.29.1`](https://github.com/FreshRSS/FreshRSS/blob/HEAD/CHANGELOG.md#2026-05-20-FreshRSS-1291)

[Compare Source](FreshRSS/FreshRSS@1.29.0...1.29.1)

- Features
  - Accept `.txt` import of feed URLs in additional to e.g. OPML [#&#8203;8818](FreshRSS/FreshRSS#8818), [#&#8203;8837](FreshRSS/FreshRSS#8837)
  - New CLI for automatic periodic SQLite export with retention [#&#8203;8819](FreshRSS/FreshRSS#8819)
  - More feed info: last received date, publication date [#&#8203;8799](FreshRSS/FreshRSS#8799)
- Bug fixing
  - Fix cookies with some browsers [#&#8203;8867](FreshRSS/FreshRSS#8867)
  - Fix search in shared user queries with empty results [#&#8203;8863](FreshRSS/FreshRSS#8863)
  - Fix XML errors with loading invalid OPML in `lib_opml` library [#&#8203;8652](FreshRSS/FreshRSS#8652), [#&#8203;8853](FreshRSS/FreshRSS#8853),
    [lib\_opml#48](https://framagit.org/marienfressinaud/lib_opml/-/merge_requests/48), [lib\_opml#51](https://framagit.org/marienfressinaud/lib_opml/-/merge_requests/51)
  - Fix ensure maximum number of feeds also with Dynamic OPML [#&#8203;8832](FreshRSS/FreshRSS#8832)
  - Fix click mark as read [#&#8203;8817](FreshRSS/FreshRSS#8817)
- UI
  - Improve browser compatibility to keep mobile navigation at the bottom [#&#8203;8833](FreshRSS/FreshRSS#8833)
  - Improve support of older/simpler Web browsers/engines such as SeaMonkey [#&#8203;8810](FreshRSS/FreshRSS#8810),
    [#&#8203;8811](FreshRSS/FreshRSS#8811), [#&#8203;8813](FreshRSS/FreshRSS#8813),
  - Improve *Swage* theme [#&#8203;8842](FreshRSS/FreshRSS#8842)
  - Rename *Nord theme* to *Nord* [#&#8203;8805](FreshRSS/FreshRSS#8805)
  - Replace GIF spinner by CSS spinner [#&#8203;8804](FreshRSS/FreshRSS#8804), [#&#8203;8812](FreshRSS/FreshRSS#8812)
  - Various UI and style improvements: [#&#8203;8800](FreshRSS/FreshRSS#8800), [#&#8203;8816](FreshRSS/FreshRSS#8816),
- I18n
  - Improve Brazilian Portuguese [#&#8203;8846](FreshRSS/FreshRSS#8846)
  - Improve Dutch [#&#8203;8868](FreshRSS/FreshRSS#8868)
  - Improve German [#&#8203;8840](FreshRSS/FreshRSS#8840)
  - Improve Polish [#&#8203;8854](FreshRSS/FreshRSS#8854)
  - Improve Russian [#&#8203;8861](FreshRSS/FreshRSS#8861)
  - Improve Traditional Chinese [#&#8203;8849](FreshRSS/FreshRSS#8849)
- Misc.
  - Update dev dependencies [#&#8203;8858](FreshRSS/FreshRSS#8858), [#&#8203;8864](FreshRSS/FreshRSS#8864)

</details>

---

### Configuration

📅 **Schedule**: (in timezone America/New_York)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xODIuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE4Mi4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.greyrock.io/greyrock-labs/home-ops/pulls/88
This was referenced Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants