+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
+#
import sys
sys.path.insert(0, '../apps')
sys.path.insert(0, '../lib')
from catalogue.models import Book, Tag
-def import_tags(file_name, attribute):
+def import_links(file_name, attribute):
for line in file(file_name):
slug, link = line.split()
link = link.strip('\n')
print 'Invalid slug %s!' % slug
-import_tags('gazeta-links', 'gazeta_link')
-
+import_links('gazeta-links', 'gazeta_link')
+import_links('wiki-links', 'wiki_link')