如何将应用转换成系统应用_将网站转换为应用

news/2024/5/20 22:20:59/文章来源:https://blog.csdn.net/culuo8053/article/details/107908897

如何将应用转换成系统应用

Convert website to app

Converting a website to a native app, whether on mobile or desktop, can be quite useful.  The problem with bookmarks, especially for software engineers, is that we often need to work in different browsers, so having everything in one browser's bookmark set can be a pain.  I'd also argue that websites with a specific purpose area great case for converting a website to desktop app.  I recently found nativefier, an open source utility that creates a native desktop app by wrapping the site in Electron.

将网站转换为本地应用程序(无论是在移动设备还是台式机上)都非常有用。 书签的问题特别是对于软件工程师而言,是我们经常需要在不同的浏览器中工作,因此在一个浏览器的书签集中设置所有内容可能会很麻烦。 我也认为具有特定用途区域的网站是将网站转换为桌面应用程序的绝佳案例。 我最近找到了nativefier ,这是一个开放源代码实用程序,它通过将网站包装在Electron中来创建本地桌面应用程序。

安装 (Installation)

You can use NPM to install nativefier and node-icns, which we'll use to create a custom icon for the app:

您可以使用NPM安装nativefier和node-icns,我们将使用它们来为应用创建自定义图标:


npm install -g nativefier # App creator
npm install -g node-icns  # Icon creator

The nativefier docs provide a method for creating the desktop app icon but ImageMagick and iconutils are required -- node-icns will save you some pain.

nativefier文档提供了一种用于创建桌面应用程序图标的方法,但是需要ImageMagick和iconutils-node-icns可以减轻您的痛苦。

创建应用程序图标 (Create the App Icon)

It's important to create the app icon before creating the app itself.  You can create an app icon with node-icns and an image of your choice:

在创建应用程序本身之前创建应用程序图标很重要。 您可以创建带有节点图标和您选择的图像的应用程序图标:


# Generate icon set required by macOS
nicns --in app-icon.png --out app-icon.icns

Use a high-quality, square-shaped PNG -- transparency will be preserved and file size doesn't matter since the files will live on your machine.

使用高质量的方形PNG-将保留透明性,并且文件大小并不重要,因为文件将保留在您的计算机上。

创建应用 (Creating the App)

nativefier provides a whole host of configuration parameters you can use to create your app.  Let's create an app using many of the useful parameters:

nativefier提供了许多配置参数 ,可用于创建应用程序。 让我们使用许多有用的参数创建一个应用程序:


nativefier \
--name "David Walsh Blog" \
--verbose \
--counter \
--icon app-icons.icns \
--fast-quit \
--inject custom-css.css \
--inject custom-js.js \
--flash # gross
"https://davidwalsh.name"

A directory named "{appname}-darwin-x64" will be generated and within that directory will be the app file, which you can drag to your Applications folder (or whatever your OS equivalent is) and to your dock.  You'll note that you can add custom user JavaScript and CSS files so that you can hide advertisements, modify colors and behavior, and so on.  The --counter argument is particularly interesting -- a web app like Gmail that updates its <title> tag as a pseudo-notification will trigger a red notification dot over the app icon when an update is made.

将生成一个名为“ {appname} -darwin-x64”的目录,该目录中将包含该应用程序文件,您可以将其拖到“ Applications文件夹(或任何等效于OS的文件夹)中,并拖到扩展坞中。 您会注意到,您可以添加自定义用户JavaScript和CSS文件,以便隐藏广告,修改颜色和行为等。 counter argument特别有趣-像Gmail这样的网络应用程序将其<title>标记更新为伪通知时,会在进行更新时在应用程序图标上触发一个红色的通知点。

Web apps like IRCCloud and websites like DevDocs are perfect candidates for conversion to desktop app.

Web应用程序像IRCCloud和喜欢的网站DevDocs是用于转换为桌面应用程序,完美的候选人。

Thanks to Byron Jones for letting me know about nativefier!

感谢拜伦·琼斯(Byron Jones)让我知道了nativefier!

