NAME§

QuiltingRoom - quilt.QuiltingRoom

FILE§

/Users/timothydavenport/GitHub/quilt/quilt

DESCRIPTION§

Main module to quilt a static site by stitching html page together

  1. set source to users directory containing the appropriate files (default output is quilted_ + source)
  2. read config.json and override default configuration
  3. load quilt file at quilt.html
  4. load all patch files in patches/
  5. locate pages/, templates/, and assets/ directories
  6. if posts/ exists and configured to build a blog create [Blog object]{#Blog}
  7. build assets by (+ = optional):
    1. copy assets/ to output
    2. creating favicon.ico +
    3. combine all css files into one +
      • auto add vendor prefix +
      • minimize each file +
    4. combine all js files into one +
      • minimize each file +
  8. go thru pages and stitch together with [Quilter object]{#Quilter}
    • if post append page data to Blog object
  9. add blog Home, Tag and Category pages
  10. generate atom feed and/or rss feed
  11. fill directories without index.html
  12. add robot.txt
  13. generate search.json, a word to url index for typeahead
  14. generate 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 :

MODULES§

PIL, bs4, copy, datetime, fnmatch, glob, hashlib, json, os, pickle, quilt, shutil, subprocess, time

CLASSES§

builtin.object
QuiltingRoom

class QuiltingRoom§

description§


the quilting room

descriptors§


spellcheck
spell check all html files

spellcheck
spell check all html files

methods§


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

DATA§

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'])
markdown