2.1.0 โ€ข Published 8 months ago

@igor.dvlpr/aria v2.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Aria ๐Ÿช…

Adblock template (ADBT) compiler

๐Ÿ•ต๐Ÿผโ€โ™‚๏ธ Install

Install it by executing:

Global install

npm i -g "@igor.dvlpr/aria"

Local install

npm i "@igor.dvlpr/aria"

๐Ÿคน๐Ÿผโ€โ™‚๏ธ Usage

๐Ÿ’ก This file only documents Aria CLI-related API.

You should read the official ADBT API documentation for more information on how ADBT works, its syntax and usage.

๐Ÿช„ Arguments

<None>

File

Compile the input ADBT template file.

Short: -f
Long: --file
Accepts: path: string
Required: yes

Example

aria -f './my-template.adbt'

๐Ÿ’ก Template files should end with the .adbt extension.

Root

Set the root directory (CWD).

Short: -r
Long: --root
Accepts: path: string
Required: no

Example

aria -f './my-template.adbt' --root 'D:\my-filter'

๐Ÿ’ก Useful when passing an absolute template path or when working from a directory that's not the directory where the template file is stored.

Versioning

The versioning to use, can be:

  • auto: default, let Aria decide which versioning system to use.
    If the resulting file already exists, i.e. Aria already compiled the template before, it will re-use the versioning found in the file, otherwise it will use semver,

  • semver: use valid SemVer versioning when exporting the filter file, e.g. v1.0.0, v2.199.222, etc.
    If no version is found the counting starts with v1.0.0,

  • timestamp: use current UNIX timestamp, e.g. 1690409508.

Short: -v
Long: --versioning
Accepts: auto, semver, timestamp
Required: no

Example

aria -f './my-template.adbt' -v semver

โ„น๏ธ Versioning in Adblock filters

Take this snippet from my AdVoid filter list:

! Title: AdVoid.Core
! Description: โœˆ AdVoid is an efficient AdBlock filter that blocks ads! ๐Ÿ‘พ
! Version: 1.8.1082

Aria takes care of the versioning, the last line you see in the snippet above - so you don't have to!

โ—When using SemVer as the versioning system, Aria will always increase only the patch component of the version.

๐Ÿช… Flags

Dry

Do a dry-run and print the resulting AST.

Short: -d
Long: --dry
Accepts: N/A
Required: no

Example

aria -f './my-template.adbt' -d

๐Ÿ’ก The template will not be compiled; Aria will only print out the log.

โ— If you want to both compile and print the log, then use the log flag.

Tree

Will print the resulting AST.

Short: -t
Long: --tree
Accepts: N/A
Required: no

Example

aria -f './my-template.adbt' -t

๐Ÿ’ก This will compile and print out the resulting AST.

๐Ÿค” What is AST?

In computer science, an abstract syntax tree (AST), or just syntax tree, is a tree representation of the abstract syntactic structure of text (often source code) written in a formal language. Each node of the tree denotes a construct occurring in the text. โ€“ Wikipedia

Log

Enable compilation logging.

Short: -l
Long: --log
Accepts: N/A
Required: no

Example

aria -f './my-template.adbt' -l

๐Ÿ’ก The template will be compiled and Aria will log while compiling.

โ— If you only want to do a dry-run and don't compile the template, then use the dry flag.

Help

Show the welcome + help screen.

Short: -h
Long: --help
Accepts: N/A
Required: no

Example

aria --help

๐Ÿ’ก This flag works the same as calling aria on its own - with 0 arguments.


๐Ÿชช License

Licensed under the MIT license which is available here, MIT license.


๐Ÿงฌ Related

ADBT

๐Ÿ“œ Provides ADBT (Adblock template) support in Visual Studio Code. ๐Ÿช…

@igor.dvlpr/adblock-filter-counter

๐Ÿฒ A dead simple npm module that counts Adblock filter rules.๐Ÿฆ˜

@igor.dvlpr/keppo

๐ŸŽก Parse, manage, compare and output SemVer-compatible version numbers. ๐Ÿงฎ

@igor.dvlpr/normalized-string

๐Ÿ’Š NormalizedString provides you with a String type with consistent line-endings, guaranteed. ๐Ÿ“ฎ

@igor.dvlpr/zing

๐ŸŒ Zing is a C# style String formatter for JavaScript that empowers Strings with positional arguments. ๐Ÿš€

AdVoid

โœˆ AdVoid is an efficient AdBlock filter that blocks ads, trackers, malware and a lot more if you want it to! ๐Ÿ‘พ

2.1.0

8 months ago

2.0.1

8 months ago

2.0.0

8 months ago

1.6.1

9 months ago

1.6.0

9 months ago

1.5.0

9 months ago

1.4.0

9 months ago

1.3.0

9 months ago

1.2.5

9 months ago

1.2.4

9 months ago

1.2.3

9 months ago

1.2.2

9 months ago

1.2.1

9 months ago

1.2.0

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago