mirror of
				https://github.com/nkanaev/yarr.git
				synced 2025-10-31 06:53:30 +00:00 
			
		
		
		
	Compare commits
	
		
			4 Commits
		
	
	
		
			v2.5
			...
			20d86e9ea6
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 20d86e9ea6 | ||
|  | 76e5e54a67 | ||
|  | a51da7b8ec | ||
|  | 33503f7896 | 
| @@ -90,6 +90,10 @@ func main() { | |||||||
| 		log.SetOutput(os.Stdout) | 		log.SetOutput(os.Stdout) | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	if open && strings.ContainsRune(addr, os.PathSeparator) { | ||||||
|  | 		log.Fatal("Cannot open unix socket path (", addr, ") in browser") | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	if db == "" { | 	if db == "" { | ||||||
| 		configPath, err := os.UserConfigDir() | 		configPath, err := os.UserConfigDir() | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
|   | |||||||
| @@ -4,6 +4,7 @@ | |||||||
| - (new) editable feed link (thanks to @adaszko) | - (new) editable feed link (thanks to @adaszko) | ||||||
| - (new) switch to feed by clicking the title in the article page (thanks to @tarasglek for suggestion) | - (new) switch to feed by clicking the title in the article page (thanks to @tarasglek for suggestion) | ||||||
| - (new) support multiple media links | - (new) support multiple media links | ||||||
|  | - (new) next/prev article navigation buttons (thanks to @tillcash) | ||||||
| - (fix) duplicate articles caused by the same feed addition (thanks to @adaszko) | - (fix) duplicate articles caused by the same feed addition (thanks to @adaszko) | ||||||
| - (fix) relative article links (thanks to @adazsko for the report) | - (fix) relative article links (thanks to @adazsko for the report) | ||||||
| - (fix) atom article links stored in id element (thanks to @adazsko for the report) | - (fix) atom article links stored in id element (thanks to @adazsko for the report) | ||||||
| @@ -17,6 +18,7 @@ | |||||||
| - (etc) load external images with no-referrer policy (thanks to @tillcash for the report) | - (etc) load external images with no-referrer policy (thanks to @tillcash for the report) | ||||||
| - (etc) open external links with no-referrer policy (thanks to @donovanglover) | - (etc) open external links with no-referrer policy (thanks to @donovanglover) | ||||||
| - (etc) show article content in the list if title is missing (thanks to @asimpson for suggestion) | - (etc) show article content in the list if title is missing (thanks to @asimpson for suggestion) | ||||||
|  | - (etc) accessibility improvements (thanks to @tseykovets) | ||||||
|  |  | ||||||
| # v2.4 (2023-08-15) | # v2.4 (2023-08-15) | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										20
									
								
								readme.md
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								readme.md
									
									
									
									
									
								
							| @@ -9,21 +9,21 @@ The app is a single binary with an embedded database (SQLite). | |||||||
|  |  | ||||||
| ## usage | ## usage | ||||||
|  |  | ||||||
| The latest prebuilt binaries for Linux/MacOS/Windows AMD64 are available | The latest prebuilt binaries for Linux/MacOS/Windows are available | ||||||
| [here](https://github.com/nkanaev/yarr/releases/latest). Installation instructions: | [here](https://github.com/nkanaev/yarr/releases/latest). | ||||||
|  | The archives follow the naming convention `yarr_{OS}_{ARCH}[_gui].zip`, where: | ||||||
|  |  | ||||||
| * MacOS | * `OS` corresponds to the target operating system (darwin/linux/windows for Linux, MacOS, Windows, respectively) | ||||||
|  | * `ARCH` is the CPU architecture (`arm64` for AMD64/Aarch64, `amd64` for X86-64) | ||||||
|  | * `-gui` indicates that the application ships with the GUI (tray icon), and is a command line application if omitted | ||||||
|  |  | ||||||
|   Download `yarr-*-macos64.zip`, unzip it, place `yarr.app` in `/Applications` folder, [open the app][macos-open], click the anchor menu bar icon, select "Open". | Usage instructions: | ||||||
|  |  | ||||||
| * Windows | * MacOS: place `yarr.app` in `/Applications` folder, [open the app][macos-open], click the anchor menu bar icon, select "Open". | ||||||
|  |  | ||||||
|   Download `yarr-*-windows64.zip`, unzip it, open `yarr.exe`, click the anchor system tray icon, select "Open". | * Windows: open `yarr.exe`, click the anchor system tray icon, select "Open". | ||||||
|  |  | ||||||
| * Linux | * Linux: place `yarr` in `$HOME/.local/bin` and run [the script](etc/install-linux.sh). | ||||||
|  |  | ||||||
|   Download `yarr-*-linux64.zip`, unzip it, place `yarr` in `$HOME/.local/bin` |  | ||||||
| and run [the script](etc/install-linux.sh). |  | ||||||
|  |  | ||||||
| [macos-open]: https://support.apple.com/en-gb/guide/mac-help/mh40616/mac | [macos-open]: https://support.apple.com/en-gb/guide/mac-help/mh40616/mac | ||||||
|  |  | ||||||
|   | |||||||
| @@ -2,7 +2,10 @@ package server | |||||||
|  |  | ||||||
| import ( | import ( | ||||||
| 	"log" | 	"log" | ||||||
|  | 	"net" | ||||||
| 	"net/http" | 	"net/http" | ||||||
|  | 	"os" | ||||||
|  | 	"strings" | ||||||
| 	"sync" | 	"sync" | ||||||
|  |  | ||||||
| 	"github.com/nkanaev/yarr/src/storage" | 	"github.com/nkanaev/yarr/src/storage" | ||||||
| @@ -53,14 +56,28 @@ func (s *Server) Start() { | |||||||
| 		s.worker.RefreshFeeds() | 		s.worker.RefreshFeeds() | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	httpserver := &http.Server{Addr: s.Addr, Handler: s.handler()} | 	network := "tcp" | ||||||
|  | 	if strings.ContainsRune(s.Addr, os.PathSeparator) { | ||||||
| 	var err error | 		network = "unix" | ||||||
| 	if s.CertFile != "" && s.KeyFile != "" { | 		err := os.Remove(s.Addr) | ||||||
| 		err = httpserver.ListenAndServeTLS(s.CertFile, s.KeyFile) | 		if err != nil { | ||||||
| 	} else { | 			log.Fatal(err) | ||||||
| 		err = httpserver.ListenAndServe() |  | ||||||
| 		} | 		} | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	ln, err := net.Listen(network, s.Addr) | ||||||
|  | 	if err != nil { | ||||||
|  | 		log.Fatal(err) | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	httpserver := &http.Server{Handler: s.handler()} | ||||||
|  | 	if s.CertFile != "" && s.KeyFile != "" { | ||||||
|  | 		err = httpserver.ServeTLS(ln, s.CertFile, s.KeyFile) | ||||||
|  | 		ln.Close() | ||||||
|  | 	} else { | ||||||
|  | 		err = httpserver.Serve(ln) | ||||||
|  | 	} | ||||||
|  |  | ||||||
| 	if err != http.ErrServerClosed { | 	if err != http.ErrServerClosed { | ||||||
| 		log.Fatal(err) | 		log.Fatal(err) | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user