mirror of
https://github.com/makeworld-the-better-one/amfora.git
synced 2024-11-25 22:53:02 +03:00
🔖 Ready for v1.3.0
This commit is contained in:
parent
9b8985905f
commit
bde371cff2
@ -4,16 +4,16 @@ All notable changes to this project will be documented in this file.
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
## [Unreleased]
|
||||
## [1.3.0] - 2020-07-10
|
||||
### Added
|
||||
- **Downloading pages and any content** (#38)
|
||||
- **Downloading content** (#38)
|
||||
- Configurable page size limit - `page_max_size` in config (#30)
|
||||
- Configurable page timeout - `page_max_time` in config
|
||||
- Link and heading lines are wrapped just like regular text lines
|
||||
- Wrapped list items are indented to stay behind the bullet (#35)
|
||||
- Certificate expiry date is stored when the cert IDs match (#39)
|
||||
- What link was selected is remembered as you browse through history
|
||||
- Render ANSI codes in `text/x-ansi` pages, or text pages that end with `.ans`
|
||||
- Render ANSI codes in `text/x-ansi` pages, or text pages that end with `.ans` (#45)
|
||||
|
||||
### Changed
|
||||
- Pages are rewrapped dynamically, whenever the terminal size changes (#33)
|
||||
|
@ -8,7 +8,7 @@ import (
|
||||
"github.com/makeworld-the-better-one/amfora/display"
|
||||
)
|
||||
|
||||
var version = "1.3.0-unreleased"
|
||||
var version = "1.3.0"
|
||||
|
||||
func main() {
|
||||
// err := logger.Init()
|
||||
@ -18,7 +18,7 @@ func main() {
|
||||
|
||||
if len(os.Args) > 1 {
|
||||
if os.Args[1] == "--version" || os.Args[1] == "-v" {
|
||||
fmt.Println(version)
|
||||
fmt.Println("amfora v" + version)
|
||||
return
|
||||
}
|
||||
if os.Args[1] == "--help" || os.Args[1] == "-h" {
|
||||
|
@ -35,6 +35,7 @@ Ctrl-R, R|Reload a page, discarding the cached version.
|
||||
|This can also be used if you resize your terminal.
|
||||
Ctrl-B|View bookmarks
|
||||
Ctrl-D|Add, change, or remove a bookmark for the current page.
|
||||
Ctrl-S|Save the current page to your downloads.
|
||||
q, Ctrl-Q, Ctrl-C|Quit
|
||||
`)
|
||||
|
||||
|
@ -13,6 +13,7 @@ type PageMode int
|
||||
const (
|
||||
ModeOff PageMode = iota // Regular mode
|
||||
ModeLinkSelect // When the enter key is pressed, allow for tab-based link navigation
|
||||
ModeSearch // When a keyword is being searched in a page - TODO: NOT USED YET
|
||||
)
|
||||
|
||||
// Page is for storing UTF-8 text/gemini pages, as well as text/plain pages.
|
||||
@ -32,9 +33,9 @@ type Page struct {
|
||||
|
||||
// Size returns an approx. size of a Page in bytes.
|
||||
func (p *Page) Size() int {
|
||||
b := len(p.Raw) + len(p.Content) + len(p.Url) + len(p.Selected) + len(p.SelectedID)
|
||||
n := len(p.Raw) + len(p.Content) + len(p.Url) + len(p.Selected) + len(p.SelectedID)
|
||||
for i := range p.Links {
|
||||
b += len(p.Links[i])
|
||||
n += len(p.Links[i])
|
||||
}
|
||||
return b
|
||||
return n
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user