Code Monkey home page Code Monkey logo

Comments (5)

Potherca avatar Potherca commented on May 19, 2024 1

Ah, I think I am beginning to understand... From the perspective of PlantUML "prepackaged" means it is part of the jar and can be used by !include <whatever> instead of being an external (or local) URL !include .... But it doesn't distinguish the need to make a "sprite" from an image (to be used as an icon) as "packaged".

The PlantUML equivalent of the above could be

@startuml
rectangle "<img:https://avatars.githubusercontent.com/u/195757?s=80&v=4>" as y

[x] --> y
@enduml

but then the question would be if that constitutes an "icon"... 🤔

I think the different concepts in PlantUML (Image, Sprite, Icon) are also slightly skewed and confused. Especially because you can also use <&icon> but only from a predefined list which (as far as I can see) can't even be extended. Then again, I've also never really seen that used in the wild (everybody uses "sprites" instead).

From my perspective, PlantUML is a great tool for all it can do, but I'm very hesitant in suggesting it to new users.
Especially as it has consistently shown to be confusing and inconsistent. 😞

from text-to-diagram-site.

alixander avatar alixander commented on May 19, 2024 1

"prepackaged" means it is part of the jar

yeah that's a reasonable definition -- i'll change it to just "packaged".

The PlantUML equivalent of the above could be

oh, that totally counts, I'll make the change that says PlantUML can load from any URL too. thank you

from text-to-diagram-site.

alixander avatar alixander commented on May 19, 2024

PlantUML, an icon or image can be loaded from any URL

do you have an example? I must've missed it, I was looking at https://plantuml.com/stdlib

from text-to-diagram-site.

Potherca avatar Potherca commented on May 19, 2024

Sure!

For instance, using the example from the gilbarbara-plantuml-sprites repo:

@startuml
!$SPRITESURL = 'https://raw.githubusercontent.com/plantuml-stdlib/gilbarbara-plantuml-sprites/v1.0/sprites'
!include $SPRITESURL/flask.puml
!include $SPRITESURL/kafka.puml
!include $SPRITESURL/kotlin.puml
!include $SPRITESURL/cassandra.puml

rectangle "<$flask>\nwebapp" as webapp
queue "<$kafka>" as kafka
rectangle "<$kotlin>\ndaemon" as daemon
database "<$cassandra>" as cassandra

webapp -> kafka
kafka -> daemon
daemon --> cassandra
@enduml

All "sprites" are loaded from remote files. Sprites are a converted form of image, but the same can be done using images:

@startuml
!$IMAGEURL = 'https://raw.githubusercontent.com/plantuml-stdlib/gilbarbara-plantuml-sprites/master/pngs'

rectangle "<img:$IMAGEURL/flask.png>\nwebapp" as webapp
queue "<img:$IMAGEURL/kafka-icon.png>" as kafka
rectangle "<img:$IMAGEURL/kotlin.png>\ndaemon" as daemon
database "<img:$IMAGEURL/cassandra.png>" as cassandra

webapp -> kafka
kafka -> daemon
daemon --> cassandra
@enduml

from text-to-diagram-site.

alixander avatar alixander commented on May 19, 2024

@Potherca Right but that's a pre-package icon set. That's what the site is saying it can do.

Can it for example use your profile pic?

Screen Shot 2023-04-17 at 1 56 31 PM

https://play.d2lang.com/?script=qlDQtVOo5KrUA4WclUJGSUlBsZW-fmJZYkliUbFeemZJRmlSaXFqUXJ-XklqXolecn6ufqm-oaWpuam5fbGthYFama0JFyAAAP__&

from text-to-diagram-site.

Related Issues (20)

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.