Introduced classes

class CmdContribFile

nitc :: CmdContribFile

Cmd that finds the contributing file related to an mentity
class CmdContribFileContent

nitc :: CmdContribFileContent

Cmd that finds the contrib file content related to an mentity
abstract class CmdEntityFile

nitc :: CmdEntityFile

abstract class CmdIni

nitc :: CmdIni

Cmd that finds the ini file related to an mentity
class CmdIniCloneCommand

nitc :: CmdIniCloneCommand

Cmd that finds the git clone command related to an mentity
class CmdIniContributors

nitc :: CmdIniContributors

Cmd that finds the contributors list of an mentity
class CmdIniDescription

nitc :: CmdIniDescription

Cmd that finds the ini description related to an mentity
class CmdIniGitUrl

nitc :: CmdIniGitUrl

Cmd that finds the clone url related to an mentity
class CmdIniIssuesUrl

nitc :: CmdIniIssuesUrl

Cmd that finds the issues link related to an mentity
class CmdIniLicense

nitc :: CmdIniLicense

Cmd that finds the license related to an mentity
class CmdIniMaintainer

nitc :: CmdIniMaintainer

Cmd that finds the maintainer name of an mentity
class CmdLicenseFile

nitc :: CmdLicenseFile

Cmd that finds the license file related to an mentity
class CmdLicenseFileContent

nitc :: CmdLicenseFileContent

Cmd that finds the license file content related to an mentity
class WarningNoContribFile

nitc :: WarningNoContribFile

No license file for mentity
class WarningNoContributor

nitc :: WarningNoContributor

No contributor for mentity
class WarningNoDescription

nitc :: WarningNoDescription

No git clone url for mentity
class WarningNoGitUrl

nitc :: WarningNoGitUrl

No git url for mentity
class WarningNoIni

nitc :: WarningNoIni

No ini file for mentity
class WarningNoIssuesUrl

nitc :: WarningNoIssuesUrl

No issues url for mentity
class WarningNoLicense

nitc :: WarningNoLicense

No ini license string for mentity
class WarningNoLicenseFile

nitc :: WarningNoLicenseFile

No license file for mentity
class WarningNoMaintainer

nitc :: WarningNoMaintainer

No maintainer for mentity

All class definitions

class CmdContribFile

nitc $ CmdContribFile

Cmd that finds the contributing file related to an mentity
class CmdContribFileContent

nitc $ CmdContribFileContent

Cmd that finds the contrib file content related to an mentity
abstract class CmdEntityFile

nitc $ CmdEntityFile

abstract class CmdIni

nitc $ CmdIni

Cmd that finds the ini file related to an mentity
class CmdIniCloneCommand

nitc $ CmdIniCloneCommand

Cmd that finds the git clone command related to an mentity
class CmdIniContributors

nitc $ CmdIniContributors

Cmd that finds the contributors list of an mentity
class CmdIniDescription

nitc $ CmdIniDescription

Cmd that finds the ini description related to an mentity
class CmdIniGitUrl

nitc $ CmdIniGitUrl

Cmd that finds the clone url related to an mentity
class CmdIniIssuesUrl

nitc $ CmdIniIssuesUrl

Cmd that finds the issues link related to an mentity
class CmdIniLicense

nitc $ CmdIniLicense

Cmd that finds the license related to an mentity
class CmdIniMaintainer

nitc $ CmdIniMaintainer

Cmd that finds the maintainer name of an mentity
class CmdLicenseFile

nitc $ CmdLicenseFile

Cmd that finds the license file related to an mentity
class CmdLicenseFileContent

nitc $ CmdLicenseFileContent

Cmd that finds the license file content related to an mentity
class WarningNoContribFile

nitc $ WarningNoContribFile

No license file for mentity
class WarningNoContributor

nitc $ WarningNoContributor

No contributor for mentity
class WarningNoDescription

nitc $ WarningNoDescription

No git clone url for mentity
class WarningNoGitUrl

nitc $ WarningNoGitUrl

No git url for mentity
class WarningNoIni

nitc $ WarningNoIni

No ini file for mentity
class WarningNoIssuesUrl

nitc $ WarningNoIssuesUrl

No issues url for mentity
class WarningNoLicense

