Giter VIP home page Giter VIP logo

ewwxml's People

Contributors

axarva avatar undefineddarkness avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

axarva wigsinator

ewwxml's Issues

npx support

This tool is great. Can it be added to npm so that you can run this command instead of what is in your readme?

npx ewwxml <PATH-TO-EWW-XML-FILE> <PATH-TO-YUCK-FILE>

Incomplete translation to object within <definitions> block

Before:

...
	<definitions>
...
		<def name="slider-vol">
			<box>
				
				<scale min="0" max="101" value="{{volume}}" onchange="amixer -D pulse sset Master {}%"/>
				{{volume}}%
			</box>
		</def>
		<def name="slider-bat">
			<box class="{{if 15 > battery-level && battery-status == 'Discharging'
				then 'red'
				else if battery-level > 80 && battery-status == 'Charging'
				then 'green'
				else ''}}">
				{{if battery-level > 99
					then ''
					else if battery-level > 90
					then ''
					else if battery-level > 80
					then ''
					else if battery-level > 70
					then ''
					else if battery-level > 60
					then ''
					else if battery-level > 50
					then ''
					else if battery-level > 40
					then ''
					else if battery-level > 30
					then ''
					else if battery-level > 20
					then ''
					else if battery-level > 10
					then ''
					else ''
				}}{{if battery-status == 'Charging'
					then ' '
					else ''
				}}{{if battery-level > 80 && battery-status == 'Charging'
					then ' '
					else ''
				}} {{battery-level}}% 
			</box>
		</def>

...
	</definitions>
...

After:

...
		(defwidget slider-vol [] 
			(box>""<scale :min 0 :max 101 :value volume :onchange "amixer -D pulse sset Master {}%")"
				${volume}%
			"</box>)
		(defwidget slider-bat [if 15 > battery-level && battery-status == 'Discharging'
				then 'red'
				else if battery-level > 80 && battery-status == 'Charging'
				then 'green'
				else ''] 
			(box :15  :class  :{{if   battery-level && battery-status == 'Discharging'
				then 'red'
				else if battery-level > 80 && battery-status == 'Charging'
				then 'green'
				else ''}}">
				{{if battery-level > 99
					then ''
					else if battery-level > 90
					then ''
					else if battery-level > 80
					then ''
					else if battery-level > 70
					then ''
					else if battery-level > 60
					then ''
					else if battery-level > 50
					then ''
					else if battery-level > 40
					then ''
					else if battery-level > 30
					then ''
					else if battery-level > 20
					then ''
					else if battery-level > 10
					then ''
					else ''
				}}{{if battery-status == 'Charging'
					then ' '
					else ''
				}}{{if battery-level >" 80 && battery-status == 'Charging'
					then ' '
					else ''
				} ${battery-level}% 			"))
...

There's partial XML in the first, and the && is invalid in yuck

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.