summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--scraper/builder.py11
-rw-r--r--site/content/about/index.txt10
-rw-r--r--site/content/blog/2018-12-01-intro/index.txt15
-rw-r--r--site/content/blog/2018-12-02-second-blog-post/index.txt54
-rw-r--r--site/content/blog/2018-12-02-second-blog-post/vision.pngbin0 -> 276521 bytes
-rw-r--r--site/content/blog/2018-12-02-second-blog-post/wideimage.jpgbin0 -> 71949 bytes
-rw-r--r--site/templates/about.html (renamed from templates/about.html)0
-rw-r--r--site/templates/layout.html (renamed from templates/layout.html)4
-rw-r--r--site/templates/paper.html (renamed from templates/paper.html)0
-rw-r--r--site/templates/terms.html (renamed from templates/terms.html)0
11 files changed, 92 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index 8d561042..d08c0f58 100644
--- a/.gitignore
+++ b/.gitignore
@@ -123,9 +123,6 @@ venv.bak/
# Rope project settings
.ropeproject
-# mkdocs documentation
-/site
-
# mypy
.mypy_cache/
diff --git a/scraper/builder.py b/scraper/builder.py
index be8c35f8..f962cade 100644
--- a/scraper/builder.py
+++ b/scraper/builder.py
@@ -1,7 +1,16 @@
#!/usr/bin/python
+import glob
from jinja2 import Environment, PackageLoader, select_autoescape
+
env = Environment(
- loader=FileSystemLoader('../templates'),
+ loader=FileSystemLoader('../site/templates'),
autoescape=select_autoescape(['html', 'xml'])
)
+
+def build_file(fn):
+ print(fn)
+
+def build_site():
+ for fn in glob.glob("../content/**/index.txt", recursive=True):
+ build_file(fn) \ No newline at end of file
diff --git a/site/content/about/index.txt b/site/content/about/index.txt
new file mode 100644
index 00000000..e936d4e1
--- /dev/null
+++ b/site/content/about/index.txt
@@ -0,0 +1,10 @@
+# About
+
+## The darkside of datasets
+
+MegaPixels is a project about the darkside of datasets. It's an exploration of what happens when you post photos online, and how they are used.
+
+In an era of exuberant data collection and analysis, social media has become the superfood of Artificial Intelligence. But what about the creators and individuals behind the data? What about their stories?
+
+During the last 20 yers etc
+
diff --git a/site/content/blog/2018-12-01-intro/index.txt b/site/content/blog/2018-12-01-intro/index.txt
new file mode 100644
index 00000000..e3dff38f
--- /dev/null
+++ b/site/content/blog/2018-12-01-intro/index.txt
@@ -0,0 +1,15 @@
+Title: Welcome to the blog!
+Author: Adam Harvey
+Date: 2018-12-01
+
+Welcome to the blog!
+
+Lorem ipsum dolor sit amet is more than just dummy test. It is a way of experiencing the world, an exciting clue to the mystery of being. A key to pondering its weighty thesis - that no one desires pain, but might undergo something painful for greater benefit - has been a key to understanding the nature of humanity since Cicero spoke those words thousands of years ago. And the world keeps on spinning like a top, folks, and we all keep going round on this crazy adventure called life.
+
+Let me tell you a secret - privacy is contagious! Don't believe me? Get up and look away from the computer right now. Do it! Walk outside! Are you still reading this? No, seriously go outside, and await further instructions!
+
+Are they gone? Let's wait another minute until we can be sure the reader is gone and it's just me here, writing for my own benefit. Whew, deep breath - not! These words really do exist in a vacuum. I literally have my eyes closed right now.
+
+Dummy text? Generation 2.0 deserves better! We will not accept the flaccid filler text of yesteryear, no, we want it all, custom bespoke dummy text, hand-crafted with love and some good old fashioned ingenuity. Don't believe me? Get up right now from your chair and go outside. I'll wait. Ok. Are they gone? Good ok now that it's definitely just us, let me let you in on a little secret. Shh, promise not to tell?
+
+The secret can be found in the next blog post.
diff --git a/site/content/blog/2018-12-02-second-blog-post/index.txt b/site/content/blog/2018-12-02-second-blog-post/index.txt
new file mode 100644
index 00000000..c17e9cd0
--- /dev/null
+++ b/site/content/blog/2018-12-02-second-blog-post/index.txt
@@ -0,0 +1,54 @@
+Title: Second post!
+Author: Adam Harvey
+Date: 2018-12-02
+
+# H1
+## H2
+### H3
+#### H4
+
+I declare a thumb war. Ha!
+
+Let's get one thing straight. [I'm an inline-style link](https://www.google.com). URLs and URLs in angle brackets will automatically get turned into links. http://www.example.com or <http://www.example.com> and sometimes example.com. We have links, but can we break the chain?
+
+Face it. Time to face facts. Look. I'm not going to say this more than once, so listen up. Listen up. Get real. Get ready. This isn't going to be easy. This isn't going to be the easiest **bold text** _italic text_ ~~strikethrough~~
+
+1. Potato
+2. Potato
+ * Un-related sub-potato
+3. Potato
+4. Potato
+
+```
+print("blah")
+print "i'm a python 2 style print statement"
+i<span class="color: red">'m a syntax error</span>
+```
+
+![hmf](vision.png "Computer vision at its finest, folks!")
+![blah](vision.png "This image has been repeated twice but it shouldn't MATTER!")
+
+## Hell Yeah
+
+| Tables | Are | Cool |
+| ------------- |:-------------:| -----:|
+| col 3 is | right-aligned | $1600 |
+| col 2 is | centered | $12 |
+| zebra stripes | are neat | $1 |
+
+> Blockquotes are very handy in email to emulate reply text.
+> This line is part of the same quote.
+
+Quote break.
+
+> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can _put_ **Markdown** into a blockquote. Now no reason to get **swervy** when your *orange* attitude is what's making the text _wrap_.
+
+<div class="test">And did I mention contain HTML??!!!</div>
+
+<script type="text/javascript">document.querySelector('.test').style.backgroundColor = 'red'</script>
+
+---
+
+That's it!
+
+![wide](wideimage.jpg "This image should be wide. I mean REALLY wide. Picture somebody who drives a pickup truck and who purposefully parks it to take up two or even three spaces. They're coming out of the Costco now with a whole lotta paper towels and mustard on a giant pallet. Power tools deluxe, fasteners, drywall, everything you need to build a shed.")
diff --git a/site/content/blog/2018-12-02-second-blog-post/vision.png b/site/content/blog/2018-12-02-second-blog-post/vision.png
new file mode 100644
index 00000000..d266cb43
--- /dev/null
+++ b/site/content/blog/2018-12-02-second-blog-post/vision.png
Binary files differ
diff --git a/site/content/blog/2018-12-02-second-blog-post/wideimage.jpg b/site/content/blog/2018-12-02-second-blog-post/wideimage.jpg
new file mode 100644
index 00000000..f337f337
--- /dev/null
+++ b/site/content/blog/2018-12-02-second-blog-post/wideimage.jpg
Binary files differ
diff --git a/templates/about.html b/site/templates/about.html
index 6699bd0f..6699bd0f 100644
--- a/templates/about.html
+++ b/site/templates/about.html
diff --git a/templates/layout.html b/site/templates/layout.html
index 67502257..c38948ef 100644
--- a/templates/layout.html
+++ b/site/templates/layout.html
@@ -18,7 +18,9 @@
<a href="/about">About</a>
</div>
</header>
- {% block content %}{% endblock %}
+ <div class="content">
+ {% block content %}{% endblock %}
+ </div>
<footer>
<a href="/about">How to use MegaPixels</a>
<a href="/pages/terms">Terms of Use & Privacy</a>
diff --git a/templates/paper.html b/site/templates/paper.html
index 6699bd0f..6699bd0f 100644
--- a/templates/paper.html
+++ b/site/templates/paper.html
diff --git a/templates/terms.html b/site/templates/terms.html
index 6699bd0f..6699bd0f 100644
--- a/templates/terms.html
+++ b/site/templates/terms.html