My favorites
▼
|
Sign in
nehcfrus
utilities&small libs written in various languages
Project Home
Downloads
Wiki
Issues
Source
Checkout
Browse
Changes
Source path:
svn
/
trunk
/
php
/
build-func-tags.php
r279
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
require_once 'nehcfrus.php';
require_once 'io.php';
require_once 'html2txt.php';
$html_dir = NEHCFRUS_HOME.'/downloads/html';
$txt_dir = NEHCFRUS_HOME.'/php/functions';
$d=dir($html_dir);
while (false!==($entry=$d->read())) {
if (!preg_match("#function\.(.+)\.html#",$entry,$m)) continue;
$f = $html_dir.'/'.$entry;
$c = file_get_contents($f);
$txt_file = $txt_dir.'/'.$m[1].'.txt';
if (!preg_match('#<\/h1[^>]*>(.+)<hr#si',$c,$matches)) {
echo $entry.'('.strlen($c).')'."\n";
continue;
}
$text = html2txt($matches[1]);
$tags[]=str_replace('-','_',$m[1]).chr(9).$txt_file.chr(9).'1';
io::writeFile($txt_file,$text);
}
io::writeFile(NEHCFRUS_HOME.'/php/tags',implode(chr(10),$tags));
?>
Show details
Hide details
Change log
r74
by surfchen on Apr 24, 2008
Diff
add 2 php files for vim tags
Go to:
/trunk/php/build-func-tags.php
/trunk/php/lib/cidian.php
/trunk/php/lib/cidian/StarDict.php
/trunk/php/vim-tags.php
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 749 bytes, 22 lines
View raw file
Powered by
Google Project Hosting