Website Plans and Ideas
Main Site
- [ ] Readme Auto-Updates when spreadsheet is updated (or vice versa, something to lessen the amount of work put in)
- [ ] Newsletter
- [x] Search box to search scripts and repos (also using the tagging system)
- [x] One page for all scripts using Pill navigation
- Not only less HTML files, but no refreshing and much easier to maintain.
- [x] Redesign
- [x] Implement Sheetrock
Scripts
- [ ] UI for submitting repos and scripts
- [x] Put all scripts into a Google Spreadsheet
- [x] Implement an Issue Template
Blog
- [x] Basic blog system
- [x] A way to write blog posts in Markdown through Editorial and upload them to the site
- [x] Comment System
Improvements
- [x] Better Script search system
- [ ] Something different than pill navigation for mobile
Really, a great goal would be to get the website to be the forefront rather than the repo itself.
Great work. The auto updates idea is appealing.
What about a "featured code of the month" blog... Once a month create a new post that describes some piece of code in Pythonista-Tools.
Is there any way blog posts could be written in Markdown (presumably in Editorial) and converted to HTML with the same format as the rest of the website? This would likely make writing blog posts a lot easier. And if this could be integrated into the script lists, the auto-submit idea would be a simpler ordeal.
@Gerzer I wasn't aware Editorial could do this. I never really got into it much since I didn't see the need to have it for myself, but if this is possible I would definitely get it.
Editorial can edit Markdown, but allows the user to create text automation workflows using a drag-and-drop interface and/or Python. We could presumably create a workflow that automates this task.
Sent from my iPhone
On Jan 28, 2015, at 3:45 PM, TJ Ferry [email protected] wrote:
@Gerzer I wasn't aware Editorial could do this. I never really got into it much since I didn't see the need to have it for myself, but if this is possible I would definitely get it.
— Reply to this email directly or view it on GitHub.
If we set up the blog using Jekyll, here is a start http://www.editorial-workflows.com/workflow/5797754072727552/auAEu7A0Rmg
Using .format() allows us to avoid the use of string concatenation:
#generate filename
fmt = '{}{}-{}.markdown'
file_name = fmt.format(posts_directory, datetime.datetime.now().strftime('%Y-%m-%d'), post_title.lower().replace(' ','-'))
# [ ... ]
#generate post metadata
fmt = '---\nlayout: post\ntitle: {}\ndate: {}\n{}summary: \n---\n\n\n'
link_param = 'link: {}\n'.format(post_eurl) if post_type == 'link' else ''
post_header = fmt.format(post_title_case, post_date, link_param)
I want to experiment with Jekyll. Should I create an "experimental"/"dev" branch or use my own fork?
I would recommend that you use your own fork if that is possible. Many of the folks on the PTools effort are not GitHub gurus and we have tried to keep PTools as simple as possible (e.g. pointers to code, instead of owning repos) to keep things simple. We look forward to seeing your work.
Ok, thanks!
@Gerzer just opened some pull requests. Will try my best to help out.
Just got Jekyll working on my fork with a test post. Unless there's anything else you want me to add, I think it's ready for a pull request.
I was thinking that the Editorial workflow would send the Markdown-formatted text to Pythonista (which supports custom modules with its site-packages directory) over Pythonista's custom iOS URL scheme. Once in Pythonista, the file would automatically be uploaded to GitHub using the gittle module (which can be accessed via site-packages). I've already started programming this, but if this method doesn't appeal, I can try my best to do it another way.
Also, @tjferry14 if you want to work on the blog design, the blog post HTML wrapper (applied by Jekyll during processing) is in the _layouts directory.
Sorry, didn't realize GitHub issues could only have one assignee...
Just got the blog auto-upload script working! It taps into StaSh to do the git stuff and has to be triggered by an Editorial workflow that I will post a link to soon. It doesn't yet save GitHub credentials, I'm still working on interfacing with the keychain. Regardless, it is at least functional currently. I'll be posting documentation alongside the Pythonista script and Editorial workflow soon.
Blog auto-upload should be cool!
We should do something to celebrate our 100th star? Only 10 more to go.
@cclauss: Something like blog auto-upload? ;-P
I think it's a great idea to develop a way to publish from Editorial to Jekyll blogs.
Another tool that might be useful is Working Copy by Anders Borum - https://appsto.re/es/xONC1.i
It's a Git client for iOS, so you have real repos in the device and thus can pull/push from the device to external repos etc.
I'm in no way affiliated with the app except for being a happy beta tester.
My 0.02
Regards
OK, time to post my blog auto-upload script!
You’ll need this Editorial workflow, this Pythonista script, and the latest version of StaSh by @ywangd. Install StaSh using getstash.py in Pythonista’s root script library directory. Once you run gestash.py, create an empty script in the auto-generated stash directory titled __init__, so that the complete filename is __init__.py. Execute stash.py (in the stash directory) and enter into StaSh first mkdir Pythonista-Tools, then cd Pythonista-Tools, then git clone https://github.com/Pythonista-Tools/Pythonista-Tools.git. If StaSh asks to install any libraries such as dulwich, make sure to comply. You can now kill StaSh with the “X” button. Once that is done, create a plain text file called .gitignore in the Pythonista-Tools directory and put in it the text:
*.md
!README.md
Make sure the aforementioned Pythonista script is in Pythonista’s root script library directory and has the filename stpt.py (When changing the filename, Pythonista may add the .py for you). You should be all set now to use the Editorial workflow to send blog posts with Jekyll front matter to Pythonista-Tools! Just open the blog post in Editorial (don’t worry about the Jekyll filename scheme, stpt.py handles that automatically) and tap the Send to Pythonista-Tools workflow, which will kick off the chain reaction! ;-)
If you have any issues, please tell me!
@Gerzer This is great. I love it. Not to blow off or discredit your work in any way, a goal ALL of us should work towards is simplifying this process.
I totally agree. We should expand on StaSh's getstash.py or something. However we go about with it, the setup process could definately be a lot easier. I just wanted to post this setup because it at least works, not because it is completely finished (which it isn't). ;-)
Sent from my iPhone
On Mar 31, 2015, at 3:53 PM, TJ Ferry [email protected] wrote:
@Gerzer This is great. I love it. Not to blow off or discredit your work in any way, a goal ALL of us should work towards is simplifying this process.
— Reply to this email directly or view it on GitHub.
Hey, just a quick note. On the page http://pythonista-tools.github.io/Pythonista-Tools/utilities.html youtube-dl downloader is not a link :)
@Vik2015 Fixed. Thank you.
Compiled a Google Spreadsheet with all the scripts. Takes a lot longer than it seems. https://docs.google.com/spreadsheets/d/1ERW9nHeg7N91eZC4BNCJjA8jsh5yRjxkahuMAE38DPY/edit?usp=sharing
There should be a way to display this on the site, which would definitely simplify the HTML AND add the ability to search scripts much easier. Also this is good for submissions ;).
Working on Calling this using the jQuery plugin called Sheetrock: http://chriszarate.github.io/sheetrock
I don't think Google's API supports pulling in hyperlinked text. I'd recommend putting the URL and the link text in separate columns, then assembling the link in a Handlebars template, e.g. something like:
<a href="{{ cells.url }}">{{ cells.name }}</a>
@tjferry14 could you post your Google Sheets integration code somewhere, perhaps in a branch based on the current gh-pages? I have a little bit of experience with Google Apps Script and would sure love to help!
@Gerzer Here's a JS Fiddle. http://jsfiddle.net/m04ddeu2/486/
@chriszarate How would that recognize what column the link is in?
Here's a working Fiddle with notes in comments. (As it happens I released a new version of Sheetrock last night and you were hot linking to the old version, which is gone.)
http://jsfiddle.net/m04ddeu2/488/
First step is separating the name and URL into separate columns (instead of linked text). Then you can use a rowTemplate (Handlebars).
@chriszarate Thanks so much for this. I restored the spreadsheet with the links a separate column, could you show how to implement:
<a href="{{ cells.url }}">{{ cells.name }}</a>
For me?