Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antoniogamiz/perl6-linkhealth
Tool to keep track of links generated in docs.perl6.org
https://github.com/antoniogamiz/perl6-linkhealth
Last synced: 22 days ago
JSON representation
Tool to keep track of links generated in docs.perl6.org
- Host: GitHub
- URL: https://github.com/antoniogamiz/perl6-linkhealth
- Owner: antoniogamiz
- License: artistic-2.0
- Created: 2019-05-08T19:28:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-27T08:24:11.000Z (over 5 years ago)
- Last Synced: 2024-12-09T17:56:14.448Z (about 1 month ago)
- Language: Perl 6
- Size: 40 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.com/antoniogamiz/Perl6-LinkHealth.svg?branch=master)](https://travis-ci.com/antoniogamiz/Perl6-LinkHealth)
# NAME
Perl6::LinkHealth - Check that all links are generated using a previous file containing the links.
## Usage
```
# check links with the default doc set
linkhealth --html-dir=test-doc# write a new link file
linkhealth --html-dir=doc --to=links.txt
```# SYNOPSIS
```perl6
use Perl6::LinkHealth;
# Read the link file
my $links = read-from-file("./links.txt");# Generates the links
my @links =list-directory("./doc");# Save the link file
save-to-file($links);```
#### sub list-directory
```perl6
sub list-directory (
Str $dir
) returns Array
```Read all files in \$dir recursively.
#### sub compare
```perl6
sub compare (
Array @previous,
Array @current
) returns (Array, Array)
```Compare all links in @current with @previous. Returns the missing ones in the first element of the list and the new ones in the second.
#### sub read-from-file
```perl6
sub read-from-file(
Str $path
) returns Seq
```Read a Seq of links from a file.
#### sub save-to-file
```perl6
sub save-to-file(
Str $path,
Str $data
) returns Mu
```Save in $path the content of $data.
# AUTHOR
Antonio Gámiz
# COPYRIGHT AND LICENSE
Copyright 2019 Antonio Gámiz
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.