Code Monkey home page Code Monkey logo

Comments (10)

rgleason avatar rgleason commented on September 24, 2024 2

After thinking about this possible tool, and finally discovering that the Move Plugin and Move Manager will accomplish this:
"All links to and from the pages that are moved will be updated to reflect the new location and/or name."

It seems to me that many of the the operations for a good DW Edit or Move Plugin "search" and "replace" of

  1. media links
  2. internal links
  3. external links

as controlled and operated by an intelligent and knowledgeable Editor - "Manager" are already programmed in the Move Plugin. Is there some way to make a text based

  1. "search"
  2. "search" and "replace"

which will operate on the

  1. Current page.
  2. Current namespace
  3. Current namespace and all below
  4. Entire book or Namespace.

and has an "Undo" in case there is a mess up?

We would have used this tool extensively while migrating and it would have saved hours, as it was we were very lucky to have 8-10 dedicated guys editing the 480 pages that were migrated completely by hand over a period of 1.5 months. I am very confident that such a tool would see continued use during ongoing maintenance!

PS: "Move" is a big word I guess. If you have any other questions, or need more clarification, please ask. It takes me a little while to get my brain back into what I was asking for.

re·cur·sive [ri- kur-siv] ADJECTIVE

  1. pertaining to or using a rule or procedure that can be applied repeatedly.
  2. Mathematics, Computers. pertaining to or using the mathematical process of recursion: a recursive function; a recursive procedure.

from dokuwiki-plugin-move.

michitux avatar michitux commented on September 24, 2024 1

The move plugin uses the search index of DokuWiki to find pages that contain links to moved pages or media files and then uses DokuWiki's parser to identify all links to pages or media files in the affected pages and changes them if necessary. Whenever a page is modified, a new revision of the page is created (but changes are batched, so when you move many pages e.g. using the tree-based move manager you should still only see 1-2 new revisions per affected page). In contrast to a simple search and replace this can identify much more complex situation e.g. when a link is [[Foo Bar]] it will be found if the page foo_bar is moved and using DokuWiki's parser makes sure that e.g. code blocks or special plugin syntax is not modified. Plugins can also add support, so e.g. the syntax of the include plugin will also be adjusted accordingly. I think it is therefore quite unlikely that there will be a major mess up. Individual pages can be easily reverted using the builtin revert functionality of DokuWiki.

External links are not indexed by DokuWiki and I believe this is also out of the scope of the move plugin (but it is not impossible, just slightly more difficult to implement). For links to pages and media files, mainly a user interface is missing. So as a summary what I understood so far what you would like to have is a four-step process:

  1. Search for a link target (maybe also using a list of pages that are linked but do not exist)
  2. Enter a new page/media id for the selected link target
  3. A preview which pages might be affected, maybe even with a preview of the actual changes (on request, this is not very cheap to calculate) with the possibility to select which pages should actually be changed (or even on a per-link level which links should be changed).
  4. Execute the changes.

And I guess an interface where this is possible for a larger amount of links all at once would also be useful. Is this correct so far?

I'm not sure this whole thing should be in the move plugin, but even if it should be a separate plugin it could make use of a lot of the functionality that is available in the move plugin.

I can definitely imagine that such a plugin could be useful, for example when you migrate data from another wiki or when you re-organize your wiki and split large pages that are referenced in a lot of places into parts. However, I don't see that I will create such a plugin/feature anytime soon.

from dokuwiki-plugin-move.

michitux avatar michitux commented on September 24, 2024

So you suggest that it should be able to adjust links without moving any pages or media files?

Note that you can rename media directories using the admin plugin, e.g. using the tree-based move manager (the link can be found above the simple move manager) - and then also all links will be automatically adjusted.

from dokuwiki-plugin-move.

rgleason avatar rgleason commented on September 24, 2024

Did not know tree based move manager would adjust all links (inluding media and internal links ?).
The reason I am looking for this utility tool is I needed it badly during migration from Druple6 to redirect and verify links to pages, namespaces, titles, and images within the entire text. An easy search and replace tool within the native dokuwiki editor would continue to be very useful.

from dokuwiki-plugin-move.

rgleason avatar rgleason commented on September 24, 2024
  • for maintenance.

from dokuwiki-plugin-move.

rgleason avatar rgleason commented on September 24, 2024

Is this correct so far?
Yes exactly. Good points.

Even if it should be a separate plugin it could make use of a lot of the functionality that is available in the move plugin.
Good!

However, I don't see that I will create such a plugin/feature anytime soon.
Yes, I understand why.... Perhaps knowing there is a good start, some other talented person will put their shoulder to the wheel...?

Thank you for your Plugin!

from dokuwiki-plugin-move.

rgleason avatar rgleason commented on September 24, 2024

What do you suggest I should I do with this very useful dialogue? If I close it, it gets lost doesn't it?

from dokuwiki-plugin-move.

michitux avatar michitux commented on September 24, 2024

I would leave it open as it is an open feature request. Closed issues are not lost, in the list of issues you can also choose to see closed issues - but they are far less visible of course.

from dokuwiki-plugin-move.

rgleason avatar rgleason commented on September 24, 2024

Michael,
I've added a paragraph with your answers to some questions to the Move Plugin
https://www.dokuwiki.org/plugin:move#technical_review_for_users

If you don't like what I've done you can remove it.

Rick

from dokuwiki-plugin-move.

splitbrain avatar splitbrain commented on September 24, 2024

From what I understand, there's nothing in here that will or should be implemented in the move plugin. If there is, a new more focused issue should be opened.

from dokuwiki-plugin-move.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.