I have several collections where Jekyll generates GeoJSON from the source. With 2.4, I gave each file in the collection a random extension, such as abc.xx, with the following example definition in _config.yml:
features:
output: true
permalink: /features/:path.geojson
This would take abc.xx and put the output in /features/abc.geojson
This no longer works in Jekyll 3. It now creates /features/abc.geojson.xx which isn't correct, and I cannot work out how to retain the previous behaviour. If I leave out the extension, e.g. abc, the file isn't output. If I call it e.g. 'abc.' then I get a syntax error. I tried with ':name' instead of ':path' but that didn't work either. I cannot call the source abc.geojson because the source isn't GeoJSON and Github will try and render the source if it's called .geojson. Apart from this, I don't care what the source is called so long as it creates abc.geojson.
Anyone?
Later: I have 2 GeoJSON files that are not part of a collection. The source for these was called xxx.geo with a permalink of /xxx.geojson in the front matter. I renamed these to just 'xxx' without an extension and a file 'xxx.geojson' is correctly generated. So it's looking increasingly like, apart from the change in behaviour from version 2, there is a bug in the processing of collections: collection items without an extension are not being output.
Related
Currently I can successfully generate the map output file but I have no idea how to display it in practice. Basically, it should be a 2D SLAM map.
The project I'm using is available at the following link on Github. This project basically uses Google Cartographer 2D SLAM without ROS.
Compiling the project I get an output file called "map_output" but it seems to be completely raw: it's not even binary. How can I convert or read it in a viewable format?
Inside the main file, specifically inside the main function, it can be seen how data consisting of inertial measurements (IMU) is taken as input and processed to provide an output map.
Update: map_output file is available here. (IMU data file is available here.) I'm pretty sure both can be read and/or represented in the same way.
I am trying IronPDF. I want to insert PDF metadata to database which I read with IronPDF. However, some "ı" characters in the metadata are not read with IronPDF. Spaces are left in place of these characters. Here is my code sample:
var md = PdfDocument.FromFile("___PATH OF PDF FILE___");
var article_title = md.MetaData.Title;
When I copy paste string to Notepad++ it gives a result like this:
And here is the screenshot of application view:
Is there a way to solve this problem or is this a bug of IronPDF? If everything goes well, of course, I think of buying. But of course, if it fails on the first try, continue to iTextSharp.
EDIT: First of all, I apologize for Windows, which made me surprised. I struggled to get a new system up all day and unfortunately it's still visual studio etc. not to be installed. I added one of the files I had problems with in the below and the IronPDF version appears as 2019.7.0.0.
PDF file: https://yadi.sk/d/HwP9JWRWTzMlSA
First of all, since you haven't provided us with a sample PDF to work with; I've google some Turkish PDF documents having metadata with Turkish characters. This is the file that I came up with: link
As you can see above the Author metadata field has ı Turkish character.
Then I created a dotnet fiddle in order to test this file using IronPDF (with the latest available version - since you haven't specified any):
sample using IronPDF
The output from this sample is ElifCakroglu which is showing the exact same symptom when copied to Notepad++:
Playing with the encodings did not help resolving this issue. So I created another dotnet fiddle to test your alternative solution which was iTextSharp: sample using iTextSharp
This time everything was working as it should be: ElifCakıroglu
Note: I've also tried creating a Word 2016 document and saving it as a PDF then using that file with the above samples and both of them did not work (not accepting as a valid PDF) for some reason. After that I tried and online PDF document validator, but the file was fine. Then I used an online converter to change the PDF version with the default settings and used the output PDF with both samples and the surprising thing is that both of them worked correctly.
My conclusion is that iTextSharp is working consistently with both documents having metadata with Turkish characters present, while IronPDF works correctly 50% of the time.
I believe that this issue is resolved and can be tested in the 2020.9 release branch of IronPdf.
https://www.nuget.org/packages/IronPdf/
I am a new user of blogdown using Hugo. I would like to create a new post that includes R code to read a data file.
The data file is in my static folder, local path C:\mydir\myblogdown\static\data\savedrecs.txt. Since I was successful in referring to an image using a relative path like this, ![](/images\myimage.jpg), I tried reading the data using something similar for the data file, read.csv("/data\savedrecs.txt"), but that didn't work.
I started playing around with the list.files() function to see if I could find a relative path that worked in my local version of the post, list.files("../../static/data") worked, showing me ## [1] "savedrecs.txt".
I tried searching around other folks' blogdown repos on Github to see how they might have referred to a data file, but the only example I found referred to a data file using a URL.
I suspect that this may be due to the location of your data file. In my working example, the Rmd form of my blog post is in the directory, called p0bs/content/post. I also add my data file (a CSV in my case) to this directory.
I then treat the rest of the post as I would in a standard Rmarkdown website, with Rmd chunks (that are named without spaces). In your case, that code would include:
read.csv("savedrecs.txt")
I hope that helps you.
I can bring up a web page, no problem. I can save the webpage...as html, no problem. I need to save the webpage as mht so I can can get all the html that gets hidden without saving as mht. In researching I'm coming up with absolutely nothing as to how to save as mht using python. Like I said above I can try to save it as a mht file, using the standard coded for saving as html but that simply doesn't work...not surprised it doesn't work either, but it was worth a shot.
url = 'https://www.thewebsite.com'
html = urllib.request.urlopen(url).read()
m = open('websitetest.mht', 'w')
m.write(str(html))
m.close()
The site I'm trying to save does 'hidden code' that comes across when saved as mht, but not when saved as html. Hence why I'm trying to save as mht so I get all the code and then can go through the code to pull off what I need to compile a database.
There is a very handy Github project coded in Python 2.7 (you need to make simple modifications to make it compatible with Python 3.4). This project has code for packing/unpacking MHT files. I think this is what you are looking for:
Un/packs an MHT (MHTML) archive into/from separate files, writing/reading them in directories to match their Content-Location.
Recently came accross the same issue,
I wanted to convert html page to mht format.
Followed Tim Golden's Python stuff and was able to achieve it using win32com.
http://timgolden.me.uk/python/win32_how_do_i/create-an-mhtml-archive.html
import win32com.client as win32
URL = r'C:\WorkSpace\chetan_index.html' # issues found 1> One while using local files, pass the path in url format like file://directory01/directory02/index.html with %20 formating for special characters
# 2> Also same to be followed for files reffered internally inside html file i.e. src="file://reference/directory01/smiley.png"
# 3> Rare issue, if alt tag is found with src, images are not embedded into mht coreectly, trying poping alt tag from web page and then call CreateMHTMLBody
message = win32.gencache.EnsureDispatch('CDO.Message')
message.CreateMHTMLBody(URL, 0) # 0 - suppress none , download all images and others
stream = win32.gencache.EnsureDispatch(message.GetStream())
stream.SaveToFile(r'C:\temp\saved_mht.mht', 2) # 2, for overwrite existing file, 1 for not to overwrite
stream.Close()
So I am having an R nightmare. I've returned to a project I built under the previous iteration (or perhaps one more) of RStudio. I produced a workable report that I was asked to update, and my current bugbear wasn't around then. Here is what happens:
My report file is "ISS Time Series.Rmd". It calls three other files:
"mystyles.sty", which updates the LaTeX preamble to use some additional packages.
"functions.R" and "load.R". The former contains frequently used functions I've written, and the latter loads the data I'm using.
I source the two R functions in the .Rmd file. When I try to Knit the report, whether I get an error or am successful, my two .R files and my one .sty file are deleted. And not just deleted -- gone for good.
I do not know what is up. I have ruined my previous work simply by returning to examine the original file.
Please, somebody has to help me here. My workflow is shot to hell if I have to write every last bit of code over and over again in each report.
UPDATE: Even copying the files to another directory doesn't help.
Here is the code block that calls the "load.R" file:
```{r loaddata}
#
# ------- Load Data
#
# This section loads the ISS survey files one at a time and saves them as
# read.SPSS objects within a list. It names these eleven objects as "ISS 2002",
# "ISS 2003", etc... until "ISS 2012". This file may be prohibitively large.
#
source("load.R") # Loads the ISS Survey files
```
Rename your file to ISS_Time_Series.Rmd and try again.
It is the spaces in the document name that makes rmarkdown::render() delete the files that have been loaded or sourced.
A an issue has already been filed. See https://github.com/rstudio/rmarkdown/issues/580