nitc $ WarningNoLicense

No ini license string for mentity
class WarningNoLicenseFile

nitc $ WarningNoLicenseFile

No license file for mentity
class WarningNoMaintainer

nitc $ WarningNoMaintainer

No maintainer for mentity
package_diagram nitc::commands_ini commands_ini nitc::commands_model commands_model nitc::commands_ini->nitc::commands_model nitc::commands_base commands_base nitc::commands_model->nitc::commands_base nitc\>modelize\> modelize nitc::commands_model->nitc\>modelize\> ...nitc::commands_base ... ...nitc::commands_base->nitc::commands_base ...nitc\>modelize\> ... ...nitc\>modelize\>->nitc\>modelize\> nitc::md_commands md_commands nitc::md_commands->nitc::commands_ini nitc::commands_parser commands_parser nitc::commands_parser->nitc::commands_ini nitc::commands_http commands_http nitc::commands_http->nitc::commands_ini nitc::json_commands json_commands nitc::json_commands->nitc::commands_ini nitc::commands_docdown commands_docdown nitc::commands_docdown->nitc::md_commands nitc::term term nitc::term->nitc::md_commands nitc::term->nitc::commands_parser nitc::commands_docdown... ... nitc::commands_docdown...->nitc::commands_docdown nitc::term... ... nitc::term...->nitc::term nitc::html_commands html_commands nitc::html_commands->nitc::commands_parser nitc::html_commands... ... nitc::html_commands...->nitc::html_commands nitc::api_base api_base nitc::api_base->nitc::commands_http nitc::api_base->nitc::json_commands nitc::api_base... ... nitc::api_base...->nitc::api_base

Ancestors

module abstract_collection

core :: abstract_collection

Abstract collection classes and services.
module abstract_text

core :: abstract_text

Abstract class for manipulation of sequences of characters
module abstract_tree

trees :: abstract_tree

Introduce tree structures abstraction
module annotation

nitc :: annotation

Management and utilities on annotations
module array

core :: array

This module introduces the standard array structure.
module bintree

trees :: bintree

Binary Tree data-structure
module bitset

core :: bitset

Services to handle BitSet
module bktree

trees :: bktree

Implementation of BKTree
module bytes

core :: bytes

Services for byte streams and arrays
module caching

serialization :: caching

Services for caching serialization engines
module circular_array

core :: circular_array

Efficient data structure to access both end of the sequence.
module codec_base

core :: codec_base

Base for codecs to use with streams
module codecs

core :: codecs

Group module for all codec-related manipulations
module collection

core :: collection

This module define several collection classes.
module commands_base

nitc :: commands_base

Documentation commands
module console

console :: console

Defines some ANSI Terminal Control Escape Sequences.
module core

core :: core

Standard classes and methods used by default by Nit programs and libraries.
module digraph

graph :: digraph

Implementation of directed graphs, also called digraphs.
module engine_tools

serialization :: engine_tools

Advanced services for serialization engines
module environ

core :: environ

Access to the environment variables of the process
module error

core :: error

Standard error-management infrastructure.
module exec

core :: exec

Invocation and management of operating system sub-processes.
module file

core :: file

File manipulations (create, read, write, etc.)
module fixed_ints

core :: fixed_ints

Basic integers of fixed-precision
module fixed_ints_text

core :: fixed_ints_text

Text services to complement fixed_ints
module flat

core :: flat

All the array-based text representations
module gc

core :: gc

Access to the Nit internal garbage collection mechanism
module hash_collection

core :: hash_collection

Introduce HashMap and HashSet.
module ini

ini :: ini

Read and write INI configuration files
module inspect

serialization :: inspect

Refine Serializable::inspect to show more useful information
module iso8859_1

core :: iso8859_1

Codec for ISO8859-1 I/O
module kernel

core :: kernel

Most basic classes and methods.
module lexer

nitc :: lexer

Lexer and its tokens.
module lexer_work

nitc :: lexer_work

Internal algorithm and data structures for the Nit lexer
module list

core :: list

This module handle double linked lists
module literal

nitc :: literal

Parsing of literal values in the abstract syntax tree.
module loader

nitc :: loader

Loading of Nit source files
module location

nitc :: location

Nit source-file and locations in source-file
module math

