Create a notebook from several md files [duplicate] - pdf

This question already has answers here:
Markdown and including multiple files
(20 answers)
Closed 2 years ago.
I'm new to Stack Overflow.
I write a lot. So I created different .md files in different directories.
Now I wanna create a notebook(it doesn't matter in .pdf format or another .md) from all the md files but I have some problems:
It will be messy I guess
I don't know how to do so
I wanted to know if there is a way to do it in a tidy way :)

I see your post is tagged for r-markdown, so I am going to show you how to do it the r-markdown way.
You can create an index.Rmd file (this doesn't have to be named index.rmd) that links to other r markdowns.
In your index file, add a code chunk with the following bit of code:
```{r child = 'children/summary.Rmd'}
```
This will knit what you have in the summary.Rmd into index.Rmd. For this example, I put summary.Rmd into a sub directory called "children".
Let me know if you have any questions!

I believe that the fastest and the most hassle-free way for you to start with the notebook is to use one of the myriads of static generators available (for example, MkDocs Material) or proceed with an application for taking notes (for example, Notable, Boost Note, and Joplin)

Related

Karate Automation: Is there any way we can set the Scenario name dynamically from a json file [duplicate]

This question already has answers here:
Can we parameterize the request file name to the Read method in Karate?
(2 answers)
Closed 1 year ago.
I am using a JSON file which act as a test case document for my API testing. The JSON contain Test Case ID, Test case Description, Header and Request body details, which should be the driving factor of Automation
Currently i am looping a feature over this json file to set different header and body validations. However it will be helpful if i can set the Scenario name from JSON file while its iterating
Something like
serverpost.feature
Feature:re-usable feature to publish data
Scenario: TC_NAME # TC_NAME is avaliable in the JSON data passed to this feature. However, CURRENTLY ITS NOT TAKING THIS DATA FROM JSON FILE.
Given path TC_ID # TC ID is taken from JSON
Given url 'http://myappurl.com:8080/mytestapp/Servers/Data/uploadServer/'
And request { some: '#(BODY)' } # Request Body Details is taken from JSON
Please suggest
In my honest opinion, you are asking for a very un-necessary feature. Please refer to the demo examples, look for it in the documentation.
Specifically, look at this one: dynamic-params.feature. There are multiple ways to create / use a data table. Instead of trying to maintain 2 files - think of Karate as being both - your data table AND the test execution. There is no need to complicate things further.
If you really really want to re-use some JSON lying around, it is up to you but you won't be able to update the scenario name, sorry. What I suggest is just use the print statement to dump the name to the log and it will appear in the HTML report (refer to the doc). Note that when calling a feature in a loop using a JSON array, the call argument is ALREADY included the report, so you may not need to do anything.
Just an observation - your questions seem to be very basic, do you mind reading the doc and the examples a bit more thoroughly, thanks.

Downloading all full-text articles in PMC and PubMed databases

According to one of the answered questions by NCBI Help Desk , we cannot "bulk-download" PubMed Central. However, can I use "NCBI E-utilities" to download all full-text papers in PMC database using Efetch or at least find all corresponding PMCids using Esearch in Entrez Programming Utilities? If yes, then how? If E-utilities cannot be used, is there any other way to download all full-text articles?
First of all, before you go downloading files in bulk, I highly recommend you read the E-utilities usage guidelines.
If you want full-text articles, you're going to want to limit your search to open access files. Furthermore, I suggest also restricting your search to Medline articles if you want articles that are any good. Then you can do the search.
Using Biopython, this gives us :
search_query = 'medline[sb] AND "open access"[filter]'
# getting search results for the query
search_results = Entrez.read(Entrez.esearch(db="pmc", term=search_query, retmax=10, usehistory="y"))
You can use the search function on the PMC website and it will display the generated query that you can copy/paste into your code.
Now that you've done the search, you can actually download the files :
handle = Entrez.efetch(db="pmc", rettype="full", retmode="xml", retstart=0, retmax=int(search_results["Count"]), webenv=search_results["WebEnv"], query_key=search_results["QueryKey"])
You might want to download in batches by changing retstart and retmax by variables in a loop in order to avoid flooding the servers.
If handle contains only one file, handle.read() contains the whole XML file as a string. If it contains more, the articles are contained in <article></article> nodes.
The full text is only available in XML, and the default parser available in pubmed doesn't handle XML namespaces, so you're going to be on your own with ElementTree (or an other parser) to parse your XML.
Here, the articles are found thanks to the internal history of E-utilities, which is accessed with the webenv argument and enabled thanks to the usehistory="y" argument in Entrez.read()
A few tips about XML parsing with ElementTree : You can't delete a grandchild node, so you're probably going to want to delete some nodes recursively. node.text returns the text in node, but only up to the first child, so you'll need to do something along the lines of "".join(node.itertext()) if you want to get all the text in a given node.
According to one of the answered questions by NCBI Help Desk , we cannot "bulk-download" PubMed Central.
https://www.nlm.nih.gov/bsd/medline.html + https://www.ncbi.nlm.nih.gov/pmc/tools/openftlist/ will download a good portion of it (I don't know the percentage). It will indeed miss the PMC full-texts articles whose license doesn't allow redistribution as explained on https://www.ncbi.nlm.nih.gov/pmc/tools/openftlist/.

How to Create folder with VB.Net? [duplicate]

This question already has answers here:
How do I create a folder in VB if it doesn't exist?
(12 answers)
Closed 9 years ago.
I need to know how i can check if the folder exist, and if it does not exist, create it
For Example:
If File.Exists(File Path) Then
Else
'Create a new folder following the path(Path here)
End If
And Thanks for your help.
You might want to consider using this class in order to determine if the folder exists: .Net Directory Class, as well as .Net File Class in order to find the functionality you need. Both of them offers an "Exists" function and a "Create" function.
If you have the case where multiple folders in the path don't exist (which you might want to consider checking for), you would need to include a loop to iterative create every folder in the path until you've reached your destination.

Paginating a long Markdown document?

I am writing a handbook for hotplate. It's going to be a lot bigger than I expected. So, I wanted to "break up" the document into several sub-documents.
I am thinking about slicing the documents according to its #titles. So:
# Main title
Under main title
## Installation
Under installation
## Initial use
Under initial use
Would generate three files:
maintitle.html -- with a point list pointing to installation.html and initialuse.html ("next")
installation.html -- with a link to maintitle.html ("prev") and one to initialuse.html ("next)
initialuse.html -- with links to installation.html ("prev")
It basically breaks up a Markdown file into sections.
Does something like this already exist?
"no" (3 years later) I guess this will help people in the future with the same question!

Extract image path from HTML in Objective C [duplicate]

This question already has an answer here:
Objective c getting image from an html string
(1 answer)
Closed 10 years ago.
Help!!!
I am fairly new to iPhone App development and I am caught up with parsing!
I am trying to read the feeds from a URL which ends in .cms
I was able to get the text from the source and remove the HTML using the flattenHTML code but I am having trouble with extracting the path for the image.
The path for the image is in something like: ....(text+html)...><img src="http://www....
If anybody could please help and suggest how i can get the path for the image extracted... :((
Thanks in advance!
You may apply a regular expression on your text to extract the path.
The pattern would be something like <img.*src?=?"(.*?)"