summaryrefslogtreecommitdiff
path: root/wrappers/gallery-dl/config.nix
blob: 649eedab25d3917a7410051ada2ec217dd2df33b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
  postprocessors = [
    {
      name = "metadata";
      mode = "json";
      whitelist = [
        "danbooru"
        "moebooru"
        "gelbooru"
        "sankaku"
        "nhentai"
        "rule34"
      ];
    }
    {
      name = "zip";
      compression = "store";
      extension = "cbz";
      filter = "extension not in ('zip', 'rar')";
      whitelist = [
        "nhentai"
        "mangadex"
      ];
    }
  ];

  Danbooru.metadata = true;

  reddit = {
    archive-format = "s_{subreddit}{filename}";
    directory = {
      "locals().get('is_gallery')" = [
        "Reddit"
        "S"
        "{subreddit!C}"
        "{title[:120]!t:?/_/R /_/}{id}"
      ];
      "" = [
        "Reddit"
        "S"
        "{subreddit!C}"
      ];
    };

    filename = {
      "locals().get('is_gallery')" = "{title[:120]!t:?/_/R /_/}{id}{num:?_//>02}.{extension}";
      "" = "{title[:120]!t:?/_/R /_/}{id}.{extension}";
    };
  };

  artstation.external = true; # Try to follow external URLs of embedded players.

  ao3.formats = [
    "pdf"
    "epub"
    "html"
  ];

  bluesky = {
    include = [ "all" ]; # List of subcategories to include when processing a **user profile**.
    metadata = [
      "facets"
      "user"
    ];
    quoted = true; # Fetch media from quoted posts.
  };
}