diff --git a/README.md b/README.md index 41f5adc..e628e1d 100644 --- a/README.md +++ b/README.md @@ -1,75 +1,41 @@ # DOWNload FAVourites -`downfav` is a simple script to download your Mastodon favourites, either to -the disk or into [Joplin](http://joplinapp.org/). +`downfav` is a simple application to download your Mastodon favourites, either +in Org or Markdown formats. ## Running -Simply call `downfav`. On the first run, it will ask for your server and do -the rounds into approving the app. After that, it will download every toot -marked as Favourite to the disk. +At first, running `downfav` should display nothing. The reason is that there +are no accounts or storage options for those accounts. -## Configuration +To create an account you need to run `downfav create`. This will +start the registration process for that account. -There is one single configuration file, `downfav.toml` which is read in the -current directory. +Next, you need to define where you want your favourites to be saved. To do +this, use `downfav storage add `. Currently, there +are two storage types: `markdown` and `org`. -The general format of this file is: +### The Markdown Storage -```toml -[favourite] -last = "" +The Markdown storage uses a directory structure based on the account name and +toot id. This means that, if you favourited a toot by "someuser@server" +identified by "123123", a tree like `/someuser@server/123123` will be created and the content will be +saved there. -[mastodon] -base = "" -client_id = "" -client_secret = "" -redirect = "" -token = "" +(This storage is usually recommended if you normally favourite content with +lots of attachments, as each toot attachment -- image/video -- will be stored +alongside the toot text.) -[org] -location = "" +### The Org Storage -[joplin] -port = -token = "" -folder = "" -``` +The Org storage is similar to the Markdown storage, but instead of creating a +new file for each toot, every favourite will be added to a `/.org` file; any attachments will be stored (and properly +linked) in `/date/` directory. -When you run `downfav`, it will ask for your server an ask to connect to your -account. After that, the first two sections will be added. - -By default, `downfav` stores favourites as Markdown files in a directory called -`data` along the configuration file; this is called the Filesystem storage. -Besides this storage, `downfav` have two more storages: - -### Joplin Storage - -[Joplin](https://joplinapp.org/) is an open source note taking application. -To use Joplin as a storage for `downfav`, you need to enable the web clipper. -On the same page, you'll find the port (usually is 41184) and the token. Along -with that, you need to define a Folder where all the favourites will be stored, -using its name. - -Once you have this information, you can add the `[joplin]` section and the rest -of the information. - -### Org Storage - -[Org-Mode](https://orgmode.org/) is a format/plugin for Emacs that can keep -notes, agenda, TODOs and a bunch more. - -To enable Org mode, you need to add the `[org]` section and define the path -where the notes will be kept. `downfav` will create one note per day, adding -any new favourites in that note. - -### Resolution order - -But what happens if I have Joplin and Org set up in my config file? Well, by -default, `downfav` will pick Joplin and ignore Org. If you want to save on Org -format, you must not have the Joplin section in your config. - -And, to use the Filesystem storage, you should have no other configuration. +(This storage is usually recommended if you normally favourite content with +lots of text and not much of attachments.) ## License