Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
conversiontools
Advanced tools
Readme
Conversion Tools is an online service that offers a fast and easy way to convert documents between different formats, like XML, Excel, PDF, Word, Text, CSV and others.
This Node.js Client allows integrating the conversion of the files into your node.js applications. To convert the files Node.js Client uses the public Conversion Tools REST API.
yarn add conversiontools
or
npm install --save conversiontools
To use REST API - get API Token from the Profile page at https://conversiontools.io/profile.
const ConversionClient = require('conversiontools');
// API Token from your Profile page at https://conversiontools.io/profile
const apiToken = 'put the api token here';
const conversionClient = new ConversionClient(apiToken);
const conversionOptions = {
filename: 'test.xml',
timeout: 4000,
outputFilename: 'test.xml.csv',
options: {
delimiter: 'tab',
},
};
conversionClient
.run('convert.xml_to_csv', conversionOptions)
.then((filename) => {
console.log('File downloaded to', filename);
})
.catch(err => {
console.error('Conversion error', err);
});
const ConversionClient = require('conversiontools');
// API Token from your Profile page at https://conversiontools.io/profile
const apiToken = 'put the api token here';
const convert = async () => {
const conversionClient = new ConversionClient(apiToken);
const conversionOptions = {
filename: 'test.xml',
timeout: 4000,
outputFilename: 'test.xml.csv',
options: {
delimiter: 'tab',
},
};
try {
const filename = await conversionClient.run('convert.xml_to_csv', conversionOptions);
console.log('File downloaded to', filename);
} catch (err) {
console.error('Conversion error', err);
}
};
convert();
The following example saving website page provided by the URL to JPG image.
const ConversionClient = require('conversiontools');
// API Token from your Profile page at https://conversiontools.io/profile
const apiToken = 'put the api token here';
const convert = async () => {
const conversionClient = new ConversionClient(apiToken);
const conversionOptions = {
url: 'https://en.wikipedia.org/wiki/Main_Page',
timeout: 4000,
outputFilename: 'wiki.jpg',
options: {
images: 'yes',
javascript: 'yes',
},
};
try {
const filename = await conversionClient.run('convert.website_to_jpg', conversionOptions);
console.log('File downloaded to', filename);
} catch (err) {
console.error('Conversion error', err);
}
};
convert();
List of available Conversion Types and corresponding conversion options can be found on the Conversion Tools API Documentation page.
Licensed under MIT.
Copyright (c) 2020-2021 Conversion Tools
FAQs
JavaScript library to convert files using Conversion Tools API at https://conversiontools.io
The npm package conversiontools receives a total of 2 weekly downloads. As such, conversiontools popularity was classified as not popular.
We found that conversiontools 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.