pax_global_header 0000666 0000000 0000000 00000000064 12124317031 0014504 g ustar 00root root 0000000 0000000 52 comment=2255c5956ab51833f38bec5607df5ce8739fb7dd
slimit-0.8.1/ 0000775 0000000 0000000 00000000000 12124317031 0013013 5 ustar 00root root 0000000 0000000 slimit-0.8.1/.coveragerc 0000664 0000000 0000000 00000000214 12124317031 0015131 0 ustar 00root root 0000000 0000000 [report]
omit =
/Users/*/.buildout/eggs/*
/home/*/.buildout/eggs/*
parts/*
eggs/*
*/test*
*lextab.py
*yacctab.py slimit-0.8.1/.gitignore 0000664 0000000 0000000 00000000170 12124317031 0015001 0 ustar 00root root 0000000 0000000 *.pyc
*.pyo
.installed.cfg
.coverage
htmlcov
bin
build
develop-eggs
dist
downloads
eggs
htmlcov
parts
src/*.egg-info
var slimit-0.8.1/CHANGES 0000664 0000000 0000000 00000006150 12124317031 0014010 0 ustar 00root root 0000000 0000000 Change History
==============
0.8.1 (2013-03-26)
------------------
- Bug fix: https://github.com/rspivak/slimit/pull/45
Fix syntax error in the output of for statement with some form of expressions
0.8.0 (2013-03-23)
------------------
- Python 3.x support
- Bug fix: https://github.com/rspivak/slimit/issues/42
slimit removes parentheses from ternary expression, causes syntax error in jQuery
- Bug fix: https://github.com/rspivak/slimit/issues/37
simple identifier in FOR init
- Bug fix: https://github.com/rspivak/slimit/issues/36
using $ for mangled function names conflicts with jQuery
0.7.4 (2012-06-5)
------------------
- Bug fix: https://github.com/rspivak/slimit/issues/34
'class' is reserved keyword now
0.7.3 (2012-05-21)
------------------
- Bug fix (unary op in FOR init): https://github.com/rspivak/slimit/pull/33
0.7.2 (2012-05-17)
------------------
- Added support for get/set properties:
https://github.com/rspivak/slimit/issues/32
0.7.1 (2012-05-10)
------------------
- Function call support in FOR init section:
https://github.com/rspivak/slimit/pull/31
0.7 (2012-04-16)
----------------
- Multiline string support: https://github.com/rspivak/slimit/issues/24
0.6.2 (2012-04-07)
------------------
- Bug fix: https://github.com/rspivak/slimit/issues/29
- Bug fix: https://github.com/rspivak/slimit/issues/28
0.6.1 (2012-03-15)
------------------
- Added command-line option *-t/--mangle-toplevel* to turn on
global scope name mangling. As of this version it's off by
default: https://github.com/rspivak/slimit/issues/27
- Removed dependency on a 'distribute' package
- Bug fix: https://github.com/rspivak/slimit/issues/26
- Bug fix: https://github.com/rspivak/slimit/issues/25
0.6 (2012-02-04)
----------------
- Added optimization: foo["bar"] ==> foo.bar
- Added base class for custom AST node visitors
- Documentation updates
- Bug fix: https://github.com/rspivak/slimit/issues/22
- Bug fix: https://github.com/rspivak/slimit/issues/21
0.5.5 (2011-10-05)
------------------
- Bugfix: https://github.com/rspivak/slimit/issues/7
0.5.4 (2011-10-01)
------------------
- Bugfix: https://github.com/rspivak/slimit/issues/6
Division with "this" fails
0.5.3 (2011-06-29)
------------------
- Bugfix: https://github.com/rspivak/slimit/issues/5
0.5.2 (2011-06-14)
------------------
- Bugfix: https://github.com/rspivak/slimit/issues/4
- Bugfix: https://github.com/rspivak/slimit/issues/3
0.5.1 (2011-06-06)
------------------
- Bugfix: https://github.com/rspivak/slimit/issues/2
0.5 (2011-06-06)
----------------
- Added name mangling
0.4 (2011-05-12)
----------------
- Minify more by removing block braces { }
- More tests
0.3.2 (2011-05-09)
------------------
- More hacks to use pre-generated lex and yacc tables when called from
the command line
0.3.1 (2011-05-09)
------------------
- Use pre-generated lex and yacc tables when called from the command line
0.3 (2011-05-09)
----------------
- Added minifier
0.2 (2011-05-07)
----------------
- Added a JavaScript parser
- Added pretty printer
- Added node visitor
0.1 (2011-05-02)
----------------
- Initial public version. It contains only a JavaScript lexer
slimit-0.8.1/CREDIT 0000664 0000000 0000000 00000001337 12124317031 0013714 0 ustar 00root root 0000000 0000000 Patches
-------
- Waldemar Kornewald
- Maurizio Sambati https://github.com/duilio
- Aron Griffis https://github.com/agriffis
- lelit https://github.com/lelit
- Dan McDougall https://github.com/liftoff
- harig https://github.com/harig
- Mike Taylor https://github.com/miketaylr
Bug reports
-----------
- Rui Pereira
- Dima Kozlov
- BadKnees https://github.com/BadKnees
- Waldemar Kornewald
- Michał Bartoszkiewicz https://github.com/embe
- Hasan Yasin Öztürk https://github.com/hasanyasin
- David K. Hess https://github.com/davidkhess
- Robert Cadena https://github.com/rcadena
- rivol https://github.com/rivol
- Maurizio Sambati https://github.com/duilio
- fdev31 https://github.com/fdev31
- edmellum https://github.com/edmellum slimit-0.8.1/LICENSE 0000664 0000000 0000000 00000002041 12124317031 0014015 0 ustar 00root root 0000000 0000000 Copyright (c) 2011 Ruslan Spivak
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
slimit-0.8.1/MANIFEST.in 0000664 0000000 0000000 00000000032 12124317031 0014544 0 ustar 00root root 0000000 0000000 include README.rst CHANGES slimit-0.8.1/README.rst 0000664 0000000 0000000 00000013577 12124317031 0014517 0 ustar 00root root 0000000 0000000 ::
_____ _ _____ __ __ _____ _______
/ ____| | |_ _| \/ |_ _|__ __|
| (___ | | | | | \ / | | | | |
\___ \| | | | | |\/| | | | | |
____) | |____ _| |_| | | |_| |_ | |
|_____/|______|_____|_| |_|_____| |_|
Welcome to SlimIt
==================================
`SlimIt` is a JavaScript minifier written in Python.
It compiles JavaScript into more compact code so that it downloads
and runs faster.
`SlimIt` also provides a library that includes a JavaScript parser,
lexer, pretty printer and a tree visitor.
`http://slimit.readthedocs.org/ `_
Installation
------------
::
$ [sudo] pip install slimit
Or the bleeding edge version from the git master branch:
::
$ [sudo] pip install git+https://github.com/rspivak/slimit.git#egg=slimit
There is also an official DEB package available at
`http://packages.debian.org/sid/slimit `_
Let's minify some code
----------------------
From the command line:
::
$ slimit -h
Usage: slimit [options] [input file]
If no input file is provided STDIN is used by default.
Minified JavaScript code is printed to STDOUT.
Options:
-h, --help show this help message and exit
-m, --mangle mangle names
-t, --mangle-toplevel
mangle top level scope (defaults to False)
$ cat test.js
var foo = function( obj ) {
for ( var name in obj ) {
return false;
}
return true;
};
$
$ slimit --mangle < test.js
var foo=function(a){for(var b in a)return false;return true;};
Or using library API:
>>> from slimit import minify
>>> text = """
... var foo = function( obj ) {
... for ( var name in obj ) {
... return false;
... }
... return true;
... };
... """
>>> print minify(text, mangle=True, mangle_toplevel=True)
var a=function(a){for(var b in a)return false;return true;};
Iterate over, modify a JavaScript AST and pretty print it
---------------------------------------------------------
>>> from slimit.parser import Parser
>>> from slimit.visitors import nodevisitor
>>> from slimit import ast
>>>
>>> parser = Parser()
>>> tree = parser.parse('for(var i=0; i<10; i++) {var x=5+i;}')
>>> for node in nodevisitor.visit(tree):
... if isinstance(node, ast.Identifier) and node.value == 'i':
... node.value = 'hello'
...
>>> print tree.to_ecma() # print awesome javascript :)
for (var hello = 0; hello < 10; hello++) {
var x = 5 + hello;
}
>>>
Writing custom node visitor
---------------------------
>>> from slimit.parser import Parser
>>> from slimit.visitors.nodevisitor import ASTVisitor
>>>
>>> text = """
... var x = {
... "key1": "value1",
... "key2": "value2"
... };
... """
>>>
>>> class MyVisitor(ASTVisitor):
... def visit_Object(self, node):
... """Visit object literal."""
... for prop in node:
... left, right = prop.left, prop.right
... print 'Property key=%s, value=%s' % (left.value, right.value)
... # visit all children in turn
... self.visit(prop)
...
>>>
>>> parser = Parser()
>>> tree = parser.parse(text)
>>> visitor = MyVisitor()
>>> visitor.visit(tree)
Property key="key1", value="value1"
Property key="key2", value="value2"
Using lexer in your project
---------------------------
>>> from slimit.lexer import Lexer
>>> lexer = Lexer()
>>> lexer.input('a = 1;')
>>> for token in lexer:
... print token
...
LexToken(ID,'a',1,0)
LexToken(EQ,'=',1,2)
LexToken(NUMBER,'1',1,4)
LexToken(SEMI,';',1,5)
You can get one token at a time using ``token`` method:
>>> lexer.input('a = 1;')
>>> while True:
... token = lexer.token()
... if not token:
... break
... print token
...
LexToken(ID,'a',1,0)
LexToken(EQ,'=',1,2)
LexToken(NUMBER,'1',1,4)
LexToken(SEMI,';',1,5)
`LexToken` instance has different attributes:
>>> lexer.input('a = 1;')
>>> token = lexer.token()
>>> token.type, token.value, token.lineno, token.lexpos
('ID', 'a', 1, 0)
Benchmarks
----------
**SAM** - JQuery size after minification in bytes (the smaller number the better)
+-------------------------------+------------+------------+------------+
| Original jQuery 1.6.1 (bytes) | SlimIt SAM | rJSmin SAM | jsmin SAM |
+===============================+============+============+============+
| 234,995 | 94,290 | 134,215 | 134,819 |
+-------------------------------+------------+------------+------------+
Roadmap
-------
- when doing name mangling handle cases with 'eval' and 'with'
- foo["bar"] ==> foo.bar
- consecutive declarations: var a = 10; var b = 20; ==> var a=10,b=20;
- reduce simple constant expressions if the result takes less space:
1 +2 * 3 ==> 7
- IF statement optimizations
1. if (foo) bar(); else baz(); ==> foo?bar():baz();
2. if (!foo) bar(); else baz(); ==> foo?baz():bar();
3. if (foo) bar(); ==> foo&&bar();
4. if (!foo) bar(); ==> foo||bar();
5. if (foo) return bar(); else return baz(); ==> return foo?bar():baz();
6. if (foo) return bar(); else something(); ==> {if(foo)return bar();something()}
- remove unreachable code that follows a return, throw, break or
continue statement, except function/variable declarations
- parsing speed improvements
Acknowledgments
---------------
- The lexer and parser are built with `PLY `_
- Several test cases and regexes from `jslex `_
- Some visitor ideas - `pycparser `_
- Many grammar rules are taken from `rkelly `_
- Name mangling and different optimization ideas - `UglifyJS `_
- ASI implementation was inspired by `pyjsparser `_
License
-------
The MIT License (MIT) slimit-0.8.1/bootstrap.py 0000664 0000000 0000000 00000024435 12124317031 0015412 0 ustar 00root root 0000000 0000000 ##############################################################################
#
# Copyright (c) 2006 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
"""Bootstrap a buildout-based project
Simply run this script in a directory containing a buildout.cfg.
The script accepts buildout command-line options, so you can
use the -c option to specify an alternate configuration file.
"""
import os, shutil, sys, tempfile, urllib, urllib2, subprocess
from optparse import OptionParser
if sys.platform == 'win32':
def quote(c):
if ' ' in c:
return '"%s"' % c # work around spawn lamosity on windows
else:
return c
else:
quote = str
# See zc.buildout.easy_install._has_broken_dash_S for motivation and comments.
stdout, stderr = subprocess.Popen(
[sys.executable, '-Sc',
'try:\n'
' import ConfigParser\n'
'except ImportError:\n'
' print 1\n'
'else:\n'
' print 0\n'],
stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate()
has_broken_dash_S = bool(int(stdout.strip()))
# In order to be more robust in the face of system Pythons, we want to
# run without site-packages loaded. This is somewhat tricky, in
# particular because Python 2.6's distutils imports site, so starting
# with the -S flag is not sufficient. However, we'll start with that:
if not has_broken_dash_S and 'site' in sys.modules:
# We will restart with python -S.
args = sys.argv[:]
args[0:0] = [sys.executable, '-S']
args = map(quote, args)
os.execv(sys.executable, args)
# Now we are running with -S. We'll get the clean sys.path, import site
# because distutils will do it later, and then reset the path and clean
# out any namespace packages from site-packages that might have been
# loaded by .pth files.
clean_path = sys.path[:]
import site # imported because of its side effects
sys.path[:] = clean_path
for k, v in sys.modules.items():
if k in ('setuptools', 'pkg_resources') or (
hasattr(v, '__path__') and
len(v.__path__) == 1 and
not os.path.exists(os.path.join(v.__path__[0], '__init__.py'))):
# This is a namespace package. Remove it.
sys.modules.pop(k)
is_jython = sys.platform.startswith('java')
setuptools_source = 'http://peak.telecommunity.com/dist/ez_setup.py'
distribute_source = 'http://python-distribute.org/distribute_setup.py'
# parsing arguments
def normalize_to_url(option, opt_str, value, parser):
if value:
if '://' not in value: # It doesn't smell like a URL.
value = 'file://%s' % (
urllib.pathname2url(
os.path.abspath(os.path.expanduser(value))),)
if opt_str == '--download-base' and not value.endswith('/'):
# Download base needs a trailing slash to make the world happy.
value += '/'
else:
value = None
name = opt_str[2:].replace('-', '_')
setattr(parser.values, name, value)
usage = '''\
[DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options]
Bootstraps a buildout-based project.
Simply run this script in a directory containing a buildout.cfg, using the
Python that you want bin/buildout to use.
Note that by using --setup-source and --download-base to point to
local resources, you can keep this script from going over the network.
'''
parser = OptionParser(usage=usage)
parser.add_option("-v", "--version", dest="version",
help="use a specific zc.buildout version")
parser.add_option("-d", "--distribute",
action="store_true", dest="use_distribute", default=False,
help="Use Distribute rather than Setuptools.")
parser.add_option("--setup-source", action="callback", dest="setup_source",
callback=normalize_to_url, nargs=1, type="string",
help=("Specify a URL or file location for the setup file. "
"If you use Setuptools, this will default to " +
setuptools_source + "; if you use Distribute, this "
"will default to " + distribute_source + "."))
parser.add_option("--download-base", action="callback", dest="download_base",
callback=normalize_to_url, nargs=1, type="string",
help=("Specify a URL or directory for downloading "
"zc.buildout and either Setuptools or Distribute. "
"Defaults to PyPI."))
parser.add_option("--eggs",
help=("Specify a directory for storing eggs. Defaults to "
"a temporary directory that is deleted when the "
"bootstrap script completes."))
parser.add_option("-t", "--accept-buildout-test-releases",
dest='accept_buildout_test_releases',
action="store_true", default=False,
help=("Normally, if you do not specify a --version, the "
"bootstrap script and buildout gets the newest "
"*final* versions of zc.buildout and its recipes and "
"extensions for you. If you use this flag, "
"bootstrap and buildout will get the newest releases "
"even if they are alphas or betas."))
parser.add_option("-c", None, action="store", dest="config_file",
help=("Specify the path to the buildout configuration "
"file to be used."))
options, args = parser.parse_args()
if options.eggs:
eggs_dir = os.path.abspath(os.path.expanduser(options.eggs))
else:
eggs_dir = tempfile.mkdtemp()
if options.setup_source is None:
if options.use_distribute:
options.setup_source = distribute_source
else:
options.setup_source = setuptools_source
if options.accept_buildout_test_releases:
args.insert(0, 'buildout:accept-buildout-test-releases=true')
try:
import pkg_resources
import setuptools # A flag. Sometimes pkg_resources is installed alone.
if not hasattr(pkg_resources, '_distribute'):
raise ImportError
except ImportError:
ez_code = urllib2.urlopen(
options.setup_source).read().replace('\r\n', '\n')
ez = {}
exec ez_code in ez
setup_args = dict(to_dir=eggs_dir, download_delay=0)
if options.download_base:
setup_args['download_base'] = options.download_base
if options.use_distribute:
setup_args['no_fake'] = True
if sys.version_info[:2] == (2, 4):
setup_args['version'] = '0.6.32'
ez['use_setuptools'](**setup_args)
if 'pkg_resources' in sys.modules:
reload(sys.modules['pkg_resources'])
import pkg_resources
# This does not (always?) update the default working set. We will
# do it.
for path in sys.path:
if path not in pkg_resources.working_set.entries:
pkg_resources.working_set.add_entry(path)
cmd = [quote(sys.executable),
'-c',
quote('from setuptools.command.easy_install import main; main()'),
'-mqNxd',
quote(eggs_dir)]
if not has_broken_dash_S:
cmd.insert(1, '-S')
find_links = options.download_base
if not find_links:
find_links = os.environ.get('bootstrap-testing-find-links')
if not find_links and options.accept_buildout_test_releases:
find_links = 'http://downloads.buildout.org/'
if find_links:
cmd.extend(['-f', quote(find_links)])
if options.use_distribute:
setup_requirement = 'distribute'
else:
setup_requirement = 'setuptools'
ws = pkg_resources.working_set
setup_requirement_path = ws.find(
pkg_resources.Requirement.parse(setup_requirement)).location
env = dict(
os.environ,
PYTHONPATH=setup_requirement_path)
requirement = 'zc.buildout'
version = options.version
if version is None and not options.accept_buildout_test_releases:
# Figure out the most recent final version of zc.buildout.
import setuptools.package_index
_final_parts = '*final-', '*final'
def _final_version(parsed_version):
for part in parsed_version:
if (part[:1] == '*') and (part not in _final_parts):
return False
return True
index = setuptools.package_index.PackageIndex(
search_path=[setup_requirement_path])
if find_links:
index.add_find_links((find_links,))
req = pkg_resources.Requirement.parse(requirement)
if index.obtain(req) is not None:
best = []
bestv = None
for dist in index[req.project_name]:
distv = dist.parsed_version
if distv >= pkg_resources.parse_version('2dev'):
continue
if _final_version(distv):
if bestv is None or distv > bestv:
best = [dist]
bestv = distv
elif distv == bestv:
best.append(dist)
if best:
best.sort()
version = best[-1].version
if version:
requirement += '=='+version
else:
requirement += '<2dev'
cmd.append(requirement)
if is_jython:
import subprocess
exitcode = subprocess.Popen(cmd, env=env).wait()
else: # Windows prefers this, apparently; otherwise we would prefer subprocess
exitcode = os.spawnle(*([os.P_WAIT, sys.executable] + cmd + [env]))
if exitcode != 0:
sys.stdout.flush()
sys.stderr.flush()
print ("An error occurred when trying to install zc.buildout. "
"Look above this message for any errors that "
"were output by easy_install.")
sys.exit(exitcode)
ws.add_entry(eggs_dir)
ws.require(requirement)
import zc.buildout.buildout
# If there isn't already a command in the args, add bootstrap
if not [a for a in args if '=' not in a]:
args.append('bootstrap')
# if -c was provided, we push it back into args for buildout's main function
if options.config_file is not None:
args[0:0] = ['-c', options.config_file]
zc.buildout.buildout.main(args)
if not options.eggs: # clean up temporary egg directory
shutil.rmtree(eggs_dir)
slimit-0.8.1/buildout.cfg 0000664 0000000 0000000 00000004115 12124317031 0015324 0 ustar 00root root 0000000 0000000 [buildout]
extends = versions.cfg
newest = false
include-site-packages = false
exec-sitecustomize = false
versions = versions
# allow-picked-versions = false
parts =
console-scripts
test
pep8-bin
pep8
pylint-bin
pylint
ipython
sphinxbuilder
develop =
.
eggs =
slimit
[console-scripts]
recipe = z3c.recipe.scripts
eggs =
zope.testrunner
createcoverage
${buildout:eggs}
interpreter=python
[sphinxbuilder]
recipe = collective.recipe.sphinxbuilder
source = ${buildout:directory}/docs-source
build = ${buildout:directory}/docs
[ipython]
recipe = z3c.recipe.scripts
eggs =
${buildout:eggs}
ipython
scripts=ipython
[var]
recipe = plone.recipe.command
directory = ${buildout:directory}/var
command = mkdir ${:directory}
[test]
recipe = zc.recipe.testrunner
eggs = slimit [test]
extra-paths = ${buildout:directory}/parts/test/working-directory
defaults = ['--tests-pattern', '^f?tests$', '-v']
[pep8-bin]
recipe = z3c.recipe.scripts
eggs =
pep8
entry-points = pep8-bin=pep8:_main
[pep8]
recipe = collective.recipe.template
input = inline:
#!/bin/bash
find -L src -type f -regex ".*\.py" | xargs bin/pep8-bin
output = ${buildout:directory}/bin/pep8
mode = 755
# :F0401: Unable to import %r (%s). Pylint has been unable to import a module.
# :C0111: *Missing docstring*
# :C0103: *Invalid name "%s" (should match %s)*
# :W0142: *Used * or ** magic*
# :W0232: *Class has no __init__ method*
# :E1101: *%s %r has no %r member*
# :R0911: Too many return statements (%s/%s)
[pylint-bin]
recipe = z3c.recipe.scripts
eggs = pylint
entry-points = pylint-bin=pylint.lint:Run
arguments = [
'--output-format=parseable',
'--reports=y',
'--include-ids=y',
'--disable=F0401,C0111,C0103,W0142,W0232,E1101,R0911',
'--generated-members=objects',
'--min-public-methods=0',
'--max-public-methods=30',
] + sys.argv[1:]
[pylint]
recipe = collective.recipe.template
input = inline:
#!/bin/bash
find -L src -type f -regex ".*\.py" | xargs bin/pylint-bin $@
output = ${buildout:directory}/bin/pylint
mode = 755 slimit-0.8.1/docs/ 0000775 0000000 0000000 00000000000 12124317031 0013743 5 ustar 00root root 0000000 0000000 slimit-0.8.1/docs/Makefile 0000664 0000000 0000000 00000012705 12124317031 0015410 0 ustar 00root root 0000000 0000000 # Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
-rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/slimit.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/slimit.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/slimit"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/slimit"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
slimit-0.8.1/docs/source/ 0000775 0000000 0000000 00000000000 12124317031 0015243 5 ustar 00root root 0000000 0000000 slimit-0.8.1/docs/source/_static/ 0000775 0000000 0000000 00000000000 12124317031 0016671 5 ustar 00root root 0000000 0000000 slimit-0.8.1/docs/source/_static/feed-24x24.png 0000664 0000000 0000000 00000002020 12124317031 0021055 0 ustar 00root root 0000000 0000000 PNG
IHDR w= IDATxڵoSe/Зݶ&:|@Ƙ8&J ?hL66
Q19B|F:Kpvz{ۯ9y?M>9<9o{nhV|B :[)/