Skip to content

Releases: sky-cake/Ritual

2.0.2

22 Nov 04:36

Choose a tag to compare

  • If-Modified-Since support, skipping downloads
  • Avoids downloading duplicate files
  • Code structure overhauled
  • Fix filter bugs (regex applied to post html, not post text)
  • Utilize /catalog, rather than /thread, when possible
  • Save state prior to shutdown

v1.0.2

29 Jun 23:16

Choose a tag to compare

  • Address <br/>

  • Add config ensure_all_files_downloaded

    # If new posts are added to the database and Ritual is interrupted before their media is downloaded,
    # it's likely that some media will be missed when you restart Ritual, resulting in gaps of posts with no media.
    # Setting this to True ensures that all media (according to the per-board download configs below) is fetched
    # by verifying each post's media file on disk.
    # This incurs a minimal CPU cost (os.path.isfile() is cheap), so the default is True.
    ensure_all_files_downloaded = True

v1.0.1

28 Jun 22:58

Choose a tag to compare

  • Utilize request sessions
  • Add webp and bmp for vichan support
  • Update docs

v1.0.0

28 Jun 18:23

Choose a tag to compare

With the recent updates to Ritual, it's time to starting documenting and tagging releases.

What's new:

  1. Only insert new posts from threads.
    • Before entire threads were continuously shoved into sqlite with on conflict handling unique id collisions.
  2. Reduced RAM usage.
  3. Better log messages.
  4. Persistent thread-last-modified cache.
  5. Utilizing last_threads in catalog responses, resulting in fewer requests than previous releases.
  6. Then there are config changes. We don't hard code URLs anymore, and we support custom headers. See below.

You'll need to update configs for this release. In configs.py, between database = make_path() and logger_name = '', overwrite everything with,

headers = None
# headers = {'User-Agent', ''}

# 4chan API data should html unescaped before writes i.e. unescape_data_b4_db_write = True
# The goal here is to persist data that is not html escaped
unescape_data_b4_db_write = True

## 4chan
url_catalog = "https://a.4cdn.org/{board}/catalog.json"
url_thread = "https://a.4cdn.org/{board}/thread/{thread_id}.json"
url_full_media = "https://i.4cdn.org/{board}/{image_id}{ext}" # str or None
url_thumbnail = "https://i.4cdn.org/{board}/{image_id}s.jpg" # str or None

## lainchan
# url_full_media = "https://lainchan.org/{board}/src/{image_id}{ext}"
# url_thumbnail = None
# url_catalog = "https://lainchan.org/{board}/catalog.json"
# url_thread = "https://lainchan.org/{board}/res/{thread_id}.json"