Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cross-project-issues-dev] Dart script for wiki migration to mark-down

Dart script to migrate wiki pages to markdown

This is a Dart script written to migrate wiki pages to markdown.
Requires dart installed on the machine.

It:

Downloads the images
Converts the wiki page into mark-down using the input file name as
template to generate the target file name

Open issues / work left to be done

Incorrectly format code in the wiki page 😠 is (in some case)
duplicated in the output, manually delete the first included code
Documents with special characters or spaces 😱 may result in broking
links. But than again, using such characters was not smart in the
first place, right? Now you have to pay for it with manual work. 😉
Classification tags in the wiki are present in the output, you may
want to delete it in the output

Usage

Open the migrate.dart file and change the wikiPageUrls, listing all
the pages you want to migrate.
Change the imageRepository to the repo you migrating your wiki pages to

Afterwards run the script, output is copied into the docs folder (can
be changed in the script)

dart migrate.dart

Copy this folder to your target repo and create a pull request to get
in merged. 😎

Checking the links the in markdown documents

Once merged into the repo you can check for broken links with another
script. dart linkchecker.dart can be used to checked broken links the
listed mark-down pages.

Adjust rawUrls in the script to customize the checked pages. Ensure
you use the https://raw.githubusercontent.com/ URL to avoid checking
the Github links in your mark-downpage

Add a note to the wiki that the page has been migrated

To be friendly to your users and if the wiki is still in edit mode,
add a note to the wiki that the page has been migrated, something
like:

{{Warning|This page has been migrated to to
https://github.com/eclipse-platform/eclipse.platform.ui/blob/master/docs/JFaceDataBinding.md.}}

On Wed, Apr 24, 2024 at 10:06 AM Lars Vogel <lars.vogel@xxxxxxxxxxx> wrote:
>
> Hi,
>
> We have written a Dart script for automatically migrating Eclipse wiki
> pages to mark-down.
>
> See https://github.com/eclipse-equinox/p2/pull/503 as an example for
> the migrated result.
>
> You can find it here https://github.com/vogellacompany/wikimigration/,
> see the README.md for its usage (copied below for the lazy reader).
>
> Best regards, Lars
>
> --
> Eclipse Platform project co-lead
> CEO vogella GmbH
>
> Haindaalwisch 17a, 22395 Hamburg
> Amtsgericht Hamburg: HRB 127058
> Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
> USt-IdNr.: DE284122352
> Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com



-- 
Eclipse Platform project co-lead
CEO vogella GmbH

Haindaalwisch 17a, 22395 Hamburg
Amtsgericht Hamburg: HRB 127058
Geschäftsführer: Lars Vogel, Jennifer Nerlich de Vogel
USt-IdNr.: DE284122352
Fax (040) 5247 6322, Email: lars.vogel@xxxxxxxxxxx, Web: http://www.vogella.com


Back to the top