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
""" | |
Scans III exports and finds records updated within a | |
particular time period. | |
Command line options: | |
-f file | |
-d days - number of days to go back and look for updates | |
-o output - directory to store the MARC records. | |
-s start - start date for updates | |
-e end - end dates for updates |
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
""" | |
Script to login to the VIVO interface as use the | |
'Merge Resources' tool under 'Ingest Tools' in the admin interface. | |
An incoming CSV file without headers is expected. | |
- the primary resource URI is in the first column | |
- the duplicate resource URI is in the second column | |
This script relies on the python requests package: | |
http://docs.python-requests.org/en/latest/user/install/ |
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
import os | |
from flask import Flask, url_for | |
from flask import request, current_app | |
from flask import jsonify | |
from flask import render_template | |
from functools import wraps | |
from fetch_data import stackview_data, get_by_bib |
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
""" | |
Utility script to parse VIVO listViewConfig.xml files. | |
Requires | |
- rdflib_sparql | |
- SPARQLWrapper | |
Run as | |
$ python generate_listview.py /path/to/listViewConfig-awardOrHonor.xml | |
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
""" | |
Quick example of creating indivduals with multiple types | |
using RDFAlchemy or just plain RDFLib. | |
""" | |
from rdflib import Namespace, Graph, Literal, RDF, URIRef | |
from rdfalchemy.rdfSubject import rdfSubject | |
from rdfalchemy import rdfSingle |
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
class MostSpecificType(rdfSubject): | |
rdf_type = VITRO.mostSpecificType | |
class Thing(rdfSubject): | |
rdf_type = OWL.Thing | |
label = rdfSingle(RDFS.label) | |
most_specific_type = rdfSingle(VITRO.mostSpecificType) | |
class Date(rdfSubject): | |
rdf_type = VIVO.DateTimeValue |
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
prefix | publisher | journals | dois | |
---|---|---|---|---|
10.12679 | 0 | 0 | ||
10.7579 | 123Doc Education | 0 | 0 | |
10.3731 | 21st Century COE Program (Toplogical Science and Technology) | 1 | 40 | |
10.5775 | A. I. Rosu Cultural Scientific Foundation Fundatia cultural-stiintifica A. I. Rosu | 1 | 80 | |
10.4037 | AACN Publishing | 2 | 766 | |
10.1306 | AAPG/Datapages | 4 | 21817 | |
10.3183 | AB Svensk Papperstidning | 1 | 1550 | |
10.5769 | ABEAT - Associacao Brasileira de Especialistas em Alta Tecnologia | 1 | 57 | |
10.7597 | ACOPIOS - Revista Iberica de Mineralogia | 1 | 9 |
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
<!doctype html> | |
<!--[if lt IE 8]> <html class="no-js ie7 oldie" lang="en"> <![endif]--> | |
<!--[if IE 8]> <html class="no-js ie8 oldie" lang="en"> <![endif]--> | |
<!--[if IE 9]> <html class="no-js ie9 oldie" lang="en"> <![endif]--> | |
<!--[if gt IE 9]><!--> <html class="no-js" lang="en"> <!--<![endif]--> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>edit publications</title> |
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
from vivo_utils import sparql | |
sparql = sparql.VIVOSparql() | |
sparql.login() | |
query = """ | |
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
PREFIX vivo: <http://vivoweb.org/ontology/core#> | |
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> |
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
Sample scripts for using the VIVO SPARQL Update API in PHP, Python. | |
https://wiki.duraspace.org/display/VIVO/The+SPARQL+Update+API |