37 Star 243 Fork 36

GVP墨客实验室 / 墨干理工套件

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
rsvg-convert.scm 1.51 KB
Copy Edit Raw Blame History
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; MODULE : rsvg-convert.scm
;; DESCRIPTION : rsvg-convert Binary plugin
;; COPYRIGHT : (C) 2024 Darcy Shen
;;
;; This software falls under the GNU general public license version 3 or later.
;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
;; in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(texmacs-module (binary rsvg-convert)
(:use (binary common)))
(define (rsvg-convert-binary-candidates)
(cond ((os-macos?)
(list "/opt/homebrew/bin/rsvg-convert"
"/usr/local/bin/rsvg-convert"))
((os-win32?)
(list ))
(else
(list "/usr/bin/rsvg-convert"))))
(tm-define (find-binary-rsvg-convert)
(:synopsis "Find the url to the rsvg-convert binary, return (url-none) if not found")
(find-binary (rsvg-convert-binary-candidates) "rsvg-convert"))
(tm-define (has-binary-rsvg-convert?)
(not (url-none? (find-binary-rsvg-convert))))
(tm-define (version-binary-rsvg-convert)
(version-binary (find-binary-rsvg-convert)))
(tm-define (svg2png-by-rsvg-convert x opts)
(let* ((dest (assoc-ref opts 'dest))
(fm (url-format (url-concretize dest)))
(res (get-raster-resolution opts))
(cmd (url->system (find-binary-rsvg-convert))))
(system-2 (string-append cmd " -f " fm " -d " res " -o ") dest x)
(if (url-exists? dest) dest #f)))
C++
1
https://gitee.com/XmacsLabs/mogan.git
git@gitee.com:XmacsLabs/mogan.git
XmacsLabs
mogan
墨干理工套件
branch-1.2

Search

53164aa7 5694891 3bd8fe86 5694891