This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~/delete_index | |
python del.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mapping = { | |
"_default_" : { | |
"type": "string" | |
} | |
} | |
conn.put_mapping("aip", {"_all" : {"enabled" : True}, "properties": mapping}, ["aips"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python -OO | |
# This file is part of Archivematica. | |
# | |
# Copyright 2010-2011 Artefactual Systems Inc. <http://artefactual.com> | |
# | |
# Archivematica is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 2 of the License, or | |
# (at your option) any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python -OO | |
# This file is part of Archivematica. | |
# | |
# Copyright 2010-2011 Artefactual Systems Inc. <http://artefactual.com> | |
# | |
# Archivematica is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 2 of the License, or | |
# (at your option) any later version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys, MySQLdb, cPickle, base64 | |
sys.path.append("/usr/lib/archivematica/archivematicaCommon") | |
import databaseInterface | |
sys.path.append("/usr/lib/archivematica/archivematicaCommon/externals") | |
import pyes | |
def index_documents_from_database(index, type): | |
indexed = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conn = pyes.ES('127.0.0.1:9200') | |
indexes = conn.get_indices() | |
if 'fpr_file' not in indexes: | |
# Grab relevant FPR data from the DB | |
results = get_fpr_table() | |
# Setup indexing for some Elastic Search action. | |
for row in results: | |
conn.index(row, 'fpr_file', 'fpr_files') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Use one of the task files as guidance… for example: | |
lib/task/import/csvAuthorityRecordImportTask.class.php | |
2) Some code to create a repo: | |
<?php | |
$repo = new QubitRepository(); | |
$repo->authorizedFormOfName = 'My Repository'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Part I | |
1. Why the Web needs Node | |
2. Getting started with Node | |
3. Asynchronous programming | |
Part II | |
4. Building Node web applications | |
5. Storing Node application data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install curl | |
curl https://raw.github.com/artefactual/archivematica/master/src/archivematicaCommon/lib/utilities/sword-diagnose.py | python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
forms.py: | |
class ProcessingForm(forms.Form): | |
def __init__(self, *args, **kwargs): | |
if 'extra' in kwargs: | |
extra = kwargs.pop('extra') | |
super(ProcessingForm, self).__init__(*args, **kwargs) | |
if 'extra' in locals(): | |
for i, question in enumerate(extra): |