newsdev / archieml.org

The archieml.org website and hub for specification development
Other
81 stars 5 forks source link

Annotations #7

Closed brainkim closed 9 years ago

brainkim commented 9 years ago

Hey! I'm really excited about ArchieML, especially because I work at a company where the bulk of authoring is done in google docs, and as a last step we copy and paste everyone over to a cruddy Django admin panel, and I've been advocating for a long time that we just get rid of this last step.

Do you guys have any experience doing annotations with AML? For example, we have our writers insert anchor tags on things they want to annotate and then we have them write the annotations in a separate place with the hopes that the indexes match up. You can see the result of this process here on our Year in Rap 2014 if you navigate over to "Interactive Lyrics."

Additionally, I'm wondering how markup like strong and emphasis are done, can I use markdown for the value of a key?

Sorry if this is the wrong place to discuss this stuff. Thanks for open sourcing it!

abstrctn commented 9 years ago

Hi @brainkim - to start with the easy answer, a value can be any string, so text formatted as markdown (e.g., key: value for bold) is valid, though you'd have to run the values through a separate markdown parser later to turn it into HTML.

Doing the work in google docs makes it a bit easier, though there's an additional parsing step that unfortunately isn't automatic. The example here gives an idea of one way to 1) authenticate with google docs, 2) export the HTML output of a google doc, and 3) convert the HTML into text that ArchieML can parse, and let's you convert Google's native links into <a> tags. The example doesn't do it, but you could also convert the bold / italics that were added in google into <strong> and <em> tags through a similar method.

So doing it that way requires a bit of mucking about...

I don't think we've used AML for annotations specifically. I don't think AML helps much in writing the source rap text, but the content of the popups on that page could certainly be expressed in AML:

[annotations]

body: The 2014 Winter Olympics took place in Sochi, Russia, with Russia clinching the title for overall medals. Many called for a boycott of the Games in response to Russia's human rights violations. Did you feel pride in your nation during the Games? Why or why not?
image: https://flocabulary.s3.amazonaws.com/images/tooltips/year-in-rap-2014_1.jpg
caption: Russia's climate was ideal for the winter Games. (Getty Images)
more: http://www.reuters.com/article/2014/02/06/sports-news-schedule-unplanned-at-1400-g-idUSL5N0LA47M20140206

...

And if you wanted to, you could add an id to each item in that array, like T1 or T2, that matches up more explicitly with the <a> tags your writers put in.

Hope that helps!

brainkim commented 9 years ago

This definitely helps! Thanks for the feedback. I'll experiment with it and get back to you. It's been a heroic effort to get our structured content out of raw html in the database and I'm really excited to see if ArchieML is useful within our org.

brainkim commented 9 years ago

Wowowow didn't realize Google Drive had an api to convert its stuff to HTML. Exciting.