Re: [fossil-users] Using fossil just for the wiki. Images and tables?

2016-01-26 Thread Tino Lange


>> [...] Fossil's Markdown support is via libdiscount [...]
> [...] Oh, Fossil uses Discount. Thanks, [...]

libdiscount? Sure? Isn't that a special version of libsoldout?

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Using fossil just for the wiki. Images and tables?

2016-01-26 Thread Ross Berteig

On 1/26/2016 6:41 AM, Tino Lange wrote:

[...] Fossil's Markdown support is via libdiscount [...]

[...] Oh, Fossil uses Discount. Thanks, [...]

libdiscount? Sure? Isn't that a special version of libsoldout?


Actually, it was derived from libsoldout by its author, Natacha Porté, 
and heavily tuned for fossil's internals. She said at the time that it 
essentially followed libsoldout, except for the deep changes need to 
replace her original buffer implementation with fossil's.


There's an extensive (internal) API for extension and customization, but 
that hasn't been exercised other than to add support for 
PHP-markdown-extra style tables, and to tweak link handling.


--
Ross Berteig   r...@cheshireeng.com
Cheshire Engineering Corp.   http://www.CheshireEng.com/
+1 626 303 1602
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Using fossil just for the wiki. Images and tables?

2016-01-25 Thread Ron W
Looking at the official
Markdown syntax, I don't see any mention of a syntax - other than
embedded HTML - for formatting tables.

Fossil's Markdown support is via libdiscount, but
that doesn't have a table extension, though does have other extensions to
Markdown.


On Mon, Jan 25, 2016 at 1:33 PM, John Gabriele 
wrote:

> Hi,
>
> I needed a small wiki, possibly with a WYSIWYG editor, and have been
> trying out fossil --- just for the wiki so far.
>
> So far I've been unable to get inline images to show up. Does the fossil
> wiki support that?  seems to
> indicate that it should. And I can indeed upload an image as an attached
> file.
>
> Also, is there any way to create html tables in pages, without resorting
> to raw html? Does the markdown flavor supported by fossil support
> tables?
>
> Thanks!
> ___
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Using fossil just for the wiki. Images and tables?

2016-01-25 Thread Warren Young
On Jan 25, 2016, at 11:33 AM, John Gabriele  wrote:
> 
> So far I've been unable to get inline images to show up. Does the fossil
> wiki support that?

Yes, but not in a WYSIWYG fashion.  You need to use one of the markup languages 
to do that.

Rather than switch the WYSIWYG editor into raw HTML mode, I recommend that you 
learn Markdown, which is simpler than either HTML yet broadly useful.  Fossil 
Wiki is roughly as powerful as Markdown, but because it delegates a lot of its 
power to HTML, Markdown ends up being simpler in many cases, including this one.

Markdown is also more broadly useful on the Internet than Wiki syntax, being 
built into so many other tools.  (Github, blogging platforms, Stack Exchange…)

You can get up to speed on Markdown quickly:

  https://daringfireball.net/projects/markdown/basics

or from “fossil ui” on a local repo:

  http://localhost:8080/md_rules

Referencing an image attachment from a Markdown-formatted wiki article requires 
jumping through a few hoops, but it’s not too horrible:

1. Attach the image
2. Click attachment
3a. Right-click “Image,” then copy the URL
3b. Alternately, left-click “Image,” then copy URL from the browser’s address 
bar
4. Add something like this to the wiki article

  ![description of image](/raw/01ed6167686c0da94803655c8dcd2ddf52c92608)

Notice that I’ve trimmed the URL down, removing leading and trailing bits that 
aren’t necessary here.  You can actually abbreviate it further, since you only 
need to give as much of that big long hexadecimal number as is unique in your 
repository.  Five to eight digits should suffice for a small repo:

  ![description of image](/raw/01ed61)

The HTML form is a bit more verbose:

  

The Fossil Wiki language doesn’t have a special syntax for inline images.  It 
just uses a form of HTML:

  

The  wrapper is necessary here for reasons you should not have to care about 
unless you’re a web developer.  That’s a good reason why I recommend Markdown 
over Fossil Wiki.

> Does the markdown flavor supported by fossil support
> tables?

Yes, though it isn’t explained in /md_rules:

  ---
  Foo | Bar
  ---
  1| 2
  3| 4
  ---


___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Using fossil just for the wiki. Images and tables?

2016-01-25 Thread John Gabriele
Oh, Fossil uses Discount. Thanks, Ron!


On Mon, Jan 25, 2016, at 02:34 PM, Ron W wrote:
> Looking at the official Markdown
> syntax, I don't see any mention of a syntax - other than embedded
> HTML - for formatting tables.
>
> Fossil's Markdown support is via libdiscount,
> but that doesn't have a table extension, though does have other
> extensions to Markdown.
>
>
> On Mon, Jan 25, 2016 at 1:33 PM, John Gabriele
>  wrote:
>> Hi,
>>
>>
I needed a small wiki, possibly with a WYSIWYG editor, and have been
>>
trying out fossil --- just for the wiki so far.
>>
>>
So far I've been unable to get inline images to show up. Does the fossil
>>
wiki support that?  seems to
>>
indicate that it should. And I can indeed upload an image as an attached
>>
file.
>>
>>
Also, is there any way to create html tables in pages, without resorting
>>
to raw html? Does the markdown flavor supported by fossil support
>>
tables?
>>
>>
Thanks!
>>
___
>>
fossil-users mailing list
>> fossil-users@lists.fossil-scm.org
>> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
> _
> fossil-users mailing list fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Using fossil just for the wiki. Images and tables?

