GithubHelp home page GithubHelp logo

floppe / nextion2text Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mmmzzzz/nextion2text

0.0 0.0 0.0 383 KB

Converts a Nextion HMI file to Text files. Allows f.ex. to see changes in commit diffs.

License: Mozilla Public License 2.0

Python 99.82% Batchfile 0.18%

nextion2text's Introduction

Nextion to Text Converter

Description

This script creates a text file for each page of your Nextion GUI, containing all components of the page, including their properties and the entire source code.

This tool was mainly created to get meaningful commit diffs (which is not possible with the binary HMI file) and to allow you to share your source code with other people as easily as developers are used to. Binary files are simply impractical for development and sharing.

This tool can NOT convert text back to a .HMI file.

Usage

The script is written in Python, v3.8. No additional modules are required. The script offers a couple of options to customize its behavior and output. You can get a full description of all command line options with

python Nextion2Text.py -h

For most basic usage, simply run

python Nextion2Text.py -i PATH_TO_HMI_FILE -o FOLDER_FOR_TEXT_FILES

Note that by default, visual properties (x/y position, colors, pictures, fonts, ...) are not included, see example links below.

Features and Limitations

Known to work with files created with editor version 1.60.x and newer. May work with some 0.5x versions.

Supports all Nextion components, including the Intelligent series components - except for the new TouchCap component (only partially supported without attributes).

However, Intelligent series attributes are only partially supported by now. You can use the --properties unknown (See command line help for more details) option to include unknown attributes, too.

Example

The Example folder contains a HMI file, a subfolder with the resultung text files, and a .cmd file that has been executed to generate the text files. In addition, here are some interesting commits you may want to look at:

License

This repository is licensed under MPL-2.0. My understanding of this license is that you have to make any changes to my code available under a similar license (GPL compatible). However you do not have to share the rest of your work (unlike GPL). It's kind of a compromise between the MIT and the GPL license.

nextion2text's People

Contributors

mmmzzzz avatar jobr99 avatar phibue avatar kant avatar floppe avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.