From 0c9e21d8818d8ce90ba3eb5c5c7594e148ea64ee Mon Sep 17 00:00:00 2001 From: Vinayak Mehta Date: Tue, 4 Sep 2018 03:53:30 +0530 Subject: [PATCH] Update README --- README.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index c002f09..7efc6f2 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,22 @@ Camelot is a Python 2.7 library and command-line tool for getting tables out of ## Usage
-from camelot.pdf import Pdf
-from camelot.lattice import Lattice
-
-manager = Pdf(Lattice(), "/path/to/pdf")
-tables = manager.extract()
+>>> import camelot
+>>> tables = camelot.read_pdf("foo.pdf")
+>>> tables
+<TableSet n=2>
+>>> tables.to_csv(zip=True) # to_json, to_excel, to_html
+>>> tables[0]
+<Table shape=(3,4)>
+>>> tables[0].parsing_report
+{
+    "accuracy": 96,
+    "whitespace": 80,
+    "time_taken": 0.5,
+    "page": 1
+}
+>>> tables[0].to_csv("foo.csv") # to_json, to_excel, to_html
+>>> df = tables[0].to_df()
 
Camelot comes with a CLI where you can specify page numbers, output format, output directory etc. By default, the output files are placed in the same directory as the PDF.