Newborn Programming Monsters

    This package has been deprecated

    Author message:

    This package is no longer maintained

    nano-sync

    0.0.6 • Public • Published

    Nano Sync Dependencies

    NPM

    Continuous filter update delivery

    A file based differential update system for filter lists.

    WORK IN PROGRESS - DEVELOPERS ONLY

    Usage

    Install

    npm install -g nano-sync

    Command Line

    nano-sync /path/to/filter.txt

    Integration

    "use strict";
     
    const nsync = require("nano-sync");
    nsync.ezPatch("filter.txt");

    You need to commit ./nano-sync-data/config.json, although not other cache files in that directory, you should add the following line to .gitignore file:

    nano-sync-data/*.txt

    If you change your filter list very often, it is recommended to create only one to two patches per day.

    Technical

    Nano Sync will, by default, generate the following output structure:

    filter.txt
    filter-diff/
        meta.json
        checkpoint.txt
        1.patch
        2.patch
        3.patch
        4.patch

    The structure of meta.json:

    {
      "checkpoint": 35,
      "latest": 37
    }

    checkpoint denotes the version of the checkpoint, latest denotes the latest version.

    In the above example, 1.patch then 2.patch need to be applied to checkpoint.txt to generate the latest filter.

    3.patch and 4.patch are leftover patch files from last round.

    This default mode is optimized for Git repository, you will get a spike in traffic on every checkpoint, but in return, generates the least amount of extra Git history.

    Keywords

    none

    Install

    npm i nano-sync

    DownloadsWeekly Downloads

    0

    Version

    0.0.6

    License

    GPL-3.0

    Unpacked Size

    45 kB

    Total Files

    6

    Last publish

    Collaborators

    • jspenguin2017