Building the Blog

Workflow Issues

  • Cross references!

Initial Posts

From published folder

  • Programming: python -m blog_tools -u -a post_file -f '.\mathsf{Pr}ogramming-Your-Career.md' (in published)

From generated folder

  • Wordle

From S\TELOS\CAS\

  • Election: built using python -m blog_tools -u -a post_file -f '.\mathsf{E}lection-Day-Lessons-for-the-Data-Scientist.md'
  • VaR I: python -m blog_tools -u -a post_file -f '.\In-Praise-of-VaR-Part-I.md'
  • VaR II python -m blog_tools -u -a post_file -f '.\In-Praise-of-VaR-Part-II.md'
  • From Min Bias folder, exponential distributions series. Intro in published.

From \S\TELOS\Notes

  • Frequency-Distributions.md
  • The-Insurance-Stack-in-a-Disrupted-World.md. File required separate PDF processing (old or R pdfs?). Used Linux smve_38_clean environment. Ran, from Notes\img folder,
In [9]: blog_tools.PublisherBase.convert_pdfs('.', '.', 'customer_ep.pdf')
34:36.399| 703| blog_tools          .convert_pdfs           |  converting customer_ep.pdf to customer_ep
time: 10.2 s (started: 2022-02-02 10:34:36 -05:00)

and similar for paper_ep.pdf, re_ep.pdf, re_all_ep.pdf, claim_ep.pdf, and total_ep.pdf * Life-Insurance-Backdating.md

From \S\TELOS\PIRC\generated

  • python -m blog_tools -u -a post_file -f '.\When-is-Premium-Riskier-Than-Loss-Slides.md'

On-going posts

Series

  1. Effective Python/matplotlib/pandas: tags Python, Effective, [matplotlib] (three)

Python setup

set FLASK_APP=flask_app.py
set FLASK_ENV=development
flask run


$env:FLASK_ENV="development"
$env:FLASK_APP="flask_app.py"
flask run


$env:PYTHONPATH="c:\users\steve\s\telos\blog\python"

python -m blog_tools -u -a post_file -f Wordle-the-Best-Start.md

References

Add YAML at the top of the markdown file. Standard Mendeley reference file. Choose your own CSL file.

bibliography: /S/TELOS/biblio/library.bib
csl: /S/TELOS/biblio/journal-of-finance.csl
link-citations: true
colorlinks: true

Added argument --citeproc to pandoc. Bingo!

Mathjax

Added --mathjax to pandoc command.

Added to base.html

<!-- pandoc manual; https://docs.mathjax.org/en/latest/web/start.html -->
<script id="MathJax-script" async
    src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"> </script>

Colorizing Code

Added --highlight-style=pygments to pandoc command.

Added to site.css file (based on pandoc default).

/* colorize code */
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { color: #007020; font-weight: bold; } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */

posted 2022-01-31 | tags: programmming, blog

Share on