Perl版の読み込みに, HTTP ではなく直接ファイルを読むように. master
authorsatomichan <...@...>
Tue, 24 Mar 2026 14:56:27 +0000 (23:56 +0900)
committersatomichan <...@...>
Tue, 24 Mar 2026 14:56:27 +0000 (23:56 +0900)
misc/make-tel2ma.js.pl

index b60c07210ed3a76b4c0b69d4572ecc65ff50b1c0..da8bfc44b903ffc32369143531dd0ce0624846f4 100755 (executable)
@@ -5,15 +5,16 @@
 use strict;
 use warnings;
 
 use strict;
 use warnings;
 
-my $URL = 'https://satomichan.jp/gitweb/?p=tel2ma/.git;a=blob_plain;f=tel2ma.pl';
+use FindBin;
+chdir $FindBin::Bin or die;
 
 header();
 
 
 header();
 
-open(my $wget, '-|', "wget '$URL' -q -O -") or die;
+open(my $PL, '../tel2ma.pl') or die;
 
 print "function get_ma_info(tel) {\n";
 
 
 print "function get_ma_info(tel) {\n";
 
-foreach my $line (<$wget>) {
+foreach my $line (<$PL>) {
     next unless $line =~ /^__DATA__/ .. 1;
     next if $line =~ /^__DATA__/;
 
     next unless $line =~ /^__DATA__/ .. 1;
     next if $line =~ /^__DATA__/;
 
@@ -65,7 +66,7 @@ __DATA__
 tel2ma.js 日本国内電話番号 -> 市外局番・MA・市町村 取得プログラム
 
 
 tel2ma.js 日本国内電話番号 -> 市外局番・MA・市町村 取得プログラム
 
 
-Copyright 2025 FUKUDA Satomi (https://satomichan.jp/about_tel2ma)
+Copyright 2025-2026 FUKUDA Satomi (https://satomichan.jp/about_tel2ma)
 
 Licensed under the Apache License, Version 2.0 (the “License”);
 you may not use this file except in compliance with the License.
 
 Licensed under the Apache License, Version 2.0 (the “License”);
 you may not use this file except in compliance with the License.