main

Entry point of the Small Web Feeds Processor command line tool

Imports

The command line interface is using typer, a library to build command line interfaces.

Otherwise, we import all the internal modules of the project used to implement the different commands of the CLI.

import os
import typer
from dotenv import load_dotenv
from typing import Optional
from typing_extensions import Annotated
from small_web_dataset import __version__
from small_web_dataset.feeds import sync_feeds as sf, connect_feeds_db, create_feeds_db, create_articles_db, sync_feeds_db_from_cache, get_articles_lang_per_feeds, update_feeds_with_languages, validate_new_index_file
from rich import print

Command line interface

version

The version command displays the current installed version of ReadNext.


version

 version ()

Get the current installed version of ReadNext

You can get the version number of the ReadNext instance installed of your machine by running:

swd version

Configuration

Display the current configuration of ReadNext.


config

 config ()

Get the current configuration of the Small Web Feeds Processor tool

You can display the current configuration uptions picked-up by ReadNext by running:

swd config

Sync Feeds


sync_feeds

 sync_feeds (ddmmyyyy:Annotated[Optional[str],<typer.models.ArgumentInfoob
             jectat0x7f43e12d1c60>]=None)

Sync all the feeds from the Small Web index. If ddmmyyyy is provided, sync the feeds from that day. Default is today.

Validate Small Web Index


validate_kagi_small_web_index

 validate_kagi_small_web_index (index_file:str)

Validate a new Small Web Index against the Kagi Small Web Index

Initialization


config_exists

 config_exists (env_var:str)

Check if env_var environment variable exists


init

 init ()

Initialize the application

Entry point

The entry point of the command line interface, the typer application will be called to manage the interaction with the users.