FinceptTerminal is a modern finance application offering advanced market analytics, investment research, and economic data tools, designed for interactive exploration and data-driven decision-making in a user-friendly environment.
C++ ai-agentsalgorithmic-tradingbloomberg-terminalcppfinancefinancial-marketsfintechgood-first-issueinvestmentinvestment-researchmachine-learningopensourcepythonqtquantitative-financestock-markettrading
#pragma once
#include "services/feeds/FeedTypes.h"
#include <QByteArray>
#include <QString>
namespace fincept::feeds {
/// Strip HTML tags + collapse whitespace + unescape common entities; cap length.
QString strip_html(const QString& in, int max_chars = 300);
/// Parse a feed timestamp through the RSS/Atom format cascade (optional explicit
/// `fmt`, then RFC2822, ISO, "ddd, dd MMM yyyy HH:mm:ss"). Returns epoch secs and
/// fills `display` ("MMM dd, HH:mm"); returns 0 if unparseable.
qint64 parse_feed_datetime(const QString& text, QString& display, const QString& fmt = {});
/// True if the body looks like an HTML page (access-denied / captcha), not a feed.
bool looks_like_html(const QByteArray& body);
/// Sniff the format from raw bytes (used when sub.format == Auto).
FeedFormat sniff_format(const QByteArray& body);
/// True for an absolute http(s) URL with a host. Feed items carry publisher-
/// supplied links; anything else (file:, javascript:, custom protocol handlers)
/// must never reach QDesktopServices::openUrl.
bool feed_link_is_web_url(const QString& url);
} // namespace fincept::feeds