1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/README.txt Mon Oct 27 00:44:45 2008 +0100
1.3 @@ -0,0 +1,88 @@
1.4 +Introduction
1.5 +------------
1.6 +
1.7 +The astgrep program permits the searching of Python source files for textual
1.8 +information of a specific type. Instead of matching a search term or
1.9 +expression to all text in a program, as grep would do, astgrep matches only
1.10 +tokens in the program having a particular type, such as names or constants.
1.11 +
1.12 +Quick Start
1.13 +-----------
1.14 +
1.15 +Try the following examples, replacing astgrep with astgrep.py if the software
1.16 +has not been installed from a package:
1.17 +
1.18 +Search for classes whose name contains Node in a particular file:
1.19 +
1.20 + astgrep -t Class -e Node libxml2dom/__init__.py
1.21 +
1.22 +Search for functions or methods whose name starts with visit in a particular
1.23 +directory hierarchy, micropython, showing the name of the matching functions
1.24 +in the output:
1.25 +
1.26 + astgrep -p -t Function -e '^visit' -r micropython
1.27 +
1.28 +Search for accesses of attributes having the exact name _node in a particular
1.29 +directory hierarchy, libxml2dom, showing the line number of each match in the
1.30 +output:
1.31 +
1.32 + astgrep -n -t Getattr -e '^_node$' -r libxml2dom
1.33 +
1.34 +Dependencies
1.35 +------------
1.36 +
1.37 +The astgrep program has the following basic dependencies:
1.38 +
1.39 +Package Release Information
1.40 +------- -------------------
1.41 +
1.42 +Python 2.5.1
1.43 +cmdsyntax Tested with 0.91
1.44 +
1.45 +URLs
1.46 +----
1.47 +
1.48 +Python http://www.python.org/
1.49 +CMDsyntax http://www.boddie.org.uk/david/Projects/Python/CMDSyntax/index.html
1.50 +
1.51 +Contact, Copyright and Licence Information
1.52 +------------------------------------------
1.53 +
1.54 +The current Web page for astgrep at the time of release is:
1.55 +
1.56 +http://www.boddie.org.uk/python/astgrep.html
1.57 +
1.58 +Copyright and licence information can be found in the docs directory - see
1.59 +docs/COPYING.txt and docs/gpl-3.0.txt for more information.
1.60 +
1.61 +Release Procedures
1.62 +------------------
1.63 +
1.64 +Update the astgrep.py __version__ attributes.
1.65 +Change the version number and package filename/directory in the documentation.
1.66 +Update the release notes (see above).
1.67 +Check the setup.py file (if eventually written).
1.68 +Check the release information in the PKG-INFO file and in the package
1.69 +changelog (and other files).
1.70 +Tag, export.
1.71 +Generate the resources (for the non-packaged full version).
1.72 +Remove generated .pyc files: rm `find . -name "*.pyc"`
1.73 +Archive, upload.
1.74 +
1.75 +Making Packages
1.76 +---------------
1.77 +
1.78 +To make Debian-based packages:
1.79 +
1.80 + 1. Create new package directories under packages if necessary.
1.81 + 2. Make a symbolic link in the distribution's root directory to keep the
1.82 + Debian tools happy. Try one of the following:
1.83 +
1.84 + ln -s packages/ubuntu-gutsy/astgrep/debian/
1.85 +
1.86 + 3. Run the package builder:
1.87 +
1.88 + dpkg-buildpackage -rfakeroot
1.89 +
1.90 + 4. Locate and tidy up the packages in the parent directory of the
1.91 + distribution's root directory.