Comments (3)
Can confirm, produces a file called "sheet.png" (which MacOS won't open) on my install too. Overriding with the "file" parameter on save_pdf
method fixed it, but it was a little unintuitive after following the docs.
from squib.
I started looking into this a bit when I was bothered by it, and I haven't tried to fix it yet, but I think I traced the problem...
The save_pdf
method comes from /lib/squib/dsl/save_pdf.rb which uses /lib/squib/graphics/save_pdf.rb and that uses sheet.full_filename
which comes from /lib/squib/args/sheet.rb where it is defined as:
def full_filename(i=nil)
if i.nil?
"#{dir}/#{file}"
else
"#{dir}/#{prefix}#{count_format % i}#{suffix}.png"
end
end
At no point is the .png
ever overridden. I'm not certain off the top of my head what the best way to fix it would be, but I think a good way that doesn't touch too many files would be making the file extension be one of the properties of sheet, and it defaults to png
but can be overridden during the Sheet#full_filename
call. I believe that would just require editing /lib/squib/graphics/save_pdf.rb and /lib/squib/args/sheet.rb, and wouldn't affect anything else.
from squib.
Oops. Small update to what I just wrote: it's not actually the full_filename method. Instead I think it's this file
parameter in /lib/squib/args/sheet.rb not being overridden:
Line 32 in 1132233
from squib.
Related Issues (20)
- undefined method "render_cairo"
- Shadow in text or images HOT 1
- CLI: in `squib new` choose advanced via menu or CLI option
- CLI: `squib add` to add a new deck
- Change config.yml to squib.yml
- Squib can't install on an MacBook M1 HOT 8
- Unable to install gem because of dependency HOT 6
- Release v0.19.0
- Document Notion integration
- Unable to load variants with fonts
- Squib post-installation with Gem on M1 Macbook error: dyld[xxxx] missing symbol called 'new' HOT 1
- squib error on Ubuntu 22.04 "undefined symbol: g_bookmark_file_get_type" HOT 3
- Add drop shadow support when using hand HOT 1
- SVGs are all lower than they should be HOT 1
- Can't install Squib on macOS. "ruby/config.h" not found
- The Squib Way documentation skips over the `squib new` command
- the Layouts Are Squib’s Best Feature documention has some broken links
- It'd be nice if the built-in layouts were specified a little differently in the code
- Extent with a decimal in the font size brings an error, not with an integer font size.
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 squib.