A cheat sheet of Blender shortcuts #1091

Merged
merged 20 commits into from Jun 2, 2015

Projects

None yet

5 participants

@xuv
Contributor
xuv commented Apr 4, 2015

So you know, I've mainly copied the Gimp_Cheat_Sheet files and just changed the information where relevant.

What does your Instant Answer do?
Shows a cheat sheet of shortcuts for Blender

What problem does your Instant Answer solve (Why is it better than organic links)?
Organic links point to pdf pages for most of them.

What is the data source for your Instant Answer? (Provide a link if possible)
http://overapi.com/blender/

Why did you choose this data source?
Seemed to be the most coherent and well organized one.

Are there any other alternative (better) data sources?
yes.

What are some example queries that trigger this Instant Answer?
blender help
blender shortcuts
blender keybindings

Which communities will this Instant Answer be especially useful for? (gamers, book lovers, etc)
The huge community of Blender users (1/2 million download a month)

Is this Instant Answer connected to a DuckDuckHack Instant Answer idea?
No

Which existing Instant Answers will this one supercede/overlap with?
None

Are you having any problems? Do you need our help with anything?
No

Where did you hear about DuckDuckHack? (For first time contributors)
Twitter

What does the Instant Answer look like? (Provide a screenshot for new or updated Instant Answers)
ddg-blender-shorcut

Checklist

