• tguillemin

    Thank you very much for your answer.

    It works, of course, beautifully.

    Thanks again

    posted in Editorial read more
  • tguillemin

    This is, of course , inspired by the question "List of workflows"
    [https://forum.omz-software.com/topic/3994/list-of-workflows](link url)

    I wondered if it would be possible to obtain the list of all sub-workflows in the different main workflows, e.g. :

    workflowfoo:subworkflowbar
    workflowfoo:subworkflowbaz

    Although this would help me keeping organized (some workflows are used as sub-workflows in more than one other workflow), this is, alas, far beyond my competences…

    Thanks in advance

    posted in Editorial read more
  • tguillemin

    I want to build a workflow to fold/unfold not lines, but specific headers and their contents, and I do not know how to proceed.(I suppose iwhat action ? what Regex ?). Of course I know how to do that manually…

    I have a text, e.g. :

    #Chapter one (@tag1, @tag2)
    
    some text
    some other text
    
    #Chapter two (@tag2, @tag3)
    
    foo
    ber
    baz
    
    #Chapter three (@tag1, @tag3)
    
    London
    Paris
    Berlin
    
    #Chapter four (@tag2, @tag4)
    
    something
    anything
    

    I want to select the, e.g. @tag1 headers and unfold these and these only, so as to have :

    #Chapter one (@tag1, @tag2)
    
    some text
    some other text
    
    [number of hidden words]
    
    #Chapter three (@tag1, @tag3)
    
    London
    Paris
    Berlin
    
    [number of hidden words]
    

    How should I proceed ?

    Thanks in advance

    posted in Editorial read more
  • tguillemin

    @omz

    Thank you very much for youe answer, which works perfectly.

    And thank you too for Editorial, which is a truly beautiful app (NB: on Mac OSX, my editor of choice is Vim, not for programming, but for writing)

    Side question (only answer if you have got time) : how to sort that same list on the n-th column ?

    And of course, best wishes for 2017

    posted in Editorial read more
  • tguillemin

    @ccc

    First of all, thank you

    But, second, I get an error, which most certainly originates in the fact that I am an ignoramus in Python, and do not know how to adapt your answer to my needs.

    Thank you again nevertheless

    posted in Editorial read more
  • tguillemin

    I have, e.g., the following lines in the middle of a larger text

    Beijing
    Berlin
    London
    Moscow
    New York
    Paris

    How do I shuffle that list (and not the rest of the text) ?

    Thanks in advance

    posted in Editorial read more
  • tguillemin

    Thank you again !

    posted in Editorial read more
  • tguillemin

    @ccc Thank you very much. It works.

    (NB : I am left in the Python console. Is there a way to be automatically brought back to my text ?)

    Thanks again

    posted in Editorial read more
  • tguillemin

    I think my problem is I do not understand how to name the input I receive from my workflow, which goes as follows (and I wish to be able to use it in any text I create, whatever its name) :

    • Extend selection (Direction : Both ; Unit : Start/End of Document)
    • Selected Text (Empty Selection Output : No output ; Folded Text Include)
    • Run Python script

    How do I grab the Selected Text - and under what name ? - in my Python script ?

    Thanks again

    posted in Editorial read more
  • tguillemin

    First of all, thank you for your answer.

    I did as you told me. Here is the Python script I incorporated in my workflow (I kept only the ASC sorting) :

    #coding: utf-8
    
    import sys
    
    my_list = input
    
    #print('\n'.join(sorted(my_list)))
    #print('=' * 5)
    
    print('\n'.join(sorted(my_list, key=len)))   #Line 10
    print('=' * 5)
    
    #print('\n'.join(reversed(sorted(my_list, key=len))))
    #print('=' * 5)
    

    But I get the following message :

    Line 10: TypeError: 'builtin_function_or_method' object is not iterable
    

    Did I do something wrong ?

    Thanks again

    posted in Editorial read more

Internal error.

Oops! Looks like something went wrong!