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"> '?ocr=true' 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"> '?ocr=true' 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)