Permalink
Browse files

First commit.

  • Loading branch information...
0 parents commit 74bb4b8ad6fec126d29a0c36150e413333a4bc3d @mthjones committed Apr 24, 2009
Showing with 1,239 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +22 −0 Contents/Info.plist
  3. +34 −0 Itemizers/Python.xml
  4. +28 −0 Languages.xml
  5. +58 −0 README.markdown
  6. +899 −0 Syntaxes/PythonSyntax.xml
  7. +196 −0 Test/test.py
@@ -0,0 +1,2 @@
+.DS_Store
+profile
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleExecutable</key>
+ <string>Python</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.yourcompany.Python</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>Python</string>
+ <key>CFBundlePackageType</key>
+ <string>BNDL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<itemizer>
+ <!-- Matches a shebang line (like `#!/usr/bin/env python`) -->
+ <recipe name="metadata.processing.comment.shebang">
+ <selector>metadata.processing.comment.shebang > path:capture(name)</selector>
+ </recipe>
+
+ <!-- Matches an encoding line (like `# encoding: utf-8`) -->
+ <recipe name="metadata.processing.comment.encoding">
+ <selector>metadata.processing.comment.encoding > encoding:capture(name)</selector>
+ </recipe>
+
+ <recipe name="function">
+ <selector>container.function > name:capture(name)</selector>
+ </recipe>
+
+ <!-- Matches a class definition -->
+ <recipe name="class">
+ <selector>container.class > name:capture(name)</selector>
+ <!--<start-selector>container.class:has-child(name:capture(name))</start-selector>
+ <end-selector>container.class:has-child(whitespace:capture(name))</end-selector>-->
+ <subrecipes>
+ <include-root-recipes />
+ </subrecipes>
+ </recipe>
+
+ <!-- Matches tripe-quoted strings -->
+ <recipe name="docstring">
+ <selector>metadata.comment.documentation > docstring:capture(name)</selector>
+ <subrecipes>
+ <include-root-recipes />
+ </subrecipes>
+ </recipe>
+</itemizer>
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<settings>
+ <language id="com.mthjones.Python">
+ <root-zone>sourcecode.python</root-zone>
+
+ <syntax-name>sourcecode.python</syntax-name>
+
+ <name>Python</name>
+
+ <detectors>
+ <!-- Checks for .py extension -->
+ <extension casesensitive="false">py</extension>
+ <!-- Checks for python shebang -->
+ <match-content lines="1">#!/[\w/ ]+python</match-content>
+ </detectors>
+ </language>
+
+ <meta>
+ <name>Python</name>
+ <description>A full syntax description of the Python programming language</description>
+ <author>Matt Jones</author>
+ <identifier>com.mthjones.Sugar.Python</identifier>
+ <version status="development">0.1</version>
+ <dependencies>
+ <dependency id="name.elliottcable.Sugar.Regex">Regex</dependency>
+ </dependencies>
+ </meta>
+</settings>
@@ -0,0 +1,58 @@
+Python.sugar
+============
+A work-in-progress Sugar for the [Espresso text-editor][espresso] for development with [Python][].
+
+[espresso]: http://macrabbit.com/espresso/ "The Espresso text editor"
+[python]: http://python.org/ "The Python programming language"
+
+If you are looking for the source for the Python.sugar project, check out the [source repository][srcrepo].
+
+[srcrepo]: http://github.com/mthjones/python.sugar-source/ "The Python.sugar source repo on GitHub"
+
+How to Use
+----------
+Install any dependencies as outlined below. The instructions to install them should be available by following the links.
+
+Once the dependencies are installed, you have a couple of easy options to install this sugar:
+
+Download the source in .zip or .tgz format using the [download button](#download_button) **or** clone this project to your computer using git:
+
+ git clone git://github.com/mthjones/python.sugar.git "Python.sugar"
+
+With Espresso versions 1.0.1 and later, you should be able to just double-click the file and it will install to Espresso. If that doesn't work, then:
+
+Move or link it to the Espresso sugars folder (note you may need to create the folder first):
+
+ mkdir -p ~/Library/Application\ Support/Espresso/Sugars/
+
+ mv Python.sugar ~/Library/Application\ Support/Espresso/Sugars/
+ -- or --
+ ln -s Python.sugar ~/Library/Application\ Support/Espresso/Sugars/
+
+Dependencies
+------------
+- [Regex.sugar][regexsugar]
+
+[regexsugar]: http://github.com/elliottcable/Regex.sugar "elliottcable's Regex.sugar on GitHub"
+
+More Information
+----------------
+This sugar uses the naming conventions as outlined by [elliottcable][] in his [Espresso Sugar Standard][ess]. Due to the fact that this standard is not set in stone and being followed by every sugar developer yet, certain themes/foams haven't been created to work with this naming convention. Therefore they may not highlight the syntax quite as nicely as one would like.
+
+There are a few themes/foams that do work with the [Espresso Sugar Standard][ess], however.
+
+- [Monokaffee][] (my own)
+- Most themes on [Coffee House][coffee]
+
+[elliottcable]: http://github.com/elliottcable/ "elltiottcable on GitHub"
+[ess]: http://github.com/elliottcable/espresso-sugar-standard/tree/master "elliottcable's Espresso Sugar Standard on GitHub"
+[monokaffee]: http://github.com/mthjones/monokaffee/ "mthjones' Monokaffee on GitHub"
+[coffee]: http://fileability.net/coffee/ "Coffee House"
+
+Because of the unpredictable nature of Espresso sugars and themes/foams, this sugar may change often, so it is worth watching.
+
+TODO
+----
+See the [Todo List][todo] (located in the source repo)
+
+[todo]: http://github.com/mthjones/python.sugar-source/blob/master/TODO.markdown
Oops, something went wrong.

0 comments on commit 74bb4b8

Please sign in to comment.