manga2pdf
glimmer-dsl-libui
manga2pdf | glimmer-dsl-libui | |
---|---|---|
1 | 21 | |
4 | 438 | |
- | - | |
0.0 | 8.0 | |
over 2 years ago | 21 days ago | |
Ruby | Ruby | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
manga2pdf
-
Manga2PDF GUI by Glimmer DSL for LibUI
# From: https://github.com/PinGunter/manga2pdf require 'selenium-webdriver' require 'uri' require 'ruby-progressbar' require 'rmagick' require 'glimmer-dsl-libui' module Manga2PDF class MangaIMG def initialize(url, mkdir, ch_limit, savefile) @url = url @end_state = false @global_count = 0 @opts = Selenium::WebDriver::Firefox::Options.new(args: ['-headless']) @driver = Selenium::WebDriver.for(:firefox, capabilities: @opts) @driver.get @url @mkdir = mkdir @current_title = @driver.find_element(tag_name: 'h1').text @ch_limit = ch_limit @img_list = [] @savefile = check_savefile savefile end def check_savefile(savefile) if savefile[savefile.length-4, savefile.length] != ".pdf" return (savefile + ".pdf") end savefile end # method to "download" all images # it actually screenshots the html element # to bypass server restrictions def get_img images = @driver.find_elements(tag_name: 'img') progress_length = (images.length) -2 progress_bar = ProgressBar.create(:title => "Progress", :total => progress_length, :length => 80) dir_path = "." dir_path = "#{@current_title}" if @mkdir if not Dir.exists? dir_path Dir.mkdir dir_path end index = 0 images.each do |img| if index > 0 and index < images.length - 1 scrn_dir = "#{@global_count}_#{index}.png" scrn_dir = "#{dir_path}/#{index}.png" if @mkdir img.save_screenshot scrn_dir @img_list << scrn_dir progress_bar.increment end index += 1 end end # method to navigate to the next page def next_page begin next_btn = @driver.find_element(link_text: 'NEXT CHAPTER') rescue @end_state = true end if not @end_state next_btn.click end @current_title = @driver.find_element(tag_name: 'h1').text #update title end def merge_to_pdf puts "Starting merge" puts "output file: #{@savefile}" final_img_list = Magick::ImageList.new(*@img_list) final_img_list.write(@savefile) puts "Finished merging!" end # method to download all images from all volumes def get_img_all while not @end_state puts "Currently downloading: #{@current_title}" get_img next_page @global_count += 1 if not @ch_limit.nil? and @global_count == @ch_limit @end_state = true end end puts "Finished downloading!" end end class MangaGUI include Glimmer def initialize @url, @mkdir, @chlimit, @chlimit_toggle, @savefile = nil, nil, 1, nil, nil @inner_thread = nil @running = false end def launch window('Manga2PDF - GUI', 600, 200) { on_closing do @inner_thread.exit end margined true vertical_box { horizontal_box { group('Manga2PDF') { vertical_box { group('Enter the URL:') @entry = entry { stretchy false on_changed do @url = @entry.text end } group('Savefile name:') @entry2 = entry { stretchy false on_changed do @savefile = @entry2.text end } @checkbox = checkbox('Have separate folders for each chapter?') { stretchy false on_toggled do @mkdir = @checkbox.checked? end } group('Max number of chapters') @checkbox2 = checkbox('Download only a number of chapters') { stretchy false on_toggled do @chlimit_toggle = @checkbox2.checked? end } @spinbox = spinbox(1,9999) { stretchy false value 1 on_changed do @chlimit = @spinbox.value end } @button = button('Download') { stretchy false on_clicked do if not @running @running = true @inner_thread = Thread.new do Glimmer::LibUI.queue_main do @label.text = "Initializing WebScraper" @progressbar.value = 5 end @chlimit = nil if not @chlimit_toggle @manga = Manga2PDF::MangaIMG.new(@url,@mkdir,@chlimit,@savefile) Glimmer::LibUI.queue_main do @label.text = "Moving to #{@url}" @progressbar.value = 15 @label.text = "Downloading images" end @manga.get_img_all Glimmer::LibUI.queue_main do @label.text = "Finished downloading images" @progressbar.value = 75 @label.text = "Merging images" end @manga.merge_to_pdf Glimmer::LibUI.queue_main do @progressbar.value = 100 @label.text = "Finished! You can close the window now" end @running = false end end end } @progressbar = progress_bar { stretchy false } @label = label("Waiting") { stretchy false } } } } } }.show @inner_thread.join end end end Manga2PDF::MangaGUI.new.launch
glimmer-dsl-libui
-
Shoes makes building little graphical programs for Mac, Windows, Linux simple
glimmer-dsl-libui is a more actively maintained alternative
https://github.com/AndyObtiva/glimmer-dsl-libui
- The Quest for the Ultimate GUI Framework
-
Rubio-Radio Currently Playing Song & Full-Text Search
Another GitHub Pull Request for Rubio-Radio (open-source Internet radio app built with Ruby) got accepted and merged, which focused on displaying the currently playing song/program, loading all available radio stations (instead of a pre-defined limit), and enhanced full-text-search support including column-specific queries. The changes have been released in rubio-radio gem version 0.0.6. In fact, the enhanced full-text-search support is included in the latest version of Glimmer DSL for LibUI (Ruby Desktop Development GUI Library used to build Rubio-Radio) as part of the refined_table custom control for use in any projects, so software engineers get that feature for free now.
- _why's Estate
-
Rubio-Radio Bookmarking & Async Gradual Fetching
Recently, I blogged about how I contributed Pagination/Filtering support to Rubio-Radio, an Internet radio application built with Ruby and Glimmer DSL for LibUI.
-
New Glimmer DSL for LibUI Apps: RubyCrumbler and Rubio-Radio
I am particularly impressed by the fact that the developers of those apps fully went the distance by walking the walk, not just talking the talk, especially given that the developers of the first app (RubyCrumbler) were brand new to Glimmer DSL for LibUI and had to exercise great problem solving skills to finish their app on time for their needs.
-
Glimmer DSL for LibUI 0.5.10 - Shape Listeners
# From: https://github.com/AndyObtiva/glimmer-dsl-libui#shape-coloring require 'glimmer-dsl-libui' class ShapeColoring include Glimmer::LibUI::Application COLOR_SELECTION = Glimmer::LibUI.interpret_color(:red) before_body { @shapes = [] } body { window('Shape Coloring', 200, 200) { margined false grid { label("Click a shape to select and\nchange color via color button") { left 0 top 0 hexpand true halign :center vexpand false } color_button { |cb| left 0 top 1 hexpand true vexpand false on_changed do @selected_shape&.fill = cb.color end } area { left 0 top 2 hexpand true vexpand true rectangle(0, 0, 600, 400) { # background shape fill :white } @shapes << colorable(:rectangle, 20, 20, 40, 20) { |shape| fill :lime } @shapes << colorable(:square, 80, 20, 20) { |shape| fill :blue } @shapes << colorable(:circle, 75, 70, 20, 20) { |shape| fill :green } @shapes << colorable(:arc, 120, 70, 40, 0, 145) { |shape| fill :orange } @shapes << colorable(:polygon, 120, 10, 120, 50, 150, 10, 150, 50) { fill :cyan } @shapes << colorable(:polybezier, 20, 40, 30, 100, 50, 80, 80, 110, 40, 120, 20, 120, 30, 91) { fill :pink } } } } } def colorable(shape_symbol, *args, &content) send(shape_symbol, *args) do |shape| on_mouse_up do |area_mouse_event| old_stroke = Glimmer::LibUI.interpret_color(shape.stroke).slice(:r, :g, :b) @shapes.each {|sh| sh.stroke = nil} @selected_shape = nil unless old_stroke == COLOR_SELECTION shape.stroke = COLOR_SELECTION.merge(thickness: 2) @selected_shape = shape end end content.call(shape) end end end ShapeColoring.launch
-
Glimmer DSL for LibUI Code Area (Ruby Tooling Future)
# From: https://github.com/AndyObtiva/glimmer-dsl-libui#class-based-custom-controls require 'glimmer-dsl-libui' require 'facets' Address = Struct.new(:street, :p_o_box, :city, :state, :zip_code) class FormField include Glimmer::LibUI::CustomControl options :model, :attribute body { entry { |e| label attribute.to_s.underscore.split('_').map(&:capitalize).join(' ') text <=> [model, attribute] } } end class AddressForm include Glimmer::LibUI::CustomControl options :address body { form { form_field(model: address, attribute: :street) form_field(model: address, attribute: :p_o_box) form_field(model: address, attribute: :city) form_field(model: address, attribute: :state) form_field(model: address, attribute: :zip_code) } } end class LabelPair include Glimmer::LibUI::CustomControl options :model, :attribute, :value body { horizontal_box { label(attribute.to_s.underscore.split('_').map(&:capitalize).join(' ')) label(value.to_s) { text <= [model, attribute] } } } end class AddressView include Glimmer::LibUI::CustomControl options :address body { vertical_box { address.each_pair do |attribute, value| label_pair(model: address, attribute: attribute, value: value) end } } end class ClassBasedCustomControls include Glimmer::LibUI::Application # alias: Glimmer::LibUI::CustomWindow before_body do @address1 = Address.new('123 Main St', '23923', 'Denver', 'Colorado', '80014') @address2 = Address.new('2038 Park Ave', '83272', 'Boston', 'Massachusetts', '02101') end body { window('Class-Based Custom Keyword') { margined true horizontal_box { vertical_box { label('Address 1') { stretchy false } address_form(address: @address1) horizontal_separator { stretchy false } label('Address 1 (Saved)') { stretchy false } address_view(address: @address1) } vertical_separator { stretchy false } vertical_box { label('Address 2') { stretchy false } address_form(address: @address2) horizontal_separator { stretchy false } label('Address 2 (Saved)') { stretchy false } address_view(address: @address2) } } } } end ClassBasedCustomControls.launch
-
2021 Was The Year of The Ruby Desktop!!!
Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library): this gem just won a 2022 Fukuoka Ruby Special Award after getting judged directly by Matz (creator of Ruby) and the Fukuoka Ruby Award Competition Judges! How is that for a Year of The Ruby Desktop accomplishment!!?!
-
Perfect Shape - Pure Ruby Geometric Algrithms
Another reason why this library was created was to address the need for supporting automated declarative drag and drop features in Glimmer DSL for LibUI coming soon (right now, it supports manually implementing drag and drop with area listeners out of the box).
What are some alternatives?
Watir - Watir Powered By Selenium
Glimmer - DSL Framework consisting of a DSL Engine and a Data-Binding Library used in Glimmer DSL for SWT (JRuby Desktop Development GUI Framework), Glimmer DSL for Opal (Pure Ruby Web GUI), Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library), Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library), Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library), Glimmer DSL for XML (& HTML), and Glimmer DSL for CSS
webdrivers - Keep your Selenium WebDrivers updated automatically
RubyGnome2 - A set of bindings for the GNOME libraries to use from Ruby.
mbfc_crawler - Crawls Media Bias/Fact Check and saves output to JSON.
glimmer-dsl-gtk - Glimmer DSL for GTK - Ruby-GNOME Desktop Development GUI Library
Ruby on Rails - Ruby on Rails
Shoes - Shoes 4 : the next version of Shoes
DManga - Baixador de mangas ( mangahost )
glimmer-dsl-swing - Glimmer DSL for Swing (JRuby Swing Desktop Development GUI Library) - Enables development of desktop applications using Java Swing and Java 2D, including vector graphics and AWT geometry.
Jekyll - :globe_with_meridians: Jekyll is a blog-aware static site generator in Ruby
qtbindings - An easy to install gem version of the Ruby bindings to Qt