mirror of
https://github.com/ilri/dspace-statistics-api.git
synced 2024-11-25 23:58:18 +01:00
indexer.py: Add license and documentation
This commit is contained in:
parent
2d8d1e6833
commit
53615dea2d
34
indexer.py
34
indexer.py
@ -1,8 +1,36 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
#
|
#
|
||||||
# Tested with Python 3.6
|
# indexer.py
|
||||||
# See DSpace Solr docs for tips about parameters
|
#
|
||||||
# https://wiki.duraspace.org/display/DSPACE/Solr
|
# Copyright 2018 Alan Orth.
|
||||||
|
#
|
||||||
|
# This program 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 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
#
|
||||||
|
# ---
|
||||||
|
#
|
||||||
|
# Connects to a DSpace Solr statistics core and ingests item views and downloads
|
||||||
|
# into a SQLite database for use with other applications (an API, for example).
|
||||||
|
#
|
||||||
|
# This script is written for Python 3 and requires several modules that you can
|
||||||
|
# install with pip (I recommend setting up a Python virtual environment first):
|
||||||
|
#
|
||||||
|
# $ pip install SolrClient
|
||||||
|
#
|
||||||
|
# See: https://solrclient.readthedocs.io/en/latest/SolrClient.html
|
||||||
|
# See: https://wiki.duraspace.org/display/DSPACE/Solr
|
||||||
|
#
|
||||||
|
# Tested with Python 3.5 and 3.6.
|
||||||
|
|
||||||
from database import database_connection_rw
|
from database import database_connection_rw
|
||||||
from solr import solr_connection
|
from solr import solr_connection
|
||||||
|
Loading…
Reference in New Issue
Block a user