<commit_before>// This file prepares rhino to do something useful

// Prep rhino
load('dist/env.rhino.js');
window.location='index.html';
load('dist/jquery.js');

// grab all the useful strings from a .html file
var myTags = "h1, h2, h3, title, label, button";

/* $('meta').each(function(){ 
    print("msgctxt \"meta\"");
    print("msgid \"" + $(this).attr('content') + "\"\n");
}) */

/* $('img[alt]').each(function(){ 
    print("msgctxt \"img " + $(this).attr('id') + "\"");
    print("msgid \"" + $(this).attr('alt') + "\"\n");
});
*/
    var printAttr = function(selector, elemAttr) {
	$(selector).each(function(){
	    print("msgctxt \"HTML Tag: " + $(this)[0].tagName + " ID: "  + $(this).attr('id') + "\"");
	    print("msgid \"" + $(this).attr(elemAttr) + "\"\n");

	});
	return this;
    }

    printAttr('meta', 'content');
    printAttr('img[alt]', 'alt');

/*    $(myTags).each(function(){ 
	print
	print($(this).html())});

*/<commit_msg>uncommented printing general html tags<commit_after>// This file prepares rhino to do something useful

// Prep rhino
load('dist/env.rhino.js');
window.location='index.html';
load('dist/jquery.js');

// grab all the useful strings from a .html file
var myTags = "h1, h2, h3, title, label, button";

$(myTags).each(function(){ 
    print("msgctxt \"HTML Tag: " + $(this)[0].tagName + " ID: "  + $(this).attr('id') + "\"");
    print("msgid \"" + $(this).html() + "\"\n");
}); 

    var printAttr = function(selector, elemAttr) {
	$(selector).each(function(){
	    print("msgctxt \"HTML Tag: " + $(this)[0].tagName + " ID: "  + $(this).attr('id') + "\"");
	    print("msgid \"" + $(this).attr(elemAttr) + "\"\n");

	});
	return this;
    }

    printAttr('meta', 'content');
    printAttr('img[alt]', 'alt');

/*    $(myTags).each(function(){ 
	print
	print($(this).html())});

*/
{'fraction_non_alphanumeric': 0.2602291325695581, 'fraction_numerical': 0.004909983633387889, 'mean_word_length': 3.57356608478803, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '101156', 'n_tokens_mistral': 670, 'n_tokens_neox': 643, 'n_words': 135}