https://github.com/devidw/memoresa
https://github.com/devidw/memoresa
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/devidw/memoresa
- Owner: devidw
- Created: 2022-12-26T16:02:58.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-05T14:30:24.000Z (over 3 years ago)
- Last Synced: 2025-02-02T11:41:44.317Z (about 1 year ago)
- Language: TypeScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.adoc
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
----