Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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
  2. @dracos

    Add sort name to speaker form and use for sorting.

    dracos authored
    Also lowercase for ordering purposes.
    Use patch from MapIt to cope with use of get_queryset.
  3. @dracos

    Alter section editing URL endpoints to match rest.

    dracos authored
    The other editing endpoints are all singular.
  4. @dracos

    Simplify section/speaker forms.

    dracos authored
    Fixes #350.
  5. @dracos @duncanparkes

    Add flake8 running to pre-commit hook.

    dracos authored duncanparkes committed
    Couple of fixes thereby.
  6. @dracos @duncanparkes

    If you edit a speaker/section, update the slug.

    dracos authored duncanparkes committed
    We already store slug history and redirect appropriately.
  7. @duncanparkes

    Move instance home buttons to sayit.

    duncanparkes authored
    These buttons used to live in the template in sayit.mysociety.org,
    for reasons no-one can remember.
  8. @duncanparkes

    Show header buttons on all speakers page if there are no speakers.

    duncanparkes authored
    We still want people to be able to import speakers if there aren't
    any already, in fact, we particularly want them to be able to!
    
    The nicest way I can think to do this is to include the normal buttons
    from the header. It seems a bit cluttered with the 'All Speakers' heading
    though, so I've taken that out until there are some.
Something went wrong with that request. Please try again.