OCR in docs upload

43 views
Skip to first unread message

p2b

unread,
Apr 8, 2012, 9:56:45 AM4/8/12
to googlecl...@googlegroups.com
Hi,

There is a work-around described in issue 338 to enable OCR on documents that are uploaded to google docs.
It says to add '?ocr=true' to line 326 of googlecl/docs/client.py.

I am having some troubles to implement this fix.
First of all how do I know which client.py to edit? I have multiple instances of this file:

/usr/lib/pymodules/python2.6/gdata/docs/client.py /usr/lib/pymodules/python2.7/gdata/docs/client.py /usr/local/lib/python2.7/dist-packages/googlecl/docs/client.py /usr/share/pyshared/gdata/docs/client.py


Also the work-around seems te be written for an older version of googlecl.
Can someone give me some pointers how to enable OCR for google docs uploads?

Thanks, Pieter

p2b

unread,
Jun 25, 2012, 12:14:35 PM6/25/12
to googlecl...@googlegroups.com
bump.

Anyone?

Op zondag 8 april 2012 15:56:45 UTC+2 schreef p2b het volgende:

p2b

unread,
Jun 27, 2012, 5:08:25 PM6/27/12
to googlecl...@googlegroups.com
Op zondag 8 april 2012 15:56:45 UTC+2 schreef p2b het volgende:
> Hi,
>
> </div>
> There is a work-around described in issue <a href="http://code.google.com/p/googlecl/issues/detail?id=338" target="_blank">338</a> to enable OCR on documents that are uploaded to google docs.</div>
> It says to add<span style="color:rgb(0,0,0);font-size:12px;white-space:pre-wrap"> &#39;?ocr=true&#39; to line 326 of </span><span style="color:rgb(0,0,0);font-size:12px;white-space:pre-wrap">googlecl/docs/client.py.</span></div>
> <font color="#000000"><span style="font-size:12px;white-space:pre-wrap">
> </span></font></div>
> <font color="#000000"><span style="font-size:12px;white-space:pre-wrap">I am having some troubles to implement this fix.</span></font></div>
> <font color="#000000"><span style="font-size:12px;white-space:pre-wrap">First of all how do I know which client.py to edit? I have multiple instances of this file:</span></font></div>
> <font color="#000000"><span style="font-size:12px;white-space:pre-wrap">
> </span></font></div>
> <font color="#000000">
> <span style="font-size:12px;white-space:pre-wrap">/usr/lib/pymodules/python2.6/<WBR>gdata/docs/client.py
> /usr/lib/pymodules/python2.7/<WBR>gdata/docs/client.py
> /usr/local/lib/python2.7/dist-<WBR>packages/googlecl/docs/client.<WBR>py
> /usr/share/pyshared/gdata/<WBR>docs/client.py</span>
> </div>
>
> </div>
>
> </div>
> Also the work-around seems te be written for an older version of googlecl. </div>
> Can someone give me some pointers how to enable OCR for google docs uploads?</div>
>
> </div>
> Thanks, Pieter</div></font></div>
>
> </div>



Op zondag 8 april 2012 15:56:45 UTC+2 schreef p2b het volgende:
> Hi,
>
> </div>
> There is a work-around described in issue <a href="http://code.google.com/p/googlecl/issues/detail?id=338" target="_blank">338</a> to enable OCR on documents that are uploaded to google docs.</div>
> It says to add<span style="color:rgb(0,0,0);font-size:12px;white-space:pre-wrap"> &#39;?ocr=true&#39; to line 326 of </span><span style="color:rgb(0,0,0);font-size:12px;white-space:pre-wrap">googlecl/docs/client.py.</span></div>
> <font color="#000000"><span style="font-size:12px;white-space:pre-wrap">
> </span></font></div>
> <font color="#000000"><span style="font-size:12px;white-space:pre-wrap">I am having some troubles to implement this fix.</span></font></div>
> <font color="#000000"><span style="font-size:12px;white-space:pre-wrap">First of all how do I know which client.py to edit? I have multiple instances of this file:</span></font></div>
> <font color="#000000"><span style="font-size:12px;white-space:pre-wrap">
> </span></font></div>
> <font color="#000000">
> <span style="font-size:12px;white-space:pre-wrap">/usr/lib/pymodules/python2.6/<WBR>gdata/docs/client.py
> /usr/lib/pymodules/python2.7/<WBR>gdata/docs/client.py
> /usr/local/lib/python2.7/dist-<WBR>packages/googlecl/docs/client.<WBR>py
> /usr/share/pyshared/gdata/<WBR>docs/client.py</span>
> </div>
>
> </div>
>
> </div>
> Also the work-around seems te be written for an older version of googlecl. </div>
> Can someone give me some pointers how to enable OCR for google docs uploads?</div>
>
> </div>
> Thanks, Pieter</div></font></div>
>
> </div>


Just figured it out:
Change the following lines:
452 return self.post(entry, uri + '?ocr=true', media_source=media,
453 desired_class=gdata.docs.data.DocsEntry,
454 auth_token=auth_token, **kwargs)
Reply all
Reply to author
Forward
0 new messages