Skip to content

Instantly share code, notes, and snippets.

View mmulich's full-sized avatar

Michael Mulich mmulich

View GitHub Profile
{'contents': [{'contents': [{'contents': [{'id': '[email protected]',
'title': 'Document One'}],
'id': 'subcol',
'title': u'Chapter One'},
{'contents': [{'id': '[email protected]',
'title': 'Document One (revised)'}],
'id': 'subcol',
'title': u'Chapter Two'}],
'id': 'subcol',
'title': u'Part One'},
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:epub="http://www.idpf.org/2007/ops"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:lrmi="http://lrmi.net/the-specification"
>
<head itemscope="itemscope"
itemtype="http://schema.org/Book"
>
[coyote]
# These queue to runner mappings (<queue_name>:<runner_name>) propulate the
# queues list to run through during runtime.
queue-mappings =
cnx_any_latex_completezip:completezip
[amqp]
host = localhost
port = 5672
@mmulich
mmulich / authoring-acceptance-plan.rst
Last active August 29, 2015 14:07
Plan for implementing role/license acceptance in authoring

Story Workflow

content creation auto acceptance:
  1. UI: 'arthur' creates content
  2. Authoring: object created & auto accepts role/license for 'arthur'
  3. Authoring: communication with publishing to set 'arthur' to accepted
adding a role to content:
  1. UI: 'arthur' adds 'smoo' to the content as both an editor and illustrator
@mmulich
mmulich / roles.sql
Last active August 29, 2015 14:09
authoring roles and acceptances database tables
create table roles(
id integer unique sequence,
document_id uuid,
role_type role_types, -- e.g. author, illustrator
user_id text, -- username as it appears in accounts
profile json, -- a copy of the user's profile json
has_accepted boolean,
requester text,
assignment_data timestamp with timezone default current_timestamp,
primary key (document_id, role_type, user_id),
@mmulich
mmulich / testcase.py
Last active August 29, 2015 14:09
Non-conflicting pyramid applications using wsgi_intercept
from pyramid.config import (
global_registries,
ApplicationCreated,
Configurator as BaseConfigurator,
)
from pyramid.threadlocal import (
defaults as threadlocal_defaults,
manager as actual_threadlocal_manager,
ThreadLocalManager,
)

/api/user.json before editing title:

{
id: 40620,
username: "MichaelMulich",
first_name: "Michael",
last_name: "Mulich",
full_name: "Michael Mulich"
# -*- coding: utf-8 -*-
"""\
Symbolically links a virtualenv's site-packages to
the globaly Python's user site-packages directory.
This should be run with the global Python.
"""
import os
import site
@mmulich
mmulich / steps.md
Last active August 29, 2015 14:18
osc install

Install basic packages

sudo apt-get update
sudo apt-get install emacs
sudo apt-get install git libxml2-dev libxslt-dev

Install rbenv

Phase One (codename: Cement Shoes)

This phase will involve setting up the foundation for transforms.

Tasks

  • Each dev should set up an instance of flower, which will help visualize/debug task processing.

  • Initialize Sphinx documentation for cnx-epub & cnx-transforms. Document the purpose and basic functionality of the two packages. Later you can document the parts you are working on and touching. Everything else can progressively be added over time.