Tagged: iphone RSS

  • Nathan Haskins 5:51 am on June 11, 2010 Permalink | Reply
    Tags: ibook, iphone   

    Publish e-book to apple store 

    Step by step guide – http://touchreviews.net/publish-ebooks-apple-ibookstore/
    Link to apply to iTunes – https://itunesconnect.apple.com/WebObjects/iTunesConnect.woa/wa/apply

     
  • Nathan Haskins 5:59 am on May 18, 2010 Permalink | Reply
    Tags: iphone,   

    Mailchimp iPhone app looks really good. http://www.mailchimp.com/iphone

     
  • Nathan Haskins 10:39 am on May 7, 2010 Permalink | Reply
    Tags: iphone, , regex, script   

    old jQuery API scraper script 

    used this on the jQuery iPhone app to get the data.

    (.*?)
    
    @s', $page, $cmdBlock); //grabs command block
    //generates a filtered page content
    for ($i=0; $i<=sizeof($cmdBlock[0]); $i++) {
    	$content .= $cmdBlock[2][$i];
    }//end for
    //plist friendly filters
    $content = preg_replace('@ @',' ',$content);
    $content = preg_replace('@&lt\;@','<', $content); // converts less than to a browser viewable text version
    $content = preg_replace('@&gt\;@','>', $content); // converts greater than to a browser viewable text version
    $content = preg_replace('@"@','"',$content);       // converts chars to quote
    $content = preg_replace('@@','',$content);  
    
    preg_match_all('@(.*?)@s',  $content, $cmdNames); //filters the command names
    preg_match_all('@
    <div class="desc">(.*?)</div>
    @s', $content, $cmdDesc);  //filters the command names
    
    for ($i=0; $i&lt;=sizeof($cmdBlock[0])-1; $i++) {
    
    	$final .=  "";
    	$final .=  $cmdNames[1][$i];  //need to strip tags 
    
    	$final .=  "\n";
    	$final .=  "";
    	$final .=  "&lt;h1&gt;".$cmdNames[1][$i]."&lt;/h1&gt;"."&lt;br&gt;";
    	$final .=  "&lt;p&gt;".$cmdDesc[1][$i]."&lt;/p&gt;"."&lt;br/&gt;\n";
    		if (preg_match('@<code class="javascript">(.*?)@s', $cmdBlock[0][$i], $cmdEx)) {
    			$cmdEx = preg_replace('@&gt\;@','&gt;', $cmdEx); //makes the > text elements
    			$cmdEx = preg_replace('@&lt\;@','&lt;', $cmdEx); //makes the < text elements
    
    //syntax highlighting start
    
                $cmdEx = preg_replace('@\$@',  '<span class="shDollar">\$</span>', $cmdEx);
                $cmdEx = preg_replace('@\(@',  '<span class="shQuote">(</span>'  , $cmdEx);
                $cmdEx = preg_replace('@\)@',  '<span class="shQuote">)</span>'  , $cmdEx);
                $cmdEx = preg_replace('@}@' ,  '<span class="shCurl">}</span>'   , $cmdEx);
    			$cmdEx = preg_replace('@{@' ,  '<span class="shCurl">{</span>'   , $cmdEx);
    
    //syntax highlighting end
    	$final .=  "<div id="codeBlock">".$cmdEx[1]."</div>"."\n"; } else {$final .=  "\n";
    	}//end if
    	$final .=  "\n";
    
    }// end for
    print <<<_HTML_
    
    \n
    _HTML_;
    echo $final;
    print <<<_HTML_
    
    _HTML_;
    ?>
    

    Well that broke the code block… lol Im not too surprised. Note to self, get file attachments setup for easy archiving.

    Zip file here: regex-jquery-api.zip