Dynamic Content Generation -------------------------- GENERAL COMMENTS ---------------- If you want to avoid entering your password every time then you can put a file called "DELETE_ME" in your home directory with your username on one line and password on the next. The script will use that if it finds it. The batch files are useful as you need to see the output from the processes - I might make a gui at some point ... PEOPLE PAGES ------------ To Run: ./RunPeoplePages Enter your password and login to access the database. The people information is taken from https://teachdb.doc.ic.ac.uk/db/report?name=Tab+Separated&num=0 You can change the start of this url in config_common.ini. During the database rollover period, there may be multiple database versions. The script goes through each enty in config_people_pages.ini. If you want to configure output, you add or remove stuff from here. Thesea are bar-separated in the format: TITLE (for page) OUTPUT TYPE (staff list or pictures) TARGET URL (for checking the output vs the web) CATEGORY (database field values to include) APPOINTMENT (database field values to include) The target url is used to check whether CMS is up to date. If the CMS information does not agree with the database output then it will issue a warning and output the two html extracts. In addition, it will create a copy of the website information in a html file so that the differences can be reviewed. The code splits files that are too long to go into one content panel in CMS. It numbers them to indicate which is which. The comparison part of the code is aware of what it is comparing and picks the correct content panel from within the target URL. The photos for the picture lists are held in CMS and their url is found using config_people_image_lookup.csv. If any pictures are missing, once you've run the you must upload a suitable photo to CMS on some page using the CMS image uploader. CMS will store it somewhere and generate a persistent URL, which you can grab from the html. Put the information into the .ini file and re-run. NOTE that I use LDAP to get people's contact details from the college directory as this was more up-to-date than the database when I was making this extract. It's useful that people keep that current as the college systems use it for their people search I think. DEGREE PAGES ------------ To run: ./RunDegreePages It takes about a minute to generate the content. It gets its information from the pages like this: https://teachdb.doc.ic.ac.uk/db/viewtab?table=Degree&arg0=%25&arg1=&arg2=&arg3=&arg4=&arg5=&arg6= config_degree_pages.ini controls the output. It has fields for DEGREE CODE (from the DB) OUTPUT STYLE (whether by term then requirement or vice versa - compare pg and ug output) TARGET URL (for comparison to CMS) config_degree_pages_types.ini controls how selective and optional courses are grouped and described. It has fields for DEGREE CODE DEGREE YEAR DATABASE REQUIREMENT (Optional, Selective, Required etc) WEB DESCRIPTION (What this requirement is going to be called) config_degree_page_addendums.ini handles addendums to course names. You can put things on the end of course names to signify anything unusual. For example, putting "1" adds a superscript 1 after that course name. You could then add "courses marked 1 continue into the spring term". Add entries in here in the format DEGREE CODE YEAR COURSE ID ADDENDUM INSERT STYLE SHEETS ------------------- The output doesn't have any style information but you can add it if you want to see how it will look on CMS. Click on RunInsertStyleSheets.bat. I haven't created a reverse for this yet, though - so you'll have to re-run the script after or pick out your html. WEBSITE BACKUP -------------- This generates a mirror of the content on the website as it currently stands. It's quite basic, but should grab all the html you might lose ... TAKE CARE --------- The output html is surrounded by a