Giter Club home page Giter Club logo

prosody_plugin's Introduction

The project is not actively maintained or developed by Scholars' Lab, but anyone should feel free to fork the project and work on it. Pull requests are accepted.

Dependencies

  • php: Requires XSL to be activated. Information can be found at the PHP:XSL Manual
  • WP Plugins: Custom Bulk Action plugin by Seravo

To Enable XSL:

In your php.ini

  1. Uncomment ;extension=php_xsl.dll
  2. Change extension_dir to extension_dir = "./ext"

Things to know

  • In order for the poems to show up, you must set WP Permalinks to Postname (i.e., pretty permalinks) in the WP settings.
  • In WP Settings/Writing, make sure that "Wordpress should correct invalidly nested XHTML automatically" is not checked. If it is checked, WP will strip out breaks that are necessary for proper display of the poems and rhymebar inputs.

Poem Upload process

  • In Prosody, every poem is an instance of the prosody_poem custom post type. To add a poem, either in the Dashboard or through the admin bar that floats at the top of the page when signed in, create a new Poem.
  • Fill in the title, then skip down to the "Original Document" field. Paste the xml for the poem in this field. When you save or publish the poem, it will automatically generate the post content for the poem.
  • Fill in the "Author," "Difficulty," and "Type" fields. Author should be formatted: Lastname, Firstname.
  • If the poem has any resources associated with it, add them in the "Resources" field. For media files, use the built-in "Add Media" button of the WYSIWYG editor.
  • Hit "Publish."
  • The home page of the site shows whichever poem has the category "Featured." If this category does not exist in your WP install, simple create it when creating a poem.

prosody_plugin's People

Contributors

csbailey5t avatar ammonshepherd avatar las2hs avatar jeremyboggs avatar

Stargazers

Amy R. Boyd avatar

Watchers

Wayne Graham avatar  avatar James Cloos avatar  avatar  avatar  avatar rcmapp avatar  avatar  avatar

prosody_plugin's Issues

Syncopation feature not working all the time

Currently, even when the poem is currently scanned, so that every line in the poem has three green check marks (stress, feet, meter), the syncopation toggle doesn't always show.

It does work for me on the staging site for the poem "Thaw," but does not work for another person on Windows (using Firefox) on the same poem.

Rendering Errors with Poem

We've added the Prosody Plugin and theme to our WordPress site, and I added the sample XML file ("I look into my glass") in accordance with the instructions as a test. Unfortunately, it's rendering incorrectly: it adds the word "meter" before most of the lines, and nothing happens when I click above the words to try to mark syllables as stressed or unstressed. I checked the console but no errors appeared.
Any idea what's going wrong?
screen shot 2018-04-19 at 10 46 52 am

Poems with 'optional' stress are marked wrong

There are parentheses in the correct answer for the stress marks on some poems. See Robert Frost's, In Negelect, second and last lines.

The code checks the data-real attribute against what the user submitted. The data-real attribute includes parentheses around the last 'optional' weak stress mark.

Indented lines push the 'check' icons too

When a line is indented (with indent2 or indent3, anything greater than indent) then the 'check' icons to the right are also pushed to the right, which is not ideal.

It would be best if the icons on the right are always visible, and that indented poem lines do not push the 'check' icons to the right.

Screen Shot 2019-10-29 at 9 33 16 AM

copy js module files to own repo

Moving our ( @mossiso @jeremyboggs ) conversation about the js module here until a basic repo for it is built.

Looking at the plugin code, I see a few things that need to be addressed:

  1. Which files should be put in the js module repo? I've identified what makes the most sense to me:
  1. Compilation and build should probably be run by the repo if possible (via Travis), so I might suggest not adding poem.css, as well as adding script to minimize handlers.js, but keeping both the .css and the .min.js file in the .gitignore for development, but still exporting it all to node.

  2. Standard practice would be to rename some of these js and css files to something like default.css and prosody.js for clarity and to hint at the option of overriding. Maybe that would be a good future enhancement in the plugin -> adding an option to not use the default.css or built-in images.

  3. The dependencies section of the README.md includes a node section that could be completely migrated to the js repo.

  4. Once those things are all in the js repo and accessible via node, we would just rewrite the plugin repo to include newer build files / settings / &c.

How does this all sound? Anyone have any other input or ideas here?

Caesura functionality is broken

Behavior is different on Chrome and Safari vs Firefox, but they all are broken.

Clicking a stress mark above a syllable works correctly. But when you click the caesura checkbox it moves the stress marks. In Firefox, unchecking caesura puts them back. In Chrome and Safari the marks are not put back.

The caesura box is removed until this can be fixed. To turn back on just uncomment the HTML in the themes/prosody/index.php and themes/prosody/single-prosody_poem.php files.

caesura-mess-up

Alginment of Rhyme boxes with poem lines is off

When you click on the "Rhyme" link to the left side of a poem, a sidebar opens with a small input field associated with each line of the poem. These input boxes should be aligned with a line of poem, but they are off by a few pixels. This is very noticeable with longer poems, such as Kubla Kahn (https://prosody.lib.virginia.edu/prosody_poem/kubla-khan/).

Screen Shot 2020-08-03 at 4 09 09 PM

Expected result: input boxes are aligned with line of poem text
Actual result: input boxes are misaligned from line of poem.

Image Sprite needed

Right now, the various, small png files used for images are separate files, adding unnecessary calls to the server. We should see if about turning this into a sprite.

Doing so would, of course, break some functionality where the image file used is the counter for successful or unsuccessful prosody checks. Changing the visible image should all be dealt with via adding/removing classes and using CSS to change the position on the sprite. Checking for success should be dealt with by abstracting the poem into an object with success states. Therefore this issue is subordinate to the object abstraction issue.

Syncopation option highlights at wrong time.

General Syncopation Operation: Syncopation check box should only appear when the entire poem has been scanned correctly (all the gray icons are either green check circles or yellow/orange asterisk). In other words, the syncopation check box should not appear when there are gray or red x icons.

When multiple stress options exist in a poem, the syncopation feature should only highlight the words when the stress selected by the user does not match the meter hard-coded in the poem.

Looking at the Walter Landor poem, the last line:
There are two options for stress (seen in the data-real attribute). The syncopation check box should show up when either stress option has been applied by a user (green check circle, or orange asterisk). When the user checks the syncopation box, the text in the last line should turn yellow ONLY when the user selected stress does NOT match the meter (data-met attribute). Current behavior does not check the user selected stress against the meter (data-met) before applying yellow font color to text.

Faulty poem uploads

Sometimes when uploading a poem, the xml is not processed correctly and outputs either no HTML or just a poem div.

I suspect, but don't know, that this is either an issue in the XML formatting or the version of XML of the poem.

Words jitter when marking foot

When you mark a foot using Chrome or Safari, the word preceding the foot mark jumps up a pixel or two. Does not happen on Firefox.
text-jump-mark-foot

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.