Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on May 26, 2015
  1. @dracos

    Fix display of speaker name when used in code.

    dracos authored
    The speaker attribute can return either str or unicode, so make sure it
    returns the expected unicode.
Commits on May 15, 2015
  1. @jpmckinney @dracos

    Make SSL certificate verification optional

    jpmckinney authored dracos committed
  2. @dracos
Commits on May 13, 2015
  1. @dracos

    Fix AN import of empty docDate or link.

    dracos authored
    If the element was empty, then the attribute was not imported.
    Thanks to Yuanhsiang Cheng for reporting.
Commits on May 6, 2015
  1. @dracos
Commits on Mar 30, 2015
  1. @jpmckinney
Commits on Mar 17, 2015
  1. @dracos

    Compare section and speech keys with same type.

    dracos authored
    In Python 3, you cannot compare a str and an int, so use infinity for
    the same effect. Fixes #472.
Commits on Jan 16, 2015
  1. @dracos
  2. @dracos

    Print out stats in command line AN import.

    dracos authored
    import_document() has not been returning a section for some time.
    It's possible there isn't one "top level" section in an AN file (if
    there's no docTitle, for example), so output the stats that the web
    interface to AN import is currently using.
    
    Thanks to Jaroslav Semančík for reporting. Fixes #460.
  3. @dracos

    Fix small issue with web AN import.

    dracos authored
    If the file contained a docTitle, had already been imported and was
    being imported with "skip", it would throw an exception.
Commits on Jan 14, 2015
  1. @duncanparkes
  2. @duncanparkes

    Merge pull request #456 from mysociety/girogiro-clobber-refinement

    duncanparkes authored
    Refine clobber to allow skipping, merging, or replacing existing sections.
    
    @girogiro's original message: 
    
    We use a three-level section hierarchy for parliamentary debates: electoral term - session - sitting. There is one AN file per sitting and the files share up to two outer level sections. To import a file into an existing hierarchy and still have an opportunity to replace existing sections I propose the following two changes in AkomaNtoso import.
    
    Clobbering works on all levels of section hierarchy now, not on the top-level section only.
    
    There are three options for clobbering of sections with the same heading:
    
        skip to skip import of a section that already exists,
        replace to delete existing section and replace it with the imported one,
        merge to append content of the imported section to the existing one.
    
    It might be better also to join respective command-line options into something like --clobbering with three allowed values skip, replace and merge. I just added third separate option --merge-existing to the existing two in sake of backwards compatibility.
  3. @duncanparkes

    Colour coded output for the pre-commit hook.

    duncanparkes authored
    Thanks @dracos for suggesting this.
  4. @duncanparkes

    Update import AN page with skipping/merging sections.

    duncanparkes authored
    The Akoma Ntoso import page needs a small update to work with
    the new skip/merge/replace options for AN top level sections on
    import.
  5. @duncanparkes

    Placate flake8.

    duncanparkes authored
  6. @girogiro @duncanparkes

    Follow #434 when clobbering an AN import

    girogiro authored duncanparkes committed
    * `replace` deletes all existing sections with the same heading (or
      no heading) as the one being imported. If there are more sections
      with that name in the import, all of them are imported.
    
    * `merge` if there is an existing section with the same heading as
      the one being imported, speeches of all sections in the import
      with that heading will be added to it (if there are more existing
      sections with the same name, speeches are added to the first one).
      If there is no existing section with the same heading as the one
      being imported, all sections with that heading are imported as
      separate sections.
    
    * `skip` if there is an existing section with the same heading as
      the one being imported, import of the section is skipped
  7. @girogiro @duncanparkes

    import files in a directory in sorted order

    girogiro authored duncanparkes committed
    Some listings in SayIt depend on the order the speeches and sections
    were imported. However, when importing a directory files imported by
    os.walk() function were traversed in random order. This commit sorts
    the files first by their path and name.
  8. @girogiro @duncanparkes

    Clobbering refinement in AkomaNtoso import

    girogiro authored duncanparkes committed
    Clobbering works on all levels of section hierarchy now, not on the
    top-level section only. There are three options for clobbering of
    sections with the same heading:
    
    * `skip` to skip import of sections that already exist,
    * `replace` to replace existing sections with the imported ones and
    * `merge` to append content of the imported sections to the existing
      ones.
Commits on Jan 12, 2015
  1. @dracos @duncanparkes

    Raise exception on empty 'showAs' attribute.

    dracos authored duncanparkes committed
  2. @duncanparkes
  3. @duncanparkes

    Give sections with no headings a title of 'Untitled'.

    duncanparkes authored
    We need a title for a section to make the slug out of.
  4. @duncanparkes

    Add an AN import page.

    duncanparkes authored
    Add an AN import page, which consists of a box to put your source
    url in and the option to skip/clobber/duplicate sections.
Commits on Jan 8, 2015
  1. @duncanparkes

    Use requests in import_akomantoso.

    duncanparkes authored
    Also refactor tests slightly to remove duplication.
Commits on Dec 13, 2014
  1. @dracos

    Version 1.3.2.

    dracos authored
    Meant to include this in 1.3.1 and forgot.
  2. @dracos

    Show calls to action when logged out too.

    dracos authored
    The messages previously shown are more suited for the hosting service at
    sayit.mysociety.org - this way, when you install the code yourself, you
    are immediately given things to do.
    
    Fixes #411.
  3. @dracos
  4. @dracos
Commits on Dec 12, 2014
  1. @dracos

    Version 1.3.1.

    dracos authored
Commits on Dec 10, 2014
  1. @dracos

    Fix colour code generation in Python 3.

    dracos authored
    hashlib() needs to be passed an encoded string in Python 3.
    Fixes #439. Thanks to Jaroslav Semančík for reporting.
Commits on Dec 8, 2014
  1. @dracos
  2. @dracos

    Better error on AN import for missing speaker ID.

    dracos authored
    And display a more informative generic error too.
Commits on Dec 5, 2014
  1. @dracos

    Version 1.3.

    dracos authored
  2. @dracos

    Show divider between sections lacking subsections.

    dracos authored
    There's no section-list child if it's just a list of sections, so add
    the border to speech-wrapper instead - but only if it's the last child,
    because it's still present when there is a section-list.
  3. @dracos
Commits on Dec 4, 2014
  1. @dracos
Something went wrong with that request. Please try again.