/* * [InsertBookMarkers.java] * * Summary: Insert markers between Insert macros to make them easy to sort. * * Copyright: (c) 2016-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 2016-06-26 initial version */ package com.mindprod.stores; import com.mindprod.common18.Misc; import com.mindprod.fastcat.FastCat; import com.mindprod.filter.ExtensionListFilter; import com.mindprod.htmlmacros.macro.Global; import com.mindprod.htmlmacros.support.ConfigurationForMindprod; import com.mindprod.hunkio.HunkIO; import java.io.File; import java.io.IOException; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Insert markers between Insert macros to make them easy to sort. *
* one shot. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2016-06-26 initial version * @since 2016-06-26 */ public class InsertBookMarkers { // TidyBookMacros: reflow Book macros. Update BookHead with recent title and published. Add missing published to BookHead. // RefreshInserts: refresh data on Insert macros from book page. Add missing published to book Insert. // InsertBookMarkers: put between books to make it easier to sort. One shot. // SortBooks: sort book Inserts on page so most recently published are first. // ProofreadInserts: check that sort worked. /** * true to get extra output */ private static final boolean DEBUGGING = false; /** * pieces used to compose regexes */ private static final Pattern BOOK_INSERT_FINDER = Pattern.compile( "" ); /** * webrootDir directory of website */ private static File webrootDir; /** * works with or without stripgenerated. * * @param args not used * * @throws IOException if trouble reading or writing files containing Book macros. */ public static void main( String[] args ) throws IOException { Global.installConfiguration( new ConfigurationForMindprod() ); // combine dirsWithMacros and dirsWithIncludes into dirsToProcess; final List