<commit_before>#!/usr/bin/perl
# zoneinfo2lua.pl - Make Lua module from /usr/share/zoneinfo
# Execute from within /usr/share/zoneinfo
# $Id$

use strict;

my %TZ;

local $/ = "\012";
open( ZTAB, "< ./zone.tab" ) || die "Unable to open zone.tab: $!";

while( ! eof ZTAB ) {
	chomp( my $line = readline ZTAB );
	next if $line =~ /^#/ || $line =~ /^\s+$/;

	my ( undef, undef, $zone, @comment ) = split /\s+/, $line;

	printf STDERR "%-40s", $zone;
<commit_msg>build: make zoneinfo2lua.pl script more convenient<commit_after>#!/usr/bin/perl
# zoneinfo2lua.pl - Make Lua module from /usr/share/zoneinfo
# Execute from within /usr/share/zoneinfo
# $Id$

use strict;

my %TZ;
my $tzdir = $ARGV[0] || "/usr/share/zoneinfo";

chdir($tzdir) || die "chdir($tzdir): $!\n";

local $/ = "\012";
open( ZTAB, "< ./zone.tab" ) || die "Unable to open zone.tab: $!";

while( ! eof ZTAB ) {
	chomp( my $line = readline ZTAB );
	next if $line =~ /^#/ || $line =~ /^\s+$/;

	my ( undef, undef, $zone, @comment ) = split /\s+/, $line;

	printf STDERR "%-40s", $zone;

{'fraction_non_alphanumeric': 0.21818181818181817, 'fraction_numerical': 0.013397129186602871, 'mean_word_length': 3.340248962655602, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5142003', 'n_tokens_mistral': 456, 'n_tokens_neox': 425, 'n_words': 115}