Send to Kindle

Sharing what I make & use: Code that runs this web site

In the spirit of sharing what I make and use 3, I have just made the source code that runs this web site available on github 4.

Why did I write the code just to run this web site? Let me explain.

I have three activities that I do daily. Reading, doing (or making), and documenting. I read to acquire knowledge necessary for my projects. I quickly prototype my idea. And I write or take pictures or record videos to share what I learned from the projects. I want to be efficient in them.

I've already written about the tools I use to record what I read and share 5, so this post is about the tool to write (document) and share: This web site. I wrote some code on top of Django 6 platform so that I can easily achieve these three goals:

  1. Write with my favorite editor instead of having to open a web browser and connect to the server.
  2. Use simple text instead of cumbersome HTML.
  3. Yet, I want to be expressive in presenting the works and thoughts.

The first two goals are very important in order to focus on what I am writing. If I have to wait for the browser to load the blog editor, my thought process is disrupted. Worse yet, I'd have to rewrite everything if something goes wrong in posting the draft. Thinking of the layout of the page is also a distraction when I write the body of the text. If I have to keep inserting HTML tags as I write, I cannot focus on the body of the text I am writing. But I do not want to come back to the draft just to edit the heading and so on.

The third goal is also very important to me. I like using photographs and even video sometimes to explain what I do, and express my thoughts and feelings. When I have a beautiful picture, I want to present it effectively. The layout of the page should optimize for what I write.

The code is written to achieve those three goals, and here are the features I created:

  1. Write in your favorite editor.

    Create and edit posts with your favorite text editor, and post them with a single command, rather than opening a web browser:

    python some-article.txt
  2. Use markdown 1 instead of cumbersome HTML.

    Draft written in Markdown is more legible than HTML, and produces cleaner HTMLs than wysiwyg HTML editors 2.

  3. Beafutiful preset layouts are just one keyword away.

    Like cover photo or carousel layouts? This can be done just adding a keyword "coverphoto" or "carousel" (or both if you want to be greedy)

Although the code is still primitive, and certainly not for a scaling web service, I am happy with what I've achieved so far. The program can be deployed at free of cost hosted at Heroku. The installation is probably nothing for a programmer, but it's probably too much for everybody else. So, the target audience is a little on tech people side. 7

I am thinking to make this website or my other project website 8 a hub for my personal data stock and flow. Posting the blog (or data about my thoughts) is already done through Application Programming Interface. I want to push out more data around my life automatically by extending this API. But the details on the plan is saved for more blog posts in the future.

  1. Markdown - Wikipedia, the free encyclopedia 

  2. WYSIWYG - Wikipedia, the free encyclopedia 

  3. On sharing, Creative Commons, and open source | Daigo Tanaka 

  4. daigotanaka/kawaraban on github 

  5. The tools I use for reading and sharing | Daigo Tanaka 

  6. The Web framework for perfectionists with deadlines | Django 

  7. I realized it when I took time to write a README file for the github repository. I wrote a bare minimum instruction, and realized how many steps one has to take to make the web site up and running. Writing an introduction also made me re-organize the thought behind the reason I coded from the first place. The goals and benefits I described in this post weren't that clear when I coded the first line. Any researches and projects evolve like this no matter how organized the final presentations are. 

  8. Daigo lab 

Original post: April 20, 2014 | Last updated: Nov. 25, 2014

Previous: On sharing, Creative Commons, and open source
Next: Me as a data bee
Read more

comments powered by Disqus