Comments (5)
There are few important things you should know this to become clear to you:
- Path passed with
output
parameter is relative to thepath
! That's not stated in documentation, neither it is obvious. - Considering my example, all of my files were be named: "[FILENAME]-Page-N.png", where:
- [FILENAME] is the original file name (without extension).
- Page is literally the word page (OR its translation to some language, in my case it was sometimes english sometimes russian).
- N is the page number. Regularily, for ordinary
.drawio
diagrams, it will be 1.
Finally I had to use the following steps combination in order to achieve my original goal:
- name: Render .drawio Files
uses: rlespinasse/drawio-export-action@v2
with:
format: png
path: assets
output: .
action-mode: all
# WARNING! This step implies all of the .drawio sources are ONE PAGE diagrams only!
- name: Rename Files
run: for f in assets/*.png; do mv "$f" "$(echo "$f" | sed 's/-.\+-[0-9]\+//g')"; done
from drawio-export-action.
I would also ask the developer for a few improvements, if they will be considered valueable:
- Update documentation to make clear
output
parameter is relative topath
. - Set the default
output
value to"."
(for simplicity reasons). - Add script, renaming output files, containing only one page and removing the
-Page-\d+
name part.
I could've helped you providing pull request if you find any of these proposals useful!
from drawio-export-action.
Thanks for the report.
- The documentation needs some rewrites to make clear some behaviors built on top of the export feature for the Drawio Desktop app.
- The default value for
output
will remainexport
to avoid breaking changes in this version. Will consider updating the default value in the next major version. The next documentation should make clearer how this works. - An option already exists for that: https://github.com/rlespinasse/drawio-export-action#remove-page-suffix, which can be considered to be set to true in the next major version.
from drawio-export-action.
Oh, great news about the option! Thanks a lot!
from drawio-export-action.
🎉 This issue has been resolved in version 2.6.0 🎉
The release is available on GitHub release
Your semantic-release bot 📦🚀
from drawio-export-action.
Related Issues (11)
- Follow GitHub Action recommandation on versionning HOT 1
- Use new GitHub Action Feature : Job summaries
- Use v* prefix on git tag HOT 1
- GitHub Actions: Deprecating save-state and set-output commands HOT 3
- Prepare the ownership change of this action HOT 1
- github.token is read-only on new repositories HOT 1
- Use actionlint on this repository HOT 1
- v2.x fails with missing git version HOT 4
- Support export of only changed files HOT 1
- Watch Drawio-export release and propose a PR with the updated version HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drawio-export-action.