pygments.rb 0.3.7 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. data/CHANGELOG +9 -0
  2. data/CHANGELOG.md +6 -0
  3. data/LICENSE +1 -1
  4. data/README.md +1 -1
  5. data/lexers +0 -0
  6. data/lib/pygments/version.rb +1 -1
  7. data/test/test_pygments.rb +0 -1
  8. data/vendor/pygments-main/AUTHORS +14 -1
  9. data/vendor/pygments-main/CHANGES +56 -6
  10. data/vendor/pygments-main/LICENSE +1 -1
  11. data/vendor/pygments-main/Makefile +1 -1
  12. data/vendor/pygments-main/REVISION +1 -0
  13. data/vendor/pygments-main/docs/generate.py +1 -1
  14. data/vendor/pygments-main/docs/src/api.txt +1 -1
  15. data/vendor/pygments-main/docs/src/index.txt +1 -1
  16. data/vendor/pygments-main/docs/src/integrate.txt +5 -0
  17. data/vendor/pygments-main/docs/src/java.txt +70 -0
  18. data/vendor/pygments-main/external/autopygmentize +64 -0
  19. data/vendor/pygments-main/external/markdown-processor.py +2 -2
  20. data/vendor/pygments-main/external/moin-parser.py +1 -1
  21. data/vendor/pygments-main/external/rst-directive-old.py +1 -1
  22. data/vendor/pygments-main/external/rst-directive.py +1 -1
  23. data/vendor/pygments-main/pygments/__init__.py +2 -2
  24. data/vendor/pygments-main/pygments/cmdline.py +14 -6
  25. data/vendor/pygments-main/pygments/console.py +1 -1
  26. data/vendor/pygments-main/pygments/filter.py +1 -1
  27. data/vendor/pygments-main/pygments/filters/__init__.py +1 -1
  28. data/vendor/pygments-main/pygments/formatter.py +1 -1
  29. data/vendor/pygments-main/pygments/formatters/__init__.py +1 -1
  30. data/vendor/pygments-main/pygments/formatters/_mapping.py +1 -1
  31. data/vendor/pygments-main/pygments/formatters/bbcode.py +1 -1
  32. data/vendor/pygments-main/pygments/formatters/html.py +73 -2
  33. data/vendor/pygments-main/pygments/formatters/img.py +1 -1
  34. data/vendor/pygments-main/pygments/formatters/latex.py +1 -1
  35. data/vendor/pygments-main/pygments/formatters/other.py +1 -1
  36. data/vendor/pygments-main/pygments/formatters/rtf.py +1 -1
  37. data/vendor/pygments-main/pygments/formatters/svg.py +1 -1
  38. data/vendor/pygments-main/pygments/formatters/terminal.py +1 -1
  39. data/vendor/pygments-main/pygments/formatters/terminal256.py +1 -1
  40. data/vendor/pygments-main/pygments/lexer.py +76 -12
  41. data/vendor/pygments-main/pygments/lexers/__init__.py +2 -2
  42. data/vendor/pygments-main/pygments/lexers/_asybuiltins.py +1 -1
  43. data/vendor/pygments-main/pygments/lexers/_clbuiltins.py +1 -1
  44. data/vendor/pygments-main/pygments/lexers/_lassobuiltins.py +4 -1
  45. data/vendor/pygments-main/pygments/lexers/_luabuiltins.py +1 -1
  46. data/vendor/pygments-main/pygments/lexers/_mapping.py +26 -10
  47. data/vendor/pygments-main/pygments/lexers/_openedgebuiltins.py +11 -0
  48. data/vendor/pygments-main/pygments/lexers/_phpbuiltins.py +2 -2
  49. data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +4 -2
  50. data/vendor/pygments-main/pygments/lexers/_robotframeworklexer.py +14 -3
  51. data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +11 -0
  52. data/vendor/pygments-main/pygments/lexers/_sourcemodbuiltins.py +2 -2
  53. data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +6 -6
  54. data/vendor/pygments-main/pygments/lexers/agile.py +6 -4
  55. data/vendor/pygments-main/pygments/lexers/asm.py +40 -2
  56. data/vendor/pygments-main/pygments/lexers/compiled.py +751 -438
  57. data/vendor/pygments-main/pygments/lexers/dalvik.py +2 -2
  58. data/vendor/pygments-main/pygments/lexers/dotnet.py +1 -1
  59. data/vendor/pygments-main/pygments/lexers/foxpro.py +428 -0
  60. data/vendor/pygments-main/pygments/lexers/functional.py +6 -5
  61. data/vendor/pygments-main/pygments/lexers/hdl.py +3 -3
  62. data/vendor/pygments-main/pygments/lexers/jvm.py +130 -16
  63. data/vendor/pygments-main/pygments/lexers/math.py +250 -9
  64. data/vendor/pygments-main/pygments/lexers/other.py +518 -13
  65. data/vendor/pygments-main/pygments/lexers/parsers.py +3 -2
  66. data/vendor/pygments-main/pygments/lexers/shell.py +48 -2
  67. data/vendor/pygments-main/pygments/lexers/special.py +1 -1
  68. data/vendor/pygments-main/pygments/lexers/sql.py +1 -1
  69. data/vendor/pygments-main/pygments/lexers/templates.py +7 -6
  70. data/vendor/pygments-main/pygments/lexers/text.py +9 -9
  71. data/vendor/pygments-main/pygments/lexers/web.py +264 -51
  72. data/vendor/pygments-main/pygments/plugin.py +1 -1
  73. data/vendor/pygments-main/pygments/scanner.py +1 -1
  74. data/vendor/pygments-main/pygments/style.py +1 -1
  75. data/vendor/pygments-main/pygments/styles/__init__.py +1 -1
  76. data/vendor/pygments-main/pygments/styles/autumn.py +1 -1
  77. data/vendor/pygments-main/pygments/styles/borland.py +1 -1
  78. data/vendor/pygments-main/pygments/styles/bw.py +1 -1
  79. data/vendor/pygments-main/pygments/styles/colorful.py +1 -1
  80. data/vendor/pygments-main/pygments/styles/default.py +1 -1
  81. data/vendor/pygments-main/pygments/styles/emacs.py +1 -1
  82. data/vendor/pygments-main/pygments/styles/friendly.py +1 -1
  83. data/vendor/pygments-main/pygments/styles/fruity.py +1 -1
  84. data/vendor/pygments-main/pygments/styles/manni.py +1 -1
  85. data/vendor/pygments-main/pygments/styles/monokai.py +1 -1
  86. data/vendor/pygments-main/pygments/styles/murphy.py +1 -1
  87. data/vendor/pygments-main/pygments/styles/native.py +1 -1
  88. data/vendor/pygments-main/pygments/styles/pastie.py +1 -1
  89. data/vendor/pygments-main/pygments/styles/perldoc.py +1 -1
  90. data/vendor/pygments-main/pygments/styles/rrt.py +1 -1
  91. data/vendor/pygments-main/pygments/styles/tango.py +1 -1
  92. data/vendor/pygments-main/pygments/styles/trac.py +1 -1
  93. data/vendor/pygments-main/pygments/styles/vim.py +1 -1
  94. data/vendor/pygments-main/pygments/styles/vs.py +1 -1
  95. data/vendor/pygments-main/pygments/token.py +1 -1
  96. data/vendor/pygments-main/pygments/unistring.py +1 -1
  97. data/vendor/pygments-main/pygments/util.py +1 -1
  98. data/vendor/pygments-main/scripts/check_sources.py +2 -2
  99. data/vendor/pygments-main/scripts/detect_missing_analyse_text.py +2 -0
  100. data/vendor/pygments-main/scripts/find_codetags.py +1 -1
  101. data/vendor/pygments-main/scripts/find_error.py +5 -6
  102. data/vendor/pygments-main/setup.cfg +1 -0
  103. data/vendor/pygments-main/setup.py +6 -4
  104. data/vendor/pygments-main/tests/examplefiles/BOM.js +1 -0
  105. data/vendor/pygments-main/tests/examplefiles/autoit_submit.au3 +25 -0
  106. data/vendor/pygments-main/tests/examplefiles/bigtest.nsi +308 -0
  107. data/vendor/pygments-main/tests/examplefiles/ca65_example +284 -0
  108. data/vendor/pygments-main/tests/examplefiles/cbmbas_example +9 -0
  109. data/vendor/pygments-main/tests/examplefiles/classes.dylan +89 -4
  110. data/vendor/pygments-main/tests/examplefiles/example.cob +3556 -0
  111. data/vendor/pygments-main/tests/examplefiles/example.prg +161 -0
  112. data/vendor/pygments-main/tests/examplefiles/example.shell-session +45 -0
  113. data/vendor/pygments-main/tests/examplefiles/example.ts +28 -0
  114. data/vendor/pygments-main/tests/examplefiles/inet_pton6.dg +2 -2
  115. data/vendor/pygments-main/tests/examplefiles/logos_example.xm +28 -0
  116. data/vendor/pygments-main/tests/examplefiles/mg_sample.pro +73 -0
  117. data/vendor/pygments-main/tests/examplefiles/minehunt.qml +112 -0
  118. data/vendor/pygments-main/tests/examplefiles/nanomsg.intr +95 -0
  119. data/vendor/pygments-main/tests/examplefiles/phpMyAdmin.spec +163 -0
  120. data/vendor/pygments-main/tests/examplefiles/rust_example.rs +191 -701
  121. data/vendor/pygments-main/tests/examplefiles/session.dylan-console +9 -0
  122. data/vendor/pygments-main/tests/examplefiles/test.opa +10 -0
  123. data/vendor/pygments-main/tests/examplefiles/test2.pypylog +120 -0
  124. data/vendor/pygments-main/tests/examplefiles/unix-io.lid +37 -0
  125. data/vendor/pygments-main/tests/old_run.py +1 -1
  126. data/vendor/pygments-main/tests/run.py +3 -2
  127. data/vendor/pygments-main/tests/support/tags +36 -0
  128. data/vendor/pygments-main/tests/test_basic_api.py +3 -2
  129. data/vendor/pygments-main/tests/test_clexer.py +1 -1
  130. data/vendor/pygments-main/tests/test_cmdline.py +1 -1
  131. data/vendor/pygments-main/tests/test_examplefiles.py +1 -1
  132. data/vendor/pygments-main/tests/test_html_formatter.py +17 -1
  133. data/vendor/pygments-main/tests/test_latex_formatter.py +1 -1
  134. data/vendor/pygments-main/tests/test_perllexer.py +1 -1
  135. data/vendor/pygments-main/tests/test_regexlexer.py +1 -1
  136. data/vendor/pygments-main/tests/test_token.py +1 -1
  137. data/vendor/pygments-main/tests/test_using_api.py +1 -1
  138. data/vendor/pygments-main/tests/test_util.py +5 -4
  139. metadata +26 -2
