Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
kml-subtitles
Advanced tools
Simple module which parses subtitle files to a javascript object
NodeJS:
npm install kml-subtitles
Let's say we have my.srt SubRip subtitles file:
1
00:00:02,000 --> 00:00:06,000
Subtitle 1.1
Subtitle 1.2
2
00:00:28,967 --> 00:01:30,958
Subtitle 2.1
Subtitle 2.2
var parser = require('kml-subtitles');
var parsedSubtitles = parser({
path : "./", //--> folder path where the subtitle files exits
ext : ['.srt', '.vtt'], //--> subtitles extensions
dest : "./subtitles.js", //--> default destination for exporting the parsed data
name : "subtitles", //--> default name of the object which contains the parsed data (used for exporting to file)
});
var data = parsedSubtitles.data();
data object will look like:
{
my : [{
start: 2,
end: 6,
text: 'Subtitle 1.1<br>Subtitle 1.2'
},
{
start: 28.967,
end: 90.958,
text: 'Subtitle 2.1<br>Subtitle 2.2'
}]
}
2. Export the parsed data to a js file
parsedSubtitles.writeTo('export.js');
the export.js content will look like :
var subtitles = {
my : [{
start: 2,
end: 6,
text: 'Subtitle 1.1<br>Subtitle 1.2'
},
{
start: 28.967,
end: 90.958,
text: 'Subtitle 2.1<br>Subtitle 2.2'
}]
}
FAQs
Simple module which parses subtitle files to a javascript object
We found that kml-subtitles 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
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.