<commit_before>#!/bin/bash
URL="http://ad-m.github.io/etr-warszawa/";
function update_revs {
	rev=$(date +"%Y-%m-%d %T");
	(cat page/head.html; python etr-warszawa-grab.py; cat page/footer.html;) | tee "revs/$rev.html" > "revs/current.html";
	git add "revs/$rev.html" "revs/current.html";
	git commit -m "Added rev $rev" "revs/$rev.html" "revs/current.html";
	git push origin;
};
function update_index {
	(cat page/head.html; echo "<ul>";
	find revs -type f | while read line; do 
		echo "<li><a href='$line'>`basename "$line"`</a></li>";
	done;
	echo "</ul>";
	cat page/footer.html;) > "index.html";
};
function generate_sitemap {
	echo '<urlset>'
	find revs -type f | while read line; do 
		echo "<url><loc>$URL$line</loc></url>";
	done;
	echo '</urlset>';
}
function update_sitemap {
	generate_sitemap > sitemap.xml;
};
function update {
	update_revs;
	update_index;
	update_sitemap;
}
update;<commit_msg>Commit updated index.html and sitemap.xml<commit_after>#!/bin/bash
URL="http://ad-m.github.io/etr-warszawa/";
function update_revs {
	rev=$(date +"%Y-%m-%d %T");
	(cat page/head.html; python etr-warszawa-grab.py; cat page/footer.html;) | tee "revs/$rev.html" > "revs/current.html";
	git add "revs/$rev.html" "revs/current.html";
	git commit -m "Added rev $rev" "revs/$rev.html" "revs/current.html";
};
function update_index {
	(cat page/head.html; echo "<ul>";
	find revs -type f | while read line; do 
		echo "<li><a href='$line'>`basename "$line"`</a></li>";
	done;
	echo "</ul>";
	cat page/footer.html;) > "index.html";
	git add "index.html";
	git commit -m "Update index" "index.html";

};
function generate_sitemap {
	echo '<urlset>'
	find revs -type f | while read line; do 
		echo "<url><loc>$URL$line</loc></url>";
	done;
	echo '</urlset>';
}
function update_sitemap {
	generate_sitemap > sitemap.xml;
	git add "sitemap.xml";
	git commit -m "Update sitemap" "sitemap.xml";
};
function update {
	update_revs;
	update_index;
	update_sitemap;
	git push origin;
}
update;
{'fraction_non_alphanumeric': 0.1956631366616238, 'fraction_numerical': 0.0, 'mean_word_length': 4.3621621621621625, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2032069', 'n_tokens_mistral': 786, 'n_tokens_neox': 787, 'n_words': 185}