core :: math

Mathematical operations
module mdoc

nitc :: mdoc

Documentation of model entities
module meta

meta :: meta

Simple user-defined meta-level to manipulate types of instances as object.
module mmodule

nitc :: mmodule

modules and module hierarchies in the metamodel
module mmodule_data

nitc :: mmodule_data

Define and retrieve data in modules
module model

nitc :: model

Classes, types and properties
module model_base

nitc :: model_base

The abstract concept of model and related common things
module model_collect

nitc :: model_collect

Collect things from the model.
module model_examples

nitc :: model_examples

Examples for Model entities
module model_index

nitc :: model_index

Search things from the Model
module modelbuilder_base

nitc :: modelbuilder_base

Load nit source files and build the associated model
module modelize

nitc :: modelize

Create a model from nit source files
module modelize_class

nitc :: modelize_class

Analysis and verification of class definitions to instantiate model element
module modelize_property

nitc :: modelize_property

Analysis and verification of property definitions to instantiate model element
module more_collections

more_collections :: more_collections

Highly specific, but useful, collections-related classes.
module mpackage

nitc :: mpackage

Modelisation of a Nit package
module native

core :: native

Native structures for text and bytes
module nitpm_shared

nitc :: nitpm_shared

Services related to the Nit package manager
module numeric

core :: numeric

Advanced services for Numeric types
module opts

opts :: opts

Management of options on the command line
module ordered_tree

ordered_tree :: ordered_tree

Manipulation and presentation of ordered trees.
module parse_annotations

nitc :: parse_annotations

Simple annotation parsing
module parser

nitc :: parser

Parser.
module parser_nodes

nitc :: parser_nodes

AST nodes of the Nit language
module parser_prod

nitc :: parser_prod

Production AST nodes full definition.
module parser_work

nitc :: parser_work

Internal algorithm and data structures for the Nit parser
module phase

nitc :: phase

Phases of the processing of nit programs
module poset

poset :: poset

Pre order sets and partial order set (ie hierarchies)
module protocol

core :: protocol

module queue

core :: queue

Queuing data structures and wrappers
module range

core :: range

Module for range of discrete objects.
module rbtree

trees :: rbtree

A red–black tree is a data structure which is a type of self-balancing binary search tree.
module re

core :: re

Regular expression support for all services based on Pattern
module ropes

core :: ropes

Tree-based representation of a String.
module serialization

serialization :: serialization

General serialization services
module serialization_core

serialization :: serialization_core

Abstract services to serialize Nit objects to different formats
module sorter

core :: sorter

This module contains classes used to compare things and sorts arrays.
module stream

core :: stream

Input and output streams of characters
module tables

nitc :: tables

Module that interfaces the parsing tables.
module template

template :: template

Basic template system
module text

core :: text

All the classes and methods related to the manipulation of text entities
module time

core :: time

Management of time and dates
module toolcontext

nitc :: toolcontext

Common command-line tool infrastructure than handle options and error messages
module trees

trees :: trees

General module for tree data structures
module trie

trees :: trie

A trie (or prefix tree) is a datastructure used to perform prefix searches.
module union_find

core :: union_find

union–find algorithm using an efficient disjoint-set data structure
module utf8

core :: utf8

Codec for UTF-8 I/O
module version

nitc :: version

This file was generated by git-gen-version.sh

Parents

module commands_model

nitc :: commands_model

Doc commands about a Model or a MEntity

Children

module commands_http

nitc :: commands_http

Initialize commands from HTTP requests
module commands_parser

nitc :: commands_parser

A parser that create DocCommand from a string
module json_commands

nitc :: json_commands

Translate command results to json
module md_commands

nitc :: md_commands

Render commands results as Markdown

Descendants

module a_star-m

a_star-m

module api

nitc :: api

Components required to build a web server about the nit model.
module api_auth

nitc :: api_auth

module api_base

nitc :: api_base

Base classes used by nitweb.
module api_docdown

nitc :: api_docdown

Nitdoc specific Markdown format handling for Nitweb
module api_feedback

nitc :: api_feedback

Feedback related features
module api_light

nitc :: api_light

Highlight and collect messages from a piece of code
module api_model

nitc :: api_model

module commands_docdown

