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.
idn-area-extractor
Advanced tools
Extract Indonesia area data from the raw sources to CSV.
This package was developed to ease and speed up the data processing stage of idn-area-data.
idn-area-extractor can be installed in the global scope (if you'd like to have it available and use it on the whole system) or locally for a specific package (especially if you'd like to use it programmatically):
Install globally:
npm install -g idn-area-extractor
Install locally:
npm install idn-area-extractor
Access the manual with idnxtr --help
command:
USAGE
$ idnxtr [regencies|districts|islands|villages] </path/to/file.[pdf|txt]> [OPTIONS]
OPTIONS
-c, --compare Compare the extracted data with the latest data
-d, --destination=<path> Set the folder destination. Default: current working directory
-o, --output=<filename> Set a specific output file name without the file extension
-r, --range=<range> Extract specific PDF pages (e.g. 1-2,5,7-10)
-R, --save-raw Save the extracted raw data into .txt file (only works with PDF data)
--silent Disable all logs
EXAMPLE
$ idnxtr
$ idnxtr regencies ~/data/regencies.pdf
$ idnxtr regencies ~/data/regencies.pdf -r 1-2,5,7-10 -R
$ idnxtr regencies ~/data/regencies.pdf --range 1-2,5,7-10 --save-raw
$ idnxtr regencies ~/data/raw-regencies.txt
Run idnxtr
without arguments to launch the interactive UI that guides you to extracting the data.
idn-area-extractor can be used programmatically by using the API documented below:
idnxtr(options)
Extract the data from the PDF file.
options
Required:
options.data
: Which kind of data should be extracted, either 'regencies', 'districts', 'islands', or 'villages'.options.filePath
: The path to the PDF or TXT file.Optional:
options.compare
: Compare the extracted data with the latest data. Default: false
.options.destination
: The destination folder to save the CSV file. Default: process.cwd()
.options.output
: The output file name without the file extension. Default: options.data
.options.range
: Extract specific PDF pages (e.g. 1-2,5,7-10). If not set, all pages will extracted.options.saveRaw
: Save the extracted raw data into .txt file (only works with PDF data). Default: false
.options.silent
: Disable all logs. Default: false
.// .js
import idnxtr from 'idn-area-extractor';
(async () => {
await idnxtr({
data: 'regencies',
filePath: '/path/to/regencies.pdf',
compare: true,
destination: '/path/to/destination',
output: 'regencies',
range: '1-2,5,7-10',
saveRaw: true,
silent: true,
});
})();
For CommonJS user, you need to use dynamic import like this:
// .js
(async () => {
const {default: idnxtr} = await import('idn-area-extractor')
await idnxtr({
// options...
})
})()
We have different channels for each problem, please use them by following these conditions :
To report a bug, please open a new issue following the guide.
If you have a new feature in mind, please open a new issue following the guide.
If you have a question, you can search for answers in the GitHub Discussions Q&A category. If you don't find a relevant discussion already, you can open a new discussion.
Give a ⭐️ if this project helped you!
You can support this project by donating via GitHub Sponsor, Trakteer, or Saweria.
FAQs
Extract Indonesia area data from the raw sources to CSV
The npm package idn-area-extractor receives a total of 6 weekly downloads. As such, idn-area-extractor popularity was classified as not popular.
We found that idn-area-extractor demonstrated a healthy version release cadence and project activity because the last version was released less than 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.