This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add as Rake task or Rails console | |
class CSVFormatter | |
def initialize | |
@buffer = [] | |
end | |
def result | |
@buffer.join("\n") | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# see: | |
# https://w3c.github.io/webdriver-bidi/#command-browsingContext-print | |
# https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF | |
# https://github.com/GoogleChromeLabs/chromium-bidi/blob/main/examples/print_example.py | |
# https://github.com/GoogleChromeLabs/chromium-bidi/blob/main/examples/_helpers.py | |
require 'net/http' |
OlderNewer