diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm index 45ca127f13..7f1754b2bc 100644 --- a/code/modules/client/client procs.dm +++ b/code/modules/client/client procs.dm @@ -259,8 +259,9 @@ getFiles( 'html/search.js', 'html/panels.css', - 'html/painew.png', - 'html/loading.gif', + 'html/images/loading.gif', + 'html/images/ntlogo.png', + 'html/images/talisman.png', 'icons/pda_icons/pda_atmos.png', 'icons/pda_icons/pda_back.png', 'icons/pda_icons/pda_bell.png', @@ -298,7 +299,5 @@ 'icons/spideros_icons/sos_11.png', 'icons/spideros_icons/sos_12.png', 'icons/spideros_icons/sos_13.png', - 'icons/spideros_icons/sos_14.png', - 'html/images/ntlogo.png', - 'html/images/talisman.png' + 'icons/spideros_icons/sos_14.png' ) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 00e49b659c..25c8f82701 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -101,7 +101,6 @@ /mob/living/silicon/pai/Login() ..() - usr << browse_rsc('html/paigrid.png') // Go ahead and cache the interface resources as early as possible // this function shows the information about being silenced as a pAI in the Status panel diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 0af4b0a235..14d53317b3 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -378,8 +378,6 @@ set name = "Changelog" set category = "OOC" getFiles( - 'html/postcardsmall.jpg', - 'html/somerights20.png', 'html/88x31.png', 'html/bug-minus.png', 'html/cross-circle.png', diff --git a/html/80x15.png b/html/80x15.png deleted file mode 100644 index ed028fed9d..0000000000 Binary files a/html/80x15.png and /dev/null differ diff --git a/html/AddToChangelog.exe b/html/AddToChangelog.exe deleted file mode 100644 index 3625bd27cc..0000000000 Binary files a/html/AddToChangelog.exe and /dev/null differ diff --git a/html/admin_pm.html b/html/admin_pm.html deleted file mode 100644 index 6993b21502..0000000000 --- a/html/admin_pm.html +++ /dev/null @@ -1,53 +0,0 @@ - - Shittiest Player Ever - PM - - -
- - Badmin: Hey why the fuck are you killing that dude???

- Shittiest Player Ever: he tok ym baten n id and i ahd to use the lasre on his *ss

- Badmin: wow good fucking job, you are the best player ever!!!!!!

- Badmin: where the fuck did you learn english?

- Shittiest Player Ever: he tryed to k;ikll me

