<?xml version="1.0" encoding="UTF-8"?>
<!--

    BleachBit
    Copyright (C) 2008-2023 Andrew Ziem
    https://www.bleachbit.org

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

-->
<cleaner id="liferea" os="linux">
  <label>Liferea</label>
  <running type="exe">liferea-bin</running>
  <!-- Newer Liferea releases do not have a "liferea" wrapper anymore. Just a binary -->
  <running type="exe">liferea</running>
  <option id="cache">
    <label>Cache</label>
    <description>Delete the cache</description>
    <action command="delete" search="walk.files" path="~/.liferea_1.4/cache/"/>
    <action command="delete" search="walk.files" path="~/.liferea_1.6/cache/"/>
    <action command="delete" search="walk.files" path="~/.liferea_1.8/cache/"/>
    <action command="delete" search="walk.files" path="~/.liferea_1.4/mozilla/liferea/Cache/"/>
    <!-- Note: starting with 1.6 Liferea does not use Mozilla anymore (using WebKitGTK now) -->
    <!-- ~/.cache/liferea/ seen in version 1.10.17 -->
    <action command="delete" search="walk.files" path="~/.cache/liferea/"/>
  </option>
  <option id="cookies">
    <label>Cookies</label>
    <description>Delete cookies, which contain information such as web site preferences, authentication, and tracking identification</description>
    <action command="delete" search="file" path="~/.liferea_1.4/mozilla/liferea/cookies.sqlite"/>
    <!-- Note: The WebkitGTK rendering used since 1.6 does not persist cookies and auth -->
    <!-- ~/.config/liferea/cookies.txt seen in 1.10.17 -->
    <action command="delete" search="file" path="~/.config/liferea/cookies.txt"/>
  </option>
  <option id="vacuum">
    <label>Vacuum</label>
    <description>Clean database fragmentation to reduce space and improve speed without removing any data</description>
    <action command="sqlite.vacuum" search="file" path="~/.liferea_1.4/liferea.db"/>
    <action command="sqlite.vacuum" search="file" path="~/.liferea_1.4/mozilla/liferea/cookies.sqlite"/>
    <action command="sqlite.vacuum" search="file" path="~/.liferea_1.4/mozilla/liferea/permissions.sqlite"/>
    <action command="sqlite.vacuum" search="file" path="~/.liferea_1.4/mozilla/liferea/places.sqlite"/>
    <action command="sqlite.vacuum" search="file" path="~/.liferea_1.6/liferea.db"/>
    <action command="sqlite.vacuum" search="file" path="~/.liferea_1.8/liferea.db"/>
    <!-- since 1.10 Liferea follows XDG paths -->
    <action command="sqlite.vacuum" search="file" path="$XDG_DATA_HOME/liferea/liferea.db"/>
  </option>
</cleaner>