@@ -32,7 +32,7 @@
32
32
  yourfilter = yourfilter:YourFilter
33
33
 
34
34
 
35
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
35
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
36
36
  :license: BSD, see LICENSE for details.
37
37
  """
38
38
  try:
@@ -12,7 +12,7 @@
12
12
  Have a look at the `DelphiLexer` to get an idea of how to use
13
13
  this scanner.
14
14
 
15
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
15
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
16
16
  :license: BSD, see LICENSE for details.
17
17
  """
18
18
  import re
@@ -5,7 +5,7 @@
5
5
 
6
6
  Basic style object.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Contains built-in styles.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  A colorful style, inspired by the terminal highlighting style.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Style similar to the style used in the Borland IDEs.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Simple black/white only style.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  A colorful style, inspired by CodeRay.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  The default highlighting style.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  A highlighting style for Pygments, inspired by Emacs.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  A modern style based on the VIM pyte theme.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  pygments version of my "fruity" vim theme.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -8,7 +8,7 @@
8
8
  This is a port of the style used in the `php port`_ of pygments
9
9
  by Manni. The style is called 'default' there.
10
10
 
11
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
11
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
12
12
  :license: BSD, see LICENSE for details.
13
13
  """
14
14
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  http://www.monokai.nl/blog/2006/07/15/textmate-color-theme/
9
9
 
10
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
10
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
11
11
  :license: BSD, see LICENSE for details.
12
12
  """
