An open API service indexing awesome lists of open source software.

https://github.com/devidw/memoresa


https://github.com/devidw/memoresa

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

= Memoresa Bulk Helper

== Concepts

=== Authentication

Copy the `token` cookie from the website into an environment variable:

[source,sh]
----
export MEMORESA_TOKEN=…
----

=== Caching

API responses are written in JSON files onto disk in a `./cache` directory.
Delete the directory to reset the cache.

== Export

Memoresa has an export feature, but unfortunately - for me - the download dies after a few
seconds and never finishes.

To be able to still export, this is a deno script that downloads all attachments and
organizes them into directories with the name of the matter. Original file names
of the attachments are respected.

[source,plain]
----
out/
some-matter/
some-attachment.pdf
another-attachment.jpg
yet-another-matter/
attachment.pdf
----

=== Usage

[source,sh]
----
deno run --allow-all ./export.ts
----

=== Empty files

For me, 2 of a few hundred downloads resulted in empty files, to identify them:

[source,sh]
----
find ./out -type f -empty -iname '*.pdf'
----

== Delete

Bulk delete _all_ your matters.

=== Usage

For now you have to run the export before, since this script depends on the matters
cache.

Feel free to make a PR to handle this in a more elegant way.

[source,sh]
----
deno run --allow-all ./delete.ts
----