Skip to content

Instantly share code, notes, and snippets.

@filak
filak / foxml-pdf-direct-not-valid.xml
Created February 12, 2016 12:38
Nevalidni FOXML
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1" PID="uuid:1f315748-ab3c-4210-b060-9633cf025c45" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Sulla spiaggia il valore di semiarco"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2014-03-18T09:11:50.578Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2014-03-18T09:11:51.725Z"/>
</foxml:objectProperties>
<foxml:datastream ID="AUDIT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false">
#!/usr/bin/env python3
import datetime
import jwt # pip install pyjwt
app_id = 'SIGLA'
shared_secret = 'add_secret_here'
now = datetime.datetime.utcnow()
token_dict = dict(
iss = app_id,
@filak
filak / ris.py
Created May 20, 2022 15:04 — forked from dperezrada/ris.py
Tool for parsing RIS files using python
import io
import sys
import re
import csv
import json
def get_parts(ris_file_text):
ris_text_parts = re.split(r'\nER -( |\n|$)', ris_file_text)
if len(ris_text_parts) == 1:
ris_text_parts = re.split(r'\r?\n\r?\n', ris_file_text)