GithubHelp home page GithubHelp logo

listviewer's Introduction

List-Viewer

A configureable list viewer.

Simplest Example

If you have a ton .efu files (created by everything)

img-1

You can add a json configuration

{
    "Title": "List-Viewer",
    "Columns": [
        {
            "ColumnName": "EFU File",
            "ColumnField": "FileName",
            "IsContextVariable": true
        },
        {
            "ColumnName": "Name",
            "ColumnField": "Filename"
        }
    ],
    "Sources": [
        {
            "Provider": "dir",
            "DirPath": "C:\\YourDir",
            "SubDirDepth": 999,
            "Templates": {
                ".efu": {
                    "Provider": "csv"
                }
            }
        }
    ]
}

Drop it on ListViewer.exe, then ...

img-2

Here is a searchable list viewer.

Configure

By default, when you launch ListViewer.exe without arguments, ListViewer will load lv-config.json from application directory.

You can drop a json config file on ListViewer.exe to use specials config file.

Config file format:

{
    "Title": "the title of main window",
    "Columns": [...],
    "Sources": [...]
}

Columns Values

{
    // the title of column name, leave null/empty to use ColumnField.
    "ColumnName": "",

    // the field to load from source
    "ColumnField": "",

    // is search on this column or not, default value is true
    "SearchOn": true,

    // is display on main window or not, default value is true
    "IsDisplay": true,

    // is the column field is a variable from context,
    // for example, "FileName" can read from context.
    "IsContextVariable": false
}

Sources Values

Common

{
    // the option field map
    "FieldMap": {
        "column-name-from-data-source": "list-viewer-field-name"
    },
    // options for load entire table to memory, default value is false
    "LoadEntireTableToMemory": false
}

Sqlite table

{
    "Provider": "sqlite3",
    "ConnectionString": "...",
    "Table": "...",
}

Other data file

{
    // one of "csv"
    "Provider": "",
    // the file path
    "FilePath": "",
    // leave null/empty to use utf-8
    "Encoding": "",
}

Files from a directory

{
    "Provider": "dir",
    // the directory path
    "DirPath": "",
    "SubDirDepth": 0,
    "Templates": {
        // key is the extension name, like ".csv"
        "": {
            // one of "csv"
            "Provider": "",
            // leave null/empty to use utf-8
            "Encoding": "",
            // the option field map
            "FieldMap": {
                "csv-column-name": "list-viewer-field-name"
            }
        },
        ...
    }
}

Context Variables

Variable name description supported providers
FilePath csv
FileName csv

listviewer's People

Contributors

cologler avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.