From d5fb53be889e7720e66edffa0a4407af7fde0a76 Mon Sep 17 00:00:00 2001 From: hrbrmstr Date: Mon, 2 Sep 2019 14:11:32 -0400 Subject: [PATCH] new srht build --- .build.yml | 71 +++- README.Rmd | 4 +- README.html | 1065 ----------------------------------------------------------- README.md | 117 ++----- 4 files changed, 81 insertions(+), 1176 deletions(-) delete mode 100644 README.html diff --git a/.build.yml b/.build.yml index 58782c8..58fe583 100644 --- a/.build.yml +++ b/.build.yml @@ -13,6 +13,7 @@ packages: - libbz2-dev - libcairo2-dev - libcurl4-openssl-dev + - libxml2-dev - libjpeg-dev - liblapack-dev - liblzma-dev @@ -25,6 +26,9 @@ packages: - libx11-dev - libxt-dev - mpack + - pandoc + - pandoc-citeproc + - pandoc-data - subversion - tcl8.6-dev - texinfo @@ -55,24 +59,71 @@ packages: - r-base - r-base-dev - r-recommended + - r-cran-crayon + - r-cran-curl + - r-cran-desc + - r-cran-httr + - r-cran-jsonlite + - r-cran-devtools + - r-cran-knitr + - r-cran-rmarkdown + - r-cran-rprojroot + - r-cran-stringi + - r-cran-testthat + - r-cran-testit + - r-cran-tidyverse + - r-cran-xml2 +environment: + R_PACKAGE: wand sources: - - https://git.sr.ht/~hrbrmstr/wand -triggers: - - action: email - condition: always - to: bob@rud.is + - https://git.sr.ht/hrbrmstr/wand tasks: - setup: | - sudo update-locale "LANG=en_US.UTF-8" + echo "en_US.UTF-8 UTF-8" > loc + sudo cp loc /etc/locale.gen sudo locale-gen --purge "en_US.UTF-8" - sudo dpkg-reconfigure --frontend noninteractive locales + sudo /usr/sbin/update-locale LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 export LANGUAGE=en_US.UTF-8 echo 'options(repos = c(CRAN = "https://cloud.r-project.org"))' > ~/.Rprofile echo 'R_LIBS_USER=/home/build/packages' > ~/.Renviron mkdir /home/build/packages - Rscript -e 'install.packages(c("covr", "tinytest"))' + export _R_CHECK_URLS_USE_CURL_=FALSE + export _R_CHECK_LENGTH_1_CONDITION_=TRUE + export _R_CHECK_LENGTH_1_LOGIC2_=TRUE + export _R_CHECK_TOPLEVEL_FILES_=TRUE + export _R_CHECK_VC_DIRS_=TRUE + export _R_CHECK_TIMINGS_=10 + export _R_CHECK_INSTALL_DEPENDS_=TRUE + export _R_CHECK_SUGGESTS_ONLY_=TRUE + export _R_CHECK_NO_RECOMMENDED_=TRUE + export _R_CHECK_EXECUTABLES_EXCLUSIONS_=FALSE + export _R_CHECK_DOC_SIZES2_=TRUE + export _R_CHECK_CODE_ASSIGN_TO_GLOBALENV_=TRUE + export _R_CHECK_CODE_ATTACH_=TRUE + export _R_CHECK_CODE_DATA_INTO_GLOBALENV_=TRUE + export _R_CHECK_CODE_USAGE_VIA_NAMESPACES_=TRUE + export _R_CHECK_DOT_FIRSTLIB_=TRUE + export _R_CHECK_DEPRECATED_DEFUNCT_=TRUE + export _R_CHECK_REPLACING_IMPORTS_=TRUE + export _R_CHECK_SCREEN_DEVICE_=stop + export _R_CHECK_TOPLEVEL_FILES_=TRUE + export _R_CHECK_S3_METHODS_NOT_REGISTERED_=TRUE + export _R_CHECK_OVERWRITE_REGISTERED_S3_METHODS_=TRUE + export _R_CHECK_PRAGMAS_=TRUE + export _R_CHECK_CRAN_INCOMING_USE_ASPELL_=TRUE + export _R_CHECK_COMPILATION_FLAGS_=TRUE + export _R_CHECK_R_DEPENDS_=warn + export _R_CHECK_SERIALIZATION_=TRUE + export _R_CHECK_R_ON_PATH_=TRUE + export _R_CHECK_PACKAGES_USED_IN_TESTS_USE_SUBDIRS_=TRUE + export _R_CHECK_SHLIB_OPENMP_FLAGS_=TRUE + export _R_CHECK_CONNECTIONS_LEFT_OPEN_=TRUE + export _R_CHECK_FUTURE_FILE_TIMESTAMPS_=TRUE + export _R_CHECK_AUTOCONF_=TRUE - build: | - R CMD build wand - R CMD check wand_*gz + sudo R CMD javareconf + Rscript -e 'install.packages(c("covr", "tinytest"))' + R CMD build ${R_PACKAGE} + R CMD check ${R_PACKAGE}_*gz diff --git a/README.Rmd b/README.Rmd index daea2c2..9ed19d8 100644 --- a/README.Rmd +++ b/README.Rmd @@ -1,7 +1,5 @@ --- -output: - rmarkdown::github_document: - df_print: kable +output: rmarkdown::github_document --- ```{r pkg-knitr-opts, include=FALSE} hrbrpkghelpr::global_opts() diff --git a/README.html b/README.html deleted file mode 100644 index cff2e28..0000000 --- a/README.html +++ /dev/null @@ -1,1065 +0,0 @@ - - - - - - - - - - - - - - - - - - -

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Signed by Signed commit % Linux build Status builds.sr.ht status Windows build status Coverage Status cran checks CRAN status Minimal R Version License

-

wand

-

Retrieve Magic Attributes from Files and Directories

-

Description

-

MIME types are shorthand descriptors for file contents and can be determined from “magic” bytes in file headers, file contents or intuited from file extensions. Tools are provided to perform curated “magic” tests as well as mapping MIME types from a database of over 1,800 extension mappings.

-

SOME IMPORTANT DETAILS

-

The header checking is minimal (i.e. nowhere near as comprehensive as libmagic) but covers quite a bit of ground. If there are content-check types from magic sources that you would like coded into the package, please file an issue and include the full line(s) from that linked magic.tab that you would like mapped.

-

What’s Inside The Tin

-

The following functions are implemented:

- -

Installation

-
install.packages("wand", repos = "https://cinc.rud.is")
-# or
-remotes::install_git("https://git.rud.is/hrbrmstr/wand.git")
-# or
-remotes::install_git("https://git.sr.ht/~hrbrmstr/wand")
-# or
-remotes::install_gitlab("hrbrmstr/wand")
-# or
-remotes::install_bitbucket("hrbrmstr/wand")
-# or
-remotes::install_github("hrbrmstr/wand")
-

NOTE: To use the ‘remotes’ install options you will need to have the {remotes} package installed.

-

Usage

-
library(wand)
-library(tidyverse)
-
-# current verison
-packageVersion("wand")
-## [1] '0.6.0'
-
list.files(system.file("extdat", package="wand"), full.names=TRUE) %>% 
-  map_df(~{
-    tibble(
-      fil = basename(.x),
-      mime = list(get_content_type(.x))
-    )
-  }) %>% 
-  unnest()
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
filmime
actions.csvapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
actions.txtapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
actions.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
test_128_44_jstereo.mp3audio/mp3
test_excel_2000.xlsapplication/msword
test_excel_spreadsheet.xmlapplication/xml
test_excel_web_archive.mhtmessage/rfc822
test_excel.xlsmapplication/zip
test_excel.xlsxapplication/vnd.openxmlformats-officedocument.spreadsheetml.sheet
test_nocompress.tifimage/tiff
test_powerpoint.pptmapplication/zip
test_powerpoint.pptxapplication/vnd.openxmlformats-officedocument.presentationml.presentation
test_word_2000.docapplication/msword
test_word_6.0_95.docapplication/msword
test_word.docmapplication/zip
test_word.docxapplication/vnd.openxmlformats-officedocument.wordprocessingml.document
test.auaudio/basic
test.binapplication/mac-binary
test.binapplication/macbinary
test.binapplication/octet-stream
test.binapplication/x-binary
test.binapplication/x-macbinary
test.bmpimage/bmp
test.dtdapplication/xml-dtd
test.emfapplication/x-msmetafile
test.emfimage/emf
test.epsapplication/postscript
test.flivideo/flc
test.flivideo/fli
test.flivideo/x-fli
test.gifimage/gif
test.icoimage/vnd.microsoft.icon
test.icoimage/x-icon
test.jpgimage/jpeg
test.mp3audio/mp3
test.odtapplication/vnd.oasis.opendocument.text
test.oggapplication/ogg
test.oggaudio/ogg
test.pcximage/pcx
test.pcximage/vnd.zbrush.pcx
test.pcximage/x-pcx
test.pdfapplication/pdf
test.plapplication/x-perl
test.pltext/plain
test.pltext/x-perl
test.pltext/x-script.perl
test.pngimage/png
test.pnmapplication/x-portable-anymap
test.pnmimage/x-portable-anymap
test.ppmimage/x-portable-pixmap
test.pptapplication/msword
test.psapplication/postscript
test.psdimage/photoshop
test.pytext/x-python
test.pytext/x-script.phyton
test.rtfapplication/rtf
test.rtfapplication/x-rtf
test.rtftext/richtext
test.rtftext/rtf
test.shapplication/x-bsh
test.shapplication/x-sh
test.shapplication/x-shar
test.shtext/x-script.sh
test.shtext/x-sh
test.tarapplication/tar
test.tar.gzapplication/gzip
test.tar.gzapplication/octet-stream
test.tar.gzapplication/x-compressed
test.tar.gzapplication/x-gzip
test.tgaimage/x-tga
test.txttext/plain
test.txt.gzapplication/gzip
test.txt.gzapplication/octet-stream
test.txt.gzapplication/x-compressed
test.txt.gzapplication/x-gzip
test.wavaudio/x-wav
test.wmfapplication/x-msmetafile
test.wmfimage/wmf
test.wmfwindows/metafile
test.xcfapplication/x-xcf
test.xmlapplication/xml
test.xpmimage/x-xbitmap
test.xpmimage/x-xpixmap
test.xpmimage/xpm
test.zipapplication/zip
-
- -

wand Metrics

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Lang# Files(%)LoC(%)Blank lines(%)# Lines(%)
HTML10.110440.81100.1200.00
R70.71540.12590.69700.69
JSON10.1800.0600.0000.00
Rmd10.1170.01170.20310.31
-

Code of Conduct

-

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

- - - diff --git a/README.md b/README.md index e0c9aab..1ed0ade 100644 --- a/README.md +++ b/README.md @@ -91,108 +91,29 @@ list.files(system.file("extdat", package="wand"), full.names=TRUE) %>% ) }) %>% unnest() +## # A tibble: 85 x 2 +## fil mime +## +## 1 actions.csv application/vnd.openxmlformats-officedocument.spreadsheetml.sheet +## 2 actions.txt application/vnd.openxmlformats-officedocument.spreadsheetml.sheet +## 3 actions.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet +## 4 test_128_44_jstereo.mp3 audio/mp3 +## 5 test_excel_2000.xls application/msword +## 6 test_excel_spreadsheet.xml application/xml +## 7 test_excel_web_archive.mht message/rfc822 +## 8 test_excel.xlsm application/zip +## 9 test_excel.xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet +## 10 test_nocompress.tif image/tiff +## # … with 75 more rows ``` -
- -| fil | mime | -| :---------------------------- | :------------------------------------------------------------------------ | -| actions.csv | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | -| actions.txt | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | -| actions.xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | -| test\_128\_44\_jstereo.mp3 | audio/mp3 | -| test\_excel\_2000.xls | application/msword | -| test\_excel\_spreadsheet.xml | application/xml | -| test\_excel\_web\_archive.mht | message/rfc822 | -| test\_excel.xlsm | application/zip | -| test\_excel.xlsx | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | -| test\_nocompress.tif | image/tiff | -| test\_powerpoint.pptm | application/zip | -| test\_powerpoint.pptx | application/vnd.openxmlformats-officedocument.presentationml.presentation | -| test\_word\_2000.doc | application/msword | -| test\_word\_6.0\_95.doc | application/msword | -| test\_word.docm | application/zip | -| test\_word.docx | application/vnd.openxmlformats-officedocument.wordprocessingml.document | -| test.au | audio/basic | -| test.bin | application/mac-binary | -| test.bin | application/macbinary | -| test.bin | application/octet-stream | -| test.bin | application/x-binary | -| test.bin | application/x-macbinary | -| test.bmp | image/bmp | -| test.dtd | application/xml-dtd | -| test.emf | application/x-msmetafile | -| test.emf | image/emf | -| test.eps | application/postscript | -| test.fli | video/flc | -| test.fli | video/fli | -| test.fli | video/x-fli | -| test.gif | image/gif | -| test.ico | image/vnd.microsoft.icon | -| test.ico | image/x-icon | -| test.jpg | image/jpeg | -| test.mp3 | audio/mp3 | -| test.odt | application/vnd.oasis.opendocument.text | -| test.ogg | application/ogg | -| test.ogg | audio/ogg | -| test.pcx | image/pcx | -| test.pcx | image/vnd.zbrush.pcx | -| test.pcx | image/x-pcx | -| test.pdf | application/pdf | -| test.pl | application/x-perl | -| test.pl | text/plain | -| test.pl | text/x-perl | -| test.pl | text/x-script.perl | -| test.png | image/png | -| test.pnm | application/x-portable-anymap | -| test.pnm | image/x-portable-anymap | -| test.ppm | image/x-portable-pixmap | -| test.ppt | application/msword | -| test.ps | application/postscript | -| test.psd | image/photoshop | -| test.py | text/x-python | -| test.py | text/x-script.phyton | -| test.rtf | application/rtf | -| test.rtf | application/x-rtf | -| test.rtf | text/richtext | -| test.rtf | text/rtf | -| test.sh | application/x-bsh | -| test.sh | application/x-sh | -| test.sh | application/x-shar | -| test.sh | text/x-script.sh | -| test.sh | text/x-sh | -| test.tar | application/tar | -| test.tar.gz | application/gzip | -| test.tar.gz | application/octet-stream | -| test.tar.gz | application/x-compressed | -| test.tar.gz | application/x-gzip | -| test.tga | image/x-tga | -| test.txt | text/plain | -| test.txt.gz | application/gzip | -| test.txt.gz | application/octet-stream | -| test.txt.gz | application/x-compressed | -| test.txt.gz | application/x-gzip | -| test.wav | audio/x-wav | -| test.wmf | application/x-msmetafile | -| test.wmf | image/wmf | -| test.wmf | windows/metafile | -| test.xcf | application/x-xcf | -| test.xml | application/xml | -| test.xpm | image/x-xbitmap | -| test.xpm | image/x-xpixmap | -| test.xpm | image/xpm | -| test.zip | application/zip | - -
- ## wand Metrics -| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) | -| :--- | -------: | --: | ---: | ---: | ----------: | ---: | -------: | ---: | -| HTML | 1 | 0.1 | 1044 | 0.81 | 10 | 0.12 | 0 | 0.00 | -| R | 7 | 0.7 | 154 | 0.12 | 59 | 0.69 | 70 | 0.69 | -| JSON | 1 | 0.1 | 80 | 0.06 | 0 | 0.00 | 0 | 0.00 | -| Rmd | 1 | 0.1 | 17 | 0.01 | 17 | 0.20 | 31 | 0.31 | +| Lang | \# Files | (%) | LoC | (%) | Blank lines | (%) | \# Lines | (%) | +| :--- | -------: | ---: | --: | ---: | ----------: | ---: | -------: | ---: | +| R | 7 | 0.78 | 154 | 0.61 | 59 | 0.78 | 70 | 0.71 | +| JSON | 1 | 0.11 | 80 | 0.32 | 0 | 0.00 | 0 | 0.00 | +| Rmd | 1 | 0.11 | 17 | 0.07 | 17 | 0.22 | 29 | 0.29 | ## Code of Conduct