elvic-ascii-studio 1.0.0

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.md ADDED
@@ -0,0 +1,82 @@
1
+ # Elvic ASCII Studio
2
+
3
+ A powerful terminal-based ASCII art generator with AI integration.
4
+
5
+ ## Installation
6
+
7
+ ### Via npm (Global)
8
+
9
+ ```bash
10
+ npm install -g elvic-ascii-studio
11
+ ```
12
+
13
+ ### Via pip (Recommended)
14
+
15
+ ```bash
16
+ pip install elvic-ascii-studio
17
+ ```
18
+
19
+ ## Requirements
20
+
21
+ - **Python 3.8+** (required)
22
+ - **pip** (Python package manager)
23
+ - **Node.js 14+** (if installing via npm)
24
+
25
+ ## Usage
26
+
27
+ After installation, run:
28
+
29
+ ```bash
30
+ elvic-ascii
31
+ ```
32
+
33
+ ## Features
34
+
35
+ - ๐ŸŽจ **Text to ASCII Art** - Convert text to ASCII art with 900+ fonts
36
+ - ๐Ÿ–ผ๏ธ **Image to ASCII** - Convert images to ASCII art (colored or monochrome)
37
+ - ๐Ÿค– **AI-Enhanced ASCII** - Generate ASCII art with OpenAI integration
38
+ - โญ **Font Favorites** - Save and manage your favorite fonts
39
+ - ๐Ÿ“Š **Font Browser** - Browse curated Top 25 fonts by category
40
+ - ๐Ÿ’ก **Smart Recommendations** - Get font suggestions based on use case
41
+ - ๐ŸŽฏ **Presets** - Quick access to font collections
42
+
43
+ ## Quick Start
44
+
45
+ 1. Install the package:
46
+ ```bash
47
+ npm install -g elvic-ascii-studio
48
+ ```
49
+
50
+ 2. Run the CLI:
51
+ ```bash
52
+ elvic-ascii
53
+ ```
54
+
55
+ 3. Choose an option from the menu and start creating ASCII art!
56
+
57
+ ## Configuration
58
+
59
+ For AI features, you'll need an OpenAI API key. Create a `.env` file:
60
+
61
+ ```bash
62
+ OPENAI_API_KEY=your_api_key_here
63
+ ```
64
+
65
+ ## Documentation
66
+
67
+ For full documentation, visit:
68
+ https://github.com/elvic-group/elvic-ascii-studio
69
+
70
+ ## License
71
+
72
+ MIT License - see LICENSE file for details
73
+
74
+ ## Author
75
+
76
+ Elvic Kongolo
77
+
78
+ ## Support
79
+
80
+ - Issues: https://github.com/elvic-group/elvic-ascii-studio/issues
81
+ - Discussions: https://github.com/elvic-group/elvic-ascii-studio/discussions
82
+
@@ -0,0 +1,74 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Elvic ASCII Studio - npm wrapper
5
+ * This script ensures Python is available and runs the Python CLI
6
+ */
7
+
8
+ const { spawn } = require('child_process');
9
+ const { platform } = require('os');
10
+
11
+ // Check if Python is available
12
+ function checkPython() {
13
+ return new Promise((resolve, reject) => {
14
+ const pythonCommands = ['python3', 'python'];
15
+ let checkedCount = 0;
16
+
17
+ pythonCommands.forEach(cmd => {
18
+ const proc = spawn(cmd, ['--version'], { stdio: 'pipe' });
19
+
20
+ proc.on('error', () => {
21
+ checkedCount++;
22
+ if (checkedCount === pythonCommands.length) {
23
+ reject(new Error('Python not found'));
24
+ }
25
+ });
26
+
27
+ proc.on('close', (code) => {
28
+ if (code === 0) {
29
+ resolve(cmd);
30
+ } else {
31
+ checkedCount++;
32
+ if (checkedCount === pythonCommands.length) {
33
+ reject(new Error('Python not found'));
34
+ }
35
+ }
36
+ });
37
+ });
38
+ });
39
+ }
40
+
41
+ // Run the Python CLI
42
+ async function runCLI() {
43
+ try {
44
+ const pythonCmd = await checkPython();
45
+
46
+ // Run the elvic-ascii command
47
+ const proc = spawn(pythonCmd, ['-m', 'elvic_ascii.cli'], {
48
+ stdio: 'inherit',
49
+ shell: true
50
+ });
51
+
52
+ proc.on('error', (err) => {
53
+ console.error('Error running Elvic ASCII Studio:', err.message);
54
+ console.error('\nPlease ensure Python 3.8+ is installed and elvic-ascii-studio is installed via pip:');
55
+ console.error(' pip install elvic-ascii-studio');
56
+ process.exit(1);
57
+ });
58
+
59
+ proc.on('close', (code) => {
60
+ process.exit(code || 0);
61
+ });
62
+
63
+ } catch (err) {
64
+ console.error('โŒ Python 3.8+ is required to run Elvic ASCII Studio');
65
+ console.error('\nPlease install Python from:');
66
+ console.error(' - macOS: https://www.python.org/downloads/ or use Homebrew: brew install python3');
67
+ console.error(' - Linux: sudo apt install python3 (Ubuntu/Debian) or sudo yum install python3 (RHEL/CentOS)');
68
+ console.error(' - Windows: https://www.python.org/downloads/');
69
+ process.exit(1);
70
+ }
71
+ }
72
+
73
+ runCLI();
74
+
package/index.js ADDED
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Elvic ASCII Studio - npm package entry point
3
+ *
4
+ * This package provides a global CLI command 'elvic-ascii'
5
+ * that wraps the Python-based Elvic ASCII Studio.
6
+ *
7
+ * Installation:
8
+ * npm install -g elvic-ascii-studio
9
+ *
10
+ * Usage:
11
+ * elvic-ascii
12
+ *
13
+ * Requirements:
14
+ * - Python 3.8+
15
+ * - pip
16
+ */
17
+
18
+ module.exports = {
19
+ name: 'elvic-ascii-studio',
20
+ version: '1.0.0',
21
+ description: 'A powerful terminal-based ASCII art generator with AI integration'
22
+ };
23
+
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "elvic-ascii-studio",
3
+ "version": "1.0.0",
4
+ "description": "A powerful terminal-based ASCII art generator with AI integration",
5
+ "main": "index.js",
6
+ "bin": {
7
+ "elvic-ascii": "./bin/elvic-ascii.js"
8
+ },
9
+ "scripts": {
10
+ "postinstall": "node scripts/install-python-deps.js",
11
+ "test": "node scripts/test-installation.js"
12
+ },
13
+ "keywords": [
14
+ "ascii",
15
+ "ascii-art",
16
+ "cli",
17
+ "terminal",
18
+ "art",
19
+ "text-to-ascii",
20
+ "image-to-ascii",
21
+ "figlet",
22
+ "pyfiglet",
23
+ "openai",
24
+ "ai",
25
+ "generator",
26
+ "converter"
27
+ ],
28
+ "author": "Elvic Kongolo <43522377+elvic-group@users.noreply.github.com>",
29
+ "license": "MIT",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/elvic-group/elvic-ascii-studio.git"
33
+ },
34
+ "bugs": {
35
+ "url": "https://github.com/elvic-group/elvic-ascii-studio/issues"
36
+ },
37
+ "homepage": "https://github.com/elvic-group/elvic-ascii-studio#readme",
38
+ "engines": {
39
+ "node": ">=14.0.0",
40
+ "npm": ">=6.0.0"
41
+ },
42
+ "os": [
43
+ "darwin",
44
+ "linux",
45
+ "win32"
46
+ ],
47
+ "preferGlobal": true,
48
+ "files": [
49
+ "bin/",
50
+ "scripts/",
51
+ "README.md",
52
+ "LICENSE"
53
+ ]
54
+ }
55
+
@@ -0,0 +1,64 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Post-install script for npm package
5
+ * Installs the Python package via pip
6
+ */
7
+
8
+ const { spawn } = require('child_process');
9
+ const { platform } = require('os');
10
+
11
+ console.log('๐Ÿ“ฆ Installing Elvic ASCII Studio Python dependencies...\n');
12
+
13
+ // Determine the pip command to use
14
+ const pipCommands = ['pip3', 'pip'];
15
+
16
+ function tryInstall(pipCmd) {
17
+ return new Promise((resolve, reject) => {
18
+ console.log(`Trying to install with ${pipCmd}...`);
19
+
20
+ const proc = spawn(pipCmd, ['install', 'elvic-ascii-studio'], {
21
+ stdio: 'inherit',
22
+ shell: true
23
+ });
24
+
25
+ proc.on('error', (err) => {
26
+ reject(err);
27
+ });
28
+
29
+ proc.on('close', (code) => {
30
+ if (code === 0) {
31
+ resolve(true);
32
+ } else {
33
+ reject(new Error(`${pipCmd} install failed with code ${code}`));
34
+ }
35
+ });
36
+ });
37
+ }
38
+
39
+ async function installPythonPackage() {
40
+ for (const pipCmd of pipCommands) {
41
+ try {
42
+ await tryInstall(pipCmd);
43
+ console.log('\nโœ… Elvic ASCII Studio installed successfully!');
44
+ console.log('\nYou can now run: elvic-ascii\n');
45
+ return;
46
+ } catch (err) {
47
+ // Try next pip command
48
+ continue;
49
+ }
50
+ }
51
+
52
+ // If we get here, all pip commands failed
53
+ console.error('\nโŒ Failed to install Python dependencies');
54
+ console.error('\nPlease install manually:');
55
+ console.error(' pip install elvic-ascii-studio');
56
+ console.error('\nOr install Python 3.8+ from:');
57
+ console.error(' - macOS: https://www.python.org/downloads/ or brew install python3');
58
+ console.error(' - Linux: sudo apt install python3-pip');
59
+ console.error(' - Windows: https://www.python.org/downloads/\n');
60
+ process.exit(1);
61
+ }
62
+
63
+ installPythonPackage();
64
+
@@ -0,0 +1,75 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Test script to verify installation
5
+ */
6
+
7
+ const { spawn } = require('child_process');
8
+
9
+ console.log('๐Ÿงช Testing Elvic ASCII Studio installation...\n');
10
+
11
+ function testPython() {
12
+ return new Promise((resolve, reject) => {
13
+ const proc = spawn('python3', ['--version'], { stdio: 'pipe' });
14
+
15
+ let output = '';
16
+ proc.stdout.on('data', (data) => {
17
+ output += data.toString();
18
+ });
19
+
20
+ proc.on('close', (code) => {
21
+ if (code === 0) {
22
+ console.log('โœ… Python found:', output.trim());
23
+ resolve(true);
24
+ } else {
25
+ reject(new Error('Python not found'));
26
+ }
27
+ });
28
+
29
+ proc.on('error', () => {
30
+ reject(new Error('Python not found'));
31
+ });
32
+ });
33
+ }
34
+
35
+ function testPipPackage() {
36
+ return new Promise((resolve, reject) => {
37
+ const proc = spawn('pip3', ['show', 'elvic-ascii-studio'], { stdio: 'pipe' });
38
+
39
+ let output = '';
40
+ proc.stdout.on('data', (data) => {
41
+ output += data.toString();
42
+ });
43
+
44
+ proc.on('close', (code) => {
45
+ if (code === 0 && output.includes('Name: elvic-ascii-studio')) {
46
+ const versionMatch = output.match(/Version: (.+)/);
47
+ const version = versionMatch ? versionMatch[1] : 'unknown';
48
+ console.log('โœ… elvic-ascii-studio package found (version:', version + ')');
49
+ resolve(true);
50
+ } else {
51
+ reject(new Error('Package not installed'));
52
+ }
53
+ });
54
+
55
+ proc.on('error', () => {
56
+ reject(new Error('pip not found'));
57
+ });
58
+ });
59
+ }
60
+
61
+ async function runTests() {
62
+ try {
63
+ await testPython();
64
+ await testPipPackage();
65
+ console.log('\nโœ… All tests passed! You can run: elvic-ascii\n');
66
+ process.exit(0);
67
+ } catch (err) {
68
+ console.error('\nโŒ Test failed:', err.message);
69
+ console.error('\nPlease run: npm install\n');
70
+ process.exit(1);
71
+ }
72
+ }
73
+
74
+ runTests();
75
+