---
- name: Create config directory
  file:
    path: ~/.config/anime-downloader
    state: directory
    mode: 0755

- name: Copy config
  copy:
    src: config.json
    dest: ~/.config/anime-downloader/config.json
    force: yes
    mode: 0644

- name: Install anime-downloader with pip
  pip:
    name: anime-downloader
    virtualenv: ~/.config/anime-downloader/venv

- name: Symlink anime executable
  file:
    src: ~/.config/anime-downloader/venv/bin/anime
    dest: ~/.local/bin/anime
    state: link
