summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhaturatu <taro@eyes4you.org>2024-09-01 02:15:59 +0900
committerhaturatu <taro@eyes4you.org>2024-09-01 02:15:59 +0900
commite0e3fa5f234e771ab5452a18a074cd83b52c8985 (patch)
treefee17fc09e686dc91a7f22053fcbd5bf4d266d2e
parentf08411e3d4cec3be138eaef300fa419b02bd286d (diff)
add readme
-rw-r--r--Gemfile.lock3
-rw-r--r--README.md42
-rwxr-xr-xgeturl.rb2
3 files changed, 43 insertions, 4 deletions
diff --git a/Gemfile.lock b/Gemfile.lock
index fdce3bb..a3e778f 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -5,8 +5,6 @@ GEM
faraday (1.2.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords
- faraday_middleware (1.2.0)
- faraday (~> 1.0)
multipart-post (2.4.1)
nokogiri (1.16.7-aarch64-linux)
racc (~> 1.4)
@@ -36,7 +34,6 @@ PLATFORMS
DEPENDENCIES
charlock_holmes
faraday
- faraday_middleware
nokogiri
parallel
unicode_utils
diff --git a/README.md b/README.md
index f39fe18..7e4e89b 100644
--- a/README.md
+++ b/README.md
@@ -1 +1,43 @@
# paint-it-url
+URLからページタイトルを取得、出力します。
+
+## Usage
+依存関係をインストール
+```
+bundle install --path ~/.gem
+```
+
+## geturl.rb
+入力ファイルは以下のような形式とします。
+`inputfile`
+```
+https://github.com/haturatu/paint-it-url
+https://soulminingrig.com/
+```
+そして実行します。
+```
+chmod +x geturl.rb
+./geturl.rb
+```
+出力
+```
+URL: https://soulminingrig.com/
+Title: Home - SOULMINIGRIG
+
+URL: https://github.com/haturatu/paint-it-url
+Title: GitHub - haturatu/paint-it-url: URLからページタイトルを取得しMarkdown形式で出力する
+```
+
+## md.rb
+出力されたファイルをMarkdown形式で出力する。
+```
+chmod +x md.rb
+./md.rb
+```
+出力
+```
+$ cat Result.md
+[Home - SOULMINIGRIG](https://soulminingrig.com/)
+
+[GitHub - haturatu/paint-it-url: URLからページタイトルを取得しMarkdown形式で出力する](https://github.com/haturatu/paint-it-url)
+```
diff --git a/geturl.rb b/geturl.rb
index 2e446d4..f86bf8e 100755
--- a/geturl.rb
+++ b/geturl.rb
@@ -7,7 +7,7 @@ require 'nokogiri'
require 'charlock_holmes'
require 'unicode_utils'
-FILE_PATH = '/your/bookmark/txtfile'
+FILE_PATH = '/home/haturatu/Downloads/mstdon/test'
RESULT_FILE = 'Result'
OTHER_ERROR_FILE = 'Other'
CONCURRENCY = 10