emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Org-mode table/links -> mediawiki
@ 2017-06-18 11:01 Sharon Kimble
  2017-06-19  9:25 ` Nicolas Goaziou
  0 siblings, 1 reply; 3+ messages in thread
From: Sharon Kimble @ 2017-06-18 11:01 UTC (permalink / raw)
  To: org-mode-email

[-- Attachment #1: Type: text/plain, Size: 2396 bytes --]


I'm at the stage of building an org-mode table to be exported to
mediawiki and its going to be the front page of my DrugFacts site.

So far I'm here -

--8<---------------cut here---------------start------------->8---
| *Illegal*                       | *Category's*               | 	*Legal*       | *Prescription only*   | *Substitute*	    | *Others*       |
|-------------------------------+--------------------------+---------------+---------------------+-----------------+--------------|
| * Amphetamines                | * :Category:Anaesthetics | * Alcohol     | * Alprazolam        | * Buprenorphine | * Flumazenil |
| * AMT                         | * Analgesics             | * [[Betel nut][Betel nut]]   | * Citalopram        | * [[Methadone][Methadone]]     | * [[Naxolone][Naxolone]]   |
| * Anabolic Steroids           | * Anticonvulsants        | * [[Caffeine][Caffeine]]    | * Codeine           | * [[Naltrexone][Naltrexone]]    |              |
| * Benzodiazepines             | * Antidepressants        | * [[Paracetamol][Paracetamol]] | * Dextroamphetamine | * [[Suboxone][Suboxone]]      |              |
| * BZP                         | * Anxiolytics‏‎            | * [[Tobacco][Tobacco]]     | * Diazepam          |                 |              |
| * Cannabis                    | * Appetite suppressants‏‎  |               | * Fentanyl          |                 |              |
--8<---------------cut here---------------end--------------->8---

But I'm running up against problems, like these -

- If I make it an org-mode link, like in 'Betel nut' then when I try to
  export it I get a message like this "(user-error "Unable to resolve
  link: \"Betel nut\"") in user-error".
  - in mediawiki the link would be [[Betel nut]].

- In mediawiki 'Cannabis' is shown as [[Marijuana|Cannabis]], but
  org-mode thinks that its another column in the table.

Using an org-mode table means that its very easy to generate/export the
table into mediawiki format, so I really do want to use one, but I do
need to have an org-mode link be able to be changed into an mediawiki
link.

How can I resolve both these problems please? 

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk  
Debian 9.0, fluxbox 1.3.5-2, emacs 25.1.1, org-mode 9.0.7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Org-mode table/links -> mediawiki
  2017-06-18 11:01 Org-mode table/links -> mediawiki Sharon Kimble
@ 2017-06-19  9:25 ` Nicolas Goaziou
  2017-06-19 12:54   ` Sharon Kimble
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2017-06-19  9:25 UTC (permalink / raw)
  To: Sharon Kimble; +Cc: org-mode-email

Hello,

Sharon Kimble <boudiccas@skimble.plus.com> writes:

> I'm at the stage of building an org-mode table to be exported to
> mediawiki and its going to be the front page of my DrugFacts site.
>
> So far I'm here -
>
> | *Illegal*                       | *Category's*               | 	*Legal*       | *Prescription only*   | *Substitute*	    | *Others*       |
> |-------------------------------+--------------------------+---------------+---------------------+-----------------+--------------|
> | * Amphetamines                | * :Category:Anaesthetics | * Alcohol     | * Alprazolam        | * Buprenorphine | * Flumazenil |
> | * AMT                         | * Analgesics             | * [[Betel nut][Betel nut]]   | * Citalopram        | * [[Methadone][Methadone]]     | * [[Naxolone][Naxolone]]   |
> | * Anabolic Steroids           | * Anticonvulsants        | * [[Caffeine][Caffeine]]    | * Codeine           | * [[Naltrexone][Naltrexone]]    |              |
> | * Benzodiazepines             | * Antidepressants        | * [[Paracetamol][Paracetamol]] | * Dextroamphetamine | * [[Suboxone][Suboxone]]      |              |
> | * BZP                         | * Anxiolytics‏‎            | * [[Tobacco][Tobacco]]     | * Diazepam          |                 |              |
> | * Cannabis                    | * Appetite suppressants‏‎  |               | * Fentanyl          |                 |              |
>
> But I'm running up against problems, like these -
>
> - If I make it an org-mode link, like in 'Betel nut' then when I try to
>   export it I get a message like this "(user-error "Unable to resolve
>   link: \"Betel nut\"") in user-error".
>   - in mediawiki the link would be [[Betel nut]].
>
> - In mediawiki 'Cannabis' is shown as [[Marijuana|Cannabis]], but
>   org-mode thinks that its another column in the table.
>
> Using an org-mode table means that its very easy to generate/export the
> table into mediawiki format, so I really do want to use one, but I do
> need to have an org-mode link be able to be changed into an mediawiki
> link.
>
> How can I resolve both these problems please?

I guess you could use a dedicated Org -> MediaWiki export backend, e.g.,

  https://github.com/tomalexander/orgmode-mediawiki/

Regards,

-- 
Nicolas Goaziou

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Org-mode table/links -> mediawiki
  2017-06-19  9:25 ` Nicolas Goaziou
