commit 1239bb5c20d9a2f50ec1b35c5c35e231a63189e6 Author: Jesse Shawl Date: Wed Jan 20 18:36:34 2021 -0600
src files
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..53c37a1 --- /dev/null +++ b/.gitignore
@@ -0,0 +1 @@
dist No newline at end of file
+ \
diff --git a/bin/add-posts b/bin/add-posts new file mode 100755 index 0000000..16c7c03 --- /dev/null +++ b/bin/add-posts
@@ -0,0 +1,17 @@
#!/bin/bash source=~/Sync/code/jesse.sh/_posts/ destination=~/Sync/code/git-site/posts/ cd $source for post in `ls`; do title=`echo "$post" | sed 's/.md//g' | sed 's/.markdown//g' | sed -e 's/[0-9\-]\{10\}//g' | sed 's/\-/ /g' | xargs` post_date=`echo "$post" | cut -c 1-10` cp $post $destination cd $destination echo "`fold -w 80 -s $post`" > $post git add $post COMMITTER_DATE="$post_date" git commit -m "$title" --date "$post_date" cd $source done
+ + + + + + + + + + + + + + + + +
diff --git a/bin/build b/bin/build new file mode 100755 index 0000000..137a263 --- /dev/null +++ b/bin/build
@@ -0,0 +1,27 @@
#!/bin/bash mkdir -p dist log=`git log --all --decorate --graph --date=format:'%Y-%m-%d' --pretty=format:"%h%d %ad %n%w(72,1,2)%s"` ./bin/log-to-html "<pre class='log'>$log</pre>" > dist/log.html for commit in `git log --all --pretty="%h"`; do mkdir -p dist message=`git log --format=%B -n 1 $commit | xargs` diff=`git show $commit` file=dist/$commit.html cat header.html > $file ./bin/diff-to-html "$diff" >> $file cat dist/log.html >> $file cat footer.html >> $file if [[ $message = "home" ]]; then file=dist/index.html cat header.html > $file ./bin/diff-to-html "$diff" >> $file cat dist/log.html >> $file cat footer.html >> $file fi done
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/bin/diff-to-html b/bin/diff-to-html new file mode 100755 index 0000000..39fd927 --- /dev/null +++ b/bin/diff-to-html
@@ -0,0 +1,9 @@
#!/usr/bin/env node const Diff = require("../src/diff-parser"); const d = process.argv[2] console.log(Diff.toHTML(Diff(d))) console.log('<hr><br>')
+ + + + + + + + +
diff --git a/bin/log-to-html b/bin/log-to-html new file mode 100755 index 0000000..c82ffba --- /dev/null +++ b/bin/log-to-html
@@ -0,0 +1,8 @@
#!/usr/bin/env node const lp = require("../src/log-parser"); const p = process.argv[2] console.log(lp(p))
+ + + + + + + +
diff --git a/footer.html b/footer.html new file mode 100644 index 0000000..ad22c6c --- /dev/null +++ b/footer.html
@@ -0,0 +1,19 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/1.2.8/marked.min.js" integrity="sha512-0G/mwgSJDEYMS2WjIH1KKeXPyIVIW0fMLdvlQTFMmCLkedtagUjYevOD6E9h0+ZcIjQxOIiSb5LJgphjEc2nBw==" crossorigin="anonymous"></script> <script> const diffs = document.querySelectorAll(".diff") Array.from(diffs).forEach((diff) => { const isMarkdown = !!diff.querySelector(".meta").innerText.match(/(\.md|\.markdown)/); if(isMarkdown){ const content = diff.querySelector('.content') diff.classList.add('render-markdown') content.innerHTML = marked(content.innerHTML); } }) </script> </body> </html>
+ + + + + + + + + + + + + + + + + + +
diff --git a/header.html b/header.html new file mode 100644 index 0000000..b797a93 --- /dev/null +++ b/header.html
@@ -0,0 +1,140 @@
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="preconnect" href="https://fonts.gstatic.com" /> <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,600;1,300&display=swap" rel="stylesheet" /> <style> body, .content, .bold { color: #262626; } .paren, .removed, .pink { color: #ff92d1; } hr { background: #e2e4e8; } .gray, .grey, .meta, .accents { color: #e2e4e8; } pre, code { background: #e2e4e8; } .added { color: #90ca96; } .cyan { color: #9bedfd; } .purple, a { color: #c69af4; } .lightPurple, a:visited, .at { color: #dbc5f8; } .bold, .at, a { font-weight: bold; } html, body, pre { margin: 0; padding: 0; font-family: "Roboto Mono", monaco, monospace; line-height: 1.35; max-width: 700px; } h1, h2, h3, h4, h5, h6, p { font-size: inherit; margin: 1.65em 0; } body { padding: 2em; } hr { border: none; height: 2px; } .meta, .content, .accents, .at { white-space: pre; } .content-with-accents { position: relative; padding-left: 1.25em; margin-top: 0; } .render-markdown{ padding-top: 1.25em; } .render-markdown .content { white-space: normal; } .render-markdown .accents .added{ display: none; } .render-markdown .content-with-accents { background-image: url( data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAArCAYAAACejGMxAAAMSGlDQ1BJQ0MgUHJvZmlsZQAASImVVwdYU8kWnltSSWiBCEgJvYnSq5QQWgQBqYKNkAQSSowJQcTOsqjg2kUE1BVdFXHRtQCyVtS1Loq9PxRRWVkXCzZU3qTAuvq997538s29f86c85+SuTczAOjU8qTSPFQXgHxJgSwhMpQ1MS2dReoGCPzoAUfgzePLpez4+BgAZej+T3lzHdpCueKi5Pp2/r+KnkAo5wOAxEOcKZDz8yHeDwBeypfKCgAg+kK99cwCqRJPhthABhOEWKrE2WpcqsSZalylsklK4EC8CwAyjceTZQOg3QL1rEJ+NuTRvgmxq0QglgCgQ4Y4iC/iCSCOgnhUfv50JYZ2wCHzC57sf3BmDnPyeNnDWF2LSshhYrk0jzfr/2zH/5b8PMVQDDs4aCJZVIKyZti3m7nTo5WYBnGvJDM2DmJ9iN+JBSp7iFGqSBGVrLZHTflyDuwZYELsKuCFRUNsCnGEJC82RqPPzBJHcCGGKwQtEhdwkzS+i4Xy8EQNZ61sekLcEM6Scdga30aeTBVXaX9SkZvM1vDfFAm5Q/yvi0VJqeqcMWqhOCUWYm2ImfLcxGi1DWZTLOLEDtnIFAnK/G0g9hdKIkPV/NjULFlEgsZeli8fqhdbLBJzYzW4ukCUFKXh2cXnqfI3grhFKGEnD/EI5RNjhmoRCMPC1bVjl4SSZE29WKe0IDRB4/tSmhevscepwrxIpd4KYlN5YaLGFw8qgAtSzY/HSgvik9R54pk5vHHx6nzwIhADOCAMsIACjkwwHeQAcXtvcy/8pp6JADwgA9lACFw0miGPVNW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UMwwxdvmPBz8DOwMbMy8LLzYupEEmHEV7IhqcPLxOsSvDqRJEcNQQoMKHM0TEbDBDMEMEVG08lomGCGAKbIMEsnAE0kLdgqs++TAAAAAElFTkSuQmCC ); background-size: 9px; background-repeat: repeat-y; background-position: 0 8px; margin-top: 1em; white-space: normal; } pre, code { padding: 0.5em; font: inherit; } code { padding: 0em 0.5em; } pre code { padding: 0.5em; background: none; } pre.log{ background: none; } .accents { position: absolute; top: 0; left: 0; } .content .meta { padding-right: 0.5em; display: inline-block; position: relative; } .content.meta:after { content: "+"; position: absolute; display: block; } </style> </head> <body>
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/index.html b/index.html deleted file mode 100644 index 6ee0f57..0000000 --- a/index.html +++ /dev/null
@@ -1,31 +0,0 @@
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Jesse Shawl github https://github.com/jshawl twitter https://twitter.com/jshawl email jesse@jesse.sh keybase https://keybase.io/jshawl pgp A346C0ACC01F8D7956D2F659322BEC391E7E8752 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEo0bArMAfjXlW0vZZMivsOR5+h1IFAmAIzdgACgkQMivsOR5+ h1J7dg/+IQpUsXWxh917rKHjg32hGS19wO9naqdscGEfdBLFDKFN+jEYulHbkOvE PZ9CgzcxD81aBNqgKYxOEwAHmwPXk4lg4ZffFmWgjN8dzLxaGsvCCrjib7ZvQyjh +XoE0AnEi4LUbvYc+6rsSdxe9+wiDyORSu/ZsnWIqMjyG5MNpIGNHO6QD1eV3Elt 8Rk9vbr415v3595zFTu/lMs12JIKnq4b0p5GbHMu+MOY5qdKq+B+UkLjiFJbq+Y1 aKNv/2O5PfKaGdwvVb7da3w9qq7ds9q3Nq15emRuOAlXUGKlfCK2/H7mx99htSaR bOpe//QF+deKYSQQbtJ1Hp/1ZRkiK8eSBv19TLFBU3X1jrXFPjgRs1M6zx4bdFDt xhnRzmMjGWarlQ2I5PI98bA0rPltDMGgACfIskho9lDND+oyqdPIp9d6xqC45igU Y6keJJj7p7McjW11gHRqioJ71PPffBGjKlhEciDzI3snupVdwZSOE00XfY1IHrnv kYp1uOcg9WYqUfc7bYcQVrKzmH3+E+pBGBUUavESWaWLT+MHJ/eA/OiR1wvVkPRh o5aaV6MXdEl+N5p4YRx7hjw2+zsMB76pVlnrtC4zJEKtKR54Z2S23wJ6w2kmF0OA D+TGPYJIQQF+3BsIjNHgGpo41cl0K2srZ7ki58rIzhveCAtnZNo= =hbSQ -----END PGP SIGNATURE-----
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..259f69e --- /dev/null +++ b/package-lock.json
@@ -0,0 +1,4733 @@