- Badmin: you are shit!!!!! -
- -
-
- - - -
- - \ No newline at end of file diff --git a/html/changelog.css b/html/changelog.css index 1d2b6a6445..0637dffa67 100644 --- a/html/changelog.css +++ b/html/changelog.css @@ -1,36 +1,35 @@ -.top{font-family:Tahoma,sans-serif;font-size:12px;} -h2{font-family:Tahoma,sans-serif;} -a img {border:none;} -.bgimages16 li { - padding:2px 10px 2px 30px; - background-position:6px center; - background-repeat:no-repeat; - border:1px solid #ddd; - border-left:4px solid #999; - margin-bottom:2px; -} -.bugfix {background-image:url(bug-minus.png)} -.wip {background-image:url(hard-hat-exclamation.png)} -.tweak {background-image:url(wrench-screwdriver.png)} -.soundadd {background-image:url(music-plus.png)} -.sounddel {background-image:url(music-minus.png)} -.rscdel {background-image:url(cross-circle.png)} -.rscadd {background-image:url(tick-circle.png)} -.imageadd {background-image:url(image-plus.png)} -.imagedel {background-image:url(image-minus.png)} -.spellcheck {background-image:url(spell-check.png)} -.experiment {background-image:url(burn-exclamation.png)} -.tgs {background-image:url(tg-notif.png)} -.sansserif {font-family:Tahoma,sans-serif;font-size:12px;} -.commit {margin-bottom:20px;font-size:100%;font-weight:normal;} -.changes {list-style:none;margin:5px 0;padding:0 0 0 25px;font-size:0.8em;} -.date {margin:10px 0;color:blue;border-bottom:2px solid #00f;width:60%;padding:2px 0;font-size:1em;font-weight:bold;} -.author {padding-left:10px;margin:0;font-weight:bold;font-size:0.9em;} -.drop {cursor:pointer;border:1px solid #999;display:inline;font-size:0.9em;padding:1px 20px 1px 5px;line-height:16px;} -.hidden {display:none;} -.indrop {margin:2px 0 0 0;clear:both;background:#fff;border:1px solid #ddd;padding:5px 10px;} -.indrop p {margin:0;font-size:0.8em;line-height:16px;margin:1px 0;} -.indrop img {margin-right:5px;vertical-align:middle;} -.closed {background:url(chevron-expand.png) right center no-repeat;} -.open {background:url(chevron.png) right center no-repeat;} +.top{font-family:Tahoma,sans-serif;font-size:12px;} +h2{font-family:Tahoma,sans-serif;} +a img {border:none;} +.bgimages16 li { + padding:2px 10px 2px 30px; + background-position:6px center; + background-repeat:no-repeat; + border:1px solid #ddd; + border-left:4px solid #999; + margin-bottom:2px; +} +.bugfix {background-image:url(bug-minus.png)} +.wip {background-image:url(hard-hat-exclamation.png)} +.tweak {background-image:url(wrench-screwdriver.png)} +.soundadd {background-image:url(music-plus.png)} +.sounddel {background-image:url(music-minus.png)} +.rscdel {background-image:url(cross-circle.png)} +.rscadd {background-image:url(tick-circle.png)} +.imageadd {background-image:url(image-plus.png)} +.imagedel {background-image:url(image-minus.png)} +.spellcheck {background-image:url(spell-check.png)} +.experiment {background-image:url(burn-exclamation.png)} +.sansserif {font-family:Tahoma,sans-serif;font-size:12px;} +.commit {margin-bottom:20px;font-size:100%;font-weight:normal;} +.changes {list-style:none;margin:5px 0;padding:0 0 0 25px;font-size:0.8em;} +.date {margin:10px 0;color:blue;border-bottom:2px solid #00f;width:60%;padding:2px 0;font-size:1em;font-weight:bold;} +.author {padding-left:10px;margin:0;font-weight:bold;font-size:0.9em;} +.drop {cursor:pointer;border:1px solid #999;display:inline;font-size:0.9em;padding:1px 20px 1px 5px;line-height:16px;} +.hidden {display:none;} +.indrop {margin:2px 0 0 0;clear:both;background:#fff;border:1px solid #ddd;padding:5px 10px;} +.indrop p {margin:0;font-size:0.8em;line-height:16px;margin:1px 0;} +.indrop img {margin-right:5px;vertical-align:middle;} +.closed {background:url(chevron-expand.png) right center no-repeat;} +.open {background:url(chevron.png) right center no-repeat;} .lic {font-size:9px;} \ No newline at end of file diff --git a/html/changelog.js b/html/changelog.js index 4146d0f094..00db7fbc70 100644 --- a/html/changelog.js +++ b/html/changelog.js @@ -1,87 +1,87 @@ -/* -function dropdowns() { - var divs = document.getElementsByTagName('div'); - var headers = new Array(); - var links = new Array(); - for(var i=0;i=0) { - elem.className = elem.className.replace('visible','hidden'); - this.className = this.className.replace('open','closed'); - } - else { - elem.className = elem.className.replace('hidden','visible'); - this.className = this.className.replace('closed','open'); - } - return false; - } - })(links[i]); - } - } -} -*/ -/* -function filterchanges(type){ - var lists = document.getElementsByTagName('ul'); - for(var i in lists){ - if(lists[i].className && lists[i].className.search('changes')>=0) { - for(var j in lists[i].childNodes){ - if(lists[i].childNodes[j].nodeType == 1){ - if(!type){ - lists[i].childNodes[j].style.display = 'block'; - } - else if(lists[i].childNodes[j].className!=type) { - lists[i].childNodes[j].style.display = 'none'; - } - else { - lists[i].childNodes[j].style.display = 'block'; - } - } - } - } - } -} -*/ -function dropdowns() { - var drops = $('div.drop'); - var indrops = $('div.indrop'); - if(drops.length!=indrops.length){ - alert("Some coder fucked up with dropdowns"); - } - drops.each(function(index){ - $(this).toggleClass('closed'); - $(indrops[index]).hide(); - $(this).click(function(){ - $(this).toggleClass('closed'); - $(this).toggleClass('open'); - $(indrops[index]).toggle(); - }); - }); -} - -function filterchanges(type){ - $('ul.changes li').each(function(){ - if(!type || $(this).hasClass(type)){ - $(this).show(); - } - else { - $(this).hide(); - } - }); -} - -$(document).ready(function(){ - dropdowns(); +/* +function dropdowns() { + var divs = document.getElementsByTagName('div'); + var headers = new Array(); + var links = new Array(); + for(var i=0;i=0) { + elem.className = elem.className.replace('visible','hidden'); + this.className = this.className.replace('open','closed'); + } + else { + elem.className = elem.className.replace('hidden','visible'); + this.className = this.className.replace('closed','open'); + } + return false; + } + })(links[i]); + } + } +} +*/ +/* +function filterchanges(type){ + var lists = document.getElementsByTagName('ul'); + for(var i in lists){ + if(lists[i].className && lists[i].className.search('changes')>=0) { + for(var j in lists[i].childNodes){ + if(lists[i].childNodes[j].nodeType == 1){ + if(!type){ + lists[i].childNodes[j].style.display = 'block'; + } + else if(lists[i].childNodes[j].className!=type) { + lists[i].childNodes[j].style.display = 'none'; + } + else { + lists[i].childNodes[j].style.display = 'block'; + } + } + } + } + } +} +*/ +function dropdowns() { + var drops = $('div.drop'); + var indrops = $('div.indrop'); + if(drops.length!=indrops.length){ + alert("Some coder fucked up with dropdowns"); + } + drops.each(function(index){ + $(this).toggleClass('closed'); + $(indrops[index]).hide(); + $(this).click(function(){ + $(this).toggleClass('closed'); + $(this).toggleClass('open'); + $(indrops[index]).toggle(); + }); + }); +} + +function filterchanges(type){ + $('ul.changes li').each(function(){ + if(!type || $(this).hasClass(type)){ + $(this).show(); + } + else { + $(this).hide(); + } + }); +} + +$(document).ready(function(){ + dropdowns(); }); \ No newline at end of file diff --git a/html/changelogs/__CHANGELOG_README.txt b/html/changelogs/__CHANGELOG_README.txt new file mode 100644 index 0000000000..08d3f11735 --- /dev/null +++ b/html/changelogs/__CHANGELOG_README.txt @@ -0,0 +1,19 @@ +Changelogs are included with commits as text .yml files created individually by the committer. If you want to create a changelog entry you create a .yml file in the /changelogs directory; nothing else needs to be touched unless you are a maintainer. + +####################################################### + +TO MAKE A CHANGELOG .YML ENTRRY + +1. Make a copy of the file example.yml in html/changelogs and rename it to [YOUR USERNAME]-PR-[YOUR PR NUMBER].yml (the pr and pr number are organizational and can be ignored if you so wish) + +2. Change the author to yourself + +3. Replace the changes text with a description of the changes in your PR, keep the double quotes to avoid errors (your changelog can be written ICly or OOCly, it doesn't matter) + +4. (Optional) set the change prefix (rscadd) to a different one listed above in example.yml (this affects what icon is used for your changelog entry) + +5. When commiting make sure your .yml file is included in the commit (it will usually be unticked as an unversioned file) + +####################################################### + +If you have trouble ask for help in #codershuttle on irc.sorcery.net or read https://tgstation13.org/wiki/Guide_to_Changelogs diff --git a/html/changelogs/example.yml b/html/changelogs/example.yml new file mode 100644 index 0000000000..6b61a43693 --- /dev/null +++ b/html/changelogs/example.yml @@ -0,0 +1,36 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# spellcheck (typo fixes) +# experiment +################################# + +# Your name. +author: N3X15 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added a changelog editing system that should cause fewer conflicts and more accurate timestamps." + - rscdel: "Killed innocent kittens." diff --git a/html/create_object.html b/html/create_object.html index a1f115b783..f4e0aa8644 100644 --- a/html/create_object.html +++ b/html/create_object.html @@ -27,7 +27,7 @@
- Type
+ Type
Offset: A @@ -44,7 +44,7 @@


- +
- - - - - -
- - - - -
Date:
Author:
Add list item - - -
- -
- - - \ No newline at end of file diff --git a/html/paigrid.png b/html/paigrid.png deleted file mode 100644 index 55ca7bf922..0000000000 Binary files a/html/paigrid.png and /dev/null differ diff --git a/html/painew.png b/html/painew.png deleted file mode 100644 index edb15d4033..0000000000 Binary files a/html/painew.png and /dev/null differ diff --git a/html/postcardsmall.jpg b/html/postcardsmall.jpg deleted file mode 100644 index 5d666d7382..0000000000 Binary files a/html/postcardsmall.jpg and /dev/null differ diff --git a/html/somerights20.png b/html/somerights20.png deleted file mode 100644 index a66f4d1a01..0000000000 Binary files a/html/somerights20.png and /dev/null differ diff --git a/html/templates/footer.html b/html/templates/footer.html new file mode 100644 index 0000000000..c26f94bdbf --- /dev/null +++ b/html/templates/footer.html @@ -0,0 +1,13 @@ + + +GoonStation 13 Development Team +
+ Coders: Stuntwaffle, Showtime, Pantaloons, Nannek, Keelin, Exadv1, hobnob, Justicefries, 0staf, sniperchance, AngriestIBM, BrianOBlivion
+ Spriters: Supernorn, Haruhi, Stuntwaffle, Pantaloons, Rho, SynthOrange, I Said No
+
+
+

Creative Commons License
Except where otherwise noted, Goon Station 13 is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.
Rights are currently extended to SomethingAwful Goons only.

+

Some icons by Yusuke Kamiyamane. All rights reserved. Licensed under a Creative Commons Attribution 3.0 License.

+ + + diff --git a/html/templates/header.html b/html/templates/header.html new file mode 100644 index 0000000000..3daf4a3d55 --- /dev/null +++ b/html/templates/header.html @@ -0,0 +1,58 @@ + + + + Baystation 12 Changelog + + + + + + + +
+ + + + +
+
Space Station 13
+ +

+ Code licensed under GPLv3. Content licensed under CC BY-SA 3.0.

+ Visit our IRC channel: #bs12 on irc.sorcery.net +
+ +
Baystation 12 Credit List + + + + +
+ Current Project Maintainers: -Click Here-
+ Currently Active GitHub contributor list: -Click Here-
+ Code: Abi79, Aryn, Cael_Aislinn, Ccomp5950, Chinsky, cib, CompactNinja, DopeGhoti, Erthilo, Hawk_v3, Head, Ispil, JoeyJo0, Lexusjjss, Melonstorm, Miniature, Mloc, NerdyBoy1104, PsiOmegaDelta, SkyMarshal, Snapshot, Spectre, Strumpetplaya, Sunfall, Tastyfish, Uristqwerty
+ Sprites: Apple_Master, Arcalane, Chinsky, CompactNinja, Deus Dactyl, Erthilo, Flashkirby, JoeyJo0, Miniature, Searif, Xenone, faux
+ Sounds: Aryn
+ Main Testers: Anyone who has submitted a bug to the issue tracker
+ Thanks to: /tg/ station, /vg/station, GoonStation devs, the original SpaceStation developers and Invisty for the title image.
Also a thanks to anybody who has contributed who is not listed here :( Ask to be added here on irc.
+
Have a bug to report?
Visit our Issue Tracker.
+
+ + +
\ No newline at end of file diff --git a/html/tg-notif.png b/html/tg-notif.png deleted file mode 100644 index 586ae70b9c..0000000000 Binary files a/html/tg-notif.png and /dev/null differ diff --git a/tools/GenerateChangelog/makeChangelog.bat b/tools/GenerateChangelog/makeChangelog.bat new file mode 100644 index 0000000000..67149b1165 --- /dev/null +++ b/tools/GenerateChangelog/makeChangelog.bat @@ -0,0 +1,4 @@ +@echo off +rem Cheridan asked for this. - N3X +call python ss13_genchangelog.py ../../html/changelog.html ../../html/changelogs +pause diff --git a/tools/GenerateChangelog/ss13_genchangelog.py b/tools/GenerateChangelog/ss13_genchangelog.py new file mode 100644 index 0000000000..472fbc69aa --- /dev/null +++ b/tools/GenerateChangelog/ss13_genchangelog.py @@ -0,0 +1,210 @@ +''' +Usage: + $ python ss13_genchangelog.py [--dry-run] html/changelog.html html/changelogs/ + +ss13_genchangelog.py - Generate changelog from YAML. + +Copyright 2013 Rob "N3X15" Nelson + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +''' + +from __future__ import print_function +import yaml, os, glob, sys, re, time, argparse +from datetime import datetime, date +from time import time + +today = date.today() + +dateformat = "%d %B %Y" + +opt = argparse.ArgumentParser() +opt.add_argument('-d', '--dry-run', dest='dryRun', default=False, action='store_true', help='Only parse changelogs and, if needed, the targetFile. (A .dry_changelog.yml will be output for debugging purposes.)') +opt.add_argument('targetFile', help='The HTML changelog we wish to update.') +opt.add_argument('ymlDir', help='The directory of YAML changelogs we will use.') + +args = opt.parse_args() + +all_changelog_entries = {} + +validPrefixes = [ + 'bugfix', + 'wip', + 'tweak', + 'soundadd', + 'sounddel', + 'rscdel', + 'rscadd', + 'imageadd', + 'imagedel', + 'spellcheck', + 'experiment', + 'tgs' +] + +def dictToTuples(inp): + return [(k, v) for k, v in inp.items()] + +changelog_cache = os.path.join(args.ymlDir, '.all_changelog.yml') + +failed_cache_read = True +if os.path.isfile(changelog_cache): + try: + with open(changelog_cache) as f: + (_, all_changelog_entries) = yaml.load_all(f) + failed_cache_read = False + + # Convert old timestamps to newer format. + new_entries = {} + for _date in all_changelog_entries.keys(): + ty = type(_date).__name__ + # print(ty) + if ty in ['str', 'unicode']: + temp_data = all_changelog_entries[_date] + _date = datetime.strptime(_date, dateformat).date() + new_entries[_date] = temp_data + else: + new_entries[_date] = all_changelog_entries[_date] + all_changelog_entries = new_entries + except Exception as e: + print("Failed to read cache:") + print(e, file=sys.stderr) + +if args.dryRun: + changelog_cache = os.path.join(args.ymlDir, '.dry_changelog.yml') + +if failed_cache_read and os.path.isfile(args.targetFile): + from bs4 import BeautifulSoup + from bs4.element import NavigableString + print(' Generating cache...') + with open(args.targetFile, 'r') as f: + soup = BeautifulSoup(f) + for e in soup.find_all('div', {'class':'commit'}): + entry = {} + date = datetime.strptime(e.h2.string.strip(), dateformat).date() # key + for authorT in e.find_all('h3', {'class':'author'}): + author = authorT.string + # Strip suffix + if author.endswith('updated:'): + author = author[:-8] + author = author.strip() + + # Find
    + ulT = authorT.next_sibling + while(ulT.name != 'ul'): + ulT = ulT.next_sibling + changes = [] + + for changeT in ulT.children: + if changeT.name != 'li': continue + val = changeT.decode_contents(formatter="html") + newdat = {changeT['class'][0] + '': val + ''} + if newdat not in changes: + changes += [newdat] + + if len(changes) > 0: + entry[author] = changes + if date in all_changelog_entries: + all_changelog_entries[date].update(entry) + else: + all_changelog_entries[date] = entry + +del_after = [] +print('Reading changelogs...') +for fileName in glob.glob(os.path.join(args.ymlDir, "*.yml")): + name, ext = os.path.splitext(os.path.basename(fileName)) + if name.startswith('.'): continue + if name == 'example': continue + fileName = os.path.abspath(fileName) + print(' Reading {}...'.format(fileName)) + cl = {} + with open(fileName, 'r') as f: + cl = yaml.load(f) + f.close() + if today not in all_changelog_entries: + all_changelog_entries[today] = {} + author_entries = all_changelog_entries[today].get(cl['author'], []) + if len(cl['changes']): + new = 0 + for change in cl['changes']: + if change not in author_entries: + (change_type, _) = dictToTuples(change)[0] + if change_type not in validPrefixes: + print(' {0}: Invalid prefix {1}'.format(fileName, change_type), file=sys.stderr) + author_entries += [change] + new += 1 + all_changelog_entries[today][cl['author']] = author_entries + if new > 0: + print(' Added {0} new changelog entries.'.format(new)) + + if cl.get('delete-after', False): + if os.path.isfile(fileName): + if args.dryRun: + print(' Would delete {0} (delete-after set)...'.format(fileName)) + else: + del_after += [fileName] + + if args.dryRun: continue + + cl['changes'] = [] + with open(fileName, 'w') as f: + yaml.dump(cl, f, default_flow_style=False) + +targetDir = os.path.dirname(args.targetFile) + +with open(args.targetFile.replace('.htm', '.dry.htm') if args.dryRun else args.targetFile, 'w') as changelog: + with open(os.path.join(targetDir, 'templates', 'header.html'), 'r') as h: + for line in h: + changelog.write(line) + + for _date in reversed(sorted(all_changelog_entries.keys())): + entry_htm = '\n' + entry_htm += '\t\t\t

    {date}

    \n'.format(date=_date.strftime(dateformat)) + write_entry = False + for author in sorted(all_changelog_entries[_date].keys()): + if len(all_changelog_entries[_date]) == 0: continue + author_htm = '\t\t\t

    {author} updated:

    \n'.format(author=author) + author_htm += '\t\t\t
      \n' + changes_added = [] + for (css_class, change) in (dictToTuples(e)[0] for e in all_changelog_entries[_date][author]): + if change in changes_added: continue + write_entry = True + changes_added += [change] + author_htm += '\t\t\t\t
    • {change}
    • \n'.format(css_class=css_class, change=change.strip()) + author_htm += '\t\t\t
    \n' + if len(changes_added) > 0: + entry_htm += author_htm + if write_entry: + changelog.write(entry_htm) + + with open(os.path.join(targetDir, 'templates', 'footer.html'), 'r') as h: + for line in h: + changelog.write(line) + + +with open(changelog_cache, 'w') as f: + cache_head = 'DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py.' + yaml.dump_all([cache_head, all_changelog_entries], f, default_flow_style=False) + +if len(del_after): + print('Cleaning up...') + for fileName in del_after: + if os.path.isfile(fileName): + print(' Deleting {0} (delete-after set)...'.format(fileName)) + os.remove(fileName)