Browse Source

Update readme, description

tags/v0.1.0
Gerben 6 years ago
parent
commit
c56296cc21
2 changed files with 46 additions and 22 deletions
  1. +16
    -8
      Readme.md
  2. +30
    -14
      appinfo/info.xml

+ 16
- 8
Readme.md View File

@@ -19,20 +19,15 @@ For example, assume you have an html file `example.html`. If this file contains
rel="origin" href="https://example.org">` in its `<head>`, it will be recognised as a snapshot of rel="origin" href="https://example.org">` in its `<head>`, it will be recognised as a snapshot of
`https://example.org`. `https://example.org`.


## Requirements

Besides of course Nextcloud itself (tested on version 14), this app requires the app [Raw][] to also
be installed, in order to host the snapshots.

## Usage ## Usage


This app presents a Memento TimeGate at the `/timegate/{url}` route. Assuming that the This app presents a Memento TimeGate at the `/timegate/{url}` route. Assuming that the
`example.html` of the above example resides in the folder `Documents/snapshots`, then visiting
`example.html` of the above example resides in a shared folder with URL `/s/123abc`, then visiting
`/apps/memento/timegate/https://example.org` would redirect you to `/apps/memento/timegate/https://example.org` would redirect you to
`/apps/raw/files/Documents/snapshots/example.html` (hence you need the [Raw] app as well).
`/apps/raw/s/123abc/example.html` (hence you need the [Raw][] app as well).


Note that a private file will only be found if the client supplies login credentials (i.e. the Note that a private file will only be found if the client supplies login credentials (i.e. the
session cookie). Otherwise, only files for which 'Share link' has been enabled will be found.
session cookie). Otherwise, only files/folders for which 'Share link' is enabled will be scanned.


