diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-06-20 16:37:07 -0400 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-06-20 16:37:07 -0400 |
commit | baf14633cbd8af6413290ccae5765aefd2a278a5 (patch) | |
tree | 6fcdf0e488d707ce373d46a50f543364ea7bf3b8 /bn_django/dump_to_pelican.py | |
parent | 4b5b2769679515a54d3287077821421dce613432 (diff) | |
download | bnewnet-baf14633cbd8af6413290ccae5765aefd2a278a5.tar.gz bnewnet-baf14633cbd8af6413290ccae5765aefd2a278a5.zip |
remove old django folder
Diffstat (limited to 'bn_django/dump_to_pelican.py')
-rw-r--r-- | bn_django/dump_to_pelican.py | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/bn_django/dump_to_pelican.py b/bn_django/dump_to_pelican.py deleted file mode 100644 index bc2be28..0000000 --- a/bn_django/dump_to_pelican.py +++ /dev/null @@ -1,41 +0,0 @@ - -import os -from journal.models import * -from django.contrib.flatpages.models import * - -def save_page(p): - if p.id == 15: return - url = p.url.decode('utf-8') - f = open("flat_page_dump/" + url.strip("/").replace("/", "_") + ".html", 'w') - f.write("Title: " + p.title + "\n") - f.write("Url: " + url + "\n") - f.write("SaveAs: " + url + "index.html\n") - f.write("Date: " + str(p.date)) - f.write("\n") - f.write("\n") - f.write(p.content.decode('utf-8')) - f.close() - -os.system("mkdir flat_page_dump") - -for page in FlatPage.objects.all(): - save_page(page) - -def save_links(): - f = open("link_dump.html", 'w') - f.write("<ul>\n") - for l in LinkArtifact.objects.all(): - f.write("<li><b><a href=\"%s\">%s</a></b> (%s): %s</li>\n" % ( - l.url, l.title, str(l.date), l.html_caption)) - f.write("</ul>\n") - f.close() - -def save_micro(): - f = open("micro_dump.html", 'w') - f.write("<ul>\n") - for m in MicroEntry.objects.all(): - f.write("<li><b>%s</b>: %s\n" % ( - str(m.date), m.html_content)) - f.write("</ul>\n") - f.close() - |