BlogExportFileSearchToBook: VBA code to produce HTML blog book from Blogger blog backup/export XML file optionally limited to content matching search string

Last updated on 9 Sep. 2023 

9 Sep. 2023 Update: I rarely use the software covered in this post now. To see the current software for creating Blogger blogbooks that I use, please visit: Short User Guide to creating Blogger Blogbooks from Backup/Export File using ExportFileFilterAndGenBook and another VBA projects' macros/code (free and open source), https://ravisiyermisc.blogspot.com/2023/09/short-user-guide-to-creating-blogger.html .

end-Update 9 Sep. 2023

I decided to put up and publish this post now on 12 Aug 2023 while this work is in progress, as I wanted to ensure that whatever work I have done till now is available for interested readers.

Code text file name suffix of gs.txt issue: Unfortunately, I have named some code copied as text files with suffix of gs.txt instead of vb.txt. Please excuse that error which came up as I was earlier working with Google Apps Script projects where I used gs.txt as suffix for code copied as text files.

This program upgrades BlogExportFileToBook VBA program which is described in my post:  BlogExportFileToBook: VBA code to produce HTML blog book from Blogger blog backup/export XML file, https://ravisiyermisc.blogspot.com/2023/07/BlogExportFileToBook-vba-code.html .

The first step was to provide the user the option of creating only the log files (not creating blog book and comments dictionary book). With the only log files option, the user can try out a search string and see the log file to know how many pages & posts in a blog export file have that string (as of now, I am not considering searching comments but may do that in future). Then if the user wants to have a blog book of those pages and posts, he/she can run the program again specifying the same search string and this time, choosing the option to create the blog book (and comments dictionary book). I also commented out the code creating the comments sequential list (book) as I felt it was not required anymore. This first step has been accomplished in v1 version which does not perform any search but allows the user to create only log files.

Top-level folder share: BlogExportFileSearchToBook,  https://drive.google.com/drive/folders/1WwxPpzQS2LdxduKq3ylDjx3F-OTGOyND?usp=drive_link .

15 Aug. 2023 Update

In Version v7 renamed PostOrPageEntry as PPCEntry as the type and code to read and log them are largely similar, if not wholly similar, for pages, posts and comments. Fixed bug of header HTML not being output in blog book if 0 pages & posts match search criteria. 

This version includes comment entry matching search criteria being flagged in comments log file. IIRC, this mod was done in this version (and not earlier version).

---------

Version v6 does some reorg of IterateThroughAllEntries sub which is now a function.

Number of posts & pages processed is returned by IterateThroughAllEntries as well as BlogExportFileSearchToBook which is also a function now. So status message box in driver sub now shows "Number of pages and posts processed". Added DriveDefaultBlogExportFileSearchToBook() .

CreateCommentsDictionary function (changed from sub to function) code has been reorganized.

v6 sub-folder share: v6, https://drive.google.com/drive/folders/17gVGMZvZ-qzxzSJiklWX8Y2AIrILCpjb?usp=drive_link

---------

Version v5 adds some finishing touches to output blog book. It also has commented out older drive subs and made the prompt run in loop sub the only drive sub.

During some runs, bugs related to comment HTML generation were detected and fixed. 

v5 sub-folder share: v5,  https://drive.google.com/drive/folders/1V1njWQNnOjTvov5lTABmh3dUF88bbCx3?usp=drive_link

end 15 Aug. 2023 Update

14 Aug. 2023 Update

Version v4 has major code reorg of main sub. BlogExportFileToBook which had become too large/long.

v4 sub-folder share: v4,  https://drive.google.com/drive/folders/1PyTsTHWwiFieoifQyfpgC_Vbv_Dg3WvN?usp=drive_link

end 14 Aug. 2023 Update

13 Aug. 2023 Update

Version v3 brings in a new macro/sub named PromptRunSearchInLoop() that runs the main macros/subs in a loop enabling one to first create only log files with a search term, and after one finds that the search term is selecting the pages & posts as per one's requirements, one can run the main macros again for same search term but this time creating the blog book (along with the log files).

v3 sub-folder share: v3, https://drive.google.com/drive/folders/1ngYHWjaqHvD5HjBL81-fTWJ_Nwvn1uma?usp=drive_link

Info.txt in it explains how I use PromptRunSearchInLoop() macro/sub:  https://drive.google.com/file/d/1GCIZLjLPXm4FxQ1yj3mK1VCoMXbKuqY4/view?usp=drive_link .

------------------

Version v2 is the first version with search feature.

v2 sub-folder share: v2,  https://drive.google.com/drive/folders/1hUSP0N7WtPGIwUdWOBLbwLbK2zVhYjm8?usp=drive_link

end 13 Aug. 2023 Update

12 Aug. 2023 contents continue below

v1 sub-folder share: v1, https://drive.google.com/drive/folders/1YaW3Hl-TmRUUCvjeRe6-6rrN73Q1xx6S?usp=drive_link . This sub-folder has run data for 3 runs and has source code files.

The next step is to include searching pages & posts against a search string and picking up only those pages & posts that match the search string.

Comments

Archive

Show more