Skip to content

Commit

Permalink
Fix missing title with --no-source
Browse files Browse the repository at this point in the history
- FIXED: Missing h1 title with --no-include-source
  • Loading branch information
ttscoff committed Sep 9, 2022
1 parent a0b3047 commit 29c3f41
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 2.0.43

## 2.0.42

#### FIXED
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
![Howzit banner image](https://cdn3.brettterpstra.com/uploads/2022/08/gatherheader-rb.webp)


Current version: 2.0.42
Current version: 2.0.43

This project is the successor to read2text, which was a Python based tool that used Arc90 Readability and html2text to convert web URLs to Markdown documents, ready to store in your notes. It takes its name from another of my similar projects that I've since retired. It was this, but with a GUI, and this is infinitely more scriptable and is designed to nestle into your favorite tools and projects.

Expand Down
9 changes: 3 additions & 6 deletions Sources/gather/gather.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Cocoa
import Foundation
import HTML2Text
import Readability
var VERSION = "2.0.42"
var VERSION = "2.0.43"

var acceptedAnswerOnly = false
var disableReadability = false
Expand Down Expand Up @@ -163,11 +163,8 @@ func markdownify_html(html: String?, read: Bool?, url: String?, baseurl: String?
} else {
source = "[Source](\(sourceUrl!))\n\n"
}
} else if url == nil, title != nil {
if includeTitleAsH1, countH1s(html!, title: title) == 0 {
source = "# \(title!)\n\n"
}
// source = "# \(title!)\n\n"
} else if title != nil, includeTitleAsH1 {
source = "# \(title!)\n\n"
}
html = "\(meta)\(source)\(html!)"

Expand Down
Binary file modified buildnotes.md.secret
Binary file not shown.
2 changes: 1 addition & 1 deletion src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!--GITHUB-->![Howzit banner image](https://cdn3.brettterpstra.com/uploads/2022/08/gatherheader-rb.webp)<!--END GITHUB-->
<!--JEKYLL{% img aligncenter 800 220 /uploads/2022/08/gatherheader-rb.jpg "Howzit banner image" %}-->

Current version: <!--VER-->2.0.41<!--END VER-->
Current version: <!--VER-->2.0.42<!--END VER-->

This project is the successor to read2text, which was a Python based tool that used Arc90 Readability and html2text to convert web URLs to Markdown documents, ready to store in your notes. It takes its name from another of my similar projects that I've since retired. It was this, but with a GUI, and this is infinitely more scriptable and is designed to nestle into your favorite tools and projects.

Expand Down

0 comments on commit 29c3f41

Please sign in to comment.