Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
db6c0f6cc2 | |||
25adc4410d | |||
b77a69e634 | |||
1e448c3f31 | |||
99899bd49e |
49
README.md
49
README.md
|
@ -1,49 +1,52 @@
|
||||||
# Mastodon Bookmarks Archive
|
# Mastodon Bookmarks Archive
|
||||||
|
|
||||||
[Release download](https://git.scambier.xyz/scambier/janet-mastodon-bookmarks/releases)
|
|
||||||
|
|
||||||
_A small Janet script to archive all your Mastodon bookmarks in Markdown files._
|
_A small Janet script to archive all your Mastodon bookmarks in Markdown files._
|
||||||
|
|
||||||
Because Mastodon posts can disappear for a variety of reasons (deletion, defederation, server instance shutdown, ...), it is safer to archive your bookmarks.
|
Because Mastodon posts can disappear for a variety of reasons (deletion, defederation, server instance shutdown, ...), it is safer to archive your bookmarks.
|
||||||
|
|
||||||
Each Markdown file will contain:
|
Each Markdown file will contain:
|
||||||
- A link to the original post
|
- [x] A link to the original post
|
||||||
- The author's handle
|
- [x] The author's handle
|
||||||
- The post's content in HTML
|
- [x] The post's content in HTML
|
||||||
- The media attachments locally downloaded
|
- [x] The media attachments locally downloaded
|
||||||
- If available, the alt text for each media
|
- [x] If available, the alt text for each media
|
||||||
|
- [ ] The full thread, if applicable
|
||||||
|
- [ ] The link card, if any
|
||||||
|
|
||||||
Most of these values will be in the form of `key:: value` for easy integration with Obsidian's plugin Dataview. A sample script is available [here](./dataview-query.js)
|
Most of these values will be in the form of `key:: value` for easy integration with Obsidian's plugin Dataview. A sample script is available [here](./dataview-query.js)
|
||||||
|
|
||||||
## Setup & Run
|
## Build & Run
|
||||||
|
|
||||||
|
### Pre-requirements
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Required by the httprequest dependency
|
||||||
|
$ sudo apt install libcurl4-openssl-dev
|
||||||
|
```
|
||||||
|
|
||||||
|
- Clone this repository
|
||||||
|
- Install Janet and jpm https://janet-lang.org/
|
||||||
- Get an access token for your Mastodon account
|
- Get an access token for your Mastodon account
|
||||||
|
|
||||||
![](image1.png)
|
![](image1.png)
|
||||||
![](image2.png)
|
![](image2.png)
|
||||||
|
|
||||||
- Run the program
|
|
||||||
|
### Run
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ ./mastodon-bookmarks YOUR_INSTANCE YOUR_APP_TOKEN
|
# Install dependencies locally with -l (--local)
|
||||||
|
$ jpm deps -l
|
||||||
|
# Tell jpm that our dependencies are local, before starting the script
|
||||||
|
$ jpm -l janet main.janet YOUR_INSTANCE YOUR_APP_TOKEN
|
||||||
```
|
```
|
||||||
|
|
||||||
The `YOUR_INSTANCE` value must not have the trailing slash (e.g: `https://hachyderm.io`)
|
The `YOUR_INSTANCE` value **must not** have the trailing slash (e.g: `https://hachyderm.io`)
|
||||||
|
|
||||||
## Development
|
### Build for release
|
||||||
|
|
||||||
- Clone this repository
|
|
||||||
- Install Janet and jpm https://janet-lang.org/
|
|
||||||
- `jpm deps --local`
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ janet main.janet YOUR_INSTANCE YOUR_APP_TOKEN
|
$ jpm build -l
|
||||||
```
|
|
||||||
|
|
||||||
## Build binary
|
|
||||||
|
|
||||||
```sh
|
|
||||||
$ jpm build
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## LICENSE
|
## LICENSE
|
||||||
|
|
Loading…
Reference in New Issue
Block a user