Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Command line options for reading a .nsd file and saving it as PNG/PDF/... #1171

Closed
rpxrpxrpx opened this issue May 29, 2024 · 3 comments
Assignees
Labels
enhancement Fixed Implemented (though possibly still not delivered)
Milestone

Comments

@rpxrpxrpx
Copy link

Hi.

It would be great if there were command line options to instruct Structorizer to read a .nsd file and export a picture or even code.

Example: Structorizer --export-png myfile.nsd
(Structorizer should read the .nsd file and export a .png file.)

It would be (among other scenarios) useful for the following: LaTeX documents that include structograms are stored in git repositories and only the .nsd files are checked in. With command line options as proposed above utilities like make could build all required .png files from the .nsd files automatically.

(This feature request is inspired by the transfig utility that transforms .fig files from xfig to lots of other formats.)

Thank you for reading this request.

@codemanyak codemanyak self-assigned this May 29, 2024
@codemanyak
Copy link
Collaborator

codemanyak commented May 29, 2024

@rpxrpxrpx

It would be great if there were command line options to instruct Structorizer to read a .nsd file and export a picture or even code.

Thank you for your proposal. The possibility to export code via command line parameters has been existing for many years. Have a look at the User Guide. This even includes pseudo code and StrukTeX export, which both allow integration into LaTeX texts. StrukTeX code actually represents LaTeX commands for graphical representation of the diagram (though looking different from the original diagrams as rendered by Structorizer itself).

It should be feasible to provide a command-line ("batch") conversion to picture files in e.g. png or pdf format, too.

@codemanyak
Copy link
Collaborator

codemanyak commented Oct 8, 2024

Eventually, I found the time for some tests. It works for .nsd files, and I am optimistic to get it working for arrangements (.arr, .arrz files), too. The proposed additional command line syntax will be:
Structorizer (-i|--image) (png|emf|pdf|svg) [-s SETTINGSFILE] [-o OUTDIR] (NSDFILE|ARRSPEC|ARRZSPEC)...

On this occasion, I bumped into an obsolete feature: The export as Flash file. I started a poll to abandon it.

@codemanyak codemanyak added this to the Release 3.33 milestone Oct 8, 2024
@codemanyak codemanyak added the Fixed Implemented (though possibly still not delivered) label Oct 9, 2024
@codemanyak
Copy link
Collaborator

codemanyak commented Oct 9, 2024

The enhancement is ready for delivery with next Structorizer version (3.32-23).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Fixed Implemented (though possibly still not delivered)
Projects
None yet
Development

No branches or pull requests

2 participants