diff options
author | haturatu <taro@eyes4you.org> | 2024-10-09 01:37:37 +0900 |
---|---|---|
committer | haturatu <taro@eyes4you.org> | 2024-10-09 01:37:37 +0900 |
commit | 9f6b3b2b7c9e757c108ffc87694826cf20fc642e (patch) | |
tree | 135c99de5fce87cdea4d511468cfed4fa8524d9a | |
parent | 031b8014901bd101d92af148a841e9b9c8fb59f5 (diff) |
-rwxr-xr-x | geturl.rb | 2 | ||||
-rwxr-xr-x | md.rb | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -70,7 +70,7 @@ def process_url(url) if title.start_with?('エラー:') File.open($OTHER_ERROR_FILE, 'a') { |f| f.puts "URL: #{url}\nエラー: #{title}\n\n" } else - File.open($RESULT_FILE, 'a') { |f| f.puts "URL: #{url}\nタイトル: #{title}\n\n" } + File.open($RESULT_FILE, 'a') { |f| f.puts "URL: #{url}\nTitle: #{title}\n\n" } end puts "URL: #{url}\nタイトル: #{title}\n\n" end @@ -3,7 +3,7 @@ def convert_to_markdown(input_file, output_file) content = File.read(input_file, encoding: 'utf-8') - pairs = content.scan(/URL: (.*?)\nタイトル: (.*?)\n/m) + pairs = content.scan(/URL: (.*?)\nTitle: (.*?)\n/m) File.open(output_file, 'w', encoding: 'utf-8') do |f| pairs.each do |url, title| |