This extends the **MyLittleForum (MLF) importer** with several optional features to make migrations more complete and reliable.
### New Features (optional via environment variables)
**Uploads import**: supports attachments and images from the MLF uploads table.
- Imported uploads are stored with relative links, ensuring they continue to work even if the forum domain changes.
- **Legacy link rewriting**: absolute links (`index.php?id=...`) are converted into working Discourse permalinks.
- Rewritten links are also created as relative links, so they remain valid after a domain move.
- **Parent category option**: all imported MLF categories can be placed under a chosen existing category.
- **Upload repair pass / incremental imports:** already-imported posts can be rescanned to fix broken or newly available upload references, allowing the importer to be run again later with a more up-to-date dataset.
- **Relaxed upload constraints**: temporarily increases file size limits and allows all extensions during the import step.
### Other Improvements
- Adjusted for MyLittleForum 2.x schema changes (e.g. `user_location` instead of `user_place`).
- User import now respects already staged users; avoids errors that would otherwise occur when trying to create them again.
- Improved BBCode → Markdown conversion: lists and quotes are converted more reliably.
- Especially improves handling of quotes at the beginning of posts and ensures following text is not mistakenly included in the quoted block.
- Thread interlinking restored: legacy links between threads are now rewritten to point to the correct Discourse topics.
### Environment Variables
- `PARENT_CATEGORY` – import all categories under an existing Discourse category.
- `REWRITE_LINKS` – rewrite absolute legacy links.
- `UPLOADS_DIR` – path to the MLF uploads directory (flat namespace).
- `REPAIR_UPLOAD_LINKS` – repair pass for already-imported posts with links.
- `LOOSEN_UPLOAD_CONSTRAINTS` – relax upload size/extension checks during import and increases file size limits and allows all extensions during the import step.
This allows text editors to use correct syntax coloring for the heredoc sections.
Heredoc tag names we use:
languages: SQL, JS, RUBY, LUA, HTML, CSS, SCSS, SH, HBS, XML, YAML/YML, MF, ICS
other: MD, TEXT/TXT, RAW, EMAIL
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.
Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging