Skip to content
/ OTCL Public
forked from karimomaya/OTCL

OpenText Command Line it's an open source library helping the customization teams to configure their content server environment using only command lines. The main advantage of OTCL is to write (your configuration) once and deploy everywhere.

Notifications You must be signed in to change notification settings

Ahmedfcis/OTCL

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OTCL

OpenText Command Line it's not only a command line it's like programming language you can write our commands with native JavaScript code. this Tool is an open source tool for helping company to configure OT content server environment using some logic . The main advantage of OTCL is to write (your configuration) once and deploy everywhere.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system. Pull the repo onto your localmachine open cmd and type node server.js access the application from http://localhost:3001/ voila everything is working enjoy configure you application using simple commands line. for help you can press on the icon ? from the top right corner

Deployment

sudo npm install -g https://github.com/karimomaya/OTCL.git

OTCL Command line

ot-cli [options] [command]

Options: -V, --version output the version number -s, --server <url> OT server URL (default: "http://localhost/") -h, --help output usage information

Commands: run|r <script-file> run script file compile|c <script-file> <out-js-file> compile script file to js

Simple Commands

Authentication to Content Server

auth %username% %password%

Create Nodes

1- create document %name% , %parent id% , %document file system%
2- create folder %name% , %parent id%
3- create news %name%, %parent id%
4- create project %name%, %parent id%
5- create shortcut %name%, %parent id%
6- create task %name%, %parent id%
7- create task_group %name%, %parent id%
8- create task_list %name%, %parent id%
9- create task_milistone %name%, %parent id%

Declare Categories

1- create folder called config under the project path
2- inside config folder create a file with extension .cat
3- make your category look like this

<?xml version="1.0" encoding="UTF-8"?>
<categories>
	<category>
		<name>first name</name>
		<type>string</type>
	</category>
	<category>
		<name>last name</name>
		<type>string</type>
	</category>
</categories>

Create Categories

  • create category %name% , %parent id% , %name of the declaration catergory without extension%

set category

  • set category %node id% , %category id%

Declare permission

1- create folder called config under the project path
2- inside config folder create a file with extension .per
3- make your permission look like this

<?xml version="1.0" encoding="UTF-8"?>
<permissions>
	<permission>
		<type>user</type>
		<name>username</name>
		<access>see</access>
	</permission>
	<permission>
		<type>group</type>
		<name>groupname</name>
		<access>see</access>
	</permission>
</permissions>

set permission

  • set permission %node id% , %name of the declaration permission without extension%

Write native Javascript code

<% for(var i=0; i< 10; i++){ %> create folder %name% , %parent id <%} %>

Examples

auth username password 
$cat = create category "category 1", 5961, "categoryConfiguration" // note that the variable cat hold the id of the category 
$folder = create folder "name", 5961
set category folder, cat // now you set the category you just created to the folder you just created :) 
$parentID = 5961
$x = 0
<% for(var i=0; i< 10; i++){ %> 
$x = create folder x, parentID 
<%} %>

About

OpenText Command Line it's an open source library helping the customization teams to configure their content server environment using only command lines. The main advantage of OTCL is to write (your configuration) once and deploy everywhere.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 43.2%
  • CSS 41.2%
  • HTML 15.6%