I am having a pdf file contaning quotes of some famous开发者_运维百科 people.I want to store these quotes in sqlite database.any suggestions?
There is no direct relation with pdf and sqlite.
First you have to somehow decode the information/data from pdf file. Read the quotes in text format.
Then you can insert them in a sqlite database.
Its a kind of tough job to decode information from pdf file. Then you need to know the structure of the pdf file format. You can get a description here pdf file format
I think you can look for some pdf file converter to convert it into text, html, xml or csv. Then read that by your app.
I think best way is through command line
awk '{printf"INSERT INTO Quotes VALUES (\x27%s\x27,\x27 Abraham Lincon\x27);\n",$0}' Quotes-AbrahamLincon.txt
where Quotes-AbrahamLincon.txt contains
A friend is one who has the same enemies as you have.
A house divided against itself cannot stand.
A woman is the only thing I am afraid of that I know will not hurt me.
output will be
INSERT INTO Quotes VALUES ('A friend is one who has the same enemies as you have.',' Abraham Lincon');
INSERT INTO Quotes VALUES ('A house divided against itself cannot stand.',' Abraham Lincon');
INSERT INTO Quotes VALUES ('A woman is the only thing I am afraid of that I know will not hurt me.',' Abraham Lincon');
now you can write this into sqlite db
精彩评论