powerpage

2025-12-10 0 594

Introduction

PowerPage is a lightweight web browser with DB capability
and windows accessibility, for rapid development of HTML/Javascript application.

Powerpage will connect to database, load startup page using Microsoft web-browser control (equivalent to IE11),
and communicate with html/js page by pb:// or ps:// protocol to provide below features

  • (Run) Call External Program
  • (File) Access file system
  • (DB) Database Accessibility
  • (PB) Call Powerbuilder Windows/Functions
  • (Misc) Global variables, sessions information

Motivation

For security reason, all browsers are working hard to prevent unauthorized access of OS resources (ie. printer, files, database etc..).
In other side, developers working hard to access OS resources for application development. Development within web-browser just like
a game of police-theft.

I had longed for a web browser which has DB connectivity and OS accessibility,
so that can coding HTML/JavaScript application like Electron.

Somehow, quite frustrated in many \”installation\” works, to setup development environment and deploy application.
It always goes wrong by unknown reasons and stuck into unknown situations.
What I want is \”copy-and-run\” and \”code-and-play\” (i.e. no installation, no compile, no deployment).

I try to make \”Powerpage\” solution for this purpose.

Features

Powerpage is a ready-make Electron-like solution. No install, no compile, no packing.
Just open editor to start coding.

  • Portable solution. No installation
  • Single execute file. No deployment.
  • No dependence, pure html/javascript/css
  • Code-and-Play instantly
  • Make use of javascript library (which support IE11)
  • Command Line for multiple purpose (e.g. save url page, generate PDF)
  • Work with Powerbuilder (e.g. call powerbuilder window/function/datawindow)

ps: due to the limitation of Microsoft web-browser control, Powerpage web browser is equivalent to IE11 (not chrome)!

Run Powerpage

Powerpage is a single executable program. just download and run powerpage.exe.

  • Simply download from release folder, unzip the file, and run powerpage.exe
  • Source code and latest version can be downloaded from \”source\” folder.

Files & Applications

  • powerpage.exe is the executable file of powerpage. (single executable file)
  • powerpage.html is the startup html file (i.e. javascript/html application)
  • powerpage.ini is the config file for DB connection and misc setup
  • powerpage.js is the initial javascript lib for interface
  • *.dll is Powerbuilder run-time files

Source code

Powerpage is developed by Powerbuilder 10.5, source code is powerpage.pbl (only one file)

  • powerpage.pbl is powerbuilder source code
  • powerpage.pbt is powerbuilder target file
  • exported source entries can be found under folder src*
  • to compile the program, add powerpage.pbt to workspace, and compile by p_powerpage

Applications

  • pp-md-editor.html is pp-application of \”Powerpage Markdown Editor\”
  • pp-web-crawler.html is pp-application of \”Powerpage Web Crawler\”

How PowerPage work?

Powerpage open a window with MS WebBrowser Control. When HTML page is loaded, Powerpage will import powerpage.js
to initialize pb javascript object to provide Powerpage interface.

HTML page may via the following channel to talk to main program

  1. recommended call by javascript: pb.apiFunction(), e.g. pb.run(\’notepad.exe\’)
  2. by url: <a href=\"pb://command/parameters\">Text</a> or window.location = \"pb://command/parameters\"
  3. by change title: document.title = \"pb://command/parameters\"

Powerpage will interpret and execute the command, and pass the result to HTML page by calling js function pb.router(callback, result, type, cmd)

