wikilinkfixer

1.1.1 • Public • Published

wikilinkfixer

Converts list of wiki media URLs with the 'File:' url structure to a list of the actual source file URLs with the /#/##/ hash structure.

mwfix {listPath} {urlStructure}

Example from wikitravel: https://wikitravel.org/en/File:Belum_Temenggor_Forest_Reserve_Banner.jpg

If this link is in a list called list.txt, and it is in our current directory, we can convert it with this command:

mwfix "list.txt" "/upload/shared/"

Output from mwfix: https://wikitravel.org/upload/shared/b/bf/Belum_Temenggor_Forest_Reserve_Banner.jpg

  • list.txt is our source file
  • "/upload/shared/" is the file structure after the TLD and up to the hash that wikitravel uses.

Readme

Keywords

none

Package Sidebar

Install

npm i wikilinkfixer

Weekly Downloads

2

Version

1.1.1

License

ISC

Unpacked Size

2.14 kB

Total Files

3

Last publish

Collaborators

  • bennettj4