In a typical Memento client (e.g. the [Memento Time Travel][] browser extension), you would add your In a typical Memento client (e.g. the [Memento Time Travel][] browser extension), you would add your
archive as `https://my-nextcloud/apps/memento/timegate/` (of course first replace `my-nextcloud` archive as `https://my-nextcloud/apps/memento/timegate/` (of course first replace `my-nextcloud`
@@ -45,6 +40,19 @@ The app normally looks for shared snapshots of all users on the Nextcloud instan
to those of a single user, use `.../u/{userid}/timegate/...` instead of `.../timegate/...` (and to those of a single user, use `.../u/{userid}/timegate/...` instead of `.../timegate/...` (and
likewise for `timemap`). likewise for `timemap`).


## Requirements

Besides of course Nextcloud itself (tested on version 14), this app requires the app [Raw][] to also
be installed, in order to host the snapshots.

## Installation

Copy/clone this repo into your Nextcloud installation's `/apps` (or `/custom_apps`) folder, log into
Nextcloud as an admin and find&enable it in the list of apps.

This app is currently not published in the Nextcloud app store.


[Memento Time Travel]: https://addons.mozilla.org/en-US/firefox/addon/memento-timetravel/ [Memento Time Travel]: https://addons.mozilla.org/en-US/firefox/addon/memento-timetravel/
[RFC7089]: https://tools.ietf.org/html/rfc7089 [RFC7089]: https://tools.ietf.org/html/rfc7089
[Wayback Machine]: https://web.archive.org/ [Wayback Machine]: https://web.archive.org/


+ 30
- 14
appinfo/info.xml View File

@@ -6,39 +6,55 @@
<summary>Turn your Nextcloud into a web archive</summary> <summary>Turn your Nextcloud into a web archive</summary>
<description> <description>
If you host snapshots of web pages on your Nextcloud, this app enables any client that speaks the If you host snapshots of web pages on your Nextcloud, this app enables any client that speaks the
Memento protocol to access these snapshots.
Memento protocol to access these snapshots. It is part of an experiment aiming to create personal
web archives.


The Memento protocol ([RFC7089][]) is widely used to ask archives (such as the Internet Archive's The Memento protocol ([RFC7089][]) is widely used to ask archives (such as the Internet Archive's
[Wayback Machine][]) for their copies of web pages. For example, a client (e.g. a browser extension) [Wayback Machine][]) for their copies of web pages. For example, a client (e.g. a browser extension)
may ask an archive whether it has a copy of `https://nextcloud.com` from around July last year, and may ask an archive whether it has a copy of `https://nextcloud.com` from around July last year, and
—if successful— will be redirected to the closest match. —if successful— will be redirected to the closest match.


Currently this app only supports snapshots that are stored as plain html files. It recognises a file
as being a snapshot if the file contains a &lt;link&gt; to the location of the original page; such
snapshots can be created using [Freeze-dry][].
## Snapshot format


This app requires the app [Raw][] to also be installed, in order to host the snapshots.
Currently this app only supports snapshots that are stored as plain html files (supporting [WARC][]
files could be a future addition). It recognises a file as being a snapshot if the file contains a
`&lt;link&gt;` to the location of the original page; such snapshots can be created using [Freeze-dry][].

For example, assume you have an html file `example.html`. If this file contains a `&lt;link
rel="origin" href="https://example.org"&gt;` in its `&lt;head&gt;`, it will be recognised as a snapshot of
`https://example.org`.


## Usage ## Usage


The app presents a Memento TimeGate at the `/timegate/{url}` route.
This app presents a Memento TimeGate at the `/timegate/{url}` route. Assuming that the
`example.html` of the above example resides in a shared folder with URL `/s/123abc`, then visiting
`/apps/memento/timegate/https://example.org` would redirect you to
`/apps/raw/s/123abc/example.html` (hence you need the [Raw] app as well).


For example, assume you have an html file `example.html` in the folder `Documents/snapshots`. If
this file contains a `&lt;link rel="origin" href="https://example.org"&gt;` in its `&lt;head&gt;`,
it will be recognised as a snapshot of `https://example.org`. Visiting
`/apps/memento/timegate/https://example.org` would then redirect you to
`/apps/raw/files/Documents/snapshots/example.html` (hence you need the [Raw] app as well).
Note that a private file will only be found if the client supplies login credentials (i.e. the
session cookie). Otherwise, only files/folders for which 'Share link' is enabled will be scanned.


In a Memento client (e.g. the [Memento Time Travel][] browser extension), you add your personal
archive as `https://my-nextcloud/apps/memento/timegate/` (of course first replace
`my-nextcloud` appropriately).
In a typical Memento client (e.g. the [Memento Time Travel][] browser extension), you would add your
archive as `https://my-nextcloud/apps/memento/timegate/` (of course first replace `my-nextcloud`
appropriately).


A TimeMap is also exposed, at the `/timemap/{url}` route, to list all available snapshots of a URL. A TimeMap is also exposed, at the `/timemap/{url}` route, to list all available snapshots of a URL.
For details, look at the documentation of the Memento protocol ([RFC7089][]). For details, look at the documentation of the Memento protocol ([RFC7089][]).


The app normally looks for shared snapshots of all users on the Nextcloud instance. To limit results
to those of a single user, use `.../u/{userid}/timegate/...` instead of `.../timegate/...` (and
likewise for `timemap`).

## Requirements

Besides of course Nextcloud itself (tested on version 14), this app requires the app [Raw][] to also
be installed, in order to host the snapshots.


[Memento Time Travel]: https://addons.mozilla.org/en-US/firefox/addon/memento-timetravel/ [Memento Time Travel]: https://addons.mozilla.org/en-US/firefox/addon/memento-timetravel/
[RFC7089]: https://tools.ietf.org/html/rfc7089 [RFC7089]: https://tools.ietf.org/html/rfc7089
[Wayback Machine]: https://web.archive.org/ [Wayback Machine]: https://web.archive.org/
[WARC]: https://iipc.github.io/warc-specifications/specifications/warc-format/warc-1.1/
[Freeze-dry]: https://github.com/WebMemex/freeze-dry [Freeze-dry]: https://github.com/WebMemex/freeze-dry
[Raw]: https://code.treora.com/gerben/nextcloud-raw [Raw]: https://code.treora.com/gerben/nextcloud-raw
</description> </description>


Loading…
Cancel
Save