2016-01-25 Thread John Gabriele
Sorry, I should've added: I see that 
[Discount](http://www.pell.portland.or.us/~orc/Code/discount/) actually does 
indeed support tables! Just tried:

~~~ foo | bar |--- 3   | green 4   | red ~~~

and that renders correctly as a table. :)

-- John



On Mon, Jan 25, 2016, at 02:43 PM, John Gabriele wrote:
> Oh, Fossil uses Discount. Thanks, Ron!
>
>
> On Mon, Jan 25, 2016, at 02:34 PM, Ron W wrote:
>> Looking at the official Markdown
>> syntax, I don't see any mention of a syntax - other than embedded
>> HTML - for formatting tables.
>>
>> Fossil's Markdown support is via libdiscount,
>> but that doesn't have a table extension, though does have other
>> extensions to Markdown.
>>
>>
>> On Mon, Jan 25, 2016 at 1:33 PM, John Gabriele
>>  wrote:
>>> Hi,
>>>
>>> I needed a small wiki, possibly with a WYSIWYG editor, and have been
>>> trying out fossil --- just for the wiki so far.
>>>
>>> So far I've been unable to get inline images to show up. Does the
>>> fossil wiki support that?
>>>  seems to indicate that
>>> it should. And I can indeed upload an image as an attached file.
>>>
>>> Also, is there any way to create html tables in pages, without
>>> resorting to raw html? Does the markdown flavor supported by fossil
>>> support tables?
>>>
>>> Thanks!
>>> ___
>>> fossil-users mailing list fossil-users@lists.fossil-scm.org
>>> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>> _
>> fossil-users mailing list fossil-users@lists.fossil-scm.org
>> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
> _
> fossil-users mailing list fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Using fossil just for the wiki. Images and tables?

2016-01-25 Thread John Gabriele
On Mon, Jan 25, 2016, at 02:46 PM, Warren Young wrote:
> On Jan 25, 2016, at 11:33 AM, John Gabriele 
> wrote:
> > 
> > So far I've been unable to get inline images to show up. Does the fossil
> > wiki support that?
> 
> Yes, but not in a WYSIWYG fashion.  You need to use one of the markup
> languages to do that.
> 
> Rather than switch the WYSIWYG editor into raw HTML mode, I recommend
> that you learn Markdown, which is simpler than either HTML yet broadly
> useful.

Thanks. I'm actually a big fan of Markdown, and have used Pandoc for
years.
I was considering using the wysiwyg editing interface because the wiki
was going
to be used by non-technical users, but it may be less work to just show
them
how to write markdown instead.

>  Fossil Wiki is roughly as powerful as Markdown, but because it
> delegates a lot of its power to HTML, Markdown ends up being simpler in
> many cases, including this one.
> 
> Markdown is also more broadly useful on the Internet than Wiki syntax,
> being built into so many other tools.  (Github, blogging platforms, Stack
> Exchange…)
> 
> You can get up to speed on Markdown quickly:
> 
>   https://daringfireball.net/projects/markdown/basics

Thanks. I've actually written my own little example online that I
sometimes
refer folks to,
,
though it includes extras that Pandoc supports.

> or from “fossil ui” on a local repo:
> 
>   http://localhost:8080/md_rules
> 
> Referencing an image attachment from a Markdown-formatted wiki article
> requires jumping through a few hoops, but it’s not too horrible:
> 
> 1. Attach the image
> 2. Click attachment
> 3a. Right-click “Image,” then copy the URL
> 3b. Alternately, left-click “Image,” then copy URL from the browser’s
> address bar
> 4. Add something like this to the wiki article
> 
>   ![description of image](/raw/01ed6167686c0da94803655c8dcd2ddf52c92608)
> 
> Notice that I’ve trimmed the URL down, removing leading and trailing bits
> that aren’t necessary here.  You can actually abbreviate it further,
> since you only need to give as much of that big long hexadecimal number
> as is unique in your repository.  Five to eight digits should suffice for
> a small repo:
> 
>   ![description of image](/raw/01ed61)
> 

This works! Thanks so much, Warren!

-- John
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Using fossil just for the wiki. Images and tables?

2016-01-25 Thread Warren Young
On Jan 25, 2016, at 12:43 PM, John Gabriele  wrote:
> 
> Oh, Fossil uses Discount. Thanks, Ron!

Fossil’s markdown implementation has some code “stolen from discount” (actual 
quote) but it is not itself libdiscount.  See src/markdown.c in the Fossil 
source tree.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users