Skip to content

Latest commit

 

History

History

c

kuliya for C

Algeria's college hierarchy dataset as a C library

Installation

You can use kuliya library with one of these 2 options:

  1. Build it locally as it shown in Get Started section then copy kuliya.h and data.h to your project.

  2. Use conan package manager in your CMake project by following these steps:

    • Add kuliya recipe to your conanfile.txt:
    [requires]
    kuliya/1.0.0
    
    [generators]
    CMakeDeps
    CMakeToolchain
    
    • Install the recipe with conan:
    conan install . --output-folder=build --build=missing
    • Update your CMakeLists.txt file accordingly:
    cmake_minimum_required(VERSION 3.15)
    project(sandbox C)
    
    find_package(kuliya REQUIRED)
    
    add_executable(${PROJECT_NAME} src/main.c)
    
    target_link_libraries(${PROJECT_NAME} kuliya::kuliya)
    • Build and run your executable.

You can check the usage here.

Prerequisites

Get Started

  • Install build dependencies:
    cd c && conan install . --output-folder=build --build=missing
  • Click on CMake Tools icon in the extensions sidebar (Open CMakeLists.txt if it doesn't appear for some reason).
  • Follow these steps:
c_steps.mov
  • To build docs locally:
    cd c && doxygen

Usage

#include <stdio.h>
#include <kuliya.h>

int main(void)
{
    kuliya_init();
    kuliya_schema *res = get_node_by_path("umkb/fst/dee/sec");
    if (res != NULL)
    {
        printf("%s\n", res->name.en);
    }
    kuliya_deinit();
}

Check practical example usage here.

Contribute

Feel free to ask for help in #kuliya group chat