Skip to content

[OpenATVreader] show text attachments of posts - #48

Open
WXbet wants to merge 1 commit into
masterfrom
text-attachments
Open

WXbet wants to merge 1 commit into
masterfrom
text-attachments

Conversation

@WXbet

@WXbet WXbet commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Text attachments of forum posts (e.g. enigma2-debug.log, messages.log) can now be read directly on the receiver.

What it does

  • Every attachment that is neither an image nor a video is checked by loading only its first 4 KiB. Files without NUL bytes and with nearly only printable characters are treated as text, independent of the file extension. Binary attachments such as .ipk are not marked.
  • Text attachments get the marker [Datei n] in the post, can be selected with up/down like links, and OK opens them.
  • They are shown with the existing LogManagerViewLog screen of enigma2 (system skin, Console font, line list), so even multi-MiB debug logs scroll smoothly.
  • At most 8 MiB are loaded. Larger files are cut after the last complete line, and a last line tells that the file was cut.
  • The file is saved as UTF-8 under its real name (title of the viewer); invalid bytes are replaced, so Latin-1 logs work too.
  • The attachment box is shown with one line per attachment instead of one long line.
  • The headline is hidden while bitte warten... is shown at its position.

@WXbet
WXbet force-pushed the text-attachments branch from 02b1b2a to 3b6f398 Compare October 5, 2026 15:32
- every attachment which is no image or video gets checked (first 4 KiB):
  text files (no NUL bytes, nearly only printable characters) get the
  marker '[Datei n]' and can be selected with up/down, OK opens them in
  the log viewer of enigma2 (LogManagerViewLog)
- max. 8 MiB are loaded; larger files are cut after the last complete line
  and a last line tells that the file was cut
- the attachment box is shown with one line per attachment
- the headline is hidden while 'bitte warten...' is shown at its position
- cache file names use SHA-256 instead of MD5
- split parseContent into smaller methods and use a constant for the
  attachment download path
@WXbet
WXbet force-pushed the text-attachments branch from 3b6f398 to 286d5cf Compare October 5, 2026 15:34
@sonarqubecloud

sonarqubecloud Bot commented Oct 5, 2026

Copy link
Copy Markdown

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.

1 participant