pike.git / bin / extract.pike

version» Context lines:

pike.git/bin/extract.pike:1:   #!/usr/local/bin/pike   // Copyright © 2000, Roxen IS.   // By Martin Nilsson and Andreas Lange   // - // $Id: extract.pike,v 1.8 2000/11/27 10:28:07 nilsson Exp $ + // $Id: extract.pike,v 1.9 2001/02/20 02:16:47 nilsson Exp $   //         // The arguments given to the program   mapping args = ([]);   // All the files to gather strings from   array(string) files = ({});   // All ids used, id:mapping(info)   mapping ids = ([]);   // Reversed id mapping, text:id
pike.git/bin/extract.pike:151:    return dec->clear()->feed(s)->drain();    };    }   }         array(mapping) languagefiles(string searchpath, void|string skiplang) {    // Based on the searchpath, returns list of files - skiplang-file    string pattern = replace(searchpath, "%%", "%");    string dirbase = (pattern/"%L")[0]; -  if(dirbase[-1]!='/') { +  if(dirbase!="" && dirbase[-1]!='/') {    array split = dirbase/"/";    dirbase = split[..sizeof(split)-2]*"/"+"/";    }    string s_patt;    if(search(pattern, "/", sizeof(dirbase))==-1)    s_patt=pattern[sizeof(dirbase)..];    else    s_patt=pattern[sizeof(dirbase)..search(pattern, "/", sizeof(dirbase))-1];    s_patt = replace(s_patt, "%L", "%3s");   
pike.git/bin/extract.pike:1026:    configname = args->project+".xml";    string filename = parse_config(configname);    if(!xml_name || xml_name=="")    if(filename!="")    xml_name = filename;    else if(args->xmlpath && args->baselang)    xml_name = replace(args->xmlpath, "%L", args->baselang);       if( (!(xml_name && args->sync && args->xmlpath && args->baselang)) &&    (!sizeof(files) || args->help) ) { -  sscanf("$Revision: 1.8 $", "$"+"Revision: %s $", string v); +  sscanf("$Revision: 1.9 $", "$"+"Revision: %s $", string v);    werror("\n Locale Extractor Utility "+v+"\n\n");    werror(" Syntax: extract.pike [arguments] infile(s)\n\n");    werror(" Arguments: --project=name default: first found in infile\n");    werror(" --config=file default: [project].xml\n");    werror(" --out=file default: [project]_eng.xml\n");    werror(" --nocopy update infile instead of infile.new\n");    werror(" --notime don't include dump time in xml files\n");    werror(" --wipe remove unused ids from xml\n");    werror(" --sync synchronize all locale projects\n");    werror(" --encoding=enc default: ISO-8859-1\n");