Skip to content

Commit

Permalink
Merge pull request #1 from AjanthaRamineni/master
Browse files Browse the repository at this point in the history
Review and Merge Pull Requests
  • Loading branch information
roukna committed Apr 4, 2018
2 parents 0ed3f08 + 8febf0f commit 78502cc
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions grantload/load_grant_data_from_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from owlpost.owls import match_input
from vivo_queries.vdos import Author
from vivo_queries import queries
from parseinput import parse_input
import datetime


Expand Down Expand Up @@ -224,6 +225,7 @@ def prepare_query(connection, input_file):
def main(argv1, argv2):
config_path = argv1
input_file = argv2
parse_input(input_file)
config = get_config(config_path)
email = config.get('email')
password = config.get('password')
Expand Down
4 changes: 4 additions & 0 deletions grantload/parse_script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
$input_file = $1
echo $1
echo "Hello"
sed -i 's/""/"/g' $1
14 changes: 14 additions & 0 deletions grantload/parseinput.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import sys
import os
import csv

def parse_input(input_file):
# print input_file
script_file = "parse_script.sh"
os.system("chmod 774 {}".format(script_file))
os.system("sh parse_script.sh %s" %(input_file))
with open(input_file, 'r') as csv_input:
reader = csv.reader(csv_input)
for row in reader:
for column_val in row:
column_val = column_val.replace('\"','')

0 comments on commit 78502cc

Please sign in to comment.