Browse Source

dir cleanup

tags/v0.2.0
Bob Rudis 8 years ago
parent
commit
b000001c55
  1. BIN
      .DS_Store
  2. 1
      .gitignore
  3. 3
      .travis.yml
  4. 1
      NAMESPACE
  5. 53
      R/aaa.r
  6. 2
      R/tidy.r
  7. 4
      man/tidy_html.Rd
  8. 29
      man/tidy_options.Rd
  9. 14
      src/htmltidy.cpp
  10. 4
      src/tidylib.c

BIN
.DS_Store

Binary file not shown.

1
.gitignore

@ -1,3 +1,4 @@
.DS_Store
.Rproj.user .Rproj.user
.Rhistory .Rhistory
.RData .RData

3
.travis.yml

@ -2,9 +2,6 @@ language: r
warnings_are_errors: true warnings_are_errors: true
sudo: required sudo: required
apt_packages:
- libtidy-dev
env: env:
global: global:
- CRAN: http://cran.rstudio.com - CRAN: http://cran.rstudio.com

1
NAMESPACE

@ -1,6 +1,5 @@
# Generated by roxygen2: do not edit by hand # Generated by roxygen2: do not edit by hand
export(tidy_html) export(tidy_html)
export(tidy_options)
importFrom(Rcpp,sourceCpp) importFrom(Rcpp,sourceCpp)
useDynLib(htmltidy) useDynLib(htmltidy)

53
R/aaa.r

@ -1,53 +0,0 @@
#' @title HTML, XHTML & XML Options for tidy_html
#' @description This dataset contains the options (and their default settings) for
#' tidy_html. They are passed in a named-list to tidy_html
#'
#' \itemize{
#' \item \code{Option}: Option name
#' \item \code{Type}: Option value type
#' \item \code{Default}: Is it the default for tidy_html?
#' }
#'
#' @docType data
#' @keywords datasets
#' @name tidy_options
#'
#' @references The \href{http://api.html-tidy.org/tidy/quickref_5.1.25.html}{
#' HTML Tidy Options Quick Reference}
#'
#' @export
#' @usage tidy_options
#' @note Last updated 2016-09-09.
#' @format A data frame with 55 rows and 3 variables
NULL
tidy_options <- structure(list(Option = c("add-xml-decl", "add-xml-space", "alt-text",
"anchor-as-name", "assume-xml-procins", "bare", "clean", "coerce-endtags",
"css-prefix", "decorate-inferred-ul", "doctype", "drop-empty-elements",
"drop-empty-paras", "drop-font-tags", "drop-proprietary-attributes",
"enclose-block-text", "enclose-text", "escape-cdata", "fix-backslash",
"fix-bad-comments", "fix-uri", "gdoc", "hide-comments", "hide-endtags",
"indent-cdata", "input-xml", "join-classes", "join-styles", "literal-attributes",
"logical-emphasis", "lower-literals", "merge-divs", "merge-emphasis",
"merge-spans", "ncr", "new-blocklevel-tags", "new-empty-tags",
"new-inline-tags", "new-pre-tags", "numeric-entities", "omit-optional-tags",
"output-html", "output-xhtml", "output-xml", "preserve-entities",
"quote-ampersand", "quote-marks", "quote-nbsp", "repeated-attributes",
"replace-color", "show-body-only", "skip-nested", "uppercase-attributes",
"uppercase-tags", "word-2000"), Type = c("Boolean", "Boolean",
"String", "Boolean", "Boolean", "Boolean", "Boolean", "Boolean",
"String", "Boolean", "DocType", "Boolean", "Boolean", "Boolean",
"Boolean", "Boolean", "Boolean", "Boolean", "Boolean", "Boolean",
"Boolean", "Boolean", "Boolean", "Boolean", "Boolean", "Boolean",
"Boolean", "Boolean", "Boolean", "Boolean", "Boolean", "AutoBool",
"Boolean", "AutoBool", "Boolean", "Tag names", "Tag names", "Tag names",
"Tag names", "Boolean", "Boolean", "Boolean", "Boolean", "Boolean",
"Boolean", "Boolean", "Boolean", "Boolean", "enum", "Boolean",
"AutoBool", "Boolean", "Boolean", "Boolean", "Boolean"), Default = c("no",
"no", "-", "yes", "no", "no", "no", "yes", "-", "no", "auto",
"yes", "yes", "no", "no", "no", "no", "no", "yes", "yes", "yes",
"no", "no", "no", "no", "no", "no", "yes", "no", "no", "yes",
"auto", "yes", "auto", "yes", "-", "-", "-", "-", "no", "no",
"no", "no", "no", "no", "yes", "no", "yes", "keep-last", "no",
"no", "yes", "no", "no", "no")), .Names = c("Option", "Type",
"Default"), row.names = 3:57, class = "data.frame")

2
R/tidy.r

@ -15,6 +15,8 @@
#' @param content atomic character or raw vector of content to tidy #' @param content atomic character or raw vector of content to tidy
#' @param options named list of options #' @param options named list of options
#' @return Atomic character vector of tidy HTML/XML/XHTML content #' @return Atomic character vector of tidy HTML/XML/XHTML content
#' @references \url{https://github.com/htacg/tidy-html5/blob/master/include/tidyenum.h}
#' (for definitions of the options supported above).
#' @export #' @export
tidy_html <- function(content, options=list(TidyXhtmlOut=TRUE)) { tidy_html <- function(content, options=list(TidyXhtmlOut=TRUE)) {
.Call('htmltidy_tidy_html_int', PACKAGE='htmltidy', source=content, options=options) .Call('htmltidy_tidy_html_int', PACKAGE='htmltidy', source=content, options=options)

4
man/tidy_html.Rd

@ -27,4 +27,8 @@ Currently supported options: \code{TidyAltText}, \code{TidyBodyOnly},
\code{TidyWrapLen}, \code{TidyXhtmlOut}, \code{TidyXmlDecl}, \code{TidyXmlOut}, \code{TidyWrapLen}, \code{TidyXhtmlOut}, \code{TidyXmlDecl}, \code{TidyXmlOut},
\code{TidyXmlTags}. \code{TidyXmlTags}.
} }
\references{
\url{https://github.com/htacg/tidy-html5/blob/master/include/tidyenum.h}
(for definitions of the options supported above).
}

29
man/tidy_options.Rd

@ -1,29 +0,0 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aaa.r
\docType{data}
\name{tidy_options}
\alias{tidy_options}
\title{HTML, XHTML & XML Options for tidy_html}
\format{A data frame with 55 rows and 3 variables}
\usage{
tidy_options
}
\description{
This dataset contains the options (and their default settings) for
tidy_html. They are passed in a named-list to tidy_html
\itemize{
\item \code{Option}: Option name
\item \code{Type}: Option value type
\item \code{Default}: Is it the default for tidy_html?
}
}
\note{
Last updated 2016-09-09.
}
\references{
The \href{http://api.html-tidy.org/tidy/quickref_5.1.25.html}{
HTML Tidy Options Quick Reference}
}
\keyword{datasets}

14
src/htmltidy.cpp

@ -1,20 +1,8 @@
#include <Rcpp.h> #include <Rcpp.h>
#include <tidy.h> #include <tidy.h>
#include <tidybuffio.h> #include <tidybuffio.h>
// #ifdef __linux__
// #include <tidy/tidy.h>
// #include <tidy/buffio.h>
// #endif
//
// #ifdef __APPLE__
// #include <tidy.h>
// #include <tidybuffio.h>
// #endif
// libtidy docs:
// http://api.html-tidy.org/tidy/tidylib_api_5.2.0/tidyenum_8h.html#a3a1401652599150188a168dade7dc150
// NOTE: cannot do "using namespace Rcpp;" b/c of annoying warnings about the // NOTE: cannot do "using namespace Rcpp;" b/c of annoying warnings about the
// ambiguity of 'yes'. // ambiguity of 'yes'.

4
src/tidylib.c

@ -1079,8 +1079,8 @@ int tidyDocSaveStdout( TidyDocImpl* doc )
#endif #endif
int status = 0; int status = 0;
uint outenc = cfg( doc, TidyOutCharEncoding ); // uint outenc = cfg( doc, TidyOutCharEncoding );
uint nl = cfg( doc, TidyNewline ); // uint nl = cfg( doc, TidyNewline );
// StreamOut* out = TY_(FileOutput)( doc, stdout, outenc, nl ); // StreamOut* out = TY_(FileOutput)( doc, stdout, outenc, nl );
// if ( 0 == status ) // if ( 0 == status )

Loading…
Cancel
Save