@ 2017-06-19 12:54   ` Sharon Kimble
  0 siblings, 0 replies; 3+ messages in thread
From: Sharon Kimble @ 2017-06-19 12:54 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: org-mode-email

[-- Attachment #1: Type: text/plain, Size: 3411 bytes --]

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Sharon Kimble <boudiccas@skimble.plus.com> writes:
>
>> I'm at the stage of building an org-mode table to be exported to
>> mediawiki and its going to be the front page of my DrugFacts site.
>>
>> So far I'm here -
>>
>> | *Illegal*                       | *Category's*               | 	*Legal*       | *Prescription only*   | *Substitute*	    | *Others*       |
>> |-------------------------------+--------------------------+---------------+---------------------+-----------------+--------------|
>> | * Amphetamines                | * :Category:Anaesthetics | * Alcohol     | * Alprazolam        | * Buprenorphine | * Flumazenil |
>> | * AMT                         | * Analgesics             | * [[Betel nut][Betel nut]]   | * Citalopram        | * [[Methadone][Methadone]]     | * [[Naxolone][Naxolone]]   |
>> | * Anabolic Steroids           | * Anticonvulsants        | * [[Caffeine][Caffeine]]    | * Codeine           | * [[Naltrexone][Naltrexone]]    |              |
>> | * Benzodiazepines             | * Antidepressants        | * [[Paracetamol][Paracetamol]] | * Dextroamphetamine | * [[Suboxone][Suboxone]]      |              |
>> | * BZP                         | * Anxiolytics‏‎            | * [[Tobacco][Tobacco]]     | * Diazepam          |                 |              |
>> | * Cannabis                    | * Appetite suppressants‏‎  |               | * Fentanyl          |                 |              |
>>
>> But I'm running up against problems, like these -
>>
>> - If I make it an org-mode link, like in 'Betel nut' then when I try to
>>   export it I get a message like this "(user-error "Unable to resolve
>>   link: \"Betel nut\"") in user-error".
>>   - in mediawiki the link would be [[Betel nut]].
>>
>> - In mediawiki 'Cannabis' is shown as [[Marijuana|Cannabis]], but
>>   org-mode thinks that its another column in the table.
>>
>> Using an org-mode table means that its very easy to generate/export the
>> table into mediawiki format, so I really do want to use one, but I do
>> need to have an org-mode link be able to be changed into an mediawiki
>> link.
>>
>> How can I resolve both these problems please?
>
> I guess you could use a dedicated Org -> MediaWiki export backend, e.g.,
>
>   https://github.com/tomalexander/orgmode-mediawiki/

Thanks Nicolas.

I already am using everything mediawiki-related from ELPA, and my google
search for 'org-mode & mediawiki' only showed me what I already have, so
I think I've reached the end of the road there, unfortunately.

But with regard to moving forward with my bullet-points -

1. If the links are exported as [Betel nut] then under mediawiki they
   could have the extra '[' and ']' placed by using 'global replace'. This
   works in my test cases.
2. If this is used [Marijuana!Cannabis] it is possible to use 'global
   replace' to change '!' to '|' and works very well. Then you can use (1).

Both of these solutions work well, although you do have to do a bit more
work on a mediawiki buffer, but its all a lot better than trying to
build a mediawiki table for the front page.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk  
Debian 9.0, fluxbox 1.3.5-2, emacs 25.1.1, org-mode 9.0.7

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-19 12:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-18 11:01 Org-mode table/links -> mediawiki Sharon Kimble
2017-06-19  9:25 ` Nicolas Goaziou
2017-06-19 12:54   ` Sharon Kimble

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).