nitc :: commands_docdown

Doc down related queries
module html_commands

nitc :: html_commands

Render commands results as HTML
module nitdoc

nitc :: nitdoc

Generator of static API documentation for the Nit language
module nitweb

nitc :: nitweb

Runs a webserver based on nitcorn that render things from model.
module nitx

nitc :: nitx

nitx, a command tool that displays useful data about Nit code
module static

nitc :: static

Nitdoc generation framework
module static_base

nitc :: static_base

Base entities shared by all the nitdoc code
module static_cards

nitc :: static_cards

Cards templates for the static documentation
module static_html

nitc :: static_html

Render documentation pages as HTML
module static_index

nitc :: static_index

Manage indexing of Nit model for Nitdoc QuickSearch.
module static_structure

nitc :: static_structure

Composes the pages of the static documentation
module term

nitc :: term

module commands_ini

import commands_model

# Cmd that finds the ini file related to an `mentity`
abstract class CmdIni
	super CmdEntity

	# Ini file
	var ini: nullable IniFile = null

	redef fun init_command do
		var res = super
		if not res isa CmdSuccess then return res
		var mentity = self.mentity.as(not null)

		if not mentity isa MPackage then return new WarningNoIni(mentity)

		var ini = mentity.ini
		if ini == null then return new WarningNoIni(mentity)

		self.ini = ini

		return res
	end
end

# No ini file for `mentity`
class WarningNoIni
	super CmdWarning

	# MEntity provided
	var mentity: MEntity

	redef fun to_s do return "No ini file for `{mentity.full_name}`"
end

# Cmd that finds the ini description related to an `mentity`
class CmdIniDescription
	super CmdIni

	# Ini description
	var desc: nullable String = null

	redef fun init_command do
		var res = super
		if not res isa CmdSuccess then return res

		var mentity = self.mentity.as(not null)
		var ini = self.ini.as(not null)

		var desc = ini["package.desc"]
		if desc == null then return new WarningNoDescription(mentity)
		self.desc = desc

		return res
	end
end

# No git clone url for `mentity`
class WarningNoDescription
	super CmdWarning

	# MEntity provided
	var mentity: MEntity

	redef fun to_s do return "No description for `{mentity.full_name}`"
end

# Cmd that finds the clone url related to an `mentity`
class CmdIniGitUrl
	super CmdIni

	# Clone url
	var url: nullable String = null

	redef fun init_command do
		var res = super
		if not res isa CmdSuccess then return res

		var mentity = self.mentity.as(not null)
		var ini = self.ini.as(not null)

		var url = ini["upstream.git"]
		if url == null then return new WarningNoGitUrl(mentity)
		self.url = url

		return res
	end
end

# No git url for `mentity`
class WarningNoGitUrl
	super CmdWarning

	# MEntity provided
	var mentity: MEntity

	redef fun to_s do return "No git url for `{mentity.full_name}`"
end

# Cmd that finds the git clone command related to an `mentity`
class CmdIniCloneCommand
	super CmdIniGitUrl

	# Clone command
	var command: nullable String is lazy do
		var url = self.url
		if url == null then return null
		return "git clone {url}"
	end
end

# Cmd that finds the issues link related to an `mentity`
class CmdIniIssuesUrl
	super CmdIni

	# Issues url
	var url: nullable String = null

	redef fun init_command do
		var res = super
		if not res isa CmdSuccess then return res

		var mentity = self.mentity.as(not null)
		var ini = self.ini.as(not null)

		var url = ini["upstream.issues"]
		if url == null then return new WarningNoIssuesUrl(mentity)
		self.url = url

		return res
	end
end

# No issues url for `mentity`
class WarningNoIssuesUrl
	super CmdWarning

	# MEntity provided
	var mentity: MEntity

	redef fun to_s do return "No issues url for `{mentity.full_name}`"
end

# Cmd that finds the maintainer name of an `mentity`
class CmdIniMaintainer
	super CmdIni

	# Maintainer name
	var maintainer: nullable String = null

	redef fun init_command do
		var res = super
		if not res isa CmdSuccess then return res

		var mentity = self.mentity.as(not null)
		var ini = self.ini.as(not null)

		var maintainer = ini["package.maintainer"]
		if maintainer == null then return new WarningNoMaintainer(mentity)
		self.maintainer = maintainer

		return res
	end
