KrySA

class main.Body(**kwargs)[source]

The main layout for the application. It handles menu values, their appropriate functions, filtering of user’s input and functions for accessing Data file in main.Table.

New in version 0.1.0.

_export_data(selection, fname, *args)[source]

Export all available Data (visible as tabs) as Data file into path selected in Dialog.

New in version 0.1.1.

static _extract_rows(data)[source]

Extract values from main.Table‘s dictionary into a flat list.

Example:

Data1 Data2 Data3
1 2.0 3

[u’Data1’, u’Data2’, u’Data3’, u‘1’, 2.0, 3, ...]

New in version 0.1.0.

_import_data(selection, *args)[source]

Import Data file from path selected in Dialog and put it to main.Table.

New in version 0.1.0.

_new_data(*args)[source]

Open a wizard for creating a new Data if a Project is available or show a warning if it doesn’t exist.

New in version 0.1.3.

_new_project(*args)[source]

Close already opened Project if available and open a dialog for creating a new one.

New in version 0.1.2.

_open_project(selection, *args)[source]

Open a Project from path selected in Dialog and import Data file.

New in version 0.1.7.

_recent_projects()[source]

Return a list of recently opened Project s from a file.

New in version 0.6.0.

_save_data(wizard, *args)[source]

Get data from the wizard, put them into main.Table and export them into Data file.

New in version 0.1.4.

_save_project(selection=None, fname=None, *args)[source]

Save a Project to path selected in Dialog and export Data file.

New in version 0.1.2.

static about(*args)[source]

Display about page of the app and include other credits.

New in version 0.1.0.

close_project(*args)[source]

Clear all important variables, remove all Data available in main.Table, clear results and switch to main.ProcessFlow.

New in version 0.1.0.

from_address(table, address, extended=False, *args)[source]

Get value(s) from main.Table according to the address such as A1 or A1:B2. Values are fetched in the way that the final list contains even empty (u'') values. It is not expected of user to use Task for strings and most of them won’t even run. To get non-empty values for a Task use for example Python’s filter():

values = filter(lambda x: len(str(x)), values)

This filter, however, will remain values such as None untouched.

New in version 0.1.0.

Changed in version 0.3.5: Added extended options and a possibility to get :all values from data.

set_page(task, result, result_type='text', footer='time')[source]

Create a main.PageBox for a result. The header consists of the Task‘s name, the footer is by default the time when the result was created and the content depends on result_type which can be - text, image(path to image) or widget. If result_type == ‘widget’, result has to be an instance of a widget (obviously containing the output), e.g.:

b = Button(text='my output')
set_page('MyTask', b, result_type='widget')

Note

When exporting pages, everything is converted into images (pngs), therefore making fancy behaving widgets is irrelevant.

New in version 0.2.0.

Changed in version 0.3.2: Added tables as a result type.

class main.CreateWizard(wdg=None, run=None, **kwargs)[source]

A popup handling the behavior for creating a new Data, i.e a wizard.

New in version 0.1.3.

class main.Dialog(**kw)[source]

A dialog handling the behavior for creating or opening files e.g. Project or Data.

New in version 0.1.0.

class main.ErrorPop(msg='', **kwargs)[source]

An error popup to let user know something is missing or typed wrong when console is disabled.

New in version 0.1.2.

class main.ImgButton(**kwargs)[source]

A button with an image of square shape in the middle.

New in version 0.2.0.

class main.KrySA(**kwargs)[source]

The main class of the application through which is handled the communication of other classes with getting an instance of the app via App.get_running_app().

Other than that, it holds important variables of Project, sql blacklist for Data file creating and updating or the application properties themselves.

build()[source]

Default Kivy function for getting the root widget of application.

errorcls

alias of ErrorPop

on_project_exists(instance, exists)[source]

Check change of main.KrySA.project_exists and if Project exists, schedule updating of its tree to 5 second interval.

New in version 0.3.0.

tablecls

alias of Table

class main.MenuDrop(**kwargs)[source]

A list of main.SizedButton s displayed as a menu, where each button may create another menu depending on the function bound to it. The main menu is handled through a single instance of main.MenuDrop which is instantiated before main.Krysa.build function.

Each click/tap on the menu button then assigns a value to it from App.menu dictionary according to its name in kv file.

New in version 0.1.0.

class main.NewDataColumn(**kw)[source]

A layout handling the behavior of type, values(NewDataValue) and some buttons for each new column in Data.

New in version 0.1.4.

checklock(disable, coltype, check, *args)[source]

Disable all cells in the column, then check them against a list of strings that could be used to corrupt Data file . If the check is done without an error, another check is made to protect against using an empty string '' as a value, which if used inappropriately results in a crash.

New in version 0.1.4.

static free(items)[source]

Free all locked cells in the column except a column type. If a wrong type is used, removing the whole column is necessary. (protection against corrupting Data file)

New in version 0.1.4.

paste(values, sep)[source]

Paste a value(s) from a user’s clipboard as a column values. A user can choose what kind of separator was used on the values, for example:

1 2 3 4 5     # (space)
1\t2\t3\t4\t  # (tab)
1\n2\n3\n4\n  # Unix-like new line character (<enter>/<return>)

If in doubt and your values were copied from a column (e.g. spreadsheet), use OS default, which will choose between \n (Unix-like) or \r\n (Windows) new line separators.

New in version 0.3.4.

class main.NewDataLayout(**kw)[source]

A layout handling the behavior of NewDataColumn and some inputs for each new value in Data.

New in version 0.1.3.

class main.NewDataValue(filter=None, **kwargs)[source]

A layout handling the behavior of inputs and button for each new value in Data.

New in version 0.1.4.

class main.PageBox(**kwargs)[source]

A layout that includes Page widget together with transparent separator. It’s used for adding new results from Tasks.

New in version 0.2.0.

class main.PaperLabel(**kwargs)[source]

A label with visual properties as a paper sheet.

New in version 0.2.0.

class main.ProcessFlow(**kwargs)[source]

A canvas on which are displayed files in project folders with a touch event opening them in the default program.

ToDo: more items such as displaying tasks.

New in version 0.1.0.

Changed in version 0.5.0: Implemented icons with a behavior representing the Project structure.

add_mainitem(name, link)[source]

Add a main item on the same level as the Project.

Parameters:
name: string

Used as a text for label.

link: path (string)

Used for a touch event.

New in version 0.5.0.

add_project()[source]

Add a root item for the other items on the main.ProcessFlow.

New in version 0.5.0.

add_subitem(name, link, parent)[source]

Add a subitem under an existing main.ProcessFlowMain.

Parameters:
name: string

Used as a text for label

link: path (string)

Used for a touch event

parent: string

Used to create a key for subitems e.g. myparent-subitems

New in version 0.5.0.

flush()[source]

Remove every item previously added to main.ProcessFlow and clean all stored positions.

New in version 0.5.0.

resize(*args)[source]

Resize the main.ProcessFlow to encapsulate its children.

New in version 0.5.0.

class main.ProcessFlowMain(link=None, source=None, **kwargs)[source]

An item on the main.ProcessFlow, provides a label with its name, an icon and a touch behavior that opens its target with system’s default program for such target.

New in version 0.5.0.

class main.ProcessFlowSep(orientation='horizontal', **kwargs)[source]

A line separator between main.ProcessFlowMain items. The line can be either horizontal or vertical.

Parameters:
orientation: string

Choose a string from [‘horizontal’, ‘vertical’], defaults to horizontal.

New in version 0.5.0.

class main.ResultGrid(**kwargs)[source]

A black gridlayout, together with main.Wrap makes a table container for results that need a table.

New in version 0.3.2.

class main.SizedButton(**kwargs)[source]

A button with width automatically customized according to text length of its siblings, which makes every sibling the same size as the one with the longest text string.

New in version 0.1.0.

class main.Table(max_rows=1, max_cols=1, values=[], labels=None, types=None, **kwargs)[source]

A view handling the behavior of the inputs from Data file. Separates the values from Data file according to its Data‘s column types into three Python categories - int, float or unicode and assigns an alphabetic order for each column together with row number to each value.

New in version 0.1.0.

clean(*args)[source]

Remove all data from main.Table

New in version 0.1.0.

get_letters()[source]

Get a list of letters the same length as Data‘s columns.

New in version 0.1.0.

lock(disabled=True)[source]

Disable cells in main.Table which can’t be accessed with the letter-number style (e.g. A1:B2).

New in version 0.1.0.

class main.TableItem(**kwargs)[source]

An item handling the behavior or each separate value in the main.Table such as updating/editing values in Data.

New in version 0.1.0.

on_focus(widget, focused)[source]

Make sure the unconfirmed value is discarded e.g. when clicked outside of the widget.

update_value(txt, *args)[source]

Update a value in main.TableItem.text on <enter> (<return>) and change main.TableItem.old_text in main.Table.

New in version 0.1.0.

class main.Wrap(**kwargs)[source]

A white label with automatically wrapped text.

New in version 0.3.2.