clean up old junk

master
radex 2024-01-30 23:42:10 +01:00
parent 9993a6b7d9
commit bc2d8c3f62
Signed by: radex
SSH Key Fingerprint: SHA256:hvqRXAGG1h89yqnS+cyFTLKQbzjWD4uXIqw7Y+0ws30
3 changed files with 0 additions and 30 deletions

View File

@ -2,9 +2,6 @@ source 'https://rubygems.org'
gem 'prawn'
gem 'prawn-qrcode', :git => 'https://github.com/jabbrwcky/prawn-qrcode'
gem 'prawn-svg'
gem 'sinatra'
gem 'color'
gem 'excon'
gem 'rmagick'
gem 'json'

View File

@ -9,12 +9,7 @@ GIT
GEM
remote: https://rubygems.org/
specs:
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
chunky_png (1.3.11)
color (1.8)
css_parser (1.7.1)
addressable
excon (0.73.0)
json (2.3.0)
mustermann (1.1.1)
@ -23,14 +18,9 @@ GEM
prawn (2.2.2)
pdf-core (~> 0.7.0)
ttfunk (~> 1.5)
prawn-svg (0.30.0)
css_parser (~> 1.6)
prawn (>= 0.11.1, < 3)
public_suffix (4.0.5)
rack (2.2.2)
rack-protection (2.0.8.1)
rack
rmagick (4.1.2)
rqrcode (1.1.2)
chunky_png (~> 1.0)
rqrcode_core (~> 0.1)
@ -48,13 +38,10 @@ PLATFORMS
ruby
DEPENDENCIES
color
excon
json
prawn
prawn-qrcode!
prawn-svg
rmagick
sinatra
BUNDLED WITH

14
main.rb
View File

@ -1,15 +1,10 @@
require 'rubygems'
require 'sinatra'
require 'rqrcode'
require 'prawn'
require 'prawn/measurements'
require 'prawn/qrcode'
require 'prawn-svg'
require 'color'
require 'excon'
require 'rmagick'
require 'json'
require 'zlib'
require 'shellwords'
include Prawn::Measurements
@ -83,15 +78,6 @@ get '/api/1/preview/:id.pdf' do
render_label params["id"]
end
get '/api/1/preview/:id.png' do
headers["Content-Type"] = "image/png"
img = Magick::ImageList.new()
img = img.from_blob(render_label(params["id"])){ self.density = 200 }.first
img.format = 'png'
img.background_color = 'white'
img.to_blob
end
post '/api/1/print/:id' do
temp = Tempfile.new('labelmaker')
temp.write(render_label(params["id"]))