Please place an 'X' where appropriate.

  • Added metadata and attribution information (https://duck.co/duckduckhack/metadata)

  • Wrote test file and added to t/ directory (https://duck.co/duckduckhack/goodie_tests)

  • Verified that instant answer adheres to design guidelines (https://duck.co/duckduckhack/design_styleguide)

  • Verified that instant answer adheres to code styleguide (https://duck.co/duckduckhack/code_styleguide)

  • Tested cross-browser compatibility

    Please let us know which browsers/devices you've tested on:

    • Windows 8
      • [] Google Chrome
      • [] Firefox
      • [] Opera
      • [] IE 10
    • Windows 7
      • [] Google Chrome
      • [] Firefox
      • [] Opera
      • [] IE 8
      • [] IE 9
      • [] IE 10
    • Windows XP
      • [] IE 7
      • [] IE 8
    • Mac OSX
      • [] Google Chrome
      • [] Firefox
      • [] Opera
      • [] Safari
    • iOS (iPhone)
      • [] Safari Mobile
      • [] Google Chrome
      • [] Opera
    • iOS (iPad)
      • [] Safari Mobile
      • [] Google Chrome
      • [] Opera
    • Android
      • [] Firefox
      • [] Native Browser
      • [] Google Chrome
      • [] Opera
    • Gnu/Linux
      • Google Chrome
      • Firefox
      • Opera

IA Page: https://duck.co/ia/view/blender_cheat_sheet

@xuv
Contributor
xuv commented Apr 5, 2015

Hmm. Don't understand why the build failed.

@mintsoft mintsoft commented on an outdated diff Apr 6, 2015
t/BlenderCheatSheet.t
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+
+use strict;
+use warnings;
+use Test::More;
+use DDG::Test::Goodie;
+
+zci answer_type => "blender_cheat_sheet";
+zci is_cached => 1;
+
+ddg_goodie_test(
+ [ 'DDG::Goodie::BlenderCheatSheet' ],
+ "blender cheat sheet" => $test_zci,
@mintsoft
mintsoft Apr 6, 2015 Member

@xuv The tests are failing because $test_zci has never been set to a value; so there's nothing to compare it to. Try setting $test_zci to something then you should get a more useful error.

The tests can be run locally from the root of the repo with: prove -Ilib t/BlenderCheatSheet.t

@jagtalon
Member

@xuv please titlecase the values as well. Instead of "select", "pan", "shrink/flatten" or "zoom", it should be "Select", "Pan", "Shrink/Flatten", and "Zoom".

@jagtalon jagtalon commented on an outdated diff Apr 10, 2015
lib/DDG/Goodie/BlenderCheatSheet.pm
+
+# Metadata. See https://duck.co/duckduckhack/metadata for help in filling out this section.
+name "BlenderCheatSheet";
+description "Blender most common shortcuts";
+primary_example_queries "blender shortcuts", "blender key bindings";
+# secondary_example_queries "optional -- demonstrate any additional triggers";
+# Uncomment and complete: https://duck.co/duckduckhack/metadata#category
+# Uncomment and complete: https://duck.co/duckduckhack/metadata#topics
+category "cheat_sheets";
+topics "computing", "geek", "special_interest";
+code_url "https://github.com/duckduckgo/zeroclickinfo-goodies/blob/master/lib/DDG/Goodie/BlenderCheatSheet.pm";
+attribution github => ["xuv", "Julien Deswaef"],
+ twitter => "xuv";
+
+# Triggers
+triggers any => "blender help", "blender shortcuts", "blender cheat sheet", "blender cheatsheet", "blender key bindings";
@jagtalon
jagtalon Apr 10, 2015 Member

What about triggers such as "cheatsheet blender" or "shortcuts blender"?

@jagtalon
jagtalon Apr 10, 2015 Member

Also "blender guide"?

@jagtalon
Member

@xuv where did you get these keybindings? Please add it as a comment so that we could check if it's right ourselves. :)

@xuv
Contributor
xuv commented Apr 10, 2015

Ok. Thx. I will make all these changes and come back to you.
As for the source for the data. It's mentioned in my first comment ;)

What is the data source for your Instant Answer? (Provide a link if possible)
http://overapi.com/blender/

@jagtalon
Member

@xuv oh I missed that source

@jagtalon jagtalon self-assigned this Apr 10, 2015
@xuv
Contributor
xuv commented Apr 10, 2015

@jagtalon: Updated all the files following your suggestions.

Test is now written correctly and passing fine (at least locally).
Have tested on certain browser also:

  • Tested cross-browser compatibility
    • Gnu/Linux
      • Google Chrome
      • Firefox
      • Opera
@xuv
Contributor
xuv commented Apr 20, 2015

Hello. What does this "Needs Community Review" tag means? Do I have to do something? Which community are we talking about: Blender? If yes, I can contact some people or post a message in forums to have it reviewed. Thx.

@mintsoft
Member

@xuv It's a tag to indicate that the DDG community needs to have a look over it. However input from the Blender community would be welcome!

@mintsoft mintsoft commented on an outdated diff Apr 20, 2015
lib/DDG/Goodie/BlenderCheatSheet.pm
@@ -0,0 +1,44 @@
+package DDG::Goodie::BlenderCheatSheet;
+# ABSTRACT: Provide a cheatsheet for common Blender shortcuts
+# Start at https://duck.co/duckduckhack/goodie_overview if you are new
@mintsoft
mintsoft Apr 20, 2015 Member

You can bomb this comment, however please leave the ABSTRACT comment in

@mintsoft mintsoft commented on an outdated diff Apr 20, 2015
lib/DDG/Goodie/BlenderCheatSheet.pm
@@ -0,0 +1,44 @@
+package DDG::Goodie::BlenderCheatSheet;
+# ABSTRACT: Provide a cheatsheet for common Blender shortcuts
+# Start at https://duck.co/duckduckhack/goodie_overview if you are new
+# to instant answer development
+
+use DDG::Goodie;
+
+zci answer_type => "blender_cheat_sheet";
+zci is_cached => 1;
+
+# Metadata. See https://duck.co/duckduckhack/metadata for help in filling out this section.
+name "BlenderCheatSheet";
+description "Blender most common shortcuts";
+primary_example_queries "blender shortcuts", "blender key bindings";
+# secondary_example_queries "optional -- demonstrate any additional triggers";
@mintsoft
mintsoft Apr 20, 2015 Member

I'd also delete these comments, and the # Metadata one above

@xuv
Contributor
xuv commented Apr 20, 2015

@mintsoft Removed unnecessary comments.

@moollaza
Member

@xuv @mintsoft it's not live yet, and I'll be adding more functionality to it this week, but for the most part it's done. We'll be moving ahead with this approach (improving as needed) and may change the format of the JSON file, but if @xuv wouldn't mind also creating a JSON file for this it would be great :)

@xuv
Contributor
xuv commented Apr 20, 2015

@moollaza: I could write the JSON :) But is it definitive and documented somewhere? Is there a way to test the JSON once written or not yet?

@moollaza
Member

It's not documented (yet!), but there's a few examples in the repo that show you the format. You can definitely test it using duckpan server. Actually, running duckpan server CheatSheets will load only that Goodie so nothing else can trigger.

I'm going to be working this week to improve the initially displayed section to allow for custom content and then I'll be updating the JSON syntax to allow for better handling of the text that's expected to be wrapped in a <code> block. I'll make any necessary updates to the JSON if the format changes :)

@xuv
Contributor
xuv commented Apr 20, 2015

Thx. Will see what I can do.

@xuv
Contributor
xuv commented Apr 23, 2015

@moollaza: Don't want to be rude, but I've tried the new CheatSheets with JSON files on a duckpan server and I get an empty box (see screenshot). I'm using Firefox 37.0.2 on a Linux machine.

duckpan-cheatsheet
And I'm just testing with your examples. Not even started writing the Blender one yet :)

But I do qget the JSON file printed in the console. Seems a cosmetic problem of some sort. Or else.

@moollaza moollaza added the CheatSheet label May 15, 2015
@xuv
Contributor
xuv commented May 20, 2015

@moollaza What's up? :) How's the new CheatSheet going?

@MrChrisW
Member

Hey @xuv, sorry for the delay! There's some action going on in #1131 related to the new CheatSheets, once merged I think we can move on this! Thanks for your patient 😄

@MrChrisW MrChrisW referenced this pull request May 25, 2015
Merged

domjacko's First Goodie #1147

@xuv
Contributor
xuv commented May 25, 2015

@MrChrisW Ho. Thx for the update and pointing to that. Waitinq then :)

@MrChrisW
Member

@xuv Just so you know there's now some great documentation on cheat sheets https://duck.co/duckduckhack/goodie_cheat_sheets

I think we can get this one completed! You'll just need to remove all other files except the json one and ensure it's the correct syntax. 👍

@xuv
Contributor
xuv commented May 30, 2015

@MrChrisW Ok. Changing the code again I guess :)

When you say "You'll just need all other files except the json one and ensure it's the correct syntax." You mean, "delete all other files except the JSON". Right?

That's what I understand from reading the doc you linked to.

@MrChrisW
Member

@xuv Sorry it's late here! 😪 Yup that's what I meant to say.
"You'll just need to remove all other files except the json file"

@xuv
Contributor
xuv commented Jun 1, 2015

@MrChrisW Removed unused files. Updated JSON to latest correct syntax. But...

Duckpan does not throw any errors.
But the cheatsheet does not display.
And I have this error in the browser console:
DDG.exec_template: template is null
Not sure what I have to do to solve this.

@MrChrisW
Member
MrChrisW commented Jun 1, 2015

@xuv Maybe try a merge from master, I see you did that 12 days ago... So I doubt that's the problem. @moollaza Probably knows what's going on 😉

@xuv
Contributor
xuv commented Jun 1, 2015

@MrChrisW I did a merge this morning: dfa2c2c ;)
And surely would like @moollaza advice. Because when I look for the Vim or Tmux cheat sheets, it renders without problem but Blender not. Although I could not spot any difference between these files and mine or find any relevant error to begin with. Except that "temblate is null".