翻译自: https://davidwalsh.name/convert-websites-apps

如何将应用转换成系统应用

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_727212.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

女朋友想让我的网站下点雪,我立马打开电脑…(附源码)

点击上方[全栈开发者社区]→右上角[...]→[设为星标⭐]前言女朋友常逛的设计网站这两天页面上多了下雪的效果&#xff0c;于是问我我的网站能下雪吗&#xff0c;作为一个程序员我一般会说实现不了&#xff0c;但是作为男朋友&#xff0c;不能说不行。雪雪我们可以使用span标签和…

amazon s3_在Amazon S3上托管网站

amazon s3Everyone knows that Amazon S3 is great for storing files. Its fast, inexpensive, and easy to setup. What you may not realize is that you can also host static websites on this robust platform. 众所周知&#xff0c; Amazon S3非常适合存储文件。 它快速…

linux文件服务器用途,文件服务器CPU篇 - 构建文件服务器:OS与CPU应用选择篇_服务器应用_Linux公社-Linux系统门户网站...

文件服务器CPU篇文件服务器的主要用途是存储&#xff0c;而不是处理能力&#xff0c;特别是家庭文件服务器而言&#xff0c;包括处理器在内部件都应该让位于硬盘、机箱和电源。文件服务器不需要最新的处理器&#xff0c;对于可能从来没必要将数据同时分发到多个客户机的文件服务…

必看,程序员应该访问的最佳网站

【公众号回复 “1024”&#xff0c;免费领取程序员赚钱实操经验】大家好&#xff0c;我是章鱼猫。今天给大家推荐的这个项目是「Best-websites-a-programmer-should-visit-zh」—— 程序员应该访问的最佳网站中文版&#xff0c;一些对程序员有用的网站。在学习 CS 的时候有一些…

查找微信公众号服务器,墨涩网 - 免插件实现微信公众号搜索连接wordpress网站文章——墨涩网...

微信公众号当前是每个用户都在使用的功能&#xff0c;而使用wordpress程序的站长会希望把自己的网站连接到微信公众号。连接后通过公众号访问网站的内容。目前网上有很多可以实现微信公众号和wordpress网站链接的插件很多&#xff0c;个人觉得醉的最好的应该是功能强大的水煮鱼…

php 网站语言切换,php 多语言切换

目录结构&#xff1a; // 文件内容&#xff1a; /include/language.php Java代码 ?php $languagesarray(); $languages[ zh-cn ][ name ] china ; $languages[ zh-cn ][ image ] flag1.jpg ; $languages[ en ][ name ] english目录结构&#xff1a;//文件内容&#xff1a;/inc…

突发:全球最大的同性交友网站挂了,修复长达四个小时的背后是一个悲伤的故事...

loonggg读完需要3分钟速读仅需 1 分钟今天下午&#xff0c;作为全球最大的同性交友网站&#xff1a;GitHub&#xff0c;突然挂了&#xff0c;一直在这两张图中间来回切换。再刷新一下&#xff0c;从 500 变成了小马&#xff0c;你还别说&#xff0c;我仔细看这个小马&#xff0…

2017年最受欢迎的10个编程挑战网站

来源&#xff1a;CSDN大数据 作者&#xff1a;Daniel Borowski 本文长度为1704字&#xff0c;建议阅读4分钟 如果你想不断地提高自己的编程技能&#xff0c;那么不断尝试去解决那些编程中的难题&#xff0c;这是一个非常不错的途径。本文为你列举了10个编程挑战网站&#xff0c…

透过日播放量超过6亿的《延禧攻略》,看2018视频网站格局

作者介绍徐麟目前就职于上海唯品会产品技术中心&#xff0c;哥大统计数据狗&#xff0c;从事数据挖掘&分析工作&#xff0c;喜欢用R&Python玩一些不一样的数据文章来源数据森麟如需转载&#xff0c;请联系原作者授权前言随着《延禧攻略》的播出&#xff0c;魏璎珞、富察…

看看黑客是如何攻破一个网站的?网友:原来...

