Legends of the Jedi Forums The Brainstormtorium Clandb use/commands guide (WIP)
This topic has 3 replies, 1 voice, and was last updated 3 years, 3 months ago by RussM.
Viewing 4 posts - 1 through 4 (of 4 total)
    • RussM Participant
      December 28, 2020 at 5:43 pm #32222

      This is a work in progress, feel free to comment with things you find or ideas to make it easier to read/learn.

      Clandb is a new function on LotJ brought to us by Miros. This allows clans to create and maintain a series of public and private ‘pages’ that can contain information, sorted into ‘directory’ like trees with descriptive titles. This can be used going forward for clans to post public information like details about the clan, engineering services, ship specs, clan laws, goals, etc. The private pages can be used to keep information internal to the clan like a quick reference ping chart, raid times, identified hostiles, and so on. The purpose of this guide is to help you learn how to view these pages, search them, and make them.

      The first thing we’ll cover is searching clandb. This is actually easier than you might think. If you’re in a clan, it’s literally just ‘clandb search’ and it’ll show you all the public pages of your clan and any private pages you have rights to see. To see another organization’s public pages, you can add a modifier to the commands, the -c or –clan, so it would be ‘clandb -c <clan> search’ and this will return their public pages.

      Now that you can find the pages, we need to view them. To do this we’ll use the view option. To view your own clans pages, you simply need ‘clandb view /path/to/page’. So if your clan has a /private/home page, then ‘clandb view /private/home’ will display what is on that page. To view another clan’s pages, you’ll need to use the -c option again. So ‘clandb -c engineeringfirm view /public/home/starfighterspec’ to see the specs of their starfighter for example.

      Now the real hard thing. Editing, and creation, of pages. Editing and creating pages both fall under the edit option. A few things to remember, pages never end in /. The command will complain to you if it catches that. Let’s see you’re a clan leader, and you want to edit your /private/home to have a list of tasks for the clan to work on. Just use ‘clandb edit /private/home’ and this will open an editor to change the contents of the page. If you want to change the title of the page, you can add ‘–title ‘<title here>’ to the end. It’ll open the editor, but it’ll also label the page per the –title variable you provide. Be sure to use single quotes to enclose the title if it contains spaces.

      Next, a new page. Your slicers figured out a ping chart, and you want both pilots and slicers to have easy access to read it. So we’ll create a new page in the private tree. ‘clandb edit /private/pingchart –title ‘Ping Chart” and this will create a page at /private/pingchart titled ‘Ping Chart’ and you can paste the chart into it so your clan can view it with ‘clandb view /private/pingchart’.

      This covers a very basic high level use of clandb. To get more indepth, you’ll want to look through the helpfiles. The first one is easy, ‘clandb -h’ give you the top level help. Then you can continue into this by picking an option, say edit, and adding a -h to it. So ‘clandb edit -h’ will give a helpfile about how edit works. Restrict has the most complex helpfile, but it has the most granularity in who can do what in the clandb.

      • This topic was modified 3 years, 3 months ago by RussM.
    • RussM Participant
      December 28, 2020 at 6:25 pm #32224

      Using restrict.

      The restrict option allows for two types of restriction. Edit rights, and view rights. The handles for these two options include adding, viewing, deleting, deleting all, or defaulting restrictions for edit or view. So to add a restriction to viewing a path, it is ‘clandb restrict view add <path> ….’ where edit rights would be replace view with edit. The …. indicates the parameters of the restriction, which is a simple check described by the one setting the restriction. The options are, from the helpfile, the following: ‘{allow,deny}{division,rank,own_clan,name,bestowment} {eq,neq,gte,lte,lt,gt} [<value>]’. Note that once these restrictions are in place, an admin or clan leader will need to start using the -r/–root option to view or edit files they have restricted to ranks, divisions, or people they are not in. When using division or rank as a requirement, use the number not the name of the rank or division.

    • RussM Participant
      December 28, 2020 at 6:52 pm #32225

      Useful commands:
      clandb -c <clan> search
      clandb search
      clandb –root search
      clandb –root restrict view view all

      • This reply was modified 3 years, 3 months ago by RussM.
    • RussM Participant
      January 1, 2021 at 12:48 am #32234

      Compound restrictions, IE only Division X with a Rank Y can read.

      First, give division X a restricted /private/home/divisionX/ that’s set with the command ‘clandb -r restrict /private/home/divisionX/ allow division eq X’. This will allow only that division to see things in this path.
      Next, create a new file on this path like /private/home/divisionX/RankY.
      Now to compound so only those of Rank Y, or higher if needed, can read files in that path: ‘clandb -r restrict view add /private/home/divisionX/rankY/ allow rank eq/gte Y’
      Now, anything created under /private/home/divisionX/ will be only visible to Division X. Anything made under /private/home/divisionX/RankY/ will only be visible to those in Division X with the proper rank.

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.