@MrChrisW
Member
MrChrisW commented Jun 1, 2015

@xuv Oops! Missed that 😄

Yup we'll need to await moollaza's advise as it all looks right to me also. Thanks again for your patience.

@moollaza moollaza commented on an outdated diff Jun 2, 2015
share/goodie/cheat_sheets/blender.json
@@ -0,0 +1,557 @@
+{
+ "id": "blender_cheat_sheet",
+ "name": "Blender",
+ "description": "3D computer graphics software",
+ "meta": {
@moollaza
moollaza Jun 2, 2015 Member

this actually needs to be metadata to prevent a naming collision -- should fix your rendering problem 👍

@moollaza moollaza commented on an outdated diff Jun 2, 2015
share/goodie/cheat_sheets/blender.json
@@ -0,0 +1,557 @@
+{
+ "id": "blender_cheat_sheet",
+ "name": "Blender",
+ "description": "3D computer graphics software",
+ "meta": {
+ "sourceName": "BlenderCheatSheet",
+ "sourceUrl": "https://duckduckgo.com"
@moollaza
moollaza Jun 2, 2015 Member

Ideally this should send them somewhere where they can get more info about these helpers, typically the source that was used to create this. Is there a particular source you used or a website we can send them for more info? If not let's remove the metadata altogether because sending them to our Homepage isn't very helpful in this context.

@xuv
Contributor
xuv commented Jun 2, 2015

@moollaza Ho thanks. Missed that "meta", "metadata" property . Thanks for spotting it.

I've added the source, also. And prettyfied the whole thing so it looks coherent and nice :)

A screenshot:
Blender shortcuts screenshot

Hope this is all fine now. :)

@moollaza moollaza commented on an outdated diff Jun 2, 2015
share/goodie/cheat_sheets/blender.json
+ }, {
+ "val": "Properties",
+ "key": "n"
+ }],
+ "Armatures": [{
+ "val": "Add bone",
+ "key": "[e] or [Ctrl] + [Click]"
+ }, {
+ "val": "Rotate",
+ "key": "[Ctrl] + [r]"
+ }, {
+ "val": "Recalculate roll",
+ "key": "[Ctrl] + [n]"
+ }, {
+ "val": "Align bones",
+ "key": "[Ctrl] + [ALt] + [a]"
@moollaza
moollaza Jun 2, 2015 Member

tiny typo, you have a capital L

@moollaza
Member
moollaza commented Jun 2, 2015

@xuv this is looking awesome! I noticed one tiny typo. Once fixed this should be good for merge!

@xuv
Contributor
xuv commented Jun 2, 2015

@moollaza Tx. Corrected typo. :)

@moollaza
Member
moollaza commented Jun 2, 2015

@xuv nice! This LGTM 👍

@moollaza moollaza merged commit c595d85 into duckduckgo:master Jun 2, 2015

1 check was pending

continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@xuv
Contributor
xuv commented Jun 2, 2015

Thanks @moollaza and the rest of the team. It's been quite a ride :) Will be happy to see this live.

@moollaza
Member
moollaza commented Jun 2, 2015

@xuv Thanks again for taking the time to contribute! We really appreciate it. Feel free to stick around and comment/help on other PR's & Issues or even submit more Instant Answers!

@xuv
Contributor
xuv commented Jun 6, 2015

Hey. Don't want to be rude or anything. But I'm wondering how long till I can see this live?
I'd be happy to get the Blender community to know about it when it's there :)

@moollaza
Member
moollaza commented Jun 6, 2015

@xuv It should be live within the next few days, I'll be sure to ping you hear once I see it's live!

@xuv
Contributor
xuv commented Jun 7, 2015

thx.

@xuv
Contributor
xuv commented Jun 10, 2015

Just saw it live. Thanks. Feels good to see it. :)

@moollaza
Member

You beat me to it! Was just about to let you know :)

https://duckduckgo.com/?q=blender+cheat+sheet&ia=cheatsheet

@xuv Thanks again for taking the time to contribute! We really appreciate it. Feel free to stick around and comment/help on other PR's & Issues or even submit more Instant Answers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment