netcache.1 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .Dd August 27, 2023
  2. .Dt NETCACHE 1
  3. .Os
  4. .
  5. .Sh NAME
  6. .Nm netcache
  7. .Nd local Internet cache handler for offpunk
  8. .
  9. .Sh SYNOPSIS
  10. .Nm
  11. .Op Fl \-path
  12. .Op Fl \-offline
  13. .Op Fl \-max\-size Ar MAX_SIZE
  14. .Op Fl \-timeout Ar TIMEOUT
  15. .Op Ar URL ...
  16. .Nm
  17. .Fl h | \-help
  18. .
  19. .Sh DESCRIPTION
  20. Netcache is the download and cache management engine of the browser
  21. .Xr offpunk 1 .
  22. It allows one to fetch a link and get its content,
  23. writing the content through the local cache for ulterior reference.
  24. Netcache can be forced into offline mode,
  25. in order to only fetch resources from the local cache,
  26. otherwise it would always refresh it from the version available online.
  27. It is also useful for mapping a given URL to its location in the cache,
  28. independently of whether it has been downloaded first.
  29. .Pp
  30. Default cache path is
  31. .Pa ~/.cache/offpunk .
  32. Set
  33. .Ev OFFPUNK_CACHE_PATH
  34. environment variable to use another location.
  35. .Bd -literal
  36. OFFPUNK_CACHE_PATH=/home/ploum/custom-cache netcache.py gemini://some.url
  37. .Ed
  38. .Pp
  39. .Xr Offpunk 1
  40. is a command-line browser and feed reader dedicated to browsing the Web,
  41. Gemini, Gopher and Spartan.
  42. .Ss Positional arguments
  43. .Bl -tag -width Ds -offset indent
  44. .It Ar URL
  45. download the URL and output the content.
  46. .El
  47. .Ss Keyword arguments
  48. .Bl -tag -width Ds -offset indent
  49. .It Fl h , \-help
  50. show a help message and exit.
  51. .It Fl \-path
  52. output the path to the cache instead of the content of the URL.
  53. .It Fl \-max-size Ar MAX_SIZE
  54. cancel download of items above that size.
  55. The value is expressed in megabytes.
  56. .It Fl \-timeout Ar TIMEOUT
  57. time to wait before cancelling connection.
  58. The value is expressed in seconds.
  59. .It Fl \-cache-validity CACHE_VALIDITY
  60. Maximum age (in second) of the cached version before redownloading a new version.
  61. .El
  62. .
  63. .Sh EXIT STATUS
  64. .Ex -std
  65. .
  66. .Sh SEE ALSO
  67. .Xr ansicat 1 ,
  68. .Xr migrate-offpunk-cache 1 ,
  69. .Xr offpunk 1 ,
  70. .Xr opnk 1 ,
  71. .Lk https://sr.ht/~lioploum/offpunk/
  72. .
  73. .Sh AUTHORS
  74. .An Lionel Dricot (Ploum) Aq Mt offpunk2 at ploum.eu