diff options
author | luxagraf <sng@luxagraf.net> | 2020-11-15 10:13:08 -0500 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2020-11-15 10:13:08 -0500 |
commit | 7509da286bccd1dda358507cd455f9297db59247 (patch) | |
tree | 779aa3660e453d73268d22a72d9a5599cc94aa02 /app/builder | |
parent | b2434dcba142961b4a4b67780cf64e01d0908bf5 (diff) |
ported jrnl building to posts
Diffstat (limited to 'app/builder')
-rw-r--r-- | app/builder/views.py | 82 |
1 files changed, 38 insertions, 44 deletions
diff --git a/app/builder/views.py b/app/builder/views.py index 7d463a7..5e67dc2 100644 --- a/app/builder/views.py +++ b/app/builder/views.py @@ -1,82 +1,76 @@ from django.shortcuts import render from django.template import RequestContext -from builder.base import BuildWriting, BuildWritingFeed, BuildMap, BuildPhotos, BuildProjects, BuildSitemap -from jrnl.build import archive_builder, detail_builder, home_builder, rss_builder, map_builder +#from builder.base import BuildWriting, BuildWritingFeed, BuildMap, BuildPhotos, BuildProjects, BuildSitemap +#from jrnl.build import archive_builder, detail_builder, home_builder, rss_builder, map_builder from resume.build import pub_builder, resume_builder from books.build import builder as book_builder from sightings.build import builder as sightings_builder from photos.build import builder as photo_builder #from notes.build import builder as notes_builder from pages.build import builder as page_builder -#from fieldnotes.build import builder as fieldnotes_builder from photos.build import dailybuilder -from posts.build import src_builder, guide_builder, fieldnotes_builder +from posts.build import BuildJrnl, BuildFieldNotes, BuildSrc, BuildGuide, BuildHome from lttr.build import lttr_builder -options = { - 'writing': BuildWriting, - 'photo_galleries': BuildPhotos, - 'projects': BuildProjects, - 'feed': BuildWritingFeed, - 'sitemap': BuildSitemap, -} - - def do_build(request): section = request.GET.get('id', '') context = {} if section == 'builddetails': context = {'message': 'Writing Jrnl Permalinks to Disk'} - detail_builder() + p = BuildJrnl("posts", "post") + p.build_latest() + p.build_detail_view() elif section == 'writingarchives': context = {'message': 'Writing Jrnl Archives to Disk'} - archive_builder() - elif section == 'resume': - context = {'message': 'Writing Resume to Disk'} - resume_builder() - elif section == 'pubs': - context = {'message': 'Writing Publications to Disk'} - pub_builder() + BuildJrnl("posts", "post").build_arc() elif section == 'buildrss': context = {'message': 'Writing RSS to Disk'} - rss_builder() - elif section == 'dailyphotos': - context = {'message': 'Writing daily photo pages to Disk'} - dailybuilder() + BuildJrnl("posts", "post").build_feed("jrnl:feed") elif section == 'homepage': context = {'message': 'Writing index to Disk'} - home_builder() + BuildHome("posts", "post").homepage() + elif section == 'src': + context = {'message': 'Writing src section to Disk'} + BuildSrc("posts", "post").build() + elif section == 'guide': + context = {'message': 'Writing guide section to Disk'} + BuildGuide("posts", "post").build() + elif section == 'pages': + context = {'message': 'Writing Pages to Disk'} + page_builder() + elif section == 'fieldnotes': + context = {'message': 'Writing FieldNotes to Disk'} + BuildFieldNotes("posts", "post").build() + elif section == 'lttr_archive': + context = {'message': 'Writing newsletter archives to Disk'} + lttr_builder() elif section == 'buildbooks': context = {'message': 'Writing Book Pages to Disk'} book_builder() elif section == 'buildsightings': context = {'message': 'Writing Sightings Pages to Disk'} sightings_builder() - elif section == 'src': - context = {'message': 'Writing src section to Disk'} - src_builder() - elif section == 'guide': - context = {'message': 'Writing guide section to Disk'} - guide_builder() elif section == 'luxphotos': context = {'message': 'Writing galleries to Disk'} photo_builder() elif section == 'figments': context = {'message': 'Writing figments to Disk'} figments_builder() - elif section == 'pages': - context = {'message': 'Writing Pages to Disk'} - page_builder() + elif section == 'resume': + context = {'message': 'Writing Resume to Disk'} + resume_builder() + elif section == 'pubs': + context = {'message': 'Writing Publications to Disk'} + pub_builder() elif section == 'map': context = {'message': 'Writing Map to Disk'} map_builder() - elif section == 'fieldnotes': - context = {'message': 'Writing FieldNotes to Disk'} - fieldnotes_builder() - elif section == 'lttr_archive': - context = {'message': 'Writing newsletter archives to Disk'} - lttr_builder() - else: - options[section]().build() - context = {'message': 'Writing %s to Disk' % section} + elif section == 'dailyphotos': + context = {'message': 'Writing daily photo pages to Disk'} + dailybuilder() return render(request, 'admin/message.html', context) + + + + + |