13
13
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Murphy's style from CodeRay.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  pygments version of my "native" vim theme.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  .. _pastie: http://pastie.caboo.se/
9
9
 
10
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
10
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
11
11
  :license: BSD, see LICENSE for details.
12
12
  """
13
13
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  .. _perldoc: http://perldoc.perl.org/
9
9
 
10
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
10
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
11
11
  :license: BSD, see LICENSE for details.
12
12
  """
13
13
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  pygments "rrt" theme, based on Zap and Emacs defaults.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -33,7 +33,7 @@
33
33
  have been chosen to have the same style. Similarly, keywords (Keyword.*),
34
34
  and Operator.Word (and, or, in) have been assigned the same style.
35
35
 
36
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
36
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
37
37
  :license: BSD, see LICENSE for details.
38
38
  """
39
39
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Port of the default trac highlighter design.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  A highlighting style for Pygments, inspired by vim.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Simple style with MS Visual Studio colors.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -5,7 +5,7 @@
5
5
 
6
6
  Basic token types and the standard tokens.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -8,7 +8,7 @@
8
8
 
9
9
  Inspired by chartypes_create.py from the MoinMoin project.
10
10
 
11
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
11
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
12
12
  :license: BSD, see LICENSE for details.
13
13
  """
14
14
  from pygments.util import u_prefix
