From: Alexandre L. <new...@al...> - 2010-02-17 18:26:03
|
Hello, I wrote a simple text-publishing Django application enabling per paragraph comments. It splits a texts into chunks and let people comment them. The project is hosted at http://github.com/aleray/close-commenting and a demo is visible there: http://closecommenting.stdin.fr/one-possible-scenario-for-a-collective-future.html It uses markdown in its back-end to format the texts and right now they are split according to their first level HTML tags (see http://github.com/aleray/close-commenting/blob/master/closecommenting/models.py line 93) I'm looking for writing a markdown extensions that would allow one to arbitrary tell the parser semantic units to comment on instead of relying on the document structure. For instance, in some case it might make more sens to comment two <p/> together, or to have two comments in one <p/>. A quick fix is to enclose units in <div/> but it is not very elegant. My first idea was to make a proper syntax was to add a "§" glyph to indicate a commentable section. eg. § Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas hendrerit mattis faucibus. Vivamus auctor sollicitudin urna, et fringilla purus auctor id. Duis laoreet feugiat magna, ac consequat lectus sagittis vitae. § Phasellus non egestas urna. Morbi eget lacus felis. Vivamus molestie est quis diam feugiat ac faucibus justo vulputate. Mauris sed lectus arcu. Fusce euismod suscipit ligula a convallis. § ... or 2 paragraphs together § Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas hendrerit mattis faucibus. Vivamus auctor sollicitudin urna, et fringilla purus auctor id. Duis laoreet feugiat magna, ac consequat lectus sagittis vitae. § Phasellus non egestas urna. Morbi eget lacus felis. Vivamus molestie est quis diam feugiat ac faucibus justo vulputate. Mauris sed lectus arcu. Fusce euismod suscipit ligula a convallis. Donec iaculis augue sit amet magna tempor at auctor tellus vehicula. Maecenas ac leo justo. Phasellus laoreet hendrerit mauris, vitae scelerisque justo sollicitudin sed. Etiam molestie sodales leo at feugiat. In hac habitasse platea dictumst. Pellentesque at enim sed ante mollis fermentum. Donec quis enim dictum nibh fermentum imperdiet. Nullam urna orci, iaculis non porttitor at, ultricies dictum metus. Quisque viverra lacus eu ante viverra blandit. Etiam tempor, ante ac tincidunt lobortis, arcu risus fringilla justo, non tempus velit nisl fermentum erat. Etiam semper, sapien sed condimentum elementum, magna neque viverra dolor, blandit suscipit arcu mauris porta lorem. Nulla orci massa, ultrices ut congue nec, pretium aliquam tortor. Donec imperdiet laoreet purus ac luctus. Sed sit amet ante tellus, at sodales metus. Praesent scelerisque, sem ut porta rutrum, lorem ante ornare diam, pharetra feugiat orci odio id nisl. Praesent imperdiet pharetra pulvinar. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque lobortis sollicitudin placerat. Maecenas ut pharetra purus. Maecenas sit amet magna ac dui euismod accumsan ac id ligula. Curabitur sit amet lorem non purus vehicula mollis accumsan at tellus. Maecenas consectetur posuere laoreet. Quisque risus leo, iaculis sit amet aliquam ac, ultricies sed lectus. Nam non libero ligula. Nullam volutpat tincidunt tortor non venenatis. Nam ultricies lacus a leo porta tincidunt fringilla quam hendrerit. In imperdiet imperdiet nibh, a bibendum erat interdum in. § ... However it gets more complex with other HTML elements such as lists, headers etc. Do you have any idea on how I could implement such a syntax? Best, Alexandre Leray |
From: Yuri T. <qar...@gm...> - 2010-02-17 18:44:24
|
> However it gets more complex with other HTML elements such as lists, > headers etc. > > Do you have any idea on how I could implement such a syntax? I'll be happy to offer suggestions on the implementation, but right now I am not quite sure what you want to achieve. What do you want your output to look like? Do you want the parser to insert divs based on where it finds §s? What do you _want_ it to do with lists, etc? In particular, do you see §s as separators breaking up your input into chunks, or do you see them as labels that get attached to natural HTML units (paragraphs, list items, etc.) marking them as commentable? - yuri |
From: Alexandre L. <new...@al...> - 2010-02-17 19:26:16
|
Hello Yuri, thanks a lot for your interest. I think it would be more like separators, as I don't have the need to exclude certain parts from being commented. Best, Alex On 02/17/2010 07:43 PM, Yuri Takhteyev wrote: > In particular, do you see §s as separators breaking up your input into > chunks, or do you see them as labels that get attached to natural HTML > units (paragraphs, list items, etc.) marking them as commentable? > |
From: Ian Stokes-R. <ijs...@hk...> - 2010-02-17 20:42:29
Attachments:
ijstokes.vcf
|
Hello Alexandre, On 2/17/10 10:56 AM, Alexandre Leray wrote: > Hello, > > I wrote a simple text-publishing Django application enabling per > paragraph comments. It splits a texts into chunks and let people comment > them. The project is hosted at http://github.com/aleray/close-commenting > and a demo is visible there: > http://closecommenting.stdin.fr/one-possible-scenario-for-a-collective-future.html > Depending on your goals, you may find that simply using a system such as ReFrameit will provide similar functionality. Ian -- Ian Stokes-Rees, PhD W: http://abitibi.sbgrid.org ijs...@hk... T: +1.617.432.5608 x75 NEBioGrid, Harvard Medical School C: +1.617.331.5993 |
From: Alexandre L. <new...@al...> - 2010-02-18 17:05:35
|
Dear Ian, thanks for pointing me to this project, I didn't know it and it seems very interesting! However I don't think it covers my needs as I'd like to keep the comments along with the texts. Best, Alexandre On 02/17/2010 09:42 PM, Ian Stokes-Rees wrote: > Depending on your goals, you may find that simply using a system such as > ReFrameit will provide similar functionality. > |
From: Yuri T. <qar...@gm...> - 2010-02-18 17:19:51
|
> thanks a lot for your interest. > I think it would be more like separators, as I don't have the need to > exclude certain parts from being commented. Using a single separator to sometimes break up paragraphs into smaller units and sometimes merge them into larger ones is going to get ugly quickly... I recommend thinking of an approach that will ensure that commentable sections do not break the boundaries of HTML tags. I.e., if a section includes the start tag for an HTML block, it should include the end tag as well. It also sounds like you want to have commentable section overlap. So, a single character separator won't work. You will at least need a pair of characters - one to open a commentable section and one to close. Anyway, if I were you, I would focus on identifying and re-using existing document structure. E.g., allowing people to attach comments to sections/headings, paragraphs, list items, sentences, quotations, etc. If this isn't enough, then you can think of two separate markups - one for identifying sub-paragraph sections, and another one for grouping paragraphs. - yuri |
From: Alexandre L. <new...@al...> - 2010-02-23 03:11:55
|
Thanks Yuri, much appreciate your help On 02/18/2010 06:19 PM, Yuri Takhteyev wrote: > Anyway, if I were you, I would focus on identifying and re-using > existing document structure. E.g., allowing people to attach comments > to sections/headings, paragraphs, list items, sentences, quotations, > etc. I agree with you I have to work on the HTML structure. For instance I recently uploaded an interview formatted as a big <dl/> list. In its current development our software considered that definition list to be a single element to comment since it was enclosed by a single <dl></dl> tag whereas it would make much more sense to break it on each <dt/> </dd> pair. > If this isn't enough, then you can think of two separate markups > - one for identifying sub-paragraph sections, and another one for > grouping paragraphs. > > - yuri > The previous solution doesn't solve the arbitrary slicing issue, and we will need to define a syntax for that. It is still unclear to me what those markups could be. Do you have anything in mind? Best, Alexandre |
From: Alexandre L. <new...@al...> - 2010-03-01 09:08:00
|
Thanks Yuri, much appreciate your help On 02/18/2010 06:19 PM, Yuri Takhteyev wrote: > Anyway, if I were you, I would focus on identifying and re-using > existing document structure. E.g., allowing people to attach comments > to sections/headings, paragraphs, list items, sentences, quotations, > etc. I agree with you I have to work on the HTML structure. For instance I recently uploaded an interview formatted as a big <dl/> list. In its current development our software considered that definition list to be a single element to comment since it was enclosed by a single <dl></dl> tag whereas it would make much more sense to break it on each <dt/> </dd> pair. > If this isn't enough, then you can think of two separate markups > - one for identifying sub-paragraph sections, and another one for > grouping paragraphs. > > - yuri > The previous solution doesn't solve the arbitrary slicing issue, and we will need to define a syntax for that. It is still unclear to me what those markups could be. Do you have anything in mind? Best, Alexandre |