All Projects → iffy → lhtml

iffy / lhtml

Licence: Apache-2.0 License
An app for working with local HTML files.

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to lhtml

Clean-macOS
💻 A simple script to setup a clean environment on macOS
Stars: ✭ 155 (+80.23%)
Mutual labels:  mac
sudoers manager
A standalone Python script to help administrators manage their sudoers file.
Stars: ✭ 28 (-67.44%)
Mutual labels:  mac
YellowDot
Hide the macOS yellow recording dot in the corner of your screen
Stars: ✭ 21 (-75.58%)
Mutual labels:  mac
changemac
change mac address of linux ,ubuntu
Stars: ✭ 17 (-80.23%)
Mutual labels:  mac
SwiftAudioPlayer
[WIP] Simple music player for macOS written in Swift
Stars: ✭ 33 (-61.63%)
Mutual labels:  mac
Geek Blog
基于Vue+Nuxt.js服务器渲染(SSR)搭建的个人博客系统
Stars: ✭ 33 (-61.63%)
Mutual labels:  mac
DELL-Alienware-Aurora-R7-macOS
Full working macOS deployment for DELL Alienware Aurora R6/R7/R8 desktop.
Stars: ✭ 43 (-50%)
Mutual labels:  mac
macOS-Tips
macOS 系统的使用技巧介绍、常用软件推荐、效率工具推荐。
Stars: ✭ 23 (-73.26%)
Mutual labels:  mac
TelegramShillBot
A simple Telegram bot, written in Python, that you can use to shill (i.e. send messages) your token, or whatever, to channels.
Stars: ✭ 42 (-51.16%)
Mutual labels:  mac
govarnam
Easily Type Indian Languages on computer and mobile. GoVarnam is a cross-platform transliteration library. Manglish -> Malayalam, Thanglish -> Tamil, Hinglish -> Hindi plus another 10 languages. GoVarnam is a near-Go port of libvarnam
Stars: ✭ 97 (+12.79%)
Mutual labels:  mac
ngx-ip
An Angular network address component (IPv4, IPv6 and MAC)
Stars: ✭ 20 (-76.74%)
Mutual labels:  mac
pre-commit-macadmin
Pre-commit hooks for Mac admins.
Stars: ✭ 43 (-50%)
Mutual labels:  mac
GNU-bash-mac-installer
Downloads and builds a Mac package installer for GNU bash 5
Stars: ✭ 17 (-80.23%)
Mutual labels:  mac
ikyle.me-code-examples
Smaller code examples from my blog posts on ikyle.me
Stars: ✭ 29 (-66.28%)
Mutual labels:  mac
csak
Cartel Swiss Army Knife for Android devices - easy to use toolkit for Android devices
Stars: ✭ 18 (-79.07%)
Mutual labels:  mac
DockBuilder
A LaunchAgent and .app to build a user's Dock upon login and/or on demand.
Stars: ✭ 39 (-54.65%)
Mutual labels:  mac
mesh-botnet
🐍 Proof-of-concept python IRC botnet for orchestrating macOS computers (harmless due to SIP & Gatekeeper)
Stars: ✭ 73 (-15.12%)
Mutual labels:  mac
hosts
🄯Curated lists of hosts files with various domain blocks.🄯
Stars: ✭ 15 (-82.56%)
Mutual labels:  mac
WebDAVServerSamples
WebDAV, CalDAV & CardDAV server examples in C# and VB based on IT Hit WebDAV Server Engine for .NET
Stars: ✭ 39 (-54.65%)
Mutual labels:  mac
HEIC-to-JPG-right-click-converter
HEIC to JPG converter with one click integration into Mac OS X
Stars: ✭ 19 (-77.91%)
Mutual labels:  mac

Build Status

LHTML

An LHTML file is a packaged web application with the ability to save itself. Think PDFs but with web technologies. For a demo, watch this video:

LHTML Demo

The current application is considered Alpha-quality. Use at your own risk, and all that.

Installation

Making LHTML files

To create an LHTML file, create an index.html file:

<!DOCTYPE html>
<html>
<head>
    <title>My LHTML file</title>
</head>
<body>
    Name: <input type="text">
</body>
</html>

then zip it up. On Linux/macOS do:

zip myfirst.lhtml index.html

Now you can open the file, type in the inputs, save it, email it, copy it, etc...

Resources

If you want to include CSS or JavaScript files, include them in the zip and reference them with relative paths. For example:

<head>
  <link type="text/css" rel="stylesheet" href="style.css" media="screen,projection">
  ...
</head>
...
zip myfirst.lhtml index.html style.css

External Resources

LHTML files are not allowed to access resources over the network. This is intentional for security reasons.

API

LHTML viewers provide a small JavaScript API to index.html files within the LHTML object. Available endpoints are described in api.md.

Why not just use Electron?

This LHTML viewer is built with Electron, so I obviously think Electron is a good choice for making apps. And it may make more sense for you to use Electron if you need full filesystem access, network access or any of the other features Electron provides.

But if you're making documents (or document-like things), you don't want to build and install an entirely new Electron app for each document.

How secure is this?

Security of LHTML hasn't yet been fully vetted. Some precautions have been taken, but we should do a full security audit before you open Internet-stranger's LHTML files. Here's what we do:

  • All documents are loaded in a sandboxed <webview> tag
  • Documents have no access to node stuff (if the sandbox of <webview> is working as designed)
  • Access to file:// resources is forbidden to documents.
  • Access to https?:// resources is forbidden to documents.
  • Documents shouldn't be able to open new windows (need to verify this for all cases), so they can't open fake system dialogs, hopefully.
  • Documents are limited in size (currently hard-coded at 10MB, but with plans to make it configurable) to prevent documents from filling up hard drives

Insecurish things:

  • Currently, LHTML files are unzipped to a temporary directory, then zipped back up to overwrite the original. If an attacker sneaked something into that temporary directory, it would end up back in the zipped LHTML.

Development

To run the application in development mode do:

yarn install
node_modules/.bin/electron .

You can set the process and browser logging levels with the LOGLEVEL and JS_LOGLEVEL environment variables.

LOGLEVEL=warn JS_LOGLEVEL=debug electron .

Packaging

To do cross-platform builds, see this guide

To package the application, do one of these:

build --win --mac --linux --ia32 --x64

You can omit whichever arch/platform you don't need to build.

Releases

To manually create a draft release, you'll need a GH_TOKEN with repo scope access. Generate one on GitHub (in Settings somewhere). Once you have the token do:

GH_TOKEN="..." dev/publish/publish.sh

Update CHANGELOG.md with:

dev/publish/updatechangelog.sh
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].