tfhelps 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe5f705e26da4fab6a4703440713d8e45b95bb669df97ec8b98b820280599221
4
- data.tar.gz: 5ead2a1e0e889d5da6647bcb4770aeba289a4d50b8194d989549c44c3e0dd0ed
3
+ metadata.gz: bdc525921dab5fc1d0db1a17df077d6ed66f61da85d836c8cada857dc804e7a8
4
+ data.tar.gz: a02b3f63d5fbe65fae54b74fb063b4349250bb95a9318d3b4b45329b9c06dfbc
5
5
  SHA512:
6
- metadata.gz: f043e914ddf1297a5a1d57f645cc5be85f551c447f723aaa3866bcfb30f630704e8a65f220878651bef59efd939aaea9b15f85601a6d4b720c672283fec42c62
7
- data.tar.gz: 961d9d646354e125a65969f808a3f4758a5e31905c30bf91481a8f8262a6f2618c9e1602abcbb9fc9e265a6be110243ca90c36b928a10e3355f039d6b88cc16e
6
+ metadata.gz: 7a617ba86bb433fe9d2f24610215d363386aae4deff7f650bd7dd50a103abdce9be3df91d03a01f8d704e07354da9769049ad38de5abfafab4da7b748b57fc3f
7
+ data.tar.gz: 277c441592219ae9a9a3e073abfa0dcee63bba8c6ba05ca60304c213f90a495d59b7a84d3182adc48832220a9e81df7c8998e2e80ffa74255206bd6e688ab3b7
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # TFHelps
2
-
2
+ [![Gem Version](https://badge.fury.io/rb/tfhelps.svg)](https://badge.fury.io/rb/tfhelps)
3
3
  > TFHelps is a command-line tool designed to format text files professionally and efficiently. Built primarily for **Helps Ministries**, it uses the Gemini API to clean up and structure text based on predefined formatting guidelines. This tool is ideal for anyone looking to automate the process of making text more readable and polished.
4
4
 
5
5
  ## Installation
@@ -18,8 +18,7 @@ Before using TFHelps, you need to obtain an API key from Google's AI Studio. Fol
18
18
 
19
19
  1. Visit Google AI Studio and sign in with your Google account.
20
20
  2. Generate an API key (free or paid, depending on your usage needs).
21
- 3. Store the API key in your environment variables with the key GEMINI_API_KEY.
22
- Add the following line to your .bashrc, .zshrc, or equivalent shell configuration file:
21
+ 3. Store the API key in your environment variables with the key GEMINI_API_KEY. To achieve that, add the following line to your .bashrc, .zshrc, or equivalent shell configuration file:
23
22
 
24
23
  ```bash
25
24
  export GEMINI_API_KEY="your_api_key_here"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tfhelps
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.3"
5
5
  end
data/lib/tfhelps.rb CHANGED
@@ -16,16 +16,19 @@ module Tfhelps
16
16
  def format_text(text)
17
17
  prompt = <<~PRO
18
18
  Format the following text into a professional and readable structure.
19
- Follow these guidelines:
20
- 1. Combine sentences into a single paragraph if they are separated by a single empty line.
21
- 2. Create a new paragraph whenever there are two or more empty lines separating the text.
22
- 3. Ensure proper spacing, punctuation, and capitalization throughout the text.
23
- 4. Maintain a clean and polished format suitable for professional use.
24
- 5. Replace all curved (smart) double quotation marks (e.g., ”) with straight (normal) double quotation marks (").
25
- 6. Do not add a title or any additional text content that is not present in the original text.
26
-
27
- Text to format:
28
- #{text}
19
+ Follow these guidelines:
20
+ 1. Combine sentences into a single paragraph if they are separated by a single empty line.
21
+ 2. Create a new paragraph whenever there are two or more empty lines separating the text.
22
+ 3. Ensure proper spacing, punctuation, and capitalization throughout the text.
23
+ 4. Replace all curved (smart) double quotation marks (e.g., ”) with straight (normal) double quotation marks (").
24
+ 5. Convert curved single quote (’) to a straight single quote (').
25
+ 6. Convert double hyphens (--), spaced double hyphens (- -), double em dashes (——), or spaced double em dashes (— —) into a single em dash (—). Apply this only if they don’t appear at the start of a new line. Remove any surrounding spaces before or after the dash.
26
+ 7. Do not modify underscores(_); leave them as is.
27
+ 8. Do not add a title or any additional text content that is not present in the original text.
28
+ 9. Transform any new line that begins with one or two hyphen characters (- or --) into a standardized bullet point format.
29
+
30
+ Text to format:
31
+ #{text}
29
32
  PRO
30
33
 
31
34
  http = Net::HTTP.new(@url.host, @url.port)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tfhelps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wuletaw Wonte
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-03-25 00:00:00.000000000 Z
10
+ date: 2025-03-31 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: |
13
13
  The Helps Text Formatter gem is a command-line tool designed for Helps Ministries to clean up and format text files using the power of Google's Gemini API.