ConScrap V1
Simple project to scan stock tickers forums for posts and post to discord.
Loading...
Searching...
No Matches
ConScrap.Constants Class Reference

Set of Constants including sample latex documents. The latex documents should include the report date, format and statistics. More...

Classes

class  YahooXPaths
 

Static Public Attributes

const string SampleTemplateLatex
 
const string PlainBox
 
const string ReportTemplate
 
const string jsQuerySelectorAllShadows
 
const string yahooBasePath = "https://finance.yahoo.com"
 
static string[] stocks
 
static string[] tstocks
 

Detailed Description

Set of Constants including sample latex documents. The latex documents should include the report date, format and statistics.

Member Data Documentation

◆ jsQuerySelectorAllShadows

const string ConScrap.Constants.jsQuerySelectorAllShadows
static
Initial value:
=
@"function querySelectorAllShadows(selector, el = document.body) {
// recurse on childShadows
const childShadows = Array.from(el.querySelectorAll('*')).
map(el => el.shadowRoot).filter(Boolean);
// console.log('[querySelectorAllShadows]', selector, el, `(${childShadows.length} shadowRoots)`);
const childResults = childShadows.map(child => querySelectorAllShadows(selector, child));
// fuse all results into singular, flat array
const result = Array.from(el.querySelectorAll(selector));
return result.concat(childResults).flat();
}
"

◆ PlainBox

const string ConScrap.Constants.PlainBox
static
Initial value:
=
@"
\begin{tcolorbox}[{{ if options }} {{options}} {{ else }} colback=red!5!white,colframe=red!75!black{{ end }}]
{{text}}
\end{tcolorbox}
"

◆ ReportTemplate

const string ConScrap.Constants.ReportTemplate
static
Initial value:
=
@"
\documentclass{scrreprt}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage{tikz,lipsum,lmodern}
\usepackage[most]{tcolorbox}
\begin{document}
\section{Yahoo Comments {{date}}}
{{ for comment in comments }}
\begin{tcolorbox}[colback=blue!5!white,colframe=blue!75!black,title={{comment.author}} - {{comment.post_date}}]
{{comment.content}}
\end{tcolorbox}
{{ end }}
\end{document}"

◆ SampleTemplateLatex

const string ConScrap.Constants.SampleTemplateLatex
static
Initial value:
=
@"
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\begin{document}
\begin{itemize}
{{ for product in products }}
\item {{product}}
{{ end }}
\end{itemize}
\end{document}"

◆ stocks

string [] ConScrap.Constants.stocks
static
Initial value:
= {
"ZIM",
"DCM.TO",
"ACT.CN",
"VUX.CN",
"FGI",
}

◆ tstocks

string [] ConScrap.Constants.tstocks
static
Initial value:
= {
"ZIM",
"UAN",
"FGI",
"VEON"
}

The documentation for this class was generated from the following file: