Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
@innovastudio/pagestudioai
Advanced tools
PageStudioAI.js 1.1 - AI Web Builder
Getting started
You can choose to run the HTML, PHP or JavaScript project examples:
A. To try the HTML example:
1. Unzip the project files:
- PageStudioAI/
2. Open terminal, go to the project directory and install the required server dependencies.
The example is using Node.js server.
> cd PageStudioAI
> npm install
Note: To run this command, you need to have NPM installed.
Download & install NPM from https://nodejs.org/en/download/.
3. Configure:
1. Obtain the API keys from OpenAI and Getimg (for Image generation):
https://openai.com
https://getimg.ai/tools/api
2. Update the .env file with your API key.
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
GETIMG_API_KEY=YOUR_GETIMG_API_KEY
4. Run the server:
> node server.js
5. Open from your browser:
http://localhost:8086/example.html
or
http://localhost:8086/example-customform.html (custom form example)
B. To try the PHP Example, open from your browser:
http://localhost/.../public/example.php
If you're using Visual Studio Code, you can use the PHP Server extension.
Configuration: update the api/config.php file with your API key:
$OPENAI_API_KEY = 'YOUR_OPENAI_API_KEY';
$GETIMG_API_KEY = 'YOUR_GETIMG_API_KEY';
C. To try the JavaScript project, install the dependencies and start the project:
> cd PageStudioAI
> npm install
> npm start
A browser window will be opened with the example running.
Note:
The code for this project is:
src/index.js
The project is using Node.js server:
server.js
Usage:
Include the script and CSS:
Initiate:
const container = document.querySelector('.mycontainer') studio = new PageStudioAI(container, {
enableImageGeneration: false, // if false, randomly selected images will be used.
// enableDownload: false,
// Endpoints for AI content & images generation
sendCommandUrl: '/sendcommand',
textToImageUrl: '/texttoimage',
upscaleImageUrl: '/upscaleimage',
// Customize the form page
imageAlt: 'Generate Your Website',
imageSrc: 'bike.jpg',
headline: 'Generate Your Website <span>with AI</span>',
tagline: 'Get ready for your personalized website in just moments!',
/*
demoImages: [
'gallery/img-w1bPB.jpg',
'gallery/img-X82Nlj.jpg',
//...
],
// Assets
placeholderPath: 'assets/placeholders/', // location of image placeholders used in templates
contentStylePath: 'assets/styles/', // location of typography styles' css
snippetsCss: 'assets/minimalist-blocks/content-preview.css', // css used by the builder
boxCss: 'box/box-flex-preview.css', // css used by the builder
*/
});
Methods:
generate(userInfo); // generate page with AI
Example:
const userInfo = {
name: 'The Studio',
type: 'Company/Organization', // or 'Freelancer/Individual'
fields: 'Interior Designer',
about: '', // optional
style: 'Formal' // or 'Friendly'
}
studio.generate(userInfo);
view(); // to view the generated page
getPage(); // get page data, eg. for saving purpose into a database
loadPage(data); // load a page
clear(); // to clear the generated page
destroy(); // destroy the library
showForm(); // to programmatically show the generate form
SUPPORT:
Email us at: support@innovastudio.com
FAQs
Unknown package
We found that @innovastudio/pagestudioai demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.