/* * [Poster.java] * * Summary: Install the daily home page mindprod.com poster. * * Copyright: (c) 2008-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 2008-07-27 initial version * 1.1 2008-08-31 screen scrape sizes and prices. * 1.2 2009-05-04 major refactoring. */ package com.mindprod.poster; import com.mindprod.htmlmacros.macro.Global; import com.mindprod.htmlmacros.support.ConfigurationForMindprod; import java.io.IOException; /** * Install the daily home page mindprod.com poster. *

* First select and crop image from AllPosters.com or Art.com and place in * E:\mindprod\image\allposters or E:\mindprod\image\artcom. or E:\mindprod\image\home * Crop it, and decide on foreground and background colours to accent it. * Enter data about the image in ProviderType.java. * Run Poster.main it will patch various files including * E:\mindprod\index.html * E:\mindprod\home.css * E:\mindprod\jgloss\artcom.html * E:\mindprod\jgloss\artcomextras.html * E:\mindprod\jgloss\allposterscom.html * E:\mindprod\jgloss\allposterscomextras.html *

* It installs the most recent image. *

* Normally you control all this with a batch script fixposter.btm * that handles hot backups as well. * Don't confuse this with htmlmacros.Poster which expands the Poster macro. * * @author Roedy Green, Canadian Mind Products * @version 1.2 2009-05-04 major refactoring. * @since 2008-07-27 */ @SuppressWarnings( { "UnusedDeclaration", "UnusedDeclaration" } ) public class Poster { private static final int FIRST_COPYRIGHT_YEAR = 2008; /** * undisplayed copyright notice */ @SuppressWarnings( { "UnusedDeclaration" } ) private static final String EMBEDDED_COPYRIGHT = "Copyright: (c) 2008-2017 Roedy Green, Canadian Mind Products, http://mindprod.com"; @SuppressWarnings( { "UnusedDeclaration" } ) private static final String RELEASE_DATE = "2009-05-04"; /** * embedded version string. */ private static final String VERSION_STRING = "1.2"; /** * define new image for home page, also thumbnail for * the recent page and extras page. * * @param args not used * * @throws IOException if can't find, read or write the files it needs */ public static void main( String[] args ) throws IOException { /* choose a source based on the most recently modified image, then invoke recently customised code for it in ProviderType.changeImage. Invoked with FixPoster.btm, which also arranges hot backups. */ Global.installConfiguration( new ConfigurationForMindprod() ); PosterProviderType.chooseSource().changeImages(); } }