Pythonista-Tools icon indicating copy to clipboard operation
Pythonista-Tools copied to clipboard

Website Plans and Ideas

Open tjferry14 opened this issue 11 years ago • 61 comments

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.

tjferry14 avatar Aug 10 '14 04:08 tjferry14

Great work. The auto updates idea is appealing.

cclauss avatar Aug 11 '14 00:08 cclauss

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.

cclauss avatar Aug 21 '14 20:08 cclauss

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 avatar Jan 28 '15 18:01 Gerzer

@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.

tjferry14 avatar Jan 28 '15 20:01 tjferry14

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.

Gerzer avatar Jan 28 '15 22:01 Gerzer

If we set up the blog using Jekyll, here is a start http://www.editorial-workflows.com/workflow/5797754072727552/auAEu7A0Rmg

tjferry14 avatar Jan 30 '15 12:01 tjferry14

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)

cclauss avatar Jan 30 '15 13:01 cclauss

I want to experiment with Jekyll. Should I create an "experimental"/"dev" branch or use my own fork?

Gerzer avatar Feb 03 '15 14:02 Gerzer

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.

cclauss avatar Feb 03 '15 18:02 cclauss

Ok, thanks!

Gerzer avatar Feb 03 '15 19:02 Gerzer

@Gerzer just opened some pull requests. Will try my best to help out.

tjferry14 avatar Feb 03 '15 21:02 tjferry14

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.

Gerzer avatar Feb 04 '15 18:02 Gerzer

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.

Gerzer avatar Feb 05 '15 17:02 Gerzer

Sorry, didn't realize GitHub issues could only have one assignee...

Gerzer avatar Feb 05 '15 17:02 Gerzer

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.

Gerzer avatar Mar 22 '15 15:03 Gerzer

Blog auto-upload should be cool!

We should do something to celebrate our 100th star? Only 10 more to go.

cclauss avatar Mar 22 '15 17:03 cclauss

@cclauss: Something like blog auto-upload? ;-P

Gerzer avatar Mar 22 '15 20:03 Gerzer

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

jjarava avatar Mar 22 '15 20:03 jjarava

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 avatar Mar 25 '15 23:03 Gerzer

@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.

tjferry14 avatar Mar 31 '15 19:03 tjferry14

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.

Gerzer avatar Apr 01 '15 02:04 Gerzer

Hey, just a quick note. On the page http://pythonista-tools.github.io/Pythonista-Tools/utilities.html youtube-dl downloader is not a link :)

JadedTuna avatar Apr 18 '15 15:04 JadedTuna

@Vik2015 Fixed. Thank you.

tjferry14 avatar Apr 18 '15 16:04 tjferry14

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 ;).

tjferry14 avatar Apr 20 '15 22:04 tjferry14

Working on Calling this using the jQuery plugin called Sheetrock: http://chriszarate.github.io/sheetrock

tjferry14 avatar Apr 22 '15 15:04 tjferry14

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>

chriszarate avatar Apr 28 '15 00:04 chriszarate

@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 avatar Apr 28 '15 13:04 Gerzer

@Gerzer Here's a JS Fiddle. http://jsfiddle.net/m04ddeu2/486/

@chriszarate How would that recognize what column the link is in?

tjferry14 avatar Apr 28 '15 14:04 tjferry14

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 avatar Apr 28 '15 15:04 chriszarate

@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?

tjferry14 avatar Apr 28 '15 15:04 tjferry14