-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
198 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import mne_cpp.core | ||
import mne_cpp.core as mne | ||
# import mne_cpp.pdf_doc | ||
from os import stat | ||
|
||
mne_cpp.core.version() | ||
mne.version() | ||
|
||
projectFolder = mne_cpp.core.baseFolder() | ||
projectFolder = mne.baseFolder() | ||
|
||
# Recursively list all the files in a directory and order by size and print results. | ||
listOfFiles = [] | ||
mne_cpp.core.recursiveFolderProcess(projectFolder + 'doc/gh-pages', lambda f: \ | ||
listOfFiles.append((f, stat(f).st_size)) \ | ||
if f.name.endswith('.md') \ | ||
else None ) | ||
mne.recursiveFolderProcess(projectFolder + 'doc/gh-pages', lambda f: \ | ||
listOfFiles.append((f, stat(f).st_size)) \ | ||
if f.name.endswith('.md') \ | ||
else None ) | ||
listOfFiles.sort(reverse=True, key=lambda f:f[1]) | ||
for f in listOfFiles: | ||
print('File: ' + f[0].path + ' - (' + mne_cpp.core.sizeHumanReadable(f[1]) + ')') | ||
print('File: ' + f[0].path + ' - (' + mne.sizeHumanReadable(f[1]) + ')') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,93 @@ | ||
import mne_cpp.core | ||
import mne_cpp.pdf_doc | ||
import mne_cpp.pdf_doc as mnepdf | ||
|
||
projectFolder = mne_cpp.core.baseFolder() | ||
webBaseFolder = projectFolder + 'doc/gh-pages' | ||
|
||
# webDocuments = mne_cpp.pdf_doc.scanFolder(webBaseFolder) | ||
# webDocuments = mnepdf.scanFolder(webBaseFolder) | ||
# print(webDocuments) | ||
|
||
# web = mne_cpp.pdf_doc.buildWebStructure(webDocuments) | ||
# web = mnepdf.buildWebStructure(webDocuments) | ||
# print('Printing Web Structure:') | ||
# print(web) | ||
|
||
# (pathLabel, filePath, fileName, fileExt, fullPath) = mne_cpp.core.extractFilePaths('../../doc/gh-pages/pages/documentation/anonymize.md') | ||
(pathLabel, filePath, fileName, fileExt, fullPath) = mne_cpp.core.extractFilePaths('../../doc/gh-pages/pages/contact.md') | ||
# (pathLabel, filePath, fileName, fileExt, fullPath) = mne_cpp.core.extractFilePaths('../../doc/gh-pages/pages/contact.md') | ||
|
||
# inFile = open(fullPath, mode = 'r', encoding = 'utf8') | ||
# inText = inFile.read() | ||
# inFile.close() | ||
|
||
# outText = mnepdf.parseUnorderedList(inText) | ||
# outFile = open(pathLabel + filePath + fileName + '.PROCESSED' + '.' + fileExt, mode = 'w', encoding = 'utf8') | ||
# outFile.write(outText) | ||
# outFile.close() | ||
|
||
inText = r''' | ||
--- | ||
layout: default | ||
title: Markdown kitchen sink | ||
nav_order: 99 | ||
--- | ||
(\n(( *[-*] *)|(\s*\d+\.\s*))[^\-*\n ].+)+ | ||
(\n(( *[-*] *)|( *\d+\. *))[^\-*\n ].+)+ | ||
(\n(( *[-*] *)|( *\d+\. *))[^\-*\n ].+)+ | ||
Text can be **bold**, _italic_, or ~~strikethrough~~. | ||
[Link to another page](another-page). | ||
There should be whitespace between paragraphs. | ||
There should be whitespace between paragraphs. We recommend including a README, or a file with information about your project. | ||
# [](#header-1)Header 1 | ||
This is a normal paragraph following a header. GitHub is a code hosting platform for version control and collaboration. It lets you and others work together on projects from anywhere. | ||
## [](#header-2)Header 2 | ||
> This is a blockquote following a header. | ||
> | ||
> When something is important enough, you do it even if the odds are not in your favor. | ||
### [](#header-3)Header 3 | ||
```js | ||
// Javascript code with syntax highlighting. | ||
var fun = function lang(l) { | ||
dateformat.i18n = require('./lang/' + l) | ||
return true; | ||
} | ||
``` | ||
```ruby | ||
# Ruby code with syntax highlighting | ||
GitHubPages::Dependencies.gems.each do |gem, version| | ||
s.add_dependency(gem, "= #{version}") | ||
end | ||
``` | ||
- level 1 item | ||
- level 2 item | ||
- level 2 item | ||
- level 3 item | ||
- level 3 item | ||
- level 1 item | ||
- level 2 item | ||
- level 2 item | ||
- level 2 item | ||
- level 1 item | ||
- level 2 item | ||
- level 2 item | ||
- level 1 item | ||
''' | ||
|
||
outText = mnepdf.parseLists(inText) | ||
|
||
|
||
|
||
|
||
|
||
a = 3 | ||
|
||
inFile = open(fullPath, mode = 'r', encoding = 'utf8') | ||
inText = inFile.read() | ||
inFile.close() | ||
|
||
outText = mne_cpp.pdf_doc.parseUnorderedList(inText) | ||
outFile = open(pathLabel + filePath + fileName + '.PROCESSED' + '.' + fileExt, mode = 'w', encoding = 'utf8') | ||
outFile.write(outText) | ||
outFile.close() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
\begin{itemize} | ||
\item level 1 item | ||
- level 2 item | ||
- level 2 item | ||
- level 3 item | ||
- level 3 item | ||
\item level 1 item | ||
- level 2 item | ||
- level 2 item | ||
- level 2 item | ||
\item level 1 item | ||
- level 2 item | ||
- level 2 item | ||
\item level 1 item | ||
\end{itemize} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
\begin{itemize} | ||
\item level 1 item | ||
\begin{itemize} | ||
\item level 2 item | ||
\item level 2 item | ||
\begin{itemize} | ||
\item level 3 item | ||
\item level 3 item | ||
\end{itemize} | ||
\end{itemize} | ||
\item level 1 item | ||
\begin{itemize} | ||
\item level 2 item | ||
\item level 2 item | ||
\item level 2 item | ||
\end{itemize} | ||
\item level 1 item | ||
\begin{itemize} | ||
\item level 2 item | ||
\item level 2 item | ||
\end{itemize} | ||
\item level 1 item | ||
\end{itemize} | ||
|
||
|
||
|
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters