sokf-core 0.9.0

sokf-core holds the logic of the sokf command-line tool: it loads and validates Superdev Open Knowledge Format (SOKF) knowledge stores, and runs each sokf command. Unstable: its interface can change in any release.
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! This module names a text for same-same.

use crate::RepoPath;

/// `name_of` returns the name under which same-same reads a text of the
/// file at `path`: its path from the repository's root, so that a pattern of
/// two parts, such as `.vscode/*.json`, reads by the file's folder too
/// (CLI-4_AC-113).
pub(crate) fn name_of(path: &RepoPath) -> String {
    path.as_str().trim_start_matches('/').to_string()
}