@@ -5,7 +5,7 @@
5
5
 
6
6
  Utility functions.
7
7
 
8
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
8
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
9
9
  :license: BSD, see LICENSE for details.
10
10
  """
11
11
 
@@ -7,7 +7,7 @@
7
7
  Make sure each Python file has a correct file header
8
8
  including copyright and license information.
9
9
 
10
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
10
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
11
11
  :license: BSD, see LICENSE for details.
12
12
  """
13
13
 
@@ -30,7 +30,7 @@ def checker(*suffixes, **kwds):
30
30
 
31
31
 
32
32
  name_mail_re = r'[\w ]+(<.*?>)?'
33
- copyright_re = re.compile(r'^ :copyright: Copyright 2006-2012 by '
33
+ copyright_re = re.compile(r'^ :copyright: Copyright 2006-2013 by '
34
34
  r'the Pygments team, see AUTHORS\.$', re.UNICODE)
35
35
  copyright_2_re = re.compile(r'^ %s(, %s)*[,.]$' %
36
36
  (name_mail_re, name_mail_re), re.UNICODE)
@@ -8,6 +8,8 @@ def main():
8
8
 
9
9
  for name, aliases, filenames, mimetypes in get_all_lexers():
10
10
  cls = find_lexer_class(name)
11
+ if not cls.aliases:
12
+ print cls, "has no aliases"
11
13
  for f in filenames:
12
14
  if f not in uses:
13
15
  uses[f] = []
@@ -7,7 +7,7 @@
7
7
  Find code tags in specified files and/or directories
8
8
  and create a report in HTML format.
9
9
 
10
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
10
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
11
11
  :license: BSD, see LICENSE for details.
12
12
  """
13
13
 
@@ -8,17 +8,16 @@
8
8
  the text where Error tokens are being generated, along
9
9
  with some context.
10
10
 
11
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
11
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
12
12
  :license: BSD, see LICENSE for details.
13
13
  """
14
14
 
15
15
  import sys, os
16
16
 
17
- try:
18
- import pygments
19
- except ImportError:
20
- # try parent path
21
- sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
17
+ # always prefer Pygments from source if exists
18
+ srcpath = os.path.join(os.path.dirname(__file__), '..')
19
+ if os.path.isdir(os.path.join(srcpath, 'pygments')):
20
+ sys.path.insert(0, srcpath)
22
21
 
23
22
 
24
23
  from pygments.lexer import RegexLexer
@@ -4,3 +4,4 @@ tag_date = true
4
4
 
5
5
  [aliases]
6
6
  release = egg_info -RDb ''
7
+ upload = upload --sign --identity=36580288
@@ -21,9 +21,9 @@
21
21
  The `Pygments tip`_ is installable with ``easy_install Pygments==dev``.
22
22
 
23
23
  .. _Pygments tip:
24
- http://bitbucket.org/birkenfeld/pygments-main/get/tip.zip#egg=Pygments-dev
24
+ http://bitbucket.org/birkenfeld/pygments-main/get/default.zip#egg=Pygments-dev
25
25
 
26
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
26
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
27
27
  :license: BSD, see LICENSE for details.
28
28
  """
29
29
 
@@ -60,7 +60,7 @@ else:
60
60
 
61
61
  setup(
62
62
  name = 'Pygments',
63
- version = '1.5',
63
+ version = '1.6',
64
64
  url = 'http://pygments.org/',
65
65
  license = 'BSD License',
66
66
  author = 'Georg Brandl',
@@ -77,11 +77,13 @@ setup(
77
77
  'Intended Audience :: Developers',
78
78
  'Intended Audience :: End Users/Desktop',
79
79
  'Intended Audience :: System Administrators',
80
- 'Development Status :: 5 - Production/Stable',
80
+ 'Development Status :: 6 - Mature',
81
81
  'Programming Language :: Python',
82
82
  'Programming Language :: Python :: 2',
83
83
  'Programming Language :: Python :: 3',
84
84
  'Operating System :: OS Independent',
85
+ 'Topic :: Text Processing :: Filters',
86
+ 'Topic :: Utilities',
85
87
  ],
86
88
  cmdclass = {'build_py': build_py},
87
89
  **add_keywords
@@ -0,0 +1 @@
1
+ /* There is a BOM at the beginning of this file. */
@@ -0,0 +1,25 @@
1
+ #include <IE.au3>
2
+ ;http://msdn.microsoft.com/en-us/library/Aa752084.aspx
3
+ $ourl="http://localhost:5000/"
4
+
5
+ $oIE = _IEAttach ($ourl,"url")
6
+ If @error = $_IEStatus_NoMatch Then
7
+ $oIE = _IECreate ($ourl & "sample.html")
8
+ endIf
9
+
10
+ $oForm = _IEFormGetObjByName ($oIE, "form1")
11
+ ;username, call DOM directly
12
+ $oIE.document.getElementById("username").value="helloAutoIT"
13
+ ;state select
14
+ $oSelect = _IEFormElementGetObjByName ($oForm, "state")
15
+ _IEFormElementOptionSelect ($oSelect, "S2", 1, "byText")
16
+ ;options raido
17
+ _IEFormElementRadioSelect($oForm, "2nd", "type", 1, "byValue")
18
+
19
+ ConsoleWrite(@Error)
20
+ Sleep(10000)
21
+ _IEFormSubmit($oForm, 0)
22
+ _IELoadWait($oIE)
23
+ Sleep(60000)
24
+ _IEQuit($oIE)
25
+
@@ -0,0 +1,308 @@
1
+ ; bigtest.nsi
2
+ ;
3
+ ; This script attempts to test most of the functionality of the NSIS exehead.
4
+
5
+ ;--------------------------------
6
+
7
+ !ifdef HAVE_UPX
8
+ !packhdr tmp.dat "upx\upx -9 tmp.dat"
9
+ !endif
10
+
11
+ !ifdef NOCOMPRESS
12
+ SetCompress off
13
+ !endif
14
+
15
+ ;--------------------------------
16
+
17
+ Name "BigNSISTest"
18
+ Caption "NSIS Big Test"
19
+ Icon "${NSISDIR}\Contrib\Graphics\Icons\nsis1-install.ico"
20
+ OutFile "bigtest.exe"
21
+
22
+ SetDateSave on
23
+ SetDatablockOptimize on
24
+ CRCCheck on
25
+ SilentInstall normal
26
+ BGGradient 000000 800000 FFFFFF
27
+ InstallColors FF8080 000030
28
+ XPStyle on
29
+
30
+ InstallDir "$PROGRAMFILES\NSISTest\BigNSISTest"
31
+ InstallDirRegKey HKLM "Software\NSISTest\BigNSISTest" "Install_Dir"
32
+
33
+ CheckBitmap "${NSISDIR}\Contrib\Graphics\Checks\classic-cross.bmp"
34
+
35
+ LicenseText "A test text, make sure it's all there"
36
+ LicenseData "bigtest.nsi"
37
+
38
+ RequestExecutionLevel admin
39
+
40
+ ;--------------------------------
41
+
42
+ Page license
43
+ Page components
44
+ Page directory
45
+ Page instfiles
46
+
47
+ UninstPage uninstConfirm
48
+ UninstPage instfiles
49
+
50
+ ;--------------------------------
51
+
52
+ !ifndef NOINSTTYPES ; only if not defined
53
+ InstType "Most"
54
+ InstType "Full"
55
+ InstType "More"
56
+ InstType "Base"
57
+ ;InstType /NOCUSTOM
58
+ ;InstType /COMPONENTSONLYONCUSTOM
59
+ !endif
60
+
61
+ AutoCloseWindow false
62
+ ShowInstDetails show
63
+
64
+ ;--------------------------------
65
+
66
+ Section "" ; empty string makes it hidden, so would starting with -
67
+
68
+ ; write reg info
69
+ StrCpy $1 "POOOOOOOOOOOP"
70
+ DetailPrint "I like to be able to see what is going on (debug) $1"
71
+ WriteRegStr HKLM SOFTWARE\NSISTest\BigNSISTest "Install_Dir" "$INSTDIR"
72
+
73
+ ; write uninstall strings
74
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest" "DisplayName" "BigNSISTest (remove only)"
75
+ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest" "UninstallString" '"$INSTDIR\bt-uninst.exe"'
76
+
77
+ SetOutPath $INSTDIR
78
+ File /a "silent.nsi"
79
+ CreateDirectory "$INSTDIR\MyProjectFamily\MyProject" ; 2 recursively create a directory for fun.
80
+ WriteUninstaller "bt-uninst.exe"
81
+
82
+ Nop ; for fun
83
+
84
+ SectionEnd
85
+
86
+ Section "TempTest"
87
+
88
+ SectionIn 1 2 3
89
+ Start: MessageBox MB_OK "Start:"
90
+
91
+ MessageBox MB_YESNO "Goto MyLabel" IDYES MyLabel
92
+
93
+ MessageBox MB_OK "Right before MyLabel:"
94
+
95
+ MyLabel: MessageBox MB_OK "MyLabel:"
96
+
97
+ MessageBox MB_OK "Right after MyLabel:"
98
+
99
+ MessageBox MB_YESNO "Goto Start:?" IDYES Start
100
+
101
+ SectionEnd
102
+
103
+ SectionGroup /e SectionGroup1
104
+
105
+ Section "Test Registry/INI functions"
106
+
107
+ SectionIn 1 4 3
108
+
109
+ WriteRegStr HKLM SOFTWARE\NSISTest\BigNSISTest "StrTest_INSTDIR" "$INSTDIR"
110
+ WriteRegDword HKLM SOFTWARE\NSISTest\BigNSISTest "DwordTest_0xDEADBEEF" 0xdeadbeef
111
+ WriteRegDword HKLM SOFTWARE\NSISTest\BigNSISTest "DwordTest_123456" 123456
112
+ WriteRegDword HKLM SOFTWARE\NSISTest\BigNSISTest "DwordTest_0123" 0123
113
+ WriteRegBin HKLM SOFTWARE\NSISTest\BigNSISTest "BinTest_deadbeef01f00dbeef" "DEADBEEF01F00DBEEF"
114
+ StrCpy $8 "$SYSDIR\IniTest"
115
+ WriteINIStr "$INSTDIR\test.ini" "MySection" "Value1" $8
116
+ WriteINIStr "$INSTDIR\test.ini" "MySectionIni" "Value1" $8
117
+ WriteINIStr "$INSTDIR\test.ini" "MySectionIni" "Value2" $8
118
+ WriteINIStr "$INSTDIR\test.ini" "IniOn" "Value1" $8
119
+
120
+ Call MyFunctionTest
121
+
122
+ DeleteINIStr "$INSTDIR\test.ini" "IniOn" "Value1"
123
+ DeleteINISec "$INSTDIR\test.ini" "MySectionIni"
124
+
125
+ ReadINIStr $1 "$INSTDIR\test.ini" "MySectionIni" "Value1"
126
+ StrCmp $1 "" INIDelSuccess
127
+ MessageBox MB_OK "DeleteINISec failed"
128
+ INIDelSuccess:
129
+
130
+ ClearErrors
131
+ ReadRegStr $1 HKCR "software\microsoft" xyz_cc_does_not_exist
132
+ IfErrors 0 NoError
133
+ MessageBox MB_OK "could not read from HKCR\software\microsoft\xyz_cc_does_not_exist"
134
+ Goto ErrorYay
135
+ NoError:
136
+ MessageBox MB_OK "read '$1' from HKCR\software\microsoft\xyz_cc_does_not_exist"
137
+ ErrorYay:
138
+
139
+ SectionEnd
140
+
141
+ Section "Test CreateShortCut"
142
+
143
+ SectionIn 1 2 3
144
+
145
+ Call CSCTest
146
+
147
+ SectionEnd
148
+
149
+ SectionGroup Group2
150
+
151
+ Section "Test Branching"
152
+
153
+ BeginTestSection:
154
+ SectionIn 1 2 3
155
+
156
+ SetOutPath $INSTDIR
157
+
158
+ IfFileExists "$INSTDIR\LogicLib.nsi" 0 BranchTest69
159
+
160
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to overwrite $INSTDIR\LogicLib.nsi?" IDNO NoOverwrite ; skipped if file doesn't exist
161
+
162
+ BranchTest69:
163
+
164
+ SetOverwrite ifnewer ; NOT AN INSTRUCTION, NOT COUNTED IN SKIPPINGS
165
+
166
+ NoOverwrite:
167
+
168
+ File "LogicLib.nsi" ; skipped if answered no
169
+ SetOverwrite try ; NOT AN INSTRUCTION, NOT COUNTED IN SKIPPINGS
170
+
171
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to skip the rest of this section?" IDYES EndTestBranch
172
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to go back to the beginning of this section?" IDYES BeginTestSection
173
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to hide the installer and wait five seconds?" IDNO NoHide
174
+
175
+ HideWindow
176
+ Sleep 5000
177
+ BringToFront
178
+
179
+ NoHide:
180
+
181
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to call the function 5 times?" IDNO NoRecurse
182
+
183
+ StrCpy $1 "x"
184
+
185
+ LoopTest:
186
+
187
+ Call myfunc
188
+ StrCpy $1 "x$1"
189
+ StrCmp $1 "xxxxxx" 0 LoopTest
190
+
191
+ NoRecurse:
192
+
193
+ EndTestBranch:
194
+
195
+ SectionEnd
196
+
197
+ SectionGroupEnd
198
+
199
+ Section "Test CopyFiles"
200
+
201
+ SectionIn 1 2 3
202
+
203
+ SetOutPath $INSTDIR\cpdest
204
+ CopyFiles "$WINDIR\*.ini" "$INSTDIR\cpdest" 0
205
+
206
+ SectionEnd
207
+
208
+ SectionGroupEnd
209
+
210
+ Section "Test Exec functions" TESTIDX
211
+
212
+ SectionIn 1 2 3
213
+
214
+ SearchPath $1 notepad.exe
215
+
216
+ MessageBox MB_OK "notepad.exe=$1"
217
+ Exec '"$1"'
218
+ ExecShell "open" '"$INSTDIR"'
219
+ Sleep 500
220
+ BringToFront
221
+
222
+ SectionEnd
223
+
224
+ Section "Test ActiveX control registration"
225
+
226
+ SectionIn 2
227
+
228
+ UnRegDLL "$SYSDIR\spin32.ocx"
229
+ Sleep 1000
230
+ RegDLL "$SYSDIR\spin32.ocx"
231
+ Sleep 1000
232
+
233
+ SectionEnd
234
+
235
+ ;--------------------------------
236
+
237
+ Function "CSCTest"
238
+
239
+ CreateDirectory "$SMPROGRAMS\Big NSIS Test"
240
+ SetOutPath $INSTDIR ; for working directory
241
+ CreateShortCut "$SMPROGRAMS\Big NSIS Test\Uninstall BIG NSIS Test.lnk" "$INSTDIR\bt-uninst.exe" ; use defaults for parameters, icon, etc.
242
+ ; this one will use notepad's icon, start it minimized, and give it a hotkey (of Ctrl+Shift+Q)
243
+ CreateShortCut "$SMPROGRAMS\Big NSIS Test\silent.nsi.lnk" "$INSTDIR\silent.nsi" "" "$WINDIR\notepad.exe" 0 SW_SHOWMINIMIZED CONTROL|SHIFT|Q
244
+ CreateShortCut "$SMPROGRAMS\Big NSIS Test\TheDir.lnk" "$INSTDIR\" "" "" 0 SW_SHOWMAXIMIZED CONTROL|SHIFT|Z
245
+
246
+ FunctionEnd
247
+
248
+ Function myfunc
249
+
250
+ StrCpy $2 "MyTestVar=$1"
251
+ MessageBox MB_OK "myfunc: $2"
252
+
253
+ FunctionEnd
254
+
255
+ Function MyFunctionTest
256
+
257
+ ReadINIStr $1 "$INSTDIR\test.ini" "MySectionIni" "Value1"
258
+ StrCmp $1 $8 NoFailedMsg
259
+ MessageBox MB_OK "WriteINIStr failed"
260
+
261
+ NoFailedMsg:
262
+
263
+ FunctionEnd
264
+
265
+ Function .onSelChange
266
+
267
+ SectionGetText ${TESTIDX} $0
268
+ StrCmp $0 "" e
269
+ SectionSetText ${TESTIDX} ""
270
+ Goto e2
271
+ e:
272
+ SectionSetText ${TESTIDX} "TextInSection"
273
+ e2:
274
+
275
+ FunctionEnd
276
+
277
+ ;--------------------------------
278
+
279
+ ; Uninstaller
280
+
281
+ UninstallText "This will uninstall example2. Hit next to continue."
282
+ UninstallIcon "${NSISDIR}\Contrib\Graphics\Icons\nsis1-uninstall.ico"
283
+
284
+ Section "Uninstall"
285
+
286
+ DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BigNSISTest"
287
+ DeleteRegKey HKLM "SOFTWARE\NSISTest\BigNSISTest"
288
+ Delete "$INSTDIR\silent.nsi"
289
+ Delete "$INSTDIR\LogicLib.nsi"
290
+ Delete "$INSTDIR\bt-uninst.exe"
291
+ Delete "$INSTDIR\test.ini"
292
+ Delete "$SMPROGRAMS\Big NSIS Test\*.*"
293
+ RMDir "$SMPROGRAMS\BiG NSIS Test"
294
+
295
+ MessageBox MB_YESNO|MB_ICONQUESTION "Would you like to remove the directory $INSTDIR\cpdest?" IDNO NoDelete
296
+ Delete "$INSTDIR\cpdest\*.*"
297
+ RMDir "$INSTDIR\cpdest" ; skipped if no
298
+ NoDelete:
299
+
300
+ RMDir "$INSTDIR\MyProjectFamily\MyProject"
301
+ RMDir "$INSTDIR\MyProjectFamily"
302
+ RMDir "$INSTDIR"
303
+
304
+ IfFileExists "$INSTDIR" 0 NoErrorMsg
305
+ MessageBox MB_OK "Note: $INSTDIR could not be removed!" IDOK 0 ; skipped if file doesn't exist
306
+ NoErrorMsg:
307
+
308
+ SectionEnd