Skip to content

Instantly share code, notes, and snippets.

@opn
opn / script,stack 'map.lc'
Created June 23, 2016 15:29
map-transport script for geo-encoded images and Wikipedia page references.
on index
put fedwiki_GetDroppedUrl ($_POST_RAW) into droppedURL
if droppedURL is empty then
fedwiki_ExitAndReturnError "Nothing dropped", "Error"
end if
set the itemdelimiter to "?"
switch
case matchtext (droppedURL, "^https://tools.wmflabs.org/geohack/geohack.php\?pagename=(.+)&params=(.+)", pageName, geoInfo)
-- put "https://tools.wmflabs.org/geohack/geohack.php?pagename=Bilbao&params=43_15_25_N_2_55_25_W_region:ES_type:city" into someURL
andre,https://gist.github.com/opn/4cc35bc7818c0df1501f713c2d9384cd
jaque,https://gist.github.com/opn/4cewqr5bc7818c0df150124713c2d9384cd
@opn
opn / script,stack 'Global | Gist | Menu'
Created August 17, 2016 13:18
This menu is for the LIvecode IDE recent changes menu.
--> MetaData
-
license: GPLv3
name: Global | Gist | Menu
type: controller
version: 0.1
--> Global | Gist | Menu
-
@opn
opn / script,stack 'Global_ScriptEditor_Recent_Watch_Menu'
Created August 17, 2016 13:37
This is my work-in=progress personal menu for the Livecode IDE "watch" or "recent changes" menu.
--> MetaData
-
license: GPLv3
name: Global | ScriptEditor | Recent | Watch | Menu
type: controller
copyright: David Bovill
license: GPLv3
version: 0.9
/*
@opn
opn / mediawiki.lc
Created June 22, 2017 17:41
Use this transport to import Wikipedia content into Fedwiki - http://transport.fedwiki.org/wikipedia-transport.html
<?lc
/* = DESCRIPTION =
--
The mediawiki.lc controller can be found at: mediawiki.lc
Below we declare the global variables gControllerHandlers AND gData
And put the public method names that we wish to expose into gControllerHandlers
--
*/
@opn
opn / bbc.lc
Created June 22, 2017 21:00
This Transport imports a range of audio podcasts in Fedwiki - http://transport.fedwiki.org/podcast-transport.html
<?lc
/* = DESCRIPTION =
--
The bbc.lc controller can be found at: bbc.lc
Below we declare the global variables gControllerHandlers AND gData
And put the public method names that we wish to expose into gControllerHandlers
--
*/
@opn
opn / handler: function fedwiki_ItemChecked
Created June 23, 2017 16:21
Checks a wiki page array to see if there is a named checkbox in a markdown section. Returns true, false, or empty.
function fedwiki_ItemChecked pageArray, checkboxTitle
put pageArray ["story"] into storyArray
put item 2 of the extents of storyArray into maxItemNum
repeat with itemNum = 1 to maxItemNum
put storyArray [itemNum] into itemArray
if itemArray ["type"] is not "markdown" then next repeat
put itemArray ["text"] into itemText
switch
case itemText contains ("- [x]" && checkboxTitle)
@opn
opn / rest.livecode.world controller: onetab.lc
Last active November 19, 2017 12:49
This is Revigniter controller 'onetab.lc' from the domain 'rest.livecode.world'.
<?lc
/* = DESCRIPTION =
--
The onetab.lc controller can be found at: onetab.lc
Here is some test help
Below we declare the global variables gControllerHandlers AND gData
And put the public method names that we wish to expose into gControllerHandlers
--
*/
@opn
opn / rest.livecode.world controller: mw_image.lc
Created June 26, 2017 15:03
This the is Revigniter controller 'mw_image.lc' from the domain 'rest.livecode.world'.
<?rev
# PUT YOUR HANDLER NAMES INTO THE GLOBAL gControllerHandlers AS A COMMA SEPARATED LIST
put "index" into gControllerHandlers
# THIS COMMAND WILL BE CALLED IF NONE IS SPECIFYED IN THE URI
command index
-- put "https://audioboom.com/boos/3844212-fedwiki-authoring-tool" into droppedURL
-- put "https://audioboom.com/boos/3836093-raspberrypad" into droppedURL
@opn
opn / rest.livecode.world controller: imagine.lc
Last active November 21, 2017 17:51
This is Revigniter controller 'imagine.lc' from the domain 'rest.livecode.world'.
<?lc
/* = DESCRIPTION =
--
The imagine.lc controller can be found at: imagine.lc
Here is some test help
Below we declare the global variables gControllerHandlers AND gData
And put the public method names that we wish to expose into gControllerHandlers
--
*/