Code Monkey home page Code Monkey logo

ohmysvg's Introduction

Oh My SVG

Reduce the size of SVGs

screenshot

Download on Flathub

About

Oh My SVG let you export unoptimized SVG files into smaller versions.

Under the hood, it uses SVGO to remove or approximate information that is not required for rendering.

It lets you preview and tweak the parameters to obtain a satisfactory result before saving.

Remember that Oh My SVG removes information and metadata that may be useful, do not overwrite your original/source SVG files.

Installation

Setup flatpak then

flatpak install re.sonny.OhMySVG
flatpak run re.sonny.OhMySVG

Roadmap

  • better icon
  • zoom in and out
  • out of process svgo
    • toggling switches not smooth
    • block UI threads
  • rasterize
    • Export to png
    • Export to webp
  • UI
    • Filename as headedr bar subtitle
    • Already optimized ๐ŸŽ‰
    • basic/advanced plugins
  • support drag'n drop file https://gitlab.gnome.org/GNOME/gtk/-/issues/3094
  • support pasting file
  • support copying file
  • show original / compare original
  • preview in browser
  • compared gzipped

Development

cd OhMySVG
./re.sonny.OhMySVG src/car-lite.svg

Make changes and hit Ctrl+Shift+Q on the window to restart the application.

To pass the tests you have to install a few dependencies:

# Install development dependencies with dnf (Fedora)
sudo dnf install --assumeyes npm flatpak make desktop-file-utils gjs gtk4-devel libadwaita-devel

# Install development dependencies with apt (Debian, Ubuntu)
sudo apt-get install --assume-yes npm flatpak make desktop-file-utils gjs libgtk-4-dev libadwaita-1-dev

# The rest is distribution-agnostic once other dependencies have been resolved
npm install
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak install --user --assumeyes --noninteractive flathub org.freedesktop.appstream-glib

# Run tests, may fail in sandboxed environments (i.e. Snap/Flatpak)
make test

Flathub builds https://flathub.org/builds/#/apps/re.sonny.OhMySVG

Building

host
meson --prefix $PWD/install build
ninja -C build install
Flatpak

Use GNOME Builder or

flatpak-builder --user --force-clean --install-deps-from=flathub --install flatpak re.sonny.OhMySVG.json

Credits

Oh My SVG is powered by SVGO and inspired by SVGOMG.

License

GPLv3. Please see COPYING file.

Bookmarks

ohmysvg's People

Contributors

sethfalco avatar snwh avatar sonnyp avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

ohmysvg's Issues

Request: Please do releases on github

Hi!

I don't use flatpak. Github has a feature where you can get notified when someone makes a release from a repository. A tag is not enough, one has to use the Releases feature.

Would it be possible to start using it? You don't need to publish anything really, github automatically tars up the repository and attaches it to the release, and you can do it at the same time as you create the version tag.

Unfortunately it's not possible to be notified of tags, as far as I know.

Thank you! If the answer is "no", just close the issue.

Potential Feature: XML view

While the visual optimization view is nice, it may be worthwhile having a view switcher to allow seeing the markup/xml optimizations as well as the visual.

Some UI Quibbles

  • the Save as button could be moved to the headerbar as a primary action and use text instead of an icon so it is more clear

image

  • the precision and features headings should use the heading class instead of title-2
    image

  • it is unclear what "Precision" means (is this the most accurate term for what this slider affects?) and the numbers do not convey meaning--what does "precision = 0" mean? This might be solved by defining the two extremes with a string label.

image

  • the big list of switches under Features is pretty cumbersome, it might be nice to break them into groups of related options to make it a bit more understandable

On narrow width the preview is not very viewable

If there's an interest in making this application adaptive or usable on mobile form factors, it would be nice if the preview for the image were visible at narrower window sizes--potentially by reflowing the UI so the preview fits in the top of the window.

image

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.