Julkaisufoorumi-tietokannasta poistetut konferenssien vakiintuneet nimet. Muunnettu Julkaisufoorumin sivulta ladatusta PDF-tiedostosta käyttäen Tabula-työkalua ja merkistöt siivottu ftfy:llä.
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 | |
| import time | |
| import random | |
| import requests | |
| from bs4 import BeautifulSoup | |
| from urllib.parse import urljoin, urlparse | |
| # Base URL | |
| BASE_URL = 'https://julkaisut.metsa.fi' | |
| SEARCH_URL = 'https://julkaisut.metsa.fi/julkaisut/?publication-search&publication-languages&publication-series&publication-product-categories=9764' |
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 | |
| import re | |
| import argparse | |
| import xml.etree.ElementTree as ET | |
| import xml.dom.minidom | |
| def parse_record(record_text): | |
| metadata = {} | |
| content_elements = [] |
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 csv | |
| import os | |
| import re | |
| import sys | |
| from collections import defaultdict | |
| from mutagen.oggvorbis import OggVorbis | |
| def extract_number(text): | |
| numbers = re.findall(r'\d+', text) | |
| return f"{int(numbers[0]):05d}" if numbers else "99999" |
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
| --- | |
| title: "Tietokantojen hinnanmuutokset" | |
| format: html | |
| --- | |
| ```{r} | |
| #| label: setup | |
| #| echo: false |
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
| const gaTrackingId = '...'; | |
| class GoogleAnalytics { | |
| constructor($rootScope, $location, $window) { | |
| this.$rootScope = $rootScope; | |
| this.$location = $location; | |
| this.$window = $window; | |
| this.loadAnalytics(this.$window); | |
| } | |
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
| declare option output:method "csv"; | |
| declare option output:csv "header=yes, separator=;"; | |
| let $docs_with_affils:= | |
| <records>{ | |
| for $record in //oai_marc | |
| where $record/controlfield[@tag eq "001"] contains text {'article.*'} using wildcards | |
| let $parent:=substring-before(substring-after(base-uri($record),"/journalfi-data/"),".xml") | |
| let $affiliation_count:=count($record//datafield[@tag eq '100' or @tag eq '700']/subfield[@code eq 'u']) | |
| let $orcid_count:=count($record//datafield[@tag eq '100' or @tag eq '700']/subfield[@code eq '0' and . contains text {"orcid.*"} using wildcards]) |
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
| declare option output:method "csv"; | |
| declare option output:csv "header=yes, separator=comma"; | |
| declare function local:to-datestamp($raw_date){ | |
| let $parts:=tokenize($raw_date," / ") | |
| return $parts[2] || '-' || $parts[1] || '-1' | |
| }; | |
| declare function local:not-total($string) { |
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
| # vim:set ft=perl:ts=4:sw=4 | |
| # | |
| # Ref.: http://librecat.org/Catmandu/ | |
| # https://github.com/LibreCat/Catmandu/wiki/Example%20Fix%20Script | |
| # https://github.com/scriptotek/simplemarcparser/blob/master/src/BibliographicRecord.php | |
| # For ElasticSearch 2.0 | |
| # See https://github.com/LibreCat/Catmandu-Store-Elasticsearch/commit/63795416d2585eab7af1d5263f5823b4cae94251 | |
| # <s>Note that we use _identifier over _id to cover deleted records which do not have _id</s> | |
| # UPDATE: When importing from a MARC dump, we don't have OAI IDs, so use the simple _ids instead. |
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
| SELECT | |
| biblio.title as 'Nimeke', | |
| CONCAT('<a href=\"/cgi-bin/koha/catalogue/moredetail.pl?', | |
| 'biblionumber=', biblio.biblionumber, '&itemnumber=', items.itemnumber, | |
| '\">', items.barcode, '</a>' ) AS 'Viivakoodi', | |
| items.datelastborrowed as 'Lainattu viimeksi', | |
| items.datelastseen as 'Käsitelty viimeksi', | |
| CONCAT( | |
| '<a target="_blank" href=\"/cgi-bin/koha/members/moremember.pl?borrowernumber=', | |
| borrower.borrowernumber, |
NewerOlder