[Commits] [SCM] claws branch, master, updated. 3.13.0-66-gbffd6c5

mones at claws-mail.org mones at claws-mail.org
Sat Nov 14 02:50:15 CET 2015


The branch, master has been updated
       via  bffd6c59e8ae058f54e7e461c5e81a337ac1048f (commit)
       via  63050e7befc2f35d29af6c5686c3cc9b0f5907f8 (commit)
       via  ca641f7813b877f7fb43dd99dce3eaa115cd4c75 (commit)
      from  bcc39aa690ad61c331b36e5b17e2252ab54c8cfd (commit)

Summary of changes:
 src/common/tlds.h          |   17 ++++++++++++++--
 tools/alternative-tlds.txt |   48 ++++++++++++++++++++++++++++++++++++++++++++
 tools/claws.get.tlds.pl    |   18 +++++++++++++++--
 3 files changed, 79 insertions(+), 4 deletions(-)
 create mode 100644 tools/alternative-tlds.txt


- Log -----------------------------------------------------------------
commit bffd6c59e8ae058f54e7e461c5e81a337ac1048f
Author: Ricardo Mones <ricardo at mones.org>
Date:   Sat Nov 14 02:49:27 2015 +0100

    Update array of recognised TLDs

diff --git a/src/common/tlds.h b/src/common/tlds.h
index c37f1b9..6d2e949 100644
--- a/src/common/tlds.h
+++ b/src/common/tlds.h
@@ -6,7 +6,7 @@
 #define __TLDS_H__
 
 static const gchar *toplvl_domains [] = {
-	/* Version 2015111201, Last Updated Thu Nov 12 07:07:01 2015 UTC */
+	/* Version 2015111300, Last Updated Fri Nov 13 07:07:01 2015 UTC */
 	"aaa", "aarp", "abb", "abbott", "abogado",
 	"ac", "academy", "accenture", "accountant", "accountants",
 	"aco", "active", "actor", "ad", "ads",
@@ -206,7 +206,20 @@ static const gchar *toplvl_domains [] = {
 	"xyz", "yachts", "yamaxun", "yandex", "ye",
 	"yodobashi", "yoga", "yokohama", "youtube", "yt",
 	"za", "zara", "zip", "zm", "zone",
-	"zuerich", "zw"
+	"zuerich", "zw", /* NameCoin */
+	"bit", /* EmerCoin */
+	"bazar", "coin",
+	"emc", "lib", /* Name.Space */
+	"art", "books", "inc",
+	"music", "radio", "shop", "talk", "union",
+	/* OpenNIC */
+	"bbs", "dyn", "free", "fur", "geek",
+	"gopher", "indy", "micro", "neo", "null",
+	"oss", "oz", "parody", "pirate", /* Tor Project */
+	"onion",
+	/* GNU Name System */
+	"gnu", /* Invisible Internet Project */
+	"i2p"
 };
 
 #endif

commit 63050e7befc2f35d29af6c5686c3cc9b0f5907f8
Author: Ricardo Mones <ricardo at mones.org>
Date:   Sat Nov 14 02:46:58 2015 +0100

    Add a list of alternative TLDs
    
    Mostly from https://en.wikipedia.org/wiki/Alternative_DNS_root

diff --git a/tools/alternative-tlds.txt b/tools/alternative-tlds.txt
new file mode 100644
index 0000000..c7e8d3d
--- /dev/null
+++ b/tools/alternative-tlds.txt
@@ -0,0 +1,48 @@
+# NameCoin
+BIT
+# EmerCoin
+BAZAR
+COIN
+EMC
+LIB
+# Name.Space
+ART
+BOOKS
+CHAT
+DESIGN
+FILM
+HELP
+INC
+LAW
+MUSIC
+NEWS
+PRESS
+RADIO
+SHOP
+TALK
+UNION
+VIDEO
+WORLD
+ZONE
+# OpenNIC
+BBS
+DYN
+FREE
+FUR
+GEEK
+GOPHER
+INDY
+ING
+MICRO
+NEO
+NULL
+OSS
+OZ
+PARODY
+PIRATE
+# Tor Project
+ONION
+# GNU Name System
+GNU
+# Invisible Internet Project
+I2P

commit ca641f7813b877f7fb43dd99dce3eaa115cd4c75
Author: Ricardo Mones <ricardo at mones.org>
Date:   Sat Nov 14 02:45:37 2015 +0100

    Support adding domains from a file

diff --git a/tools/claws.get.tlds.pl b/tools/claws.get.tlds.pl
index 31aa31c..0ae3990 100755
--- a/tools/claws.get.tlds.pl
+++ b/tools/claws.get.tlds.pl
@@ -4,6 +4,9 @@
 
 claws.get.tlds.pl - IANA TLDs online list to stdout as gchar* array.
 
+Syntax:
+  claws.get.tlds.pl [extra-domains.txt] > src/common/tlds.h
+
 Copyright (c) 2015 Ricardo Mones <ricardo at mones.org>
 
 This program is free software: you can redistribute it and/or modify it
@@ -32,12 +35,23 @@ print "#ifndef __TLDS_H__\n#define __TLDS_H__\n\n";
 print "static const gchar *toplvl_domains [] = {\n\t"; # open array
 
 my $payload = get URL;
-my @lines = split /^/, $payload;
+die "Unable to retrieve IANA list of TLDs\n" unless defined $payload;
+my @lines = map { chomp; $_ } split /^/, $payload;
 my ($i, $j) = (0, 0);
 
+if (defined $ARGV[0] and -f $ARGV[0]) {
+  my %domains = ();
+  foreach (@lines) { $domains{$_} = "" unless (/^#.*$/) }
+  open my $fh, '<', $ARGV[0] or die "Unable to open $ARGV[0] for reading\n";
+  while (<$fh>) {
+    chomp;
+    push @lines, $_ if (/^#.*/ or not defined $domains{$_});
+  }
+  close $fh;
+}
+
 foreach (@lines) {
   ++$i;
-  chomp;
   if (/^#(.*)$/) { # comments
     my $c = $1; $c =~ s/^\s+|\s+$//g;
     print "/* $c */\n\t";

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list