Skip to content

Commit 7e95ee6

Browse files
committedDec 30, 2011
Use the root of the git repository as the root of the packag
This makes it easier for people to git clone directly in the packages folder easier for people
1 parent db889e3 commit 7e95ee6

File tree

23 files changed

+44
-0
lines changed

23 files changed

+44
-0
lines changed
 

‎maketags ‎SharedSupport/maketags

File renamed without changes.
File renamed without changes.

‎Support/maketags

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/usr/local/zend/bin/php-cli
2+
<?php
3+
//------------------------------------------------------------------------------
4+
// J. Gregg Thomason (gregg.thomason@gmail.com)
5+
// inspired by https://github.com/markhuot/ptags
6+
//------------------------------------------------------------------------------
7+
8+
$zendpath = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($argv[1], FilesystemIterator::SKIP_DOTS)); // path to Zend base dir. like the one with the files in it.
9+
$tagfile = "!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;\" to lines/\n";
10+
$tagfile.= "!_TAG_FILE_SORTED 0 /0=unsorted, 1=sorted, 2=foldcase/\n";
11+
$tagfile.= "!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/\n";
12+
$tagfile.= "!_TAG_PROGRAM_NAME Exuberant Ctags //\n";
13+
$tagfile.= "!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/\n";
14+
$tagfile.= "!_TAG_PROGRAM_VERSION 5.8 //\n";
15+
foreach($zendpath as $pathitem){
16+
if($pathitem->isDir()) continue;
17+
if(preg_match('/\.php/', $pathitem->getFilename())){
18+
$activefile = file_get_contents($pathitem->getPathname());
19+
$isagoodfile = preg_match('/^(abstract|final)?\s?(class|interface) (\w+)/m', $activefile, $classname);
20+
if(!$isagoodfile) { continue; }
21+
$thisclass = $classname[3];
22+
preg_match_all('/(public|private|protected)\s?(static)?\s?function\s?([&_\w]+)\s?(\([\w\s,&\'\"\(\):\._\$=]*\))+/m', $activefile, $allfuncs, PREG_SET_ORDER);
23+
foreach($allfuncs as $funcmatch){
24+
$signature = str_replace('$', '', $funcmatch[4]);
25+
$signature = str_replace("'",'',$signature);
26+
$signature = str_replace("\n",' ',$signature);
27+
$tagfile .= $funcmatch[3]."\t*.php\t0;\"\tkind:f\tclass:".$thisclass."\taccess:".$funcmatch[1]."\tsignature:".$signature."\n";
28+
}
29+
}
30+
}
31+
file_put_contents('tags', $tagfile);

‎Support/maketags.py

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/python
2+
#------------------------------------------------------------------------------
3+
# J. Gregg Thomason (gregg.thomason@gmail.com)
4+
# inspired by https://github.com/markhuot/ptags
5+
#------------------------------------------------------------------------------
6+
7+
import sys,re,glob,os
8+
9+
10+
directorypath = sys.argv[1]
11+
for root,dir,files in os.walk(directorypath):
12+
if 'php' in files:
13+
print files

0 commit comments

Comments
 (0)
Please sign in to comment.