Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Ruby APIs for manipulating Microsoft Word based upon OOXML standards.
Install the gem and add to the application's Gemfile by executing:
$ bundle add goldendocx
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install goldendocx
require 'goldendocx'
Support both ox
and nokogiri
as XML serializer, and ox
as default.
You can customize with configuration
Goldendocx.configure do |config|
config.xml_serializer = :nokogiri
end
Create new MS Word file or read exists file and write to another path
docx = Goldendocx::Docx.new
docx = Goldendocx::Docx.new(docx_file_path)
docx.read_from(docx_file_path)
docx.write_to(new_file_path)
Create texts to MS Word
docx.create_text("Hello World!")
docx.add_style(well_comsposed_style_path)
docx.create_text("Hello World!", style: 'StyleName', align: :center)
Create tables to MS Word
headers = %w[名称 数量 百分比]
rows = [
%w[A 10 10%],
%w[B 66 66%],
%w[C 24 24%]
]
table = docx.create_table
headers.each { |header| table.add_header(header) }
rows.each { |row| table.add_row(row) }
Create images to MS Word
docx.create_image(File.open(image_path))
docx.create_image("data:image/png;base64,ImageBase64StringData")
docx.create_image(Kernel.open('https://image.url'))
Create charts to MS Word
chart = docx.create_chart(:column)
chart.name = '地域分布详情数据'
categories = %w[河南省 山东省 浙江省 四川省 安徽省 上海市 湖北省 山西省 河北省 贵州省]
values = [13, 12, 9, 9, 8, 7, 7, 6, 5, 3]
chart.add_series('地域分布详情数据', categories, values)
More demos view at Demos
FAQs
Unknown package
We found that goldendocx demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.