A possible PND-system replacement

levi

Still fresh, damnit!
Joined
Oct 6, 2008
Messages
11,506
Location
Somewhere off the coast of the EU
Yeah, that's true.  It should be a trivial sed command to knock out any user defined roles, but that's a bit hacky.  I was looking for a way to do it within the format language itself, but I guess anything within the format can probably be disabled by other things in the same file.
 

Neelix

Insecticidal Maniac
Joined
Jan 8, 2011
Messages
3,231
Location
Melbourne, Australia
Wouldn't that only be a problem if that aspect of the format is implemented?  If you control the implementation you can ensure that attempts to embed HTML are ignored, no?

-Neelix
 

thatgui

Advanced Member
Joined
Apr 2, 2009
Messages
3,048
Well as B-ZaR already suggested,  Markdown could work well.  It also occurs to me that we could use a subset of BBCode, which was designed for the exact purpose of providing a set of formatting codes that could be used to format user provided content without having to permit the use of raw html in the content itself. There's no need to re-invent the wheel here.
Oh, did miss that - sorry.

I  am not comfortable with using "BBCode" or the mentioned "RestructuredText" as this sets the entry level higher for package maintainers as they occur to me as rather "exotic" languages. Markdown may have its merits, but which one would or should it be ? Depending on the intended requirements (= what should be possible in terms of text magic) we may need to use a variation that also allows to embed html. And then we are back at square one: if we need to filter anyway, why not html directly > its widely know, and a gazillion tutorials,editors, libraries, controls, etc are already available ?
 

slaeshjag

¯\_(ツ)_/¯
Joined
Apr 8, 2010
Messages
2,687
Location
~Stockholm, Sweden
You don't really understand the issue. Embedded HTML isn't really a problem as long as no HTML at all is the target.

There shouldn't be any need for any special markdown extensions, just plain standard markdown should do. This means existing markdown editors can be used.
 

thatgui

Advanced Member
Joined
Apr 2, 2009
Messages
3,048
You don't really understand the issue. Embedded HTML isn't really a problem as long as no HTML at all is the target.

There shouldn't be any need for any special markdown extensions, just plain standard markdown should do. This means existing markdown editors can be used.
Oh, ok - would you be willing to tell me were exactly I don't get it ? I thought this was about finding a "language" that allows to embed some text formatting into the field so whichever software is reading this particular field can present this to a user in a more "non plain text" fashion. With html you can do that, but with the problem (you initially mentioned ) that it needs some sanitation to keep a certain level of security. But at least one major target client/plattform will be the repo, which means in the end we are bound to html anyway - so if we choose something that has no html syntax (like Markdown) we need to convert it to html - which is again, legwork.

Or am I completly on the wrong track here ?

Disclaimer: Just to be sure, this is not meant to be sarcastic at all, I see myself too in a position where I am trying to keep up with people that know a lot more then me
 

bzar

A Commando
Joined
Sep 22, 2008
Messages
4,447
Location
Finland
Website
Visit site
Well as B-ZaR already suggested,  Markdown could work well.  It also occurs to me that we could use a subset of BBCode, which was designed for the exact purpose of providing a set of formatting codes that could be used to format user provided content without having to permit the use of raw html in the content itself. There's no need to re-invent the wheel here.
Oh, did miss that - sorry.

I  am not comfortable with using "BBCode" or the mentioned "RestructuredText" as this sets the entry level higher for package maintainers as they occur to me as rather "exotic" languages. Markdown may have its merits, but which one would or should it be ? Depending on the intended requirements (= what should be possible in terms of text magic) we may need to use a variation that also allows to embed html. And then we are back at square one: if we need to filter anyway, why not html directly > its widely know, and a gazillion tutorials,editors, libraries, controls, etc are already available ?
Markdown has the benefit that it's actually quite readable and clean even in its plaintext format.
 

notaz

Certified Guru
Joined
Aug 23, 2005
Messages
4,913
Location
Lithuania
Website
notaz.gp2x.de
Yeah markdown would be nice. If you don't like it you can ignore it and just type plain text to get the result we have in PNDs now.
 

thatgui

Advanced Member
Joined
Apr 2, 2009
Messages
3,048
Markdown has the benefit that it's actually quite readable and clean even in its plaintext format.
With that in mind, and that it has a rather simple syntax (which is, thanks to git, probably widely known) it looks like a viable option - do you know wether there are libs widely available / already "common" to convert it to html ?
 

bzar

A Commando
Joined
Sep 22, 2008
Messages
4,447
Location
Finland
Website
Visit site
Markdown has the benefit that it's actually quite readable and clean even in its plaintext format.
With that in mind, and that it has a rather simple syntax (which is, thanks to git, probably widely known) it looks like a viable option - do you know wether there are libs widely available / already "common" to convert it to html ?
http://www.w3.org/community/markdown/wiki/MarkdownImplementations

https://github.com/markdown/markdown.github.com/wiki/Implementations
 
Last edited by a moderator:

thatgui

Advanced Member
Joined
Apr 2, 2009
Messages
3,048
thanks

The biggest downside to markdown I know is no nice table support.
probably why Christoph.Krn suggested Multimarkdown (?), according to the lists you provided, using it instead of markdown should not be too much of a hassle. Even if support was even less then the links suggest, even I could come up with a simple non fancy (=no css) converter in less than an hour.

edit: After taking a closer look, better make that two hours: figuring out a clever way to differentate a table definition from "akward text" probably needs some effort
 
 
Last edited by a moderator:

Christoph.Krn

Advanced Member
Joined
Mar 17, 2009
Messages
2,112
Location
Germany
The sample implementation of MultiMarkdown 4 itself is written in C.

There's no PHP version, but is it (edit: a library that's actually written in PHP) really neccessary (edit: or are there viable alternative means of achieving the same thing within the already existing PHP code)? I assume it's meant for a repository-type website, would containing the executable with SELinux, using PHP's exec securely, and storing results in the database, be a viable alternative? If not, maybe there's a fitting transpiler.

*Insert mandatory rant that PHP sucks anyway and should not be used.*
 
Last edited by a moderator:

slaeshjag

¯\_(ツ)_/¯
Joined
Apr 8, 2010
Messages
2,687
Location
~Stockholm, Sweden
Then write your own damn repo. Don't complain about the tools of others if you're not doing the work yourself. I'm not writing the repo, so milkshake will have to comment on what he's prepared to use, but it'll probably involve PHP.

I require all dependencies that I'm to use to be present in the official repository of Debian Jessie, if they aren't, I'm not going to consider it.
 

Christoph.Krn

Advanced Member
Joined
Mar 17, 2009
Messages
2,112
Location
Germany
Now that I look at my previous post again, I notice that there was a language slip. The "it" in "There's no PHP version, but is it really neccessary?" wasn't meant to refer to PHP. Rather, I was trying to ask "For use with PHP, would a version of a MultiMarkdown library that's actually written in PHP be really neccessary, or could another version (written in a different language) be used in the PHP code?" My apologies. That sentence of mine would have been unambiguously clear in German.

My question is genuine, I didn't know that it was milkshake who was working on a new repository, or whether there even was anyone working on a new repository right now.

As for it being required for things to be in the debian repository, point noted, though I have to note that you previously stated that it'd merely be preferred.
 
Last edited by a moderator:
Top