Inkscape.org
Creating New Extensions Including document metadata in a textpath
  1. #1
    GerBNL GerBNL @GerBNL

    Hi,

    I'm not quite sure whether my question really is a beginners question, but i'm certainly a beginner as this is my first post. Mucking around with Inkscape 1.3 (beta now) on a MacBook Pro M1. My interest is in tesselations of any kind. I'm also a data nerd of sorts wanting (imho not so) weird things and this weekend i stumbled over my first Inkscape one. Hence this post.

    What i want is to include a variable or macro in a text string to be rendered to it's content at printing (saving?) time. Think along the lines of date-, time strings, but also the metadata and licensing information from the document properties. Or even something random within the UFT space?

    I've a feeling as such it could be (a) function(s) in the default text extension. Or maybe there already is such an extension? Of maybe the is a reason why it's totally impossible and i'm not thinking straight?

     

  2. #2
    Polygon Polygon @Polygon🌶

    not sure but does Text->Unicode Characters… probably help?

  3. #3
    GerBNL GerBNL @GerBNL

    Hi Polygon! Thanks, but that's not what i mean. I figure i shouldn't have put the UTF reference in my post (misspelled even).

    In the document properties (shift-command-d) there is a tab named Metadata. (and License).

    I want to be able to include whatever is entered there in a string in the text tool. Same for 'current' date and time strings. (where 'current' is to be interpret as last save/print date/time). That way a print can be easily 'watermarked'/identified.

     

  4. #4
    Jurgen Gaeremyn Jurgen Gaeremyn @JurgenG

    Hey, basically an SVG-file is an XML file.

    So open it up in a document editor.

    With some basic Javascript (or TS) you can reference elements in the DOM.

    I know this isn't really a beginner-friendly answer, but maybe just the answer a data-nerd might be able to handle ;)

  5. #5
    inklinea inklinea @inklinea⛰️

    To get good text layout / sizing takes work. 

    However if it doesn't have to be perfect, reasonably straightforward.

    Parse the metadata, create text elements , or if a path is selected, stick on the path.

    Metadata
  6. #6
    inklinea inklinea @inklinea⛰️
    🔥

    Another thing exists in the Universe:

    https://gitlab.com/inklinea/print-metadata

  7. #7
    GerBNL GerBNL @GerBNL

    Wow, Inklinea!  Too bad the datetime isn't there, but this already close to something workable for me!

    I imagined something different, but an extension like this might do the job brilliantly. Maybe even better, since it needn't be very complicated.

    And the best thing is i get to see how it's done.

    Thank you very much!

  8. #8
    inklinea inklinea @inklinea⛰️

    I only hope to inspire others to write extensions :)

    The file has to be saved for date/time to work.

    I use the Inkscape extension system to write t hings that have do not even use Inkscape ;) 

    ffmpeg encoding script for example.

Inkscape Inkscape.org Inkscape Forum Creating New Extensions Including document metadata in a textpath