#!/usr/bin/env python
#coding=utf-8

# @file arXiv_abstract.py
# @brief arXiv_abstract
# @author x565178035,x565178035@126.com
# @version 1.0
# @date 2017-12-17 17:42

import sys

reload(sys)
sys.setdefaultencoding("utf-8")

# Django specific settings
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
import django
django.setup()

# Import your models for use in your script
from db.models import *

def arXiv_abstract():
    for each in Paper.objects.filter(published_in="arXiv"):
        each.abstract=each.abstract.replace('\n',' ')
        each.save()

if __name__ == '__main__':
    arXiv_abstract()

