Пример #1
0
def main():
    (options, args) = parse_args()

    court = options.court
    casenum = options.casenum

    if options.action == "delete_documents":
        documents = get_documents(court, casenum, options.docrange, options.show_warning)

        # Safety first! - put these in a different directory than our normal ones
        remove_docket.archive_docket_xml_locally(court, casenum, "backup_dockets")
        for document in documents:
          if document.available:
             remove_document.archive_document_locally(document, "backup_documents")


        status = delete_documents_from_docket(court, casenum, documents)

        if not status:
            print "IA Docket update did not succeed, exiting...."
            exit()

        print "not deleting items from IA - not setup to deal with large numbers of deletions"
        print "If this is a relatively small number of files, open this script and uncomment the lines below :"
        for document in documents:
            #print "    deleting document %s.%s from IA" % (document.docnum, document.subdocnum)
            #remove_document.delete_document_from_IA(document)
            document.delete()
Пример #2
0
def main():
    court, casenum = get_court_casenum_from_argv()
    documents = get_documents(court, casenum)
    for document in documents:
        if document.available:
            print document.docnum
            print document.subdocnum
            remove_document.archive_document_locally(document)
            remove_document.delete_document_from_IA(document)
        document.delete()

    archive_docket_xml_locally(court, casenum)
    delete_docket_xml_from_IA(court, casenum)
    delete_docket_html_from_IA(court, casenum)
Пример #3
0
def main():
    court, casenum = get_court_casenum_from_argv()
    documents = get_documents(court, casenum)
    for document in documents:
        if document.available:
            print document.docnum
            print document.subdocnum
            remove_document.archive_document_locally(document)
            remove_document.delete_document_from_IA(document)
        document.delete()

    archive_docket_xml_locally(court, casenum)
    delete_docket_xml_from_IA(court, casenum)
    delete_docket_html_from_IA(court, casenum)