This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
sphinx.builders.mobi | |
~~~~~~~~~~~~~~~~~~~~ | |
Build mobi files. | |
Originally derived from epub.py. | |
:copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. | |
:license: BSD, see LICENSE for details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% pages = sitemap.resources.find_all{|p| p.source_file.match(/\.html/) } %> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> | |
<% pages.each do |p| %> | |
<url> | |
<loc>http://youdomain.com/<%=p.destination_path.gsub('/index.html','')%></loc> | |
<priority>0.7</priority> | |
</url> | |
<% end %> | |
</urlset> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shutil | |
from sphinx.builders.epub import EpubBuilder | |
# We subclass EpubBuilder and re-define build_epub to call | |
# clean_html_file_for_ibooks. This function replaces all instances of | |
# the SPAN tag to SAMP. It's uglish but it works. A better way would | |
# be to change sphinx.writers.html to emmit the SAMP tag in the first | |
# place, but it seems even more difficult to do. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# -*- ruby -*- | |
# This is a fully-functional set of donkey patches that will break | |
# Ruby so badly that it makes all of the Ruby Koans pass right out of | |
# the box. ALl you need to do is patch edgecase.rb with this line: | |
# | |
# require File.expand_path(File.dirname(__FILE__) + '/donkey_patches') | |
# | |
# so it's the first line of the file. Then save this file as |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Two ENV variables control the 'gem' command: | |
# | |
# GEM_HOME: the single path to a gem dir where gems are installed | |
# GEM_PATH: a standard PATH to gem dirs where gems are found | |
# | |
# A gem directory is a directory that holds gems. The 'gem' command will lay | |
# out and utilize the following structure: | |
# | |
# bin # installed bin scripts | |
# cache # .gem files ex: cache/gem_name.gem |
NewerOlder