for example:

  • Run notepad.exe to edit powerpage.ini -> javascript:pb.run(\'notepad.exe powerpage.ini\') or pb://run/notepad.exe powerpage.ini
  • Run SQL1 and callback showData() -> javascript:pb.callback(\'showData\').db.query(sql1) or pb://callback/showData/db/query/@sql1
  • Run update SQL2 -> javascript:pb.db.execute(sql3) or pb://db/execute/@sql3
  • Call About window -> javascript:pb.window(\'w_about\') or pb://window/w_about

Documentation

please refer to latest documents in github-page: https://casualwriter.g*i*t*hub.io/powerpage

  • Home
  • API Reference
  • Development Guide

Command Line

Beside running html/javascript applications, Powerpage has wide usage by using command-line parameters.

powerpage.exe /ini={ini-file} /url={start-url}  /script={script-file} /fullscreen /print /silent
              /save={save-html} /pdf={output-pdf-file} /select={selector} /delay={1000}
  • /ini={ini-file} specifies ini setting file. Aplication could be changed by change the ini file.
  • /url={start-url} is used to specify startup link. Aplication could be changed by change startup link.
  • /script={script-file} will specify user-defined javascript instead of powerpage.js. useful for js injection.
  • /fullscreen or /kiosk will run in fullscreen mode, useful for kiosk, or display board.
  • /silent will run in silent mode (i.e. suppress js error message)
  • `/print“ will load startup url, print and close program.
  • /save={save-html} will load startup url, save to html file, and close program. Useful for web-crawler
  • /pdf={output-pdf-file} will load startup url, generate PDF file, and close program. useful for PDF generation.
  • /delay={1000} specifies delay time (by milliseconds) for print/save/pdf options
  • /select={css-selector} is applied for print/save to select part of html elements. Useful for web-crawler

Samples of using command-line

General Usage

  • powerpage.exe /ini=pp-md-editor.ini run \”Powerpage Markdown Editor\” with its config ini
  • powerpage.exe /url=pp-md-editor.html run \”Powerpage Markdown Editor\”
  • powerpage.exe /url=pp-web-crawler.html run \”Powerpage Web Crawler\”
  • powerpage.exe /url=pp-kanban.html /fullscreen run Kanban display board in fullscreen mode
  • powerpage.exe /url=pp-md-document.html open \”Powerpage Documents\”
  • powerpage.exe /url=facebook.com /script=myfacebook.js“ inject js script for facebook.com

print page or save to html/pdf

  • powerpage.exe /url=http://ha*odoo.net**/ /print print page of haodoo.net
  • powerpage.exe /url=http://ha*odoo.net**/ /pdf=haodoo.pdf save the page of haodoo.net to PDF file
  • powerpage.exe /url=http://ha*odoo.net**/ /save=haodoo.html save page \”haodoo.net\” to haodoo.html

save web content to file (whole page or select by css-selecotr)

  • powerpage.exe /url=https://*pings*h*an-tech.com/powerpage/doc /save=README.html save powerpage README (whole page)
  • powerpage.exe /url=https://*pings*h*an-tech.com/powerpage/doc /save=README.html /select=#content save powerpage README (#content:outerHTML)
  • powerpage.exe /url=https://*pings*h*an-tech.com/powerpage/doc /save=README.html /select=@#content save powerpage README (#content:innerText)
  • powerpage.exe /url=https://*pings*h*an-tech.com/powerpage/doc /save=README.html /select=#right-panel save powerpage README (#right-panel)

save github content to html/pdf (select==.markdown-body)

  • powerpage /url=https://*g*ith*ub.com/casualwriter/powerpage /save=README.html /select=.markdown-body to save README from github (has error msg)
  • powerpage /url=https://*g*ith*ub.com/casualwriter/powerpage /save=README.html /select=.markdown-body /silent to save README from github (silent mode)
  • powerpage /url=https://*g*ith*ub.com/casualwriter/powerpage /pdf=README.pdf /select=.markdown-body /silent to save in PDF format

Application Samples

Powerpage is released with some sample applications.

  • Powerpage as Quick Reference, or self-demonstration
  • Powerpage – Markdown Editor
  • Powerpage – Web Crawler
  • Powerpage – Document By Markdown

Modification History

  • 2021/05/07, v0.41, initial version of Powerpage
  • 2021/05/14, v0.43, code simple markdown editor powerpage-md-editor
  • 2021/06/03, v0.48, generate PDF report (using wkhtmltopdf.exe)
  • 2021/06/16, v0.50, more command line options
  • 2021/07/02, v0.54, crawl web function, code powerpage-web-crawler
  • 2021/07/08, v0.55, refine powerpage, update powerpage-web-crawler
  • 2021/10/05, v0.57, code document framework, and markdown parser
  • 2021/10/14, v0.60, align all version (powerpage-md-editor,powerpage-web-crawler) to v0.60
  • 2021/10/20, v0.62, refine markdown parser; update pb source to \\src*.*
  • 2021/11/02, v0.63, remove local documents, host in github-page now.

下载源码

通过命令行克隆项目:

git clone https://github.com/casualwriter/powerpage.git

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

申明:本文由第三方发布,内容仅代表作者观点,与本网站无关。对本文以及其中全部或者部分内容的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。本网发布或转载文章出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,也不代表本网对其真实性负责。

左子网 编程相关 powerpage https://www.zuozi.net/33468.html

Budgie Dock
上一篇: Budgie Dock
opencred
下一篇: opencred
常见问题
  • 1、自动:拍下后,点击(下载)链接即可下载;2、手动:拍下后,联系卖家发放即可或者联系官方找开发者发货。
查看详情
  • 1、源码默认交易周期:手动发货商品为1-3天,并且用户付款金额将会进入平台担保直到交易完成或者3-7天即可发放,如遇纠纷无限期延长收款金额直至纠纷解决或者退款!;
查看详情
  • 1、描述:源码描述(含标题)与实际源码不一致的(例:货不对板); 2、演示:有演示站时,与实际源码小于95%一致的(但描述中有”不保证完全一样、有变化的可能性”类似显著声明的除外); 3、发货:不发货可无理由退款; 4、安装:免费提供安装服务的源码但卖家不履行的; 5、收费:价格虚标,额外收取其他费用的(但描述中有显著声明或双方交易前有商定的除外); 6、其他:如质量方面的硬性常规问题BUG等。 注:经核实符合上述任一,均支持退款,但卖家予以积极解决问题则除外。
查看详情
  • 1、左子会对双方交易的过程及交易商品的快照进行永久存档,以确保交易的真实、有效、安全! 2、左子无法对如“永久包更新”、“永久技术支持”等类似交易之后的商家承诺做担保,请买家自行鉴别; 3、在源码同时有网站演示与图片演示,且站演与图演不一致时,默认按图演作为纠纷评判依据(特别声明或有商定除外); 4、在没有”无任何正当退款依据”的前提下,商品写有”一旦售出,概不支持退款”等类似的声明,视为无效声明; 5、在未拍下前,双方在QQ上所商定的交易内容,亦可成为纠纷评判依据(商定与描述冲突时,商定为准); 6、因聊天记录可作为纠纷评判依据,故双方联系时,只与对方在左子上所留的QQ、手机号沟通,以防对方不承认自我承诺。 7、虽然交易产生纠纷的几率很小,但一定要保留如聊天记录、手机短信等这样的重要信息,以防产生纠纷时便于左子介入快速处理。
查看详情

相关文章

猜你喜欢
发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务