PubPub reformating in a single message.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2023-05-16 10:20:40 -05:00
parent baba99ec84
commit eeb2330fe8
2 changed files with 18 additions and 2 deletions

View File

@ -170,6 +170,17 @@ Markdeep >> fromMarkdownFile: aFileReference [
^ self.
]
{ #category : #accessing }
Markdeep >> fromPubPubToMarkdeep [
self
removeAutoGeneratedFileNotice;
removeCCByLicenseDiv;
commentPubPubDelimiters;
replaceEscapedCharacters;
renamePubPubFootnotes;
removeAlternativeImagesArray
]
{ #category : #accessing }
Markdeep >> gtTextFor: aView [
<gtView>
@ -402,6 +413,8 @@ Markdeep >> pubPubRawLinks [
{ #category : #accessing }
Markdeep >> reformatPubPubFootnotes [
| footnotesLines footnotesIDs toReplace response |
(self = self pubPubFootnotesLinesRangeForContents)
ifTrue: [^self].
footnotesLines := self contents lines
copyFrom: self pubPubFootnotesLinesRangeForContents first
to: self pubPubFootnotesLinesRangeForContents second.

View File

@ -53,11 +53,14 @@ PubPub >> defaultTitle [
PubPub >> downloadContents [
| workingDirectory |
workingDirectory := self folder / self currentLanguage / 'book'.
self tableOfContents keysAndValuesDo: [ :name :chapterAddress |
self tableOfContents keysAndValuesDo: [ :name :chapterAddress | |currentFileName|
currentFileName := name, '--', chapterAddress, '.md'.
(workingDirectory / currentFileName) asFileReference ensureDelete.
(workingDirectory / 'markdown') asFileReference ensureDelete.
ZnClient new
get: self address, 'pub/', chapterAddress, '/download/markdown';
downloadTo: workingDirectory .
workingDirectory / 'markdown' renameTo: name, '--', chapterAddress, '.md'
workingDirectory / 'markdown' renameTo: currentFileName
].
^ workingDirectory
]