Count Stuff in WorkFlowy

With the WFcount Bookmarklet.

IMG_1519
Von Tag!

…Two Tags!

……Tree Tags!

………Ah, Ah, Ah!

WFcount can count like a purple Muppet (only just WorkFlowy stuff, like bullets, parents, children, completed items and tags).

It works on a very simple premise: count what is visible. So you control what gets counted by expanding, collapsing and zooming on bullets. Then click on the bookmarklet to get a summary of your counts.

Update Feb 9, 2016: Now with Time Tags!

Here’s what it looks like…

WFcount Bookmarklet

Tips:

  • When zoomed, double clicking the bullet title will toggle expand/collapse of all children.
  • When viewing your WorkFlowy home page, double clicking “workflowy” will do the same. (Handy if you want to count everything in your WorkFlowy castle.)
  • Alternately, either zoomed or from your Home page, you can search for “@ OR #” (no quotes) to reveal all your tags. This method can be preferable to expanding all, especially if you wish to preserve the expand/collapse state of some of your nodes.

Installation Options:

1) WFcount: Desktop

  • Opens in a small browser window (see the screenshot above)
  • Can selectively copy count information.
  • Leave the window open and it will append count summaries in that window.
  • Monospace font
  • Click here for a link you can drag to your Bookmarks Bar.

2) iWFcount: Mobile or Desktop

  • Displays counts in an alert dialog.
  • Good option for “quick view” where you don’t need to copy.
  • For Desktop Install: Triple click the code below to select it, then drag to your Bookmarks Bar. Rename the bookmark.
  • For Mobile Install: Bookmark this page, and save it to your favorites folder.
  • Select all the code in the box below and copy it to the clipboard.
javascript:(function(){var%20version=%22v1.4i%22,timeFormat=0,br=%22\n%22;if(-1!=location.href.indexOf(%22workflowy.com%22)){var%20projectSelected=document.title.replace(/%20-%20WorkFlowy$/,%22%22),bullets=document.getElementsByClassName(%22bullet%22).length,parents=document.getElementsByClassName(%22parent%22).length,children=bullets-parents,tags=document.getElementsByClassName(%22project%20selected%22)[0].getElementsByClassName(%22contentTag%22),completed=document.getElementsByClassName(%22project%20selected%22)[0].getElementsByClassName(%22done%22).length;if(0==document.getElementsByClassName(%22showCompleted%22).length)var%20completed=%22Hidden%22;var%20finalCount=%22%22,totalHours=%22%22;if(tags.length%3E0){var%20i,tagList=[];for(i=0;i%3Ctags.length;i++)tagList.push(tags[i].textContent.toLowerCase());tagList.sort();var%20tagCount={};tagList.forEach(function(x){tagCount[x]=(tagCount[x]||0)+1});for(var%20tagTitle%20in%20tagCount)finalCount+=tagTitle+%22%20=%20%22+tagCount[tagTitle]+br;var%20tagNames=finalCount.match(/=/g).length,timeTags=finalCount.match(/(%23)(\d+)(m|h)(%20=%20)(\d+)/g);if(null!==timeTags){var%20final=0;for(i=0;i%3CtimeTags.length;i++)findTime=/(%23)(\d+)(m|h)(%20=%20)(\d+)/,total=timeTags[i].match(findTime)[2]*timeTags[i].match(findTime)[5],-1!==timeTags[i].indexOf(%22h%22)%26%26(total=60*total),final+=total;var%20totalHours=br+%22Total%20Time%20=%20%22+Math.floor(final/60)+%22h%20%22+final%2560+%22m%22;if(0!==timeFormat)var%20totalHours=br+%22Total%20Hours%20=%20%22+Math.round(final/60*100)/100}}else%20var%20tagNames=0;alert(projectSelected+br+br+%22Parents%20=%20%22+parents+br+%22Children%20=%20%22+children+br+%22Completed%20=%20%22+completed+br+br+%22Tag%20Count%20=%20%22+tags.length+br+%22Tag%20Names%20=%20%22+tagNames+totalHours+br+br+finalCount+br+br+version)}})();

iOS Tip: Press, hold, and release on “javascript” to select it, then gently swipe down on the right grabber, until you see only the left grabber and then copy.

  • Open the bookmarks menu and edit the bookmark you just created.
  • Clear the URL/Address field, and paste the code you copied above.
  • Save your changes and exit out of the bookmarks menu.

View: WFcount source code

Happy counting arithmomaniacs! Ah, Ah, Ah!

Advertisements

15 thoughts on “Count Stuff in WorkFlowy

  1. Love the continued extensions/bookmarklet’s for WorkFlowy! There is one feature I keep hoping for – wondering if it’s even possible to create. From what I’ve seen here so far – if it’s possible, you may be the one to ask about it!

    I would like to create tags with numbers (ie: #30 or #90) that would represent the estimated minutes a task would take. Then, if I could use FlatFlowy to limit the list, and then another bookmarklet to show me the TOTAL represented by these number tags that would be very awesome. It would help me estimate my time better and help me to not get so overly optimistic about what I can accomplish in a day.

    Any chance of creating something like this? Is it even possible?

    Like

  2. PS: I used a tool that did exactly this for Todoist. I left Todoist because it was clunky and didn’t seem to be improving. However, I do REALLY miss this time total feature. The brilliant script there that did time totaling was found here: https://github.com/beda42/tdtimer

    I am not familiar enough with programing to know: could something similar work in Workflowy?

    Like

    1. Completely doable. WFcount could be customized to add “Total hours” by parsing time tags. Chance of creating? That depends on how you structure things in WorkFlowy… which determines how much tweaking is required 🙂

      FlatFlowy won’t be part of the solution. It works on different code, hiding things from you, but not WFcount.

      I need to understand your outline structure & use cases before I can say anything definitive. Contact me at rawbytz at gee male; I think we can get things figured out in a few questions. Cheers!

      Liked by 1 person

  3. Hi I’m a real fan of workflowy but my lack of geekiness is showing 🙂 Two questions for those who are a bit more workflowy savvy. Number one: I’ve ‘installed’ WFcount’ however it only counts what is on the screen and no more… can it be made to do your entire Workflowy tree? Question two: What is an ‘orphan’ and what does ‘orphan hunting’ mean? Please type slowly so I can understand you clearly 🙂

    Like

    1. Ha! Sophie your comment made me smile. Be careful! Using this bookmarklet may raise your geekiness factor to dangerously high levels… Rather than typing slow, I may just type long… apologies in advance.

      If you want to count all tags you have two options. In both cases, you need to decide if you want to include completed items. Click on Completed: in the toolbar to toggle it between Hidden and Visible.

      Method 1: From your home page, search for “# OR @” (don’t include the quotes). This will show all your tags, since WorkFlowy tags only start with those characters. Then click on WFcount.

      btw: OR is a special search operator. It must be ALLCAPS with spaces on either side. When not used, WorkFlowy treats spaces between search terms as AND.

      Method 2: From your home page, double click the WorkFlowy logo to the left of the searchbox. This will Expand All bullets (clicking again will collapse them) The advantage of this method is it will also give you an accurate count of all your bullets. Method 1 will not. The big disadvantage of this method, is that WorkFlowy remembers the expand/collapse state of all bullets. Some people are picky about that, and this method messes with their setup.

      Orphans are simply tags that you no longer use. The only reason to hunt and kill them is to reduce the number of tags that show in that tag-helper-popup-thingy (actual technical term)

      Hope that helps!

      Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s