Volunteer github guru for documentation submissions?

Kay C Lan lan.kc.macmail at gmail.com
Thu Apr 14 01:44:51 EDT 2016


On Thu, Apr 14, 2016 at 11:57 AM, Monte Goulding <monte at appisle.net> wrote:

>
> That sounds complicated.


Getting to Heaven is never going to be easy... especially when it's my LC
Heaven ;-)

>
>  I’m not sure if it is easy to determine which doc is currently being
> viewed in the dictionary.
>

When I visit the LC Community Docs via the Web interface the URL always
start with:

https://github.com/lan-kc/livecode/

where 'lan-kc' is my fork name. If you enter in whatever your fork name is
when you run this script it should display in your browser the lcdoc of
whatever is currently showing in your Dictionary. Obviously this is just a
proof of concept and it wont work for EVERY entry, especially those Entry
names that have special characters - $, #, < etc that need encoding, or any
Glossary entries - but I think you'll agree that those are not
insurmountable.

on mouseUp
   put the htmltext of widget 1 of stack "revDictionary" into tText
   filter lines of tText with "*<h1 style=" & quote & "margin:0px 0px 30px
12px" & quote & ">*"
   get matchText(tText,".+>(.+?)</h1>",tName)
   replace " " with "-" in tName
   get matchText(tText,">type</div><div class=.+?([_a-z]+)</div><div"
,tType)
   ask "Please enter your GItHub fork name:" with "fork-name" titled "Fork
Name"
   put it into tAnswer
   if (tAnswer = empty) then
      exit to top
   end if
   put "https://github.com/" & tAnswer & \
         "/livecode/blob/community-docs/docs/dictionary/" & \
         tType & "/" & tName & ".lcdoc" into tPath
   launch URL tPath
end mouseUp


If you think figuring out which doc the Dictionary is currently viewing was
going to be hard, then the future is indeed looking very bright :-)



More information about the use-livecode mailing list