Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/i2z1/vcardr
Read/write VCF contact files with R
https://github.com/i2z1/vcardr
contacts r vcard vcf
Last synced: about 4 hours ago
JSON representation
Read/write VCF contact files with R
- Host: GitHub
- URL: https://github.com/i2z1/vcardr
- Owner: i2z1
- License: agpl-3.0
- Created: 2023-09-13T13:01:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-23T16:43:33.000Z (over 1 year ago)
- Last Synced: 2024-11-12T07:12:40.382Z (2 months ago)
- Topics: contacts, r, vcard, vcf
- Language: R
- Homepage: https://i2z1.github.io/vcardr/
- Size: 510 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE.md
Awesome Lists containing this project
README
---
output: github_document
---```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
``````{r generate_hex, include=FALSE, fig.path="man/figures/hex-"}
library(hexSticker)imgurl <- "man/figures/phone_small.png"
hexSticker::sticker(imgurl, package="vcardr",
p_size=28,
p_y=1.5,
s_x=0.96,
s_y=0.8,
s_width=0.6,
s_height=0.5,
h_fill = "#055a43",
p_color = "#dcc535",
h_color = "#34897c", #border
p_family = "teko",
filename="man/figures/hex.png")
```# vcardr
# vcardr
Read/write VCF contact files in vCard format with R
## Description
Imports data from vcf vcard format into R dataframe, basic manipulations with contacts data and write back into vsf vcard file format, which can be imported with various contact apps.
Also can import data from Telegram JSON (data export procedure).
Supports VCARD 3.0 file format, including these fields:
- FN -- full name
- N -- name fields
- BDAY
- PHOTO (in base64 format)
- TEL -- including phone type (HOME/CELL/FAX...) and preferable phone
- ORG
- TITLE## Installation
You can install the development version of vcardr from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("i2z1/vcardr")
```## Example
#### Make dataframe from VCF file:
```{r example, eval = FALSE}
library(vcardr)df <- vcardr::import_vcf("path_to_file.vcf")
## basic example code
```Note that if contact has few phone numbers, record would consist of coressponding number of rows in dataframe with the same set of columns but various telephone numbers.
#### Import Telegram JSON:
```{r example2, eval = FALSE}
df <- vcardr::import_telegramJSON("data.json")
```#### Write vCard
```{r example3, eval = FALSE}
export2vcf(contacts_df, "mycontacts.vcf")
```