I have code snippets all over the place and am now trying to better organize all of them.
So I'm in the process of building a utility to access my public gists at GitHub "Gists Book". This uses a app token to allow access to GitHubs api, nice and simple.
At the moment I can list, add new and edit my gists via the app but I was thinking that perhaps if there is enough interest this could be expanded to provide an open snippet facility for all?
My thoughts are that I could create an online db wich could be accessed via the Gist Book app allowing users to upload their gists for sharing.
The db gists would be able to be listed and imported into Gist Book for use in LiveCode.
This is a screenshot of where I am at the moment, as you can its definitely a work in progress.
I'm happy to host the db for the project.
Interested on ideas and features...what do you think about this?
GitHub Gists Sharing code snippets
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
GitHub Gists Sharing code snippets
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
Re: GitHub Gists Sharing code snippets
Looks good Andy - as it happens was working on something similar although still just in SQLite -- but been thinking of gist or hosting my own (as I don't think the gist API directly lets you search public gists for terms like 'livecodescript'.
Screenshot;
Considering online sharing, I was thinking a user would need 'private' snippets that are stored locally and 'public' snippets that would be shared online; a way to search online for snippets but allow read-only access only, with the option to add to private collection if not the owner of the snippet.
Ideally there would be a way to search gist for 'livecode' or some such but not sure if the API allows this (after a brief look, I don't think it does)
Was considering just adding this to my liveCloud account and open it up if people want to use this to share snippets, we'll see...
Stam
Screenshot;
Considering online sharing, I was thinking a user would need 'private' snippets that are stored locally and 'public' snippets that would be shared online; a way to search online for snippets but allow read-only access only, with the option to add to private collection if not the owner of the snippet.
Ideally there would be a way to search gist for 'livecode' or some such but not sure if the API allows this (after a brief look, I don't think it does)
Was considering just adding this to my liveCloud account and open it up if people want to use this to share snippets, we'll see...
Stam
Last edited by stam on Sun Nov 27, 2022 6:42 am, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 257
- Joined: Sat Aug 16, 2008 9:48 am
- Location: Stockholm, Sweden
- Contact:
Re: GitHub Gists Sharing code snippets
A very good idea and initiative, Andy!
From time to time I 'rediscover' the stack called MasterLibrary by Michael Doub, which might not have been updated for a few years but still has loads of great script snippets in it. Maybe the content of that stack could be transferred to your db later on?
I don't know how to find it other than googling it, which gives you this old use-list post, where you can find a download link:
https://use-livecode.runrev.narkive.com ... able#post2
From time to time I 'rediscover' the stack called MasterLibrary by Michael Doub, which might not have been updated for a few years but still has loads of great script snippets in it. Maybe the content of that stack could be transferred to your db later on?
I don't know how to find it other than googling it, which gives you this old use-list post, where you can find a download link:
https://use-livecode.runrev.narkive.com ... able#post2
Re: GitHub Gists Sharing code snippets
Thanks for sharing that Andreas.
Interesting stack - The design is not exactly what I'd go for design-wise (for example I'd prefer not to group scripts in categories - much like Andy I'd prefer to categorise by tag).
There may be some useful scripts in there... although a number of them seem to be 1-liner handler calls. Still, kudos to Michael Doub for sharing this complex stack which has clearly been a labour of love, and for including the scripts as well...
Interesting stack - The design is not exactly what I'd go for design-wise (for example I'd prefer not to group scripts in categories - much like Andy I'd prefer to categorise by tag).
There may be some useful scripts in there... although a number of them seem to be 1-liner handler calls. Still, kudos to Michael Doub for sharing this complex stack which has clearly been a labour of love, and for including the scripts as well...
Re: GitHub Gists Sharing code snippets
Hi Stam, looks good, nice clean interface.
I will carry on with Gist Book and when ready will add to share and GitHub.
Thanks for sharing that Andreas, lots of useful snippets there, will be adding some of these to my gists library.
I will carry on with Gist Book and when ready will add to share and GitHub.
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search