@innovastudio/contentbox 1.5.87 → 1.5.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/readme.txt CHANGED
@@ -1,131 +1,144 @@
1
- ContentBox.js 5.6.1
1
+ ContentBox.js 5.6.2
2
2
 
3
- To get started, please refer to the documentation:
3
+ Documentation:
4
4
 
5
5
  https://demo.innovastudio.com/docs/ContentBox.pdf
6
6
 
7
+ https://demo.innovastudio.com/docs/AI-Assistant.pdf (AI Assistant documentation)
7
8
 
8
- To try the example:
9
9
 
10
- Copy all files into your localhost and open the following in your browser:
10
+ You can choose to run the HTML, PHP or JavaScript project examples:
11
11
 
12
- http://localhost/.../public/example.html
12
+ A. To try the HTML example:
13
13
 
14
- or
14
+ 1. Unzip the project files:
15
15
 
16
- http://localhost/.../public/example.php (PHP example)
16
+    - ContentBox/
17
17
 
18
+ 2. Open terminal, go to the project directory and install the required server dependencies.
19
+ The example is using Node.js server.
18
20
 
19
- or run the example project:
20
-
21
- 1. Install the project dependencies:
21
+ > cd ContentBox
22
22
 
23
23
  > npm install
24
24
 
25
- Note: To run this command, you need to have NPM installed.
26
- Download & install NPM from https://nodejs.org/en/download/.
25
+ Note: To run this command, you need to have NPM installed.
26
+ Download & install NPM from https://nodejs.org/en/download/.
27
+
28
+ 3. Run the server:
29
+
30
+ > node server.js
31
+
32
+ 3. Open from your browser:
33
+
34
+ http://localhost:8081/example.html
35
+
36
+
37
+ B. To try the PHP Example, open from your browser:
27
38
 
28
- 2. Run the project:
39
+ http://localhost/.../public/example.php
40
+
41
+ If you're using Visual Studio Code, you can use the PHP Server extension.
42
+
43
+
44
+ C. To try the JavaScript project, install the dependencies and start the project:
45
+
46
+ > npm install
29
47
 
30
48
  > npm start
31
49
 
32
- A browser window will open with the ContentBox.js example running.
50
+ A browser window will be opened with the example running.
33
51
 
34
- - The ContentBox initialization can be found in 'src/index.js'.
35
- - The Node.js server code is in 'server.js'.
52
+ Note:
53
+ The code for this project is:
54
+
55
+ src/index.js
36
56
 
37
- NOTE:
57
+ The project is using Node.js server:
58
+
59
+ server.js
38
60
 
39
- - The AI Assistant is an optional feature that you can enable or disable.
40
- Please refer to the AI Assistant documentation:
41
61
 
42
- https://demo.innovastudio.com/docs/AI-Assistant.pdf
62
+ NOTE:
43
63
 
44
64
  - To use the AI Assistant:
45
65
  1. Obtain the OpenAI API key from https://openai.com.
46
66
  2. Update the .env file with your API key.
47
67
 
48
- Alternatively, if you're using PHP, update the 'api/config.php' file with your API key:
49
-
50
- $OPENAI_API_KEY = 'YOUR_API_KEY';
51
-
52
- 3. Initialization
68
+ OPENAI_API_KEY=YOUR_API_KEY
53
69
 
54
- const builder = new ContentBox({
55
- sendCommandUrl: '/sendcommand',
56
- });
70
+ Alternatively, if you're using PHP, update the api/config.php file with your API key:
57
71
 
58
- If you're using PHP:
59
-
60
- const builder = new ContentBox({
61
- sendCommandUrl: '/sendcommand',
62
- });
72
+ $OPENAI_API_KEY = 'YOUR_API_KEY';
63
73
 
64
74
  - For speech recognition (if dictation is enabled), the browser's built-in
65
75
  speech recognition is used. However, certain browsers may not support this feature.
66
76
  We recommend using Deepgram for browser compatibility and accuracy.
67
- Obtain the Deepgram API key from https://deepgram.com.
68
- An example of using Deepgram is provided in the example project.
69
- Obtain the Deepgram API key and update the .env file with your API key.
77
+ Obtain the Deepgram API key from https://deepgram.com and update the .env file with your API key.
70
78
  Then enable the 'speechTranscribeUrl' parameter in the ContentBox initialization (src/index.js).
71
79
 
72
80
  - To use the AI image generation:
73
81
  1. Obtain the API key from https://getimg.ai/tools/api.
74
82
  2. Update the .env file with your API key.
75
83
 
84
+ GETIMG_API_KEY=YOUR_API_KEY
85
+
76
86
  Alternatively, if you're using PHP, update the 'api/config.php' file with your API key:
77
87
 
78
88
  $GETIMG_API_KEY = 'YOUR_API_KEY';
79
89
 
80
- 3. Initialization
90
+ - To try the examples using S3 Storage:
91
+
92
+ A. HTML example
93
+
94
+ 1. Update the .env file with your S3 storage credentials.
95
+
96
+ AWS_KEY=YOUR_KEY
97
+ AWS_SECRET=YOUR_SECRET
98
+ AWS_BUCKET=BUCKET_NAME
99
+ AWS_URL=http://BUCKET_NAME.s3-website-us-east-1.amazonaws.com
100
+ AWS_REGION=us-east-1
101
+
102
+ 2. Install the server dependencies:
103
+
104
+ > npm install
105
+
106
+ 3. Run the server:
81
107
 
82
- const builder = new ContentBox({
83
- textToImageUrl: '/texttoimage',
84
- upscaleImageUrl: '/upscaleimage',
85
- imageAutoUpscale: true,
86
- });
87
-
88
- If you're using PHP:
108
+ > node server-aws.js
89
109
 
90
- const builder = new ContentBox({
91
- textToImageUrl: 'api/texttoimage.php',
92
- upscaleImageUrl: 'api/upscaleimage.php',
93
- imageAutoUpscale: true,
94
- });
110
+ 4. Open from your browser:
95
111
 
96
- - Please add your own security to the API endpoints (public/api/)!
112
+ http://localhost:8081/example-s3.html
97
113
 
98
- - You can try a full working example by running the example project (please refer to the previous instructions).
114
+ B. PHP example
99
115
 
116
+ 1. Update the public/api/config.php with your S3 storage credentials.
100
117
 
101
- ______________________
102
- SOURCE CODE PACKAGE
118
+ $AWS_KEY = 'YOUR_KEY';
119
+ $AWS_SECRET = 'YOUR_SECRET';
120
+ $AWS_BUCKET = 'BUCKET_NAME';
121
+ $AWS_URL = 'http://BUCKET_NAME.s3-website-us-east-1.amazonaws.com';
122
+ $AWS_REGION = 'us-east-1';
103
123
 
104
- If you have the ContentBox source code:
124
+ 2. Download the AWS SDK for PHP phar file (aws.phar) from https://github.com/aws/aws-sdk-php/releases
125
+ and copy it to your project's public/api/ directory.
105
126
 
106
- - The source code is located in the 'src/contentbox/' folder.
107
- When you run the project, you can try modifying the source code, and
108
- the changes will be applied, and the browser will refresh automatically.
127
+ 3. Open from your browser:
109
128
 
110
- - When finished, to build the JavaScript code for production use, update the package.json file:
129
+ http://localhost/.../public/example-s3.php
111
130
 
112
- {
113
- "name": "@innovastudio/contentbox",
114
- "type": "module",
115
131
 
116
- }
132
+ - IMPORTANT:
117
133
 
118
- Then, run:
134
+ Please add your own security to the API endpoints (public/api/)!
119
135
 
120
- > npm run build
121
136
 
122
- The minified JS will be generated in the folder: 'public/contentbuilder/contentbuilder.min.js'.
123
- You can test it by opening: 'public/example.html'.
124
- If you're using Visual Studio Code, right-click on the 'example.html' file and select "Open with Live Server".
137
+ - If you have Source Code package (Super license), please refer to:
125
138
 
126
- - To build CSS from SCSS files, run:
139
+ readme-sourcecode.txt
127
140
 
128
- > npm run scss
141
+ for additional information.
129
142
 
130
143
 
131
144
  _____________________________________________