QuiltingRoom - quilt.QuiltingRoom
/Users/timothydavenport/GitHub/quilt/quilt
Main module to quilt a static site by stitching html page together
source
to users directory containing the appropriate files (default output is quilted_
+ source
)config.json
and override default configurationquilt.html
patches/
pages/
, templates/
, and assets/
directoriesposts/
exists and configured to build a blog create [Blog
object]{#Blog}assets/
to outputfavicon.ico
+css
files into one +js
files into one +Quilter
object]{#Quilter}Blog
objectatom
feed and/or rss
feedindex.html
robot.txt
search.json
, a word to url index for typeahead
sitemap.xml
project : quilt
version : 0.1.1
status : development
modifydate : 2015-05-13 07:09:00 -0700
createdate : 2015-04-28 06:02:00 -0700
website : https://github.com/tmthydvnprt/quilt
author : tmthydvnprt
email : tmthydvnprt@users.noreply.github.com
maintainer : tmthydvnprt
license : MIT
copyright : Copyright 2015, quilt
credits :
PIL, bs4, copy, datetime, fnmatch, glob, hashlib, json, os, pickle, quilt, shutil, subprocess, time
builtin.object
QuiltingRoom
description§
the quilting room
descriptors§
spellcheck
spell check all html filesspellcheck
spell check all html filesmethods§
def analyze_posts(self'):
analyze all pages under posts/ and save needed info
def build_assets(self'):
copy, combine, and minimize assets (all configurable)
def build_word_dictionary(self'):
build correct word dictionary for project
def combine_source(self, sources=None, source_name='''):
combine css or js source files
def copy_asset_directory(self'):
copy the whole asset directory over to the output directory
def create_favicon_versions(self'):
create multiple image versions of icon
def generate_index(self'):
search for directories without index.html
def generate_robot(self'):
generate robot.txt in root
def generate_search(self'):
create reverse word index
def generate_sitemap(self'):
generates a sitemap for site
def get_output_files(self, match='''):
go thru and find output files
def ouput_path(self, filepath='', replacement='''):
get the output directory equivalent
def quilt(self'):
quilt the site
def quilt_pages(self, pages, post_data=None'):
loop through pages and quilt them
def replace_or_minimize_assets(self, soup=None, sources=None, source_name='''):
replace assets with combined assets and minimize inline assets
def spellcheck(self'):
spell check all html files
ASSETCOMMENT
/*! * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * asset %s combined on %s * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
BODY_STRAINER
body|{}
CSS_EXT_RE
\.css$
DEFAULT_CONFIG
{'copyrighter': 'you', 'buildicon': True, 'atomid': 'randomid', 'keywords': [], 'git': '', 'spellcheck': True, 'patches': 'patches', 'title': 'some default title', 'quiltcomment': True, 'combinecss': True, 'priority': '0.5', 'pageobject': True, 'local': False, 'correctwords': 'correct_words.txt', 'copydate': 2016, 'vendorfycss': True, 'iconsizes': [64, 60, 76, 120, 152], 'assets': 'assets', 'categories': [], 'spellignore': ['maths', 'codehilite'], 'name': 'some name', 'posts': 'posts', 'copymd': True, 'pagecomment': True, 'domain': 'some_name.com', 'page_ext': ['*.html', '*.md'], 'quilt': 'quilt.html', 'patchcomment': True, 'blogsubtitle': 'a blogy blog', 'minimizecss': True, 'images': 'imgs', 'asset_ext': ['*'], 'buildsearch': True, 'author': 'you', 'buildatom': True, 'blogtitle': 'some blog', 'emptywarning': False, 'buildrobot': True, 'iconfile': 'icon.png', 'assetcomment': True, 'email': 'you@some_name.com', 'templates': 'templates', 'patch_ext': ['*.html'], 'buildrss': True, 'description': 'default description', 'tags': [], 'template_ext': ['*.html'], 'combinejs': True, 'rssid': 'randomid', 'changefreq': 'monthly', 'pages': 'pages', 'buildindex': True, 'buildsitemap': True, 'minimizejs': True, 'buildblog': True}
GIT_BRANCH_CMD
git -C {} rev-parse --abbrev-ref HEAD
GIT_HASH_CMD
git -C {} rev-parse HEAD
HEAD_STRAINER
head|{}
NO_NEW_POSTS
There are no newer posts
NO_OLD_POSTS
There are no earlier posts
QUILTHEADER
,,,,,,, quilt %s ;#~#~#; source : %s ;~#~#~; branch : %s ;#~#~#; hash : %s ''''''' time : %s
ROBOTTXT
# Sitemap location Sitemap: %s/sitemap.xml # Allow crawling of all content User-agent: * Disallow:
ROOT_LEVEL_JS_EXT_RE
not foundjs/.*\.js$
SITEMAP
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> %s </urlset>
SITEMAPINDEX
<?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>%s</loc> <lastmod>%s</lastmod> </sitemap> <sitemap> </sitemapindex>
SITEMAPURL
<url> <loc>%s</loc> <lastmod>%s</lastmod> <changefreq>%s</changefreq> <priority>%s</priority> </url>
SITEMAP_IGNORE
set(['sitemapindex.xml', 'sourcehash.pkl', 'sitemap.xml'])