{"id":23138656,"url":"https://github.com/triptych/storywrapper","last_synced_at":"2026-02-11T17:31:19.626Z","repository":{"id":264965178,"uuid":"894640598","full_name":"triptych/storywrapper","owner":"triptych","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-30T07:00:48.000Z","size":161,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T09:46:22.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://storywrapper.puter.site/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/triptych.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-26T18:01:36.000Z","updated_at":"2025-01-28T11:11:33.000Z","dependencies_parsed_at":"2024-11-27T01:27:54.198Z","dependency_job_id":"6e1358a5-1067-4f89-b21e-8124964cbaf3","html_url":"https://github.com/triptych/storywrapper","commit_stats":null,"previous_names":["triptych/storywrapper"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/triptych/storywrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fstorywrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fstorywrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fstorywrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fstorywrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/triptych","download_url":"https://codeload.github.com/triptych/storywrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/triptych%2Fstorywrapper/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270034799,"owners_count":24515761,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-12T02:00:09.011Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-17T13:11:29.230Z","updated_at":"2026-02-11T17:31:14.606Z","avatar_url":"https://github.com/triptych.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Story Wrapper\n\nAn Electron-based desktop application wrapper for the markdown editor web app. This application provides native desktop features like:\n\n- Native file system integration\n- Standard application menus\n- Keyboard shortcuts\n- Cross-platform compatibility\n\n## Features\n\n- Open markdown files (Ctrl/Cmd + O)\n- Save markdown files (Ctrl/Cmd + S)\n- Standard text editing operations (cut, copy, paste, undo, redo)\n- Window management (zoom, fullscreen)\n- Development tools for debugging\n\n## Development\n\n### Prerequisites\n\n- Node.js and npm installed on your system\n\n### Running the Application\n\n1. Install dependencies:\n\n```bash\nnpm install\n```\n\n2. Start the application:\n\n```bash\nnpm start\n```\n\n## Building Windows Executable\n\n### Icon Preparation\n\nThe Windows executable requires an ICO format icon. Here's how to convert SVG to ICO:\n\n1. Install required packages:\n\n```bash\nnpm install sharp png-to-ico\n```\n\n2. Create a conversion script (convert-icon.js):\n\n```javascript\nconst sharp = require('sharp');\nconst pngToIco = require('png-to-ico');\nconst path = require('path');\nconst fs = require('fs');\n\nconst inputPath = path.join(__dirname, 'icons', 'icon-512x512.svg');\nconst pngPath = path.join(__dirname, 'build', 'icon.png');\nconst outputPath = path.join(__dirname, 'build', 'icon.ico');\n\n// Ensure build directory exists\nif (!fs.existsSync('build')) {\n    fs.mkdirSync('build');\n}\n\nasync function convertToIco() {\n    try {\n        // First convert to SVG to PNG\n        await sharp(inputPath)\n            .resize(256, 256)\n            .png()\n            .toFile(pngPath);\n\n        // Then convert PNG to ICO\n        const buf = await pngToIco([pngPath]);\n        fs.writeFileSync(outputPath, buf);\n\n        console.log('Icon converted successfully!');\n    } catch (err) {\n        console.error('Error converting icon:', err);\n    }\n}\n\nconvertToIco();\n```\n\n3. Run the conversion script:\n\n```bash\nnode convert-icon.js\n```\n\n### Build Configuration\n\nConfigure package.json with the following build settings to avoid permission issues and ensure proper icon usage:\n\n```json\n{\n  \"build\": {\n    \"appId\": \"com.storywrapper.app\",\n    \"win\": {\n      \"target\": \"portable\",\n      \"icon\": \"build/icon.ico\"\n    },\n    \"asar\": true,\n    \"forceCodeSigning\": false\n  },\n  \"scripts\": {\n    \"build\": \"electron-builder --win portable --config.win.signAndEditExecutable=false\"\n  }\n}\n```\n\nKey points in the configuration:\n\n- Use `portable` target to avoid installation/permission issues\n- Disable code signing with `forceCodeSigning: false`\n- Use `--config.win.signAndEditExecutable=false` in build command\n- Specify the ICO file path in the `win.icon` setting\n\n### Building and Releasing\n\nThere are two ways to build and release the application:\n\n#### 1. Automated Release Process\n\nA PowerShell script is provided to automate the entire release process. This script handles:\n\n- Icon conversion\n- Building the executable\n- Creating a zip file\n- Creating a GitHub release\n\nPrerequisites:\n\n- GitHub CLI (gh) installed and authenticated\n- PowerShell\n- All development dependencies installed\n\nUsage:\n\n```powershell\n.\\scripts\\release-builder.ps1 -Version \"1.0.0\" -Notes \"Release notes here\"\n```\n\nThe script will:\n\n1. Convert the icon using convert-icon.js\n2. Build the executable using electron-builder\n3. Create a zip file of the executable\n4. Create a GitHub release with the specified version and notes\n\n#### 2. Manual Process\n\nIf you prefer to build manually, follow these steps:\n\n1. Install electron-builder:\n\n```bash\nnpm install electron-builder --save-dev\n```\n\n2. Run the build command:\n\n```bash\nnpm run build\n```\n\nThe executable will be created in the `dist` directory as `storywrapper 1.0.0.exe`.\n\n3. Create a zip file of the executable:\n\n```powershell\n# Using PowerShell\nCompress-Archive -Path \"dist/storywrapper 1.0.0.exe\" -DestinationPath \"dist/storywrapper-1.0.0-win-x64.zip\"\n```\n\n4. Create the release using GitHub CLI:\n\n```powershell\ngh release create v1.0.0 --title 'Story Wrapper v1.0.0' --notes 'Release notes' './dist/storywrapper-1.0.0-win-x64.zip#Windows Portable Executable'\n```\n\nOr create the release manually through the GitHub web interface:\n\n1. Go to your GitHub repository\n2. Click on \"Releases\" in the right sidebar\n3. Click \"Create a new release\"\n4. Set the tag version, title, and description\n5. Upload the zip file\n6. Click \"Publish release\"\n\n### Troubleshooting\n\n- If you encounter symbolic link errors, use the portable target and disable code signing\n- If icon conversion fails with sharp alone, use the png-to-ico package as an intermediate step\n- Make sure the build directory exists before running the icon conversion\n- The final ICO file should be placed in the build directory as specified in the package.json\n\n## Keyboard Shortcuts\n\n- `Ctrl/Cmd + O`: Open file\n- `Ctrl/Cmd + S`: Save file\n- `Ctrl/Cmd + Z`: Undo\n- `Ctrl/Cmd + Y`: Redo\n- `Ctrl/Cmd + X`: Cut\n- `Ctrl/Cmd + C`: Copy\n- `Ctrl/Cmd + V`: Paste\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriptych%2Fstorywrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftriptych%2Fstorywrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftriptych%2Fstorywrapper/lists"}