点击上方[全栈开发者社区]→右上角[...]→[设为星标⭐]点击领取全栈资料&#xff1a;全栈资料通过本文你将了解黑客常用的入手思路和技术手法&#xff0c;适合热爱网络信息安全的新手朋友了解学习。本文将从最开始的信息收集开始讲述黑客是如何一步步的攻破你的网站和服务器的。…

有哪些网站,一旦知道,你就离不开了?

loonggg读完需要5分钟速读仅需 2 分钟大家好&#xff0c;我是你们的校长。感觉好久没有给大家分享工具类的好东西了&#xff0c;今天给大家分享几个好东西。作为程序员&#xff0c;一个技术人员&#xff0c;我从工作的角度和职场的角度给大家推荐几个非常不错的网站吧&#xff…

添加javascript_使用JavaScript将搜索添加到您的网站

添加javascriptStatic website generators like Gatsby and Jekyll are popular because they allow the creation of complex, templated pages that can be hosted anywhere. But the awesome simplicity of website generators is also limiting. Search is particularly ha…

不吸吮的网站建设者

我从不追求真棒 (I Never Pursue My Awesome Ideas) Im constantly struck with ideas for new web projects. Unfortunately, I rarely act on them because I have too little time and theyre too much of a hassle to see through. 我一直对新的Web项目的想法感到惊讶。 不…

GitHub Star 10K,让你的网站更炫酷的开源库

【公众号回复 “1024”&#xff0c;免费领取程序员赚钱实操经验】大家好&#xff0c;我是你们的章鱼猫。现在不少网站都支持了骨架屏&#xff0c;能够在网页数据加载前&#xff0c;展示固定的布局&#xff0c;能够减少用户在进入网页时感受到白屏的不适感。今天要给大家推荐一个…

bootstrap网站框架_启动框架:网站构建器,Bootstrap主题等

bootstrap网站框架One conclusion that Ive come to when evaluating my skills is that Im not a designer. Each time I redesign this blog, I identify a few sites I like and then meld them together. Of course that means I end up with UI components that dont lo…

牛逼啊,这两个程序员生财案例网站

loonggg读完需要4分钟速读仅需 2 分钟今天是日更生财技能的第二天。我决定每天写一篇生财感悟类的文章&#xff0c;带领大家每天「钱近」一小步。今天我读「生财日历」上 2 号的内容&#xff0c;上面讲的是一个变现超过 100 万美元的国外网课销售漏斗模型的案例。大致内容讲的就…

相亲网站比自己优秀的男人太多?单身程序员惊现神操作!

戳蓝字“CSDN云计算”关注我们哦&#xff01;话说&#xff0c;今年还有不到一个月就要过去了&#xff0c;作为一个单身狗的小编&#xff0c;看着大街上一个个成双成对的情侣&#xff0c;不由感到悲从心来&#xff0c;只能妄图从新闻中寻找一丝安慰。结果你别说&#xff0c;我最…

SEO核心技术纯白帽快速排名方法

我相信很多朋友都知道SEO快速排名&#xff0c;现在流行的快速排名都是众人皆知的黑帽SEO技术&#xff0c;但是却唯独不知道纯白帽也可以快速排名。但是我估计大家都看到过很多新站在短短数月内就上了首页&#xff0c;权重从0升到3&#xff0c;这难道是黑帽吗&#xff0c;不是的…

聊聊云计算:为什么构建网站时常会用到负载均衡

戳蓝字“CSDN云计算”关注我们哦&#xff01;作者&#xff1a;疯子程序员来源&#xff1a;https://blog.csdn.net/qq_40196321/article/details/85075746 负载均衡可以将客户端请求分摊到多个操作单元上进行处理硬件负载均衡负载均衡有很多种不同的实现方式&#xff0c;总的来说…

java比递归查询更快方法_使网站更小更快的5种方法

java比递归查询更快方法Confession: Id say once a week I genuinely wish I was a kid who spent his work day cutting grass and doing landscaping. Why? Because at the end of the day, they are able to say "the grass is cut, the job is complete." A…