Skip to content

Instantly share code, notes, and snippets.

Atsuya Kumano atkm

View GitHub Profile
@atkm
atkm / metha_to_postgres.py
Last active Oct 15, 2017
Populate Postgres with arXiv articles
View metha_to_postgres.py
from app import db
from models import Article, Author, Category, article_author, article_category
import os, gzip, glob
from datetime import datetime
import xml.etree.ElementTree as ET
def get_title(record):
arXiv_prefix = '{http://arxiv.org/OAI/arXiv/}'
metadata = record.find('metadata').find(arXiv_prefix + "arXiv")
You can’t perform that action at this time.