I want to design an email header parser using c language.
I have the email header in text format, but i don't have any idea of how to
parse and extract information from it, and what is the relevent information
to be extracted.
If anybody have an idea of any programme please inform.
There are a lot of libraries in C++ that you could use or check out for clues, like these or mimetic.
I suggest you also check these out:
RFC2821 and RFC2822
One way to go about it is to use a regular expressions library. This is a good place to start: http://www.gnu.org/s/libc/manual/html_node/Regular-Expressions.html
Related
I have implemented an iPad application which is actually read the PDF file(using quartz). Now I want to implement the Search Feature and for this I have checked some tutorial some where mentioned using quartz and some where mentioned FastPdfKit. But I don't know which one will be better. I have seen the quartz ( https://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_pdf_scan/dq_pdf_scan.html ).
I have some doubt in this.
the "Callbacks for Operators" what and why we use this?
"Operators Table" what is the purpose of this? and
Where we will put the search text.
Please suggest me in this regards or provide any other open source which I can use.
Thanks in advance.
CGPDFScanner is a fairly low-level API which allows you to selectively scan for various PDF operators and invoke callbacks on each operator. It does require you to have some knowledge of PDF structure, but it will do the job. A PDF operator is a command in a PDF file which does some operation (usually manipulating the drawing state, e.g. writing text, drawing lines, changing graphics state, etc.).
Essentially, you tell the scanner what PDF operators you are interested in, and tell it what callback you want to invoke. In your case, you are interested in the text operators TJ, Tj; see this page for a working text search example using this API, and this question for some other answers on text search.
You may get your answer at FastPdfKit. Please let me know if you still more information. I think this will solve your purpose.
#Subodh S: At the momment, PDFKitten does not support multi-words query. Therefore, your keyword is not searched and highlighted. You must handle yourself in source code and even change some points in PDFKitten.
Is there any particular way to integrate Captch code validation in iPhone application?
is this possible to create captcha? (with or without web-service / any API)
If any kind of external library or any source is required to be imported, then also please let me know.
Any kind of link or source code is available then please suggest me.
Also suggest from where to start to do this, if possible.
Thanks in advance.
I know you probably don't want to hear this, but why do you need captcha on iPhone? It's completely useless since there are no bots or something.
But if you really need it then make some image with white background and then use this code
http://iphonesdksnippets.com/post/2009/05/05/Add-text-to-image-%28UIImage%29.aspx
to add text to the image... once you'll have this, then just check if the entered string is equal to the randomly generated one on the image and you are good to go.
I didn't find any libraries which could be used as a captcha, so I think this is probably the best solution right now.
Cya,
Nick
Am able to parse
< name>Walmart< /name>
using xml parser
but how to parse
*< s:image link="http://i.walmartimages.com/i/p/00/02/72/42/77/0002724277837_500X500.jpg"/>*
using xml parse in iphone.
Thanks in advance
There are various ways of doing this. My personal favorite is using Xpath via TFHpple. Xpath is clearly documented and easy to understand at W3schools. Sorry, I can't link to it. Spam filter prevents it.
I've used this approach for all sorts of things, and it is also great to note that you can use this library with HTML data as well.
I got the solution......
No need to go to parser libraries...
We can parse such tags using NSXMLParser with the help of attribute concepts....
thanks for you all for helping me....
cheers
I am working on gather sports statistics for a personal hobby project. I found this site with all the info I need:file:///Users/JohnJNichols4/Desktop/view-source%20cluster.leaguestat.com%20download.php%20client_code=ahl&file_path=daily-report%20daily-report.html
Am I able to parse this site with xpath? I only have experience (little experience) with cocoa and xcode, so I am writing this is objective c with a wrapper called hpple. My problem arises when I need to pull info from the tables. I have no idea how to go about this. The xpath expressions that I enter are all wrong. Can anyone show me how one might parse the standings in the first table? The function I am using is:
NSArray *elements = [xpathParser search:#"xpath stuff goes here"];
Thanks a lot!
EDIT URL
Sorry guys, I put up the local URL by mistake. Here is the right one: http://cluster.leaguestat.com/download.php?client_code=ahl&file_path=daily-report/daily-report.html
If you want to treat it as XML, you can, but it'll have to be properly formed, which isn't always the case with HTML. I'd recommend using the TouchXML library, it has great xpath support and a fair amount of documentation and examples.
http://foobarpig.com/iphone/touchxml-installation-guide.html
I am looking for a way to identify quoted text in emails. The goal is to add something along the lines of Gmails "show quoted text" feature to my web app which involves a mail handler bot.
There are similar questions on stackoverflow, but they are asking for an algorithm. I could implement this if I have to, but I would greatly prefer a tried and true solution.
Requirements:
1) Support both HTML and plain text emails
2) Operates on the full thread (that is, it has the original text to compare the quoted text against; no need to guess)
3) Handles common quote-related additions such as "On May 10th, 2008 at 6:35 PM Brandon wrote:"
A python library would be super magically awesome ideal, but I don't expect to get that lucky. A simple command line tool which can do this would pretty close to ideal, but I don't expect to that that lucky either. I'd gladly settle on a well known good implementation from an open source mail client which would be reasonably possible to extract into a tool.
Does anyone have a suggestion what my best bet would be?
I'm kind of surprised that there is no such thing as an "email handler bot construction kit".
Just following up on an email I received regarding this question.
Sup has a pretty easy to understand/extract/translate bit of logic for accomplishing this. I ported the relevant functions to Python and tweaked it for my purposes.
Sup is terminal-based mail client written in Ruby: http://sup.rubyforge.org/
Google has a patent for their method:
http://www.google.co.uk/patents/US7222299