Skipping large diff.

diff --git a/package.json b/package.json new file mode 100644 index 0000000..74f8343 --- /dev/null +++ b/package.json
@@ -0,0 +1,15 @@
{ "name": "jesse.sh", "version": "1.0.0", "description": "", "scripts": { "build": "bin/build", "test": "jest", "deploy": "rm dist/*.html && npm run build && scp dist/* static:/var/www/jesse.sh/awl/" }, "author": "", "license": "ISC", "devDependencies": { "jest": "^26.6.3" } }
+ + + + + + + + + + + + + + +
diff --git a/src/diff-parser.js b/src/diff-parser.js new file mode 100644 index 0000000..6c5cd5e --- /dev/null +++ b/src/diff-parser.js
@@ -0,0 +1,65 @@
const Diff = (text) => { let [header, ...body] = text.split(/diff \-\-git/) body = body.map(el => "
+ + + +
diff --git" + el) + + const message = header.split("\n").slice(-3,-2)[0].trim() + header = header.split("\n").slice(0,3).join("\n") + const diffs = body.map(b => { + let [meta, location, content] = b.split(/(
@@.*@@
/) content = content || "" content = content.split("\n").map(line => [line[0],line.slice(1)]) || [] return { meta, location, content } }) return { commit: { header, message, diffs } } } Diff.toHTML = (diff) => { const mappings = { " ": "existing", "+": "added", "-": "removed" } const diffs = diff.commit.diffs.map(d => { const accent = c => `<span class='${mappings[c[0]] || ""}'>${c[0] || ""}</span>` let accents = d.content.map(accent).join('\n') let content = d.content.map(d => d[1].replace(/</g,'<').replace("\n",'')).join('\n') if(content.length > 100000){ content = `<p>Skipping large diff.</p>` accents = `` } return ` <div class='diff'> <div class='meta'>${d.meta}</div> <div class='at'>${d.location}</div> <div class='content-with-accents'> <div class='content'>${content} </div> <div class='accents'>${accents}</div> </div> </div> ` }).join('\n') return `<div class='meta'>${diff.commit.header}</div><div class='content'> ${diff.commit.message} </div>${diffs}` } module.exports = Diff
) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/diff-parser.test.js b/src/diff-parser.test.js new file mode 100644 index 0000000..f5770c9 --- /dev/null +++ b/src/diff-parser.test.js
@@ -0,0 +1,13 @@
const diff = require("./diff-parser") const fs = require("fs") const text = fs.readFileSync('./src/diff.txt','utf-8') describe("diff", () => { const d = diff(text) it("is has a commit message", () => { expect(d.commit.message).toBe("commit message here") }) it("'s commit has diffs", () => { expect(d.commit.diffs.length).toBe(5) }) })
+ + + + + + + + + + + + +
diff --git a/src/diff.txt b/src/diff.txt new file mode 100644 index 0000000..032eee3 --- /dev/null +++ b/src/diff.txt
@@ -0,0 +1,65 @@
commit d956ffaa6987c15463fa245b581153ebddb40aff Author: Jesse Shawl <jesse@jshawl.com> Date: Wed Jan 4 06:07:12 2017 -0500 commit message here
+ + + + + + +
diff --git a/_is-all-about/index.md b/_is-all-about/index.md +index 8ab9b22..cff3f23 100644 +--- a/_is-all-about/index.md ++++ b/_is-all-about/index.md +
@@ -8,6 +8,5 @@
existing content - removed content + added content existing content
+ + + + +
diff --git a/_layouts/default.html b/_layouts/default.html +index 9262c36..aeaea31 100644 +--- a/_layouts/default.html ++++ b/_layouts/default.html +
@@ -39,28 +39,8 @@
<div class="right">JSHAWL(1)</div> <a class="site-title logo" href="/"> </a> </div> -<a href='https://updog.co/pricing?utm_source=jesse.sh&utm_medium=banner&utm_campaign=launch' class="updog-promo"> - <div class="logo"></div> - <h1>UpDog's gone pro!</h1> - <span>Upgrade now for unlimited sites, markdown rendering, and <span>more</span>!</span> -</a> {{ content }} </section> - -<script type="text/javascript"> - var _gauges = _gauges || []; - (function() { - })(); -</script> -<script src='https://tallies.co/track/5777d53f2e2031075a886fdd'></script> <script src='/js/app.js'></script> </body>
+ + + + + + + + + + + + + + + + + + + + +
diff --git a/_posts/2017-01-04-caching-api-calls.md b/_posts/2017-01-04-caching-api-calls.md +new file mode 100644 +index 0000000..d9cba4e +--- /dev/null ++++ b/_posts/2017-01-04-caching-api-calls.md +
@@ -0,0 +1,73 @@
+--- +layout: post +The caching code in total is available [on GitHub](https://github.com/jshawl/updog/blob/0a829523544ed3db32d036c9bbd7ea5ce2694a21/app/models/site.rb#L73-L78)
+ + + +
diff --git a/img/me.jpg b/img/me.jpg +index 1ddfbcf..4338870 100644 +Binary files a/img/me.jpg and b/img/me.jpg differ +
undefined
diff --git a/index.html b/index.html +index 24d84b0..595dd5f 100644 +--- a/index.html ++++ b/index.html +
@@ -5,7 +5,7 @@
title: "Blog" <h2>Name</h2> - <p><strong>Jesse Shawl</strong> -- Web Development Immersive Instructor at General Assembly</p> + <p><strong>Jesse Shawl</strong> -- Sophomore developer working on <a href='https://updog.co/'>updog.co</a></p> <h2>Options</h2> <nav> <a href="mailto:jesse@jshawl.com">[jesse@jshawl.com]</a>
+ + + + + + + +
diff --git a/src/log-parser.js b/src/log-parser.js new file mode 100644 index 0000000..9149ea8 --- /dev/null +++ b/src/log-parser.js
@@ -0,0 +1,33 @@
const LogParser = (text) => { const lines = text.split("\n") return lines.map(line => { const matches = line.match(/\* ([a-z0-9]{7}) ?\(?([a-zA-Z0-9\->, \/]+)\)? ?([0-9]{4}\-[0-9]{2}\-[0-9]{2})/) // console.log(matches) const sha = matches && matches[1] let branches = matches && matches[2] const date = matches && matches[3] if(sha) line = line.replace(sha, `<a href='${sha}.html'>${sha}</a>`) if(branches){ let branchnames = branches.split(", ").map(branchName => { if(branchName.match("HEAD ->")) return `<span class='cyan'>HEAD -></span><span class='added'>${branchName.replace(/HEAD \->/,'')}</span>` return `<span class='added'>${branchName}</span>` }) line = line.replace(/\(/,'<span class="paren">(</span>') line = line.replace(/\)/,'<span class="paren">)</span>') line = line.replace(branches, `<span class='added'>${branchnames.join(', ')}</span>`) } if(date) line = line.replace(date,`<span class='meta'>${date}</span>`) return line // console.log('matches', matches) // if(matches && matches[2]){ // const branches = matches[2].split(", ") // console.log('branches', branches) // } }).join("\n") } module.exports = LogParser
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
diff --git a/src/log-parser.text.js b/src/log-parser.text.js new file mode 100644 index 0000000..550389e --- /dev/null +++ b/src/log-parser.text.js
@@ -0,0 +1,13 @@
const branchURL = (name) => { return `https://` } const p = LogParser(`* 7246adb (origin/main, main) 2021-01-21 | home * 5abbd2b (HEAD -> improvements) 2021-01-21 | how i made this * 0841ee7 2021-01-20 initial commit`) // console.log(p)
+ + + + + + + + + + + + +


* 8c875b3 (posts) 2021-01-23 
|  npm pack
| * 1239bb5 (HEAD -> build) 2021-01-20 
|/   src files
* d9a30b3 (main) 2021-01-21 
   home