end

# No maintainer for `mentity`
class WarningNoMaintainer
	super CmdWarning

	# MEntity provided
	var mentity: MEntity

	redef fun to_s do return "No maintainer for `{mentity.full_name}`"
end

# Cmd that finds the contributors list of an `mentity`
class CmdIniContributors
	super CmdIni

	# Contributors list
	var contributors: nullable Array[String] = null

	redef fun init_command do
		var res = super
		if not res isa CmdSuccess then return res

		var mentity = self.mentity.as(not null)
		var ini = self.ini.as(not null)

		var names = ini["package.more_contributors"]
		if names == null then return new WarningNoContributor(mentity)

		var contributors = new Array[String]
		for name in names.split(",") do
			contributors.add name.trim
		end
		if contributors.is_empty then return new WarningNoContributor(mentity)
		self.contributors = contributors

		return res
	end
end

# No contributor for `mentity`
class WarningNoContributor
	super CmdWarning

	# MEntity provided
	var mentity: MEntity

	redef fun to_s do return "No contributor for `{mentity.full_name}`"
end

# Cmd that finds the license related to an `mentity`
class CmdIniLicense
	super CmdIni

	# License string
	var license: nullable String = null

	redef fun init_command do
		var res = super
		if not res isa CmdSuccess then return res

		var mentity = self.mentity.as(not null)
		var ini = self.ini.as(not null)

		var license = ini["package.license"]
		if license == null then return new WarningNoLicense(mentity)
		self.license = license

		return res
	end
end

# No ini license string for `mentity`
class WarningNoLicense
	super CmdWarning

	# MEntity provided
	var mentity: MEntity

	redef fun to_s do return "No license for `{mentity.full_name}`"
end

abstract class CmdEntityFile
	super CmdEntity

	# File path
	var file: nullable String = null is writable

	# Accepted file names
	fun file_names: Array[String] is abstract

	# Init file related data
	fun init_file: CmdMessage do
		var mentity = self.mentity.as(not null)

		var source_file = mentity.location.file
		if source_file == null then return throw_warning

		for file_name in file_names do
			var file = source_file.filename / file_name
			if not file.file_exists then continue
			self.file = file
			break
		end

		if file == null then return throw_warning

		return new CmdSuccess
	end

	redef fun init_command do
		var res = super
		if not res isa CmdSuccess then return res
		return init_file
	end

	fun throw_warning: CmdWarning is abstract
end

abstract class CmdEntityFileContent
	super CmdEntityFile

	# File content
	var content: nullable String = null is writable

	redef fun init_file do
		var res = super
		if not res isa CmdSuccess then return res

		var file = self.file.as(not null)
		content = file.to_path.read_all
		return res
	end
end

# Cmd that finds the license file related to an `mentity`
class CmdLicenseFile
	super CmdEntityFile

	redef var file_names = ["LICENSE", "LICENSE.md", "LICENSE.txt"]
	redef fun throw_warning do return new WarningNoLicenseFile(mentity.as(not null))
end

# Cmd that finds the license file content related to an `mentity`
class CmdLicenseFileContent
	super CmdEntityFileContent
	super CmdLicenseFile
end

# No license file for `mentity`
class WarningNoLicenseFile
	super CmdWarning

	# MEntity provided
	var mentity: MEntity

	redef fun to_s do return "No license file for `{mentity.full_name}`"
end

# Cmd that finds the contributing file related to an `mentity`
class CmdContribFile
	super CmdEntityFile

	redef var file_names = ["CONTRIBUTING", "CONTRIBUTING.md", "CONTRIBUTING.txt"]
	redef fun throw_warning do return new WarningNoContribFile(mentity.as(not null))
end

# Cmd that finds the contrib file content related to an `mentity`
class CmdContribFileContent
	super CmdEntityFileContent
	super CmdContribFile
end

# No license file for `mentity`
class WarningNoContribFile
	super CmdWarning

	# MEntity provided
	var mentity: MEntity

	redef fun to_s do return "No contributing file for `{mentity.full_name}`"
end
src/doc/commands/commands_ini.nit:15,1--361,3