Git Product home page Git Product logo

dokuwiki_plugin_abc's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

dokuwiki_plugin_abc's Issues

PHP 7 compatibility

First of all, thank you for developing this plugin, it allowed me to use my wiki the way I didn't hope for. Unfortunately, it didn't work for me out-of-the-box. I've never developed a DokuWiki plugin before, so it took me some time to figure it out, but finally I discovered that the problem is PHP version-related. The plugin uses preg_match with /e modifier for extracting ID and title needed to generate image name, but /e modifier has been deprecated since PHP 5.5 and removed in 7.0. Failing to extract these pieces of information, the resulting image name is broken and so is the rendered HTML.

The solution seems to be pretty simple - remove /e modifier. With this little change it works flawlessly for my version of PHP (7.3) and from what I read, the modifier is completely meaningless in preg_match function anyway, so it should be compatible with older versions as well. I can create a pull request if there is anybody who can review it and eventually merge too.

use DW functions for media URLs

Use the ml() and/or mediaFN() functions for getting URLs for media (images, pdf, etc).

Add the timestamp through those as well and explain in a comment.

abc - plugin: different authors overwriting each other's musical excerpts.

DW: Detritus, PHP: 7.0.2, abcm2ps-8.10.1

$conf['im_convert'] = '/usr/bin/convert';
$conf['plugin']['abc']['displayErrorlog'] = 1;
$conf['plugin']['abc']['abc2ps'] = '/usr/local/bin/abcm2ps';

$conf['plugin']['abc']['params4img'] = '';

It is not a software bug as such, rather a design problem leading to the bug.

In the test case when author A working on page A embedding musical excerpt with X:1 and T:Name and author B working on the page B in the same namespace embedding a different musical excerpt with different contents and X:1 and T:name, who saves last overwrites previous authors content.

It is easily possible to have X and T identical for the different musical excerpts with different contents.

The ABC specification is that the X: (reference number) field is used to assign to each tune within a tunebook a unique reference number.

A T: (title) field must follow immediately after the X: field; it is the human identifier for the tune.

Authors publishing for example orchestral excerpt cannot assign any X, no such X exist (yet it must be present according to specs), at best they can number the number of excerpts on the page (starting with 1). At the same time different authors can work on the orchestral excerpt from the same piece (with different contents but the same title) on different pages.

abc plugin creates filename of the png file using X and T and that is not enough; the above scenario is easily reproducible, workaround none. Solution would be to add another parameter to the filename such as the name of the page from which the excerpt was created.

A side note: All the excerpts are saved in the namespace defined in mediaNS. In case of big number of excerpts it might lead to problems in the future.

Implement JavaScript solution

Implement abcjs [https://github.com/paulrosen/abcjs] as

a) a visual help while editing a tune
b) optional configurable output instead of the png

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.