Skip to content

Commit

Permalink
Merge branch 'release/0.7.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
klen committed Jul 10, 2014
2 parents 4e7a8cb + e049169 commit 45ec763
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
2 changes: 2 additions & 0 deletions Makefile
Expand Up @@ -26,6 +26,8 @@ register:
.PHONY: upload
# target: upload - Upload module on PyPi
release: clean
@git push --all
@git push --tags
@python setup.py sdist upload || echo 'Skip sdist upload'
# @python setup.py bdist_wheel upload || echo 'Skip bdist upload'

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Expand Up @@ -171,7 +171,7 @@ Get help

head/h -- extract the first element/character of a list/string

index/ix/i N -- get the N-th element/character from list/string.
index/ix N -- get the N-th element/character from list/string.

join/j SEPARATOR -- concatenate a list/string with intervening occurrences of SEPARATOR

Expand Down
2 changes: 1 addition & 1 deletion atmark/__init__.py
@@ -1,7 +1,7 @@
# Package information
# ===================

__version__ = "0.7.1"
__version__ = "0.7.2"
__project__ = "atmark"
__author__ = "Kirill Klenov <horneds@gmail.com>"
__license__ = "BSD"
Expand Down
6 changes: 3 additions & 3 deletions atmark/atmark.py
Expand Up @@ -2,8 +2,8 @@
Atmark (@) -- is a command line utility for parsing text input and generating output.
You can pipe data within a Atmark (@) statement using standard unix style pipes ("|").
Provide for Atmark function composition and let them work for you.
You can pipe a data within Atmark (@) statement using standard unix style pipes ("|").
Provide for Atmark a function composition and let them work for you.
Example. Replace "_" with "-" in files in current dir and change the files extensions to jpg:
Expand All @@ -13,7 +13,7 @@
$ ls > replace($LINE, "_", "-") > split($RESULT, ".") > format($RESULT, "mv $LINE $RESULT.jpg")
You can use "@ --debug ARGS" for debug Armark commands. """
You can use `--debug` argument (@ --debug ARGS) for debug Armark commands. """
import os
import sys

Expand Down
7 changes: 3 additions & 4 deletions atmark/commands.py
Expand Up @@ -94,14 +94,13 @@ def at_head(arg):
return arg.value and arg.value[0] or None


@_command(1, 'ix', 'i')
@_command(1, 'ix')
def at_index(arg, index):
""" %s N \t\t -- get the N-th element/character from list/string. """
try:
index = int(index)
except ValueError:
return arg.value[int(index)]
except (ValueError, IndexError):
return None
return arg.value[index]


@_command(1, 'j')
Expand Down

0 comments on commit 45ec763

Please sign in to comment.