From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sharon Kimble Subject: Re: Org-mode table/links -> mediawiki Date: Mon, 19 Jun 2017 13:54:27 +0100 Message-ID: <87efugp27w.fsf@skimble.plus.com> References: <87bmplblvi.fsf@skimble.plus.com> <87tw3cba8g.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dMwCY-0007Iq-0s for emacs-orgmode@gnu.org; Mon, 19 Jun 2017 08:54:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dMwCU-0007hZ-TX for emacs-orgmode@gnu.org; Mon, 19 Jun 2017 08:54:42 -0400 Received: from avasout04.plus.net ([212.159.14.19]:35689) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dMwCU-0007fG-Il for emacs-orgmode@gnu.org; Mon, 19 Jun 2017 08:54:38 -0400 In-Reply-To: <87tw3cba8g.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Mon, 19 Jun 2017 11:25:03 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: org-mode-email --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Nicolas Goaziou writes: > Hello, > > Sharon Kimble 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 n= ut][Betel nut]] | * Citalopram | * [[Methadone][Methadone]] | = * [[Naxolone][Naxolone]] | >> | * Anabolic Steroids | * Anticonvulsants | * [[Caffein= e][Caffeine]] | * Codeine | * [[Naltrexone][Naltrexone]] | = | >> | * Benzodiazepines | * Antidepressants | * [[Paracet= amol][Paracetamol]] | * Dextroamphetamine | * [[Suboxone][Suboxone]] |= | >> | * BZP | * Anxiolytics=E2=80=8F=E2=80=8E = | * [[Tobacco][Tobacco]] | * Diazepam | |= | >> | * Cannabis | * Appetite suppressants=E2=80=8F=E2=80= =8E | | * 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. =2D-=20 A taste of linux =3D http://www.sharons.org.uk TGmeds =3D http://www.tgmeds.org.uk DrugFacts =3D https://www.drugfacts.org.uk=20=20 Debian 9.0, fluxbox 1.3.5-2, emacs 25.1.1, org-mode 9.0.7 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAllHyYMACgkQNoGAGQr4 g1u7LxAAmY2VUSULvoWqdkN1l/dfEa6U6/4RFHuWYnL9et37gaIdJ1N331o58Arv DdDqQDScVoH1qBHqeCDADsT2F94BOetuy2xe6BzCaDy592w9BWyQgsN/gCC41Z0i dWGFLb5cVmJFL6e3l2pfPMQ1onFRclmnKEobMQX7cqEyjjbcXFwfqortM0uMeXrg BqecZd9SzTDFq/es0Gw4HqB76+F9PdDcrHE9fuqQZC/CCgOKnmQvgE+awOHmaKmt q6UWwsaOTT0Zdz2Cpu7nhsNdmkZV8W4GgEai7NTA+SlfjfVCJQSRiIPO9DHVTA2r 8fDbb9eOEJcBosiDm5TJ8XlWMYbJEyLZsYc0K+8QVQF1QVh8nI/R2exWyydQVrK2 O3PVEJamLbVTAKGMI9bxbsgWin6z9S4aL4OXh6tY3L6ysm7mGUgGrO3j6qzBGupD SAZuq71qpQGBDnadgDWEI8wbdj3p7662O1OunqAAu893iS3S1QYw8qwHqRLaMghP SCeTkttSpK5Mt92NG2kYk9Ok7QL1LvXJ0P+bKALY4zYrIiyGtSzVSvCMipNdOb48 9nCmpjIkxXUAQy3xmG2LBtcO6PeV5XJNksA7/xAYkj62n3RyaTj/Q4d9WHdIkzwX diYkaCDYw/nE3tLNnZcZ0Oa34NXSsTVBMt3KzD+s8EMEtC/5rxM= =6MGA -----END PGP SIGNATURE----- --=-=-=--