{% extends "base.html" %} {% block content %}

Help

cocat keeps catalogues of time intervals that you and your colleagues edit together, in the browser, in SciQLop and from Python.

Projects

Projects hold catalogues and their events. Everyone in a project sees and can work on everything in it, with the role you give them. An event can belong to several catalogues of the same project. The project's history covers all of it.

Your account starts with a project called “My catalogues”. It is private until you share it. Signing in opens it.

The project's name at the top of the catalogues is a menu. It lists your projects: pick one to switch to it. It also creates, renames, leaves and deletes projects, and opens your groups.

To share only some catalogues, create a project for them with New project, and share that one.

SciQLop and Python call a project a “room”.

Catalogues and events

A catalogue is a named list of events. A project's catalogues are listed on the left; pick one to see its events on a timeline and in a table.

An event is a time interval. It has:

Pick a row to open the event. Editors change it there. Its Listed in part shows its catalogues, and adds it to another one.

Deleting an event or a catalogue moves it to the Trash, at the bottom of the catalogue list. From there, Restore puts it back. Delete for good removes it, and cannot be undone.

Statistics

While no event is open, the panel on the right sums up the events the table shows: after the filter and the period picked on the timeline.

More statistics opens the other sections. The page remembers which ones you keep open, in this browser.

Smart catalogues

A smart catalogue has a rule. The rule picks events from the whole project. Its list updates by itself while people edit. You can still add events to it by hand.

To make one in the catalogue browser, open a catalogue and use More → Add a rule…. The editor starts with an example to change. The catalogue keeps the events it lists and adds the ones the rule picks. On a smart catalogue, Edit rule changes the rule. Before you save, the editor says in words what the rule picks, or what is wrong with it. Python and a tscat dynamic catalogue import make smart catalogues too.

A rule is written in JSON. A few examples:

{% for (what, rule) in rules %}
{{ what }}
{{ rule }}
{% endfor %}

A rule can test start, stop, tags, status, confidence, author, products, and any attribute as #name. Write times like 2020-01-01T00:00:00Z. Gaps are in seconds.

Some rules make new intervals, like the last example. Those intervals are read-only. To keep what a smart catalogue holds today, use More → Freeze…. It makes a normal catalogue holding the events the rule picks now. Joined intervals become events you can edit. The smart catalogue stays as it is.

History

The server keeps every version of a project. In the catalogue browser, press History to see them, newest first.

A version is a run of changes by one person. A new version starts when:

Save version ends the current version on purpose. Give it a name, like “paper v1”, and a note that says why, like “as submitted”. Saved versions carry a mark in the list. Name this version names any version later.

Pick a version to see what it changed: the events it added, changed and removed.

Restore this version makes the project as it was then. Opened from a catalogue, the history shows that catalogue only, and a restore brings back only that catalogue. Nothing is lost. Events made since then go to the trash. The restore is a new version, so you can undo it by restoring the version before it.

To try something without touching the project, press Make a copy from this version. You get a new project of your own that starts as that version, with all its catalogues and events. Change it as you like: the original and its history stay as they were. Anyone in the project can make a copy, viewers too. A copy takes the whole project, even when you opened the history from one catalogue, and it counts in your own storage.

Sharing

The Share button at the top shows who is in the project. The owner and the editors share the project from there, in three ways:

Revoke stops a link or an invitation at once, whoever made it.

The same people change each member's role and remove members there. Nobody can change the owner's role or remove the owner.

The owner can keep this to themselves: untick Editors can change access and share in Share. Editors then see the lists without the controls, like viewers. Viewers never change who is in the project.

Any member can Leave a project from the project menu. The owner cannot leave: they transfer ownership first. Transfer ownership…, at the bottom of Share, hands the project to another member, and the old owner stays as an editor. Only the owner can do that.

Groups

A group is a set of people you share many projects with. Open Groups… in the project menu, create one there, then invite people with a share link or by email.

In Share, whoever shares the project adds a group they belong to, as editor or viewer. Everyone in the group gets the project, including people who join the group later. Someone who reaches a project both directly and through a group gets the higher of the two roles.

The group's owner invites and removes members, renames it and deletes it. Members can leave.

Roles

Viewer
Sees the catalogues, the events, the members and the history, and can make a copy of any version for themselves. Changes nothing in the project.
Editor
Also adds, changes and deletes events and catalogues, edits rules, saves, names and restores versions, and renames the project. Unless the owner said no, an editor also shares the project: invites people, changes roles, removes members and adds groups.
Owner
Can do all of that, always. Only the owner deletes the project, transfers ownership and decides whether editors can share. A project has one owner.

Nobody can give themselves a higher role. Anyone but the owner can leave.

Deleting a project deletes its catalogues and its history for everyone.

Who is here

In the catalogue browser, the round badges at the top are the other people in the project right now. Hover one to see who it is.

When someone edits an event, its row shows in their colour. Changes reach everyone at once. Live, at the top right, says your changes are reaching the server.

SciQLop and Python

This server's address is {{ server_url }}.

SciQLop: in the cocat plugin's settings, enter that address, then sign in with your email and password. Your projects appear there. Edits show up here live, and the other way round.

Python, with the cocat_rs package. Python calls Save version commit.

import cocat_rs

url = "{{ server_url }}"
cookie = cocat_rs.login(url, "you@example.org", "your password")
for info in cocat_rs.projects(url, cookie):
    print(info.id, info.name, info.role)

project = cocat_rs.Project.open("cocat-cache", info.id)
project.connect(url, cookie)
project.wait_synced(10)
for catalogue in project.catalogues():
    print(catalogue.name, len(catalogue.events))

project.save()
cocat_rs.commit(url, cookie, info.id, name="paper v1", message="as submitted")

Your account

{% endblock %}