Please install the following tools:
We will use Medium.com clone called Conduit to test API during workshop. If you want to practice on your machine, please do the following steps.
1. В настройках поста нужно поменять timestamp, как показано на рисунке: http://cl.ly/image/0c0Y1c2t3s1k | |
Файлы у меня называются по маске год-месяц-день.md (Пример: 2012-08-26.md). | |
2. После <data:post.body/> вставил конструкцию: | |
<div style='text-align:center; margin-bottom: 10px;'><a class='button icon edit' expr:href='"https://github.com/drakulavich/blogpost/blob/master/posts/" + data:post.dateHeader + ".md"'>Исправить статью</a></div> | |
data:post.dateHeader превращается в 2012-08-26 и ссылка ведёт, куда следует. Уличная магия. |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os, operator, sys | |
from glob import glob | |
from optparse import OptionParser | |
usage = "usage: %prog [options] path_to_directory" | |
parser = OptionParser(usage=usage) | |
parser.add_option("-s", "--size", type="int", dest="cdsize", default=700, |