]> apps.delaporte.us Git - dotfiles.git/commitdiff
Merge branch 'main' of github.com:edthedev/dotfiles
authorEdward Delaporte <delaport@illinois.edu>
Wed, 8 Nov 2023 23:15:57 +0000 (17:15 -0600)
committerEdward Delaporte <delaport@illinois.edu>
Wed, 8 Nov 2023 23:15:57 +0000 (17:15 -0600)
doc/markdown.md [new file with mode: 0644]
files/Microsoft.PowerShell_profile.ps1
files/dashboard.css [moved from files/dasboard.css with 100% similarity]
files/paths.ps1

diff --git a/doc/markdown.md b/doc/markdown.md
new file mode 100644 (file)
index 0000000..f9179c8
--- /dev/null
@@ -0,0 +1,43 @@
+
+
+## Markdown to PDF
+
+The usual VSCode plugins add a lot of weird junk (telemetry, perhaps), so I decided to start using brute force and minimal `GoLang` code to convert my Markdown into HTML.
+
+### Setup
+
+```powershell
+go install github.com/gomarkdown/mdtohtml@latest
+mdtohtml -h
+```
+
+### Generate document
+
+```powershell
+mdtohtml.exe -css https://edward.delaporte.us/css/edthedev.css .\Dashboard.md > Dashboard.html
+```
+
+VSCode Settings:
+```json
+"command-runner.terminal.name": "runCommand",
+"command-runner.terminal.autoClear": true,
+"command-runner.terminal.autoFocus": true,
+"command-runner.commands": {
+    "markdown to HTML": "mdtohtml.exe -css https://edward.delaporte.us/css/edthedev.css ${file} > ${file}.html",
+       "HTML to PDF": "wkhtmltopdf.exe ${file}.html ${file}.pdf",
+},
+```
+
+Then `Ctrl+Shift+P`, `Run Command` and select `markdown to HTML`.
+
+## Markdown to PDF
+
+### Setup
+
+Install `wkhtml2pdf.exe` somewhere on my path. 
+
+### Use
+
+```powershell
+wkhtmltopdf.exe .\Dashboard.md.html dash.pdf
+```
\ No newline at end of file
index 7fd5faa0cbe099352aa956c724ad6715e56c361f..854a92d27e20d2e8de6b3bdaba01eb06727ed299 100644 (file)
@@ -15,7 +15,7 @@ Set-Alias code codium  # Prefer Codium
 # You can pry my unix commands out of my cold dead fingers
 Set-Alias which get-command
 # Reject Windows heritage, act like Vi
-Set-PSReadlineOption -HistorySavePath $env:src\PSHistory.log
+# Set-PSReadlineOption -HistorySavePath $env:src\PSHistory.log
 Set-PSReadlineOption -BellStyle Visual
 Set-PSReadlineOption -ViModeIndicator Prompt
 Set-PSReadlineOption -EditMode Vi
similarity index 100%
rename from files/dasboard.css
rename to files/dashboard.css
index 88d6bb8e505c381f6163f592f292d32681d3f9d1..1b53bb88f3ff8ab411530c6ec9d246cbd87d0f45 100644 (file)
@@ -23,9 +23,11 @@ if($IsWindows){
        Add-ToPath "$env:src\x16-demo\tools" -optional # x16 python tools
        Add-ToPath "$env:src\flutter\bin" -optional # Flutter for Dart
        Add-ToPath "$env:src\bin" -optional # anything else I need
+       Add-ToPath "$HOME\bin" -optional # anything else I need
 }
 else {
        Add-ToPath "$env:src/bin" -optional # anything else I need
+       Add-ToPath "$HOME\bin" -optional # anything else I need
        Add-ToPath "$HOME/x16/x16-emulator" -optional # x16 Emulator
        Add-ToPath "$HOME/src/x16-demo/tools" -optional # x16 python tools
 }