An error occurred fetching the project authors.
  1. 21 Aug, 2023 2 commits
  2. 30 Sep, 2022 1 commit
  3. 04 May, 2022 1 commit
    • Arnaud Fontaine's avatar
      py2/py3: Make Products code compatible with both python2 and python3. · a17bb910
      Arnaud Fontaine authored
      Done through various 2to3 fixers (zope.fixers, modernize, future) and manual
      changes. This is a single commit so that we have a clearer picture of how code
      converted with my2to3 should look like.
      
      Except straightforward @implementer decorator 2to3 fixer, only product/ folder
      was considered as the goal was to be able to create an ERP5Site.
      
      * Use @implementer decorator introduced in zope.interface 3.6.0 (2010):
      
        The implements syntax used under Python 2.X does not work under 3.X, since it
        depends on how metaclasses are implemented and this has changed. Instead it
        now supports a decorator syntax (also under Python 2.X).
      
        Applied thanks to 2to3 `zope.fixers` package.
      
      * Use `six.moves` rather than `future` install_aliases() feature because the
        latter use unicode_literals and "wraps" module aliases so that unicode() are
        returned for text rather than str() (Python2 standard library). This notably
        breaks BusinessTemplate code which uses urllib quote() for filesystem paths...
      
      * No more unbound methods in python3 so use six.get_unbound_function().
      
      * dict.(iteritems,iterkeys,itervalues)() => six.\1(dict) thanks to `dict_six`
        2to3 fixer from `modernize`:
        $ python-modernize -w -f dict_six product/
      
      * Manually make sure that dict.{items,values,keys}() returns a real list when it
        is latter modified rather than a dict_{items,values,keys} (ensure_list()). By
        default, 2to3 blindly does list(dict.{items,values,keys}()) which is not
        acceptable from performances point of view. With my2to3, this will be possible
        to handle such case automatically.
      
      * Replace cStringIO.StringIO() by six.moves.cStringIO() (a module alias for
        cStringIO.StringIO() on py2 and io.StringIO() on py3).
      
      * Use six.text_type which maps to unicode() on py2 and str() on py3. This also
        makes a clearer difference between text and binary strings.
      
      * Replace map()/filter() with lambda function by list comprehension (this has
        the benefit to avoid casting to list for py3 as it returns iterators).
      a17bb910
  4. 02 Jun, 2021 1 commit
    • Jérome Perrin's avatar
      dms: use ghostscript to convert PDF to text · f775724e
      Jérome Perrin authored
      For historical reasons, PDF to text involved conversion first of the PDF to
      png, then this png to tiff and the tiff was sent to tesseract. This works, but
      it consumes a lot of resources with large PDFs, especially because the
      intermediate png/tiff are created with a resolution of 300 DPI, which easily
      needs serveral Go of RAM and temporary disk space.
      This was obsorved with the PDF created by erp5_document_scanner, which are
      usually high quality (1 or 2Mo per page) and even a one page PDF sometimes
      took more than one minute to OCR.
      
      Since 9.53 ghostscript integrates tesseract engine directly, we don't need to
      prepare a tiff beforehand, we can directly send the PDF data to ghostscript.
      
      These change use ghostscript if available and otherwise fallback to the same
      pipeline as before. This will allow the transition until all ERP5 instances
      are running a recent enough SlapOS with ghostscript 9.54. Fortunately, before
      SlapOS include ghostscript 9.54, ERP5 software release did not have ghostscript
      in $PATH, so we don't have to check ghostscript version, we assume that if gs
      is in $PATH, it means we have a recent enough SlapOS.
      
      This new approach was less tolerant regarding broken/password-protected PDFs
      so we perform a new check that the PDF is valid and not encrypted before
      trying to use OCR.
      f775724e
  5. 20 Jul, 2020 1 commit
  6. 11 Mar, 2020 1 commit
  7. 21 Feb, 2020 1 commit
  8. 10 Feb, 2020 1 commit
  9. 14 Jan, 2020 1 commit
  10. 16 Oct, 2014 1 commit
  11. 26 Jun, 2014 1 commit
  12. 16 May, 2014 1 commit
  13. 15 Oct, 2013 2 commits
  14. 16 Aug, 2013 1 commit
  15. 12 Aug, 2013 3 commits
  16. 28 Jun, 2013 1 commit
  17. 17 Apr, 2013 1 commit
  18. 04 Apr, 2013 1 commit
  19. 31 Mar, 2013 1 commit
  20. 28 Feb, 2013 2 commits
  21. 26 Feb, 2013 1 commit
  22. 24 Mar, 2011 1 commit
  23. 16 Mar, 2011 1 commit
  24. 02 Feb, 2011 1 commit
  25. 01 Feb, 2011 2 commits
  26. 28 Dec, 2010 1 commit
  27. 01 Dec, 2010 1 commit
    • Nicolas Delaby's avatar
      Refactoring of DMS. · de2545fc
      Nicolas Delaby authored
      - file_name become filename
      - filename values are not stored in source_reference
      Contribution Tool will not honour id arguments.
      Contribution Tool can create any kind of document.
      Portal Contribution Registry can read extention, content_type and read content_type from data
      to guess what will be the best Portal Type to use.
      
      All discoverable methods (IDiscoverable) can change the portal_type of document.
        (migratePortalType)
      User can change portal_type of document through UI with simple Action.
      Crawling will not hardcode ids of document depending of their URLs thanks to 
      Portal Url Registry
      
      
      
      
      
      git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40971 20353a03-c40f-0410-a6d1-a30d3c3de9de
      de2545fc
  28. 28 Oct, 2010 1 commit
  29. 19 Jul, 2010 1 commit
  30. 15 Jul, 2010 1 commit
    • Sebastien Robin's avatar
      sync with trunk@37114 · c1ae57b0
      Sebastien Robin authored
      Conflicts:
      	bt5/erp5_base/bt/revision
      	bt5/erp5_simulation/DocumentTemplateItem/InvoiceSimulationRule.py
      	bt5/erp5_simulation/bt/revision
      	bt5/erp5_trade/SkinTemplateItem/portal_skins/erp5_trade/Base_viewTradeFieldLibrary.xml
      	bt5/erp5_trade/bt/change_log
      	bt5/erp5_trade/bt/revision
      	products/ERP5/Document/BusinessPath.py
      	products/ERP5/Document/SimulationMovement.py
      	products/ERP5/Document/TradeCondition.py
      	products/ERP5/Document/TradeModelLine.py
      	products/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision
      	products/ERP5Type/ERP5Type.py
      
      git-svn-id: https://svn.erp5.org/repos/public/erp5/sandbox/amount_generator@37129 20353a03-c40f-0410-a6d1-a30d3c3de9de
      c1ae57b0
  31. 14 Jul, 2010 2 commits
  32. 03 Jun, 2010 1 commit
  33. 02 Jun, 2010 1 commit