Documentation
Installation
You LicenseGrabber.jl like most Julia packages
julia>] add LicenseGrabber
Overview
License Grabber consists of one single module.
LicenseGrabber
— ModuleLicenseGrabber
Description
LicenseGrabber provides functionalities to gather Information regarding the current active Julia Environment and the licenses used by it's dependencies.
Example
Let us start with this very repository as an example. Here we have the following folder structure:
>>> tree -ra . -I '.git'
.
├── test
│ ├── runtests.jl
│ ├── Project.toml
│ └── Manifest.toml
├── src
│ └── LicenseGrabber.jl
├── README.md
├── Project.toml
├── Manifest.toml
├── LICENSE.md
├── .gitlab-ci.yml
├── .gitignore
└── docs
├── src
│ └── index.md
├── Project.toml
├── Manifest.toml
└── make.jl
4 directories, 14 files
Since there is only one dependency: Julia
itself, let us add some packages:
julia>]add GLM
After it's installation, let us grab the now used licences in this repo (excluding it's own license...)
julia> using LicenseGrabber
julia> LicenseGrabber.grab!()
[ Info: get license locations
Activating environment at `~/Code/LicenseGrabber/Project.toml`
Activating environment at `~/Code/LicenseGrabber/Project.toml`
[ Info: copy license files
As the result we obtain the following folderstructure
>>> tree -ra . -I '.git'
.
├── test
│ ├── runtests.jl
│ ├── Project.toml
│ └── Manifest.toml
├── src
│ └── LicenseGrabber.jl
├── README.md
├── Project.toml
├── Manifest.toml
├── LICENSE.md
├── .license_information
│ ├── TableTraits
│ │ └── LICENSE.md
│ ├── Tables
│ │ └── LICENSE
│ ├── StructTypes
│ ├── StatsModels
│ │ └── LICENSE.md
│ ├── StatsFuns
│ │ └── LICENSE.md
│ ├── StatsBase
│ │ └── LICENSE.md
│ ├── SpecialFunctions
│ │ └── LICENSE
│ ├── SortingAlgorithms
│ │ └── LICENSE.md
│ ├── ShiftedArrays
│ │ └── LICENSE.md
│ ├── Rmath_jll
│ │ └── LICENSE
│ ├── Rmath
│ │ └── LICENSE.md
│ ├── Reexport
│ │ └── LICENSE.md
│ ├── QuadGK
│ │ └── LICENSE
│ ├── PrettyTables
│ ├── Preferences
│ │ └── LICENSE.md
│ ├── PooledArrays
│ ├── PDMats
│ │ └── LICENSE.md
│ ├── Parsers
│ ├── OrderedCollections
│ │ └── License.md
│ ├── OpenSpecFun_jll
│ │ └── LICENSE
│ ├── Missings
│ │ └── LICENSE.md
│ ├── JULIA
│ │ └── LICENSE.md
│ ├── JSON
│ ├── JLLWrappers
│ │ ├── test
│ │ │ ├── Vulkan_Headers_jll
│ │ │ │ └── LICENSE
│ │ │ ├── OpenLibm_jll
│ │ │ │ └── LICENSE
│ │ │ └── HelloWorldC_jll
│ │ │ └── LICENSE
│ │ └── LICENSE
│ ├── IteratorInterfaceExtensions
│ │ └── LICENSE.md
│ ├── InvertedIndices
│ ├── GLM
│ │ └── LICENSE.md
│ ├── Formatting
│ ├── FillArrays
│ │ └── LICENSE
│ ├── Distributions
│ │ └── LICENSE.md
│ ├── DataValueInterfaces
│ │ └── LICENSE.md
│ ├── DataStructures
│ │ └── License.md
│ ├── DataFrames
│ ├── DataAPI
│ │ └── LICENSE.md
│ ├── Crayons
│ ├── Compat
│ │ └── LICENSE.md
│ ├── ChainRulesCore
│ │ └── LICENSE.md
│ └── CategoricalArrays
├── .gitlab-ci.yml
├── .gitignore
└── docs
├── src
│ └── index.md
├── Project.toml
├── Manifest.toml
└── make.jl
47 directories, 45 files
including a copy of every License file found in a dependency.
Functions
LicenseGrabber.getlicloc
— Functiongetlicloc()
getlicloc(envpath::T; ignorepaths=[".license_information"]) where T <: AbstractString
Description
getlicloc gathers all license file location of all (direct and indirect) licenses file of the active julia environment.
Example
julia> LicenseGrabber.getlicloc()
Activating environment at `~/Code/LicenseGrabber/Project.toml`
Activating environment at `~/Code/LicenseGrabber/Project.toml`
Dict{String, Vector{AbstractString}} with 1 entry:
"JULIA" => ["/home/knbrt/Tools/julia/1.6.0/LICENSE.md"]
Meta
Uses
Used by
LicenseGrabber.cplicenses!
— Functioncplicenses!(ld::Dict{String, AbstractString}, destination::AbstractString)
Description
cplicenses! copies the license files specified in ld to destination
.
Meta
Uses
Used by
LicenseGrabber.parselicenses
— Functionparselicenses(path::AbstractString)
Description
parselicenses parses all license file in path
oder standard destination
for known license types.
This is under development and not stable.
Meta
Uses
Used by
LicenseGrabber.grab!
— Functiongrab!()
grab!(projectfile::String)
Description
grab! grabs all licenses specified in projectfile
or in the current active environment
, copies them to the default location (see cplicenses!
) and parses them for the known license types.
Meta
Usage
- API
Uses
Used by
FutureFeature
Will be used by a license parsing function which compares license files to a database of existing license files to identify the used license. See Milestone v0.1.0