helper

package
v0.1.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 8, 2024 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTorrentContent

func GetTorrentContent(torrent string, defaultSite string,
	forceLocal bool, forceRemote bool, stdin []byte, ignoreParsingError bool) (
	content []byte, tinfo *torrentutil.TorrentMeta, siteInstance site.Site, siteName string,
	filename string, id string, err error)

Read a torrent and return it's contents. torrent could be: local filename (e.g.: abc.torrent), site torrent id (e.g.: mteam.1234) or url (e.g. https://kp.m-team.cc/details.php?id=488424), or "-" to read torrent contents from os.Stdin. forceLocal: force treat torrent as local filename. forceRemote: force treat torrent as site torrent id or url. ignoreParsingError: ignore torrent parsing error, in which case the returned tinfo may by nil. stdin: if not nil, use it as torrent contents when torrent == "-" instead of reading from os.Stdin. siteInstance : if torrent is a site torrent, the created corresponding site instance. sitename & filename & id : if torrent is a site torrent, the downloaded torrent sitename & filename & id.

func ReadArgsFromStdin

func ReadArgsFromStdin() ([]string, error)

Read whitespace splitted tokens from stdin

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL