ropensci / popler

The R package to browse and query the popler database
https://docs.ropensci.org/popler
MIT License
8 stars 7 forks source link

`fancy_dictionary` function #47

Open AldoCompagnoni opened 7 years ago

AldoCompagnoni commented 7 years ago

We need a function akin to fancy_browse, but working for dictionary. This function should:

  1. Open an html document with a list of variables and their description
  2. A link to each variable reporting the unique occurrences of each.
  3. This fancy_dictionary should return a different list in case full_tbl = FALSE or full_tbl = TRUE.
bochocki commented 7 years ago

Completed 1, 2, and 3, but I'm not sure I implemented (3) as intended. Unlike dictionary, fancy_dictionary does not currently allow users to choose which variables to display; they can only set full_tbl = TRUE or full_tbl = FALSE

bochocki commented 7 years ago

Quick thought: tf the goal is to only give the user two dictionary options ("full" or "not full"), then we can save time by building each version of the dictionary once instead of rebuilding it every time the user calls fancy_dictionary(). We could have some function, update_dictionary(), that runs whenever update_summary_table() runs, and we could save the html files in main popler directory.

AldoCompagnoni commented 7 years ago
  1. I like the update_dictionary() idea! You should do it if you find time.
  2. fancy_dictionary() does not work on my machine. It throws the following error:

pandoc.exe: Could not fetch C:/Program C:/Program: openBinaryFile: does not exist (No such file or directory) Error: pandoc document conversion failed with error 67

AldoCompagnoni commented 7 years ago

Error 67 is known, but I still can't fix it (some info on https://github.com/ramnathv/rcstatebin/issues/6)

AldoCompagnoni commented 7 years ago

fancy_dictionary and fancy_browse now both work, but one more hurdle:

Getting the logo image to appear. Padoc.exe does not work when path has "Program Files" in it. We need to find a way add "%20" in the path.

bochocki commented 7 years ago

We need to edit the "browse.html" and "dictionary.html" documents after they're created but before they're displayed. We need to replace any spaces in the system.file("",package="popler") path with %20.