Re: tip wanted: faster git clone

2017-12-07 Thread Jacob MacDonald
Check out the documentation for the `--depth` flag to `git-clone`. It will
pull only the selected number of commits from a single branch, which means
your initial clone is far smaller. However, it makes it very difficult to
do development later, so make sure the clone will only be used for reading!

Jacob.

On Thu, Dec 7, 2017 at 10:51 PM Matt Wilkie  wrote:

> Somebody (Kent?) posted a git clone command that was faster than the
> typical:
>
>  git clone https://github.com/leo-editor/leo-editor.git
>
> I think it involved telling git there was no need to go back to the
> beginning of time, just the previous N months. Or something?
>
> matt
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


tip wanted: faster git clone

2017-12-07 Thread Matt Wilkie
Somebody (Kent?) posted a git clone command that was faster than the
typical:

 git clone https://github.com/leo-editor/leo-editor.git

I think it involved telling git there was no need to go back to the
beginning of time, just the previous N months. Or something?

matt

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How big is Leo on disk?

2017-12-07 Thread Zoom.Quiet
42M Leo-5.4
not include Py 2.7.10 + PyQt ...ect.


On Fri, Dec 8, 2017 at 8:46 AM, Matt Wilkie  wrote:
>> For anyone wondering what you could possibly do with a 20 Mb drive,
>> apps. and games were all much less than 1 Mb back then, so it was quite
>> useful.
>
> The most amazing program under 1mb I ever encountered was World Construction
> Set. At a time when the expensive GIS software used to make our daily bread
> came on 20 to 30 floppy disks (~1995), depending on extensions, it showed up
> in a measly cardboard envelope, and blew my socks off. It could render a 3D
> perspective view of rocks, trees, clouds, distance haze and more from
> real-world spatial data while said expensive GIS software could only draw
> wire frames.
> http://www.maphew.com/archive/patawi/matt/polargeo/gallery/3D/Minto_View2.htm
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.



-- 
life is pathetic, go Pythonic! 人生苦短, Python当歌!
俺: http://zoomquiet.io
授: http://creativecommons.org/licenses/by-sa/2.5/cn/
怒: 冗余不做,日子甭过!备份不做,十恶不赦!
KM keep growing environment culture which promoting organization learning!

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How big is Leo on disk?

2017-12-07 Thread Matt Wilkie
> For anyone wondering what you could possibly do with a 20 Mb drive,
> apps. and games were all much less than 1 Mb back then, so it was quite
> useful.​

The most amazing program under 1mb I ever encountered was World
Construction Set. At a time when the expensive GIS software used to make
our daily bread came on 20 to 30 floppy disks (~1995), depending on
extensions, it showed up in a measly cardboard envelope, and blew my socks
off. It could render a 3D perspective view of rocks, trees, clouds,
distance haze and more from real-world spatial data while said expensive
GIS software could only draw wire frames.
http://www.maphew.com/archive/patawi/matt/polargeo/gallery/3D/Minto_View2.htm

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How big is Leo on disk?

2017-12-07 Thread Chris George
My first computer was a TRS-80 with 16k RAM and a cassette tape drive.

My first PC was an XT with 640k RAM and a 5MB hard disk.


Chris

On Thu, Dec 7, 2017 at 1:51 PM, Kent Tenney  wrote:

> Hey kids, I was thrilled when I got a machine with 2! 5"
> floppies, boot disk AND data disk!
>
> get off my lawn
>
> On Thu, Dec 7, 2017 at 3:36 PM, Terry Brown  wrote:
>
>> On Thu, 7 Dec 2017 13:00:14 -0800
>> Matt Wilkie  wrote:
>>
>> > *(Who remembers buying his first hard drive for $$$. A 330mb scsi disk
>>
>> Heh, I paid $$$ for a 20 Mb (yes, megabyte) hard disk.  And now you can
>> get a 128 Gb microSD card for < $25 USD.
>>
>> For anyone wondering what you could possibly do with a 20 Mb drive,
>> apps. and games were all much less than 1 Mb back then, so it was quite
>> useful.
>>
>> Another place Leo can consume a lot of disk space is in the .leo folder
>> in your home directory - old db cache entries can add up a lot.
>>
>> Cheers -Terry
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "leo-editor" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to leo-editor+unsubscr...@googlegroups.com.
>> To post to this group, send email to leo-editor@googlegroups.com.
>> Visit this group at https://groups.google.com/group/leo-editor.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How big is Leo on disk?

2017-12-07 Thread Kent Tenney
Hey kids, I was thrilled when I got a machine with 2! 5"
floppies, boot disk AND data disk!

get off my lawn

On Thu, Dec 7, 2017 at 3:36 PM, Terry Brown  wrote:

> On Thu, 7 Dec 2017 13:00:14 -0800
> Matt Wilkie  wrote:
>
> > *(Who remembers buying his first hard drive for $$$. A 330mb scsi disk
>
> Heh, I paid $$$ for a 20 Mb (yes, megabyte) hard disk.  And now you can
> get a 128 Gb microSD card for < $25 USD.
>
> For anyone wondering what you could possibly do with a 20 Mb drive,
> apps. and games were all much less than 1 Mb back then, so it was quite
> useful.
>
> Another place Leo can consume a lot of disk space is in the .leo folder
> in your home directory - old db cache entries can add up a lot.
>
> Cheers -Terry
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How big is Leo on disk?

2017-12-07 Thread Terry Brown
On Thu, 7 Dec 2017 13:00:14 -0800
Matt Wilkie  wrote:

> *(Who remembers buying his first hard drive for $$$. A 330mb scsi disk

Heh, I paid $$$ for a 20 Mb (yes, megabyte) hard disk.  And now you can
get a 128 Gb microSD card for < $25 USD.

For anyone wondering what you could possibly do with a 20 Mb drive,
apps. and games were all much less than 1 Mb back then, so it was quite
useful.

Another place Leo can consume a lot of disk space is in the .leo folder
in your home directory - old db cache entries can add up a lot.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: How big is Leo on disk?

2017-12-07 Thread Mike Hodson
On Thu, Dec 7, 2017 at 4:00 PM, Matt Wilkie  wrote:

>
> *(Who remembers buying his first hard drive for $$$. A 330mb scsi disk
> drive that was 5cm/2inch thick and could be used as a boat anchor or to
> crush the skull of a troll. Awesomely strong magnets inside too.)*
>
I remember my first Linux install.
It was on 2 disks, in a 486...
An 80MB and a 204MB.  the 204 was /usr. the 80 was / ..
I tried for no less than 2 days to get RedHat 5.1 installed... Note: do NOT
install TeTeX! (i thought 'hey this sounds cool' without ever knowing how
massive it was)

Ah...Memories...

Mike

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


How big is Leo on disk?

2017-12-07 Thread Matt Wilkie
I've been wondering how much storage am I devoting to Leo. I have one
install for each type (user, develop, git) in a virtual env. Here's what's
on my Win7 machine:

Foundation:

280 mb - Bare bones dependencies: python3 + pyqt5
322 mb - Leo user dependencies: {bare} + docutils + sphinx
330 mb - Leo develop dependencies: {user} + pylint + pylakes + twine + ...

Leo:

036 mb - Leo itself (what gets put into `site-packages` with pip install)
040 mb - Leo git export (everything in git master branch but nothing else)
217 mb - Leo git checkout ({export} + .git folder which has several
branches)

So right now my total is 1,225 MB.

matt


*(Who remembers buying his first hard drive for $$$. A 330mb scsi disk
drive that was 5cm/2inch thick and could be used as a boat anchor or to
crush the skull of a troll. Awesomely strong magnets inside too.)*

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: ENB: Prototype of convention checker

2017-12-07 Thread Edward K. Ream
On Thursday, December 7, 2017 at 12:39:12 PM UTC-6, Edward K. Ream wrote:

4. Oops. At present the narrative lacks the following:
>
> class class LeoTagWidget(QtWidgets.QWidget):
>def def __init__(self,c,parent=None):
>self=   self.tc = self.c.theTagController
>
> It would be easy to add a regex to detect that.
>

Done at 4c75a5d. The new pattern is:

('self.x=', re.compile(r'^\s*self\.\w+\s*=')),

And now the narrative contains, among other statements:

  class class LeoTagWidget(QtWidgets.QWidget):
def def __init__(self,c,parent=None):
self.x= self.c=c
self.x= self.tc=self.c.theTagController
self.x= self.mapping={}
self.x= self.search_re='(&|\\||-|\\^)'

Some/most of these assignments will be of no particular value.  
Furthermore, the "deductions" involved in:

self.x= self.c=c
self.x= self.tc=self.c.theTagController

this assignment are non-trivial for programs. But we humans can see clearly 
that self.tc is an instance of the TagController class. This is, imo, 
purely static type inference, and it should be possible to do it quickly!

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: ENB: Prototype of convention checker

2017-12-07 Thread Edward K. Ream
On Thursday, December 7, 2017 at 12:22:52 PM UTC-6, Edward K. Ream wrote:

Yes, it is possible to do a prototype in a few hours, with a doctor's 
> appointment in between.
>

I promised a narrative.  Here it is:

1. Here are assignments to c.theTagController, *recognized as such*, with 
kind "c.x=":

   def def onCreate(tag,keys):
  c.x= c.theTagController=theTagController

class class TagController(object):
   def def __init__(self,c):
  c.x= c.theTagController=self

 2. Here is the definition of tc.remove_tag:

 class class TagController(object):
   def def remove_tag(self,p,tag):


3. And here is the formerly-erroneous call to tc.remove_tag:

 class class LeoTagWidget(QtWidgets.QWidget):
  
   def def callback_factory(self,tag):
   def def callback(event):
  call tc.remove_tag(p,tag)
  
4. Oops. At present the narrative lacks the following:

class class LeoTagWidget(QtWidgets.QWidget):
   def def __init__(self,c,parent=None):
   self=   self.tc = self.c.theTagController

It would be easy to add a regex to detect that.

*Summary*

There is a big difference between this kind of prototype and an actual 
convention checker.  The prototype just matches patterns.  Working code 
would create representations of classes, their methods, functions, 
assignments, etc. etc.

Otoh, the narrative I've just provided does, I think, illustrate my point 
of view.

The present prototype suffices for now. I plan no further work in the near 
future, but heh, I've said that before...

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


ENB: Prototype of convention checker

2017-12-07 Thread Edward K. Ream
Yes, it is possible to do a prototype in a few hours, with a doctor's 
appointment in between.

Rev 2874a6f adds a copy of @button checker to leoCheck.py.  I did this 
mostly so I wouldn't have to show the entire code here.

The guts of the prototype is this method:

patterns = (
('class', re.compile(r'class\s+[a-z_A-Z][a-z_A-Z0-9]*.*:')),
('def',   re.compile(r'^\s*def\s+[\w0-9]+.*:')),
('c.x=',  re.compile(r'^\s*c\.[\w.]+\s*=')),
# Assignment to c.
('call',  re.compile(r'^\s*(\w+)(\.\w+)*\s*\(.*\)')),
# Possible function call.
)
ignore = ('dict', 'enumerate', 'list', 'tuple')
# Things that look like function calls.

def show(self, fn, node):
s = leoAst.AstFormatter().format(node)
aList = g.splitLines(s)
g.trace('%s lines, %s' % (len(aList), g.shortFileName(fn)))
for s in aList:
# Match each pattern separately for better control.
for kind, pattern in self.patterns:
m = pattern.match(s)
if m:
try:
call = m.group(1)
if not any([call.startswith(z) for z in self.ignore]):
print('%6s %s' % (kind, s.rstrip()))
except IndexError:
# No m.group(1)
print('%6s %s' % (kind, s.rstrip()))

And here is the results, when node is the ast tree for nodetags.py:

show 272 lines, nodetags.py
   def def init():
  call g.app.createQtGui(__file__)
  call g.registerHandler('after-create-leo-frame',onCreate)
  call g.plugin_signon(__name__)
  call g.es('Plugin %s not loaded.'%__name__,color='red')
   def def onCreate(tag,keys):
  c.x= c.theTagController=theTagController
 class class TagController(object):
   def def __init__(self,c):
  call self.initialize_taglist()
  c.x= c.theTagController=self
  call c.frame.log.createTab('Tags',widget=self.ui)
  call self.ui.update_all()
   def def initialize_taglist(self):
  call taglist.append(tag)
   def def get_all_tags(self):
   def def update_taglist(self,tag):
  call self.taglist.append(tag)
  call self.taglist.remove(tag)
  call self.ui.update_all()
   def def get_tagged_nodes(self,tag):
  call nodelist.append(p.copy())
   def def get_tagged_gnxes(self,tag):
   def def get_tags(self,p):
  call g.trace(tags,p.h)
   def def add_tag(self,p,tag):
  call tags.add(tag)
  call self.c.setChanged(bool)
  call self.update_taglist(tag)
   def def remove_tag(self,p,tag):
  call tags.remove(tag)
  call self.c.setChanged(bool)
  call self.update_taglist(tag)
 class class LeoTagWidget(QtWidgets.QWidget):
   def def __init__(self,c,parent=None):
  call QtWidgets.QWidget.__init__(self,parent)
  call self.initUI()
  call self.registerCallbacks()
  call g.registerHandler('select2',self.select2_hook)
  call g.registerHandler('create-node',self.command2_hook)
  call g.registerHandler('command2',self.command2_hook)
   def def initUI(self):
  call self.setObjectName('LeoTagWidget')
  call self.verticalLayout_2.setContentsMargins(0,1,0,1)
  call self.verticalLayout_2.setObjectName(
'nodetags-verticalLayout_2')
  call self.horizontalLayout.setContentsMargins(0,0,0,0)
  call self.horizontalLayout.setObjectName(
'nodetags-horizontalLayout')
  call self.horizontalLayout2.setContentsMargins(0,0,0,0)
  call self.horizontalLayout2.setObjectName(
'nodetags-horizontalLayout2')
  call label2.setObjectName('nodetags-label2')
  call label2.setText('Tags for current node:')
  call self.horizontalLayout2.addWidget(label2)
  call self.verticalLayout.setObjectName('nodetags-verticalLayout')
  call self.comboBox.setObjectName('nodetags-comboBox')
  call self.comboBox.setEditable(bool)
  call self.horizontalLayout.addWidget(self.comboBox)
  call self.pushButton.setObjectName('nodetags-pushButton')
  call self.pushButton.setMinimumSize(24,24)
  call self.pushButton.setMaximumSize(24,24)
  call self.horizontalLayout.addWidget(self.pushButton)
  call self.verticalLayout.addLayout(self.horizontalLayout)
  call self.listWidget.setObjectName('nodetags-listWidget')
  call self.verticalLayout.addWidget(self.listWidget)
  call self.verticalLayout.addLayout(self.horizontalLayout2)
  call self.label.setObjectName('nodetags-label')
  call self.label.setText('Total: 0 items')
  call self.verticalLayout.addWidget(self.label)
  call self.verticalLayout_2.addLayout(self.verticalLayout)
  call QtCore.QMetaObject.connectSlotsByName(self)
   def def registerCallbacks(self):
  call 

Re: Harvesting Tips from GitHub

2017-12-07 Thread Xavier G. Domingo (xgid)
On Thursday, December 7, 2017 at 2:28:52 PM UTC-3, Terry Brown wrote:
 

> I think the current GitHub solution handles revision.  The harvesting 
> code only takes a moment to run - we could add it to a git commit hook 
> as a once a day thing for example.  As you say re-opening an tip-issue 
> could be used to temporarily exclude it from harvesting, if needed. 
>
> Cheers -Terry 
>

OK, sounds good to me.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Harvesting Tips from GitHub

2017-12-07 Thread Terry Brown
On Thu, 7 Dec 2017 09:11:49 -0800 (PST)
"Xavier G. Domingo (xgid)"  wrote:

> > If a tip needs revision (they will), where does that happen? 
>
> It could be done in many ways, but one could be storing the
> "closed_at" date somehow in our "harvested" copy and comparing it
> with the current "closed_at" date of the tip at each harvest. To make
> a revision, we should simply *Reopen *the issue at GitHub and *Close
> *it again when the new text is in place. What do you think?

I think the current GitHub solution handles revision.  The harvesting
code only takes a moment to run - we could add it to a git commit hook
as a once a day thing for example.  As you say re-opening an tip-issue
could be used to temporarily exclude it from harvesting, if needed.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Harvesting Tips from GitHub

2017-12-07 Thread Xavier G. Domingo (xgid)

On Thursday, December 7, 2017 at 1:20:07 PM UTC-3, Terry Brown wrote:
>
>
> I disagree.  We need to define the canonical source for the tips, or 
> violate DRY.  If we're using GitHub because of its markdown editing / 
> preview, I think by default GitHub is the canonical source. 
>
>  
I agree with Terry: setting up a well defined workflow here would be 
prefered to avoid duplicating efforts and time waste. And if it can be 
automated in some way, the better: specially your time, Edward, must be 
valued as gold! ;-)

Personally, I would prefer a more "leonine" workflow based in .md files 
which can be stored in a dedicated folder in the main leo-editor repository 
and simply "harvested" by Leo using its own weapons: a .leo file with an 
@path node or similar... but I understand that such a workflow would make 
contributions harder, so the current idea of Edward to use GitHub issues I 
think it's great.

If a tip needs revision (they will), where does that happen? 


It could be done in many ways, but one could be storing the "closed_at" 
date somehow in our "harvested" copy and comparing it with the current 
"closed_at" date of the tip at each harvest. To make a revision, we should 
simply *Reopen *the issue at GitHub and *Close *it again when the new text 
is in place. What do you think?

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Harvesting Tips from GitHub

2017-12-07 Thread Terry Brown
On Thu, 7 Dec 2017 06:30:13 -0600
"Edward K. Ream"  wrote:

> On Wed, Dec 6, 2017 at 5:04 PM, Terry Brown 
> wrote:
> 
> > If we use the "open Tip issues are being edited, closed Tip issues
> > are ready to use" workflow, we can get the Tips from:
> >
> > https://api.github.com/repos/leo-editor/leo-editor/issues?
> > labels=Tip=closed
> >
> > It's a JSON list of dicts which have a `body` key (they ripped that
> > terminology off Leo, I bet ;-) which is the issue summary markdown.
> 
> ​Hehe.  Or we could just cut/paste :-) It would not, in fact, take
> very long.

I disagree.  We need to define the canonical source for the tips, or
violate DRY.  If we're using GitHub because of its markdown editing /
preview, I think by default GitHub is the canonical source.  If a tip
needs revision (they will), where does that happen?

Here's code to harvest them:
https://github.com/leo-editor/snippets/blob/master/scripts/misc/get_tips.py

It captures the title for feed back, I don't think we'll use it in the
user visible tip.

Cheers -Terry

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Head scratching from a newbie: Markdown compiling?

2017-12-07 Thread Edward K. Ream
On Thu, Dec 7, 2017 at 7:29 AM, vitalije  wrote:

Markdown supports html comments.
>

​I didn't know that :-)

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Head scratching from a newbie: Markdown compiling?

2017-12-07 Thread vitalije
Markdown supports html comments.

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Harvesting Tips from GitHub

2017-12-07 Thread Edward K. Ream
On Wed, Dec 6, 2017 at 5:04 PM, Terry Brown  wrote:

> If we use the "open Tip issues are being edited, closed Tip issues are
> ready to use" workflow, we can get the Tips from:
>
> https://api.github.com/repos/leo-editor/leo-editor/issues?
> labels=Tip=closed
>
> It's a JSON list of dicts which have a `body` key (they ripped that
> terminology off Leo, I bet ;-) which is the issue summary markdown.
>

​Hehe.  Or we could just cut/paste :-) It would not, in fact, take very
long.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Head scratching from a newbie: Markdown compiling?

2017-12-07 Thread Rebecca Scalese

>
> These are preliminary thoughts.  All comments welcome. 
>

>From my weak understanding of Leo, this seems like a good approach. 
Regarding section titles, it might be worth it to have two differing 
approaches:
- If the Markdown nodes don't have any heading markings (#, ##, etc.), 
build titles based on indentation level and headlines the way it's usually 
done with rST.
- If there are headings in some or all of the Markdown nodes, use these 
instead and don't build titles at all (this way, one can deliberately 
override automatic title/level handling).

When you save Leo document, a file named mymdfile.md will be created and it 
> will contain your markdown content.
> For conversion in html you can use some other tool like pelican 
> .
>

Actually, this mostly solves the problem in my case - I'm a Ulysses user, 
so ultimately once I have a clean .md file export is trivial (and Ulysses's 
GUI for export configuration is pretty great). But this is a solution 
specific to the tools I have at hand, and although Leo probably shouldn't 
thrive to have this much granularity (at least not at first), I think it'd 
still be a good thing for it to be able to export HTML from Markdown 
natively.

Thanks for the input and information, this has helped a lot!

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: Head scratching from a newbie: Markdown compiling?

2017-12-07 Thread Edward K. Ream
On Wed, Dec 6, 2017 at 4:51 PM, vitalije  wrote:

> As far as I know, @auto-markdown or @auto-md are not implemented yet.
>

​They *are* implemented, but perhaps not completely.
plugins/importers/​markdown.py imports these files.
plugins/writers/markdown.py writes these files.

For conversion in html you can use some other tool like pelican
> .
>

​​Or pandoc, as others have mentioned.

Yesterday I saw that the rst3 command might be taught to understand
markdown syntax, perhaps without needing pandoc or pelican.

The trigger would be @language markdown (or md).

A simple regex should suffice to discover links of the form [a](b).

More importantly, the rst3 command might support, say, @toc, which would
tell rst3 create a table of contents at the given location.  We can't use
"meaningful" comments because markdown has no comments.

These are preliminary thoughts.  All comments welcome.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.


Re: [QA]how to define Syntax coloring for GLOBAL var?

2017-12-07 Thread Zoom.Quiet
thanx for all, i appended my try into:
Support patching of Leo's colorizer tables · Issue #613 · leo-editor/leo-editor
https://github.com/leo-editor/leo-editor/issues/613

On Wed, Dec 6, 2017 at 4:49 AM, Edward K. Ream  wrote:
> On Tuesday, December 5, 2017 at 12:09:15 PM UTC-6, Edward K. Ream wrote:
>
>> The keys in the python_main_keywords_dict must be strings, not regular
>> expressions.  However, it definitely would be possible to add entries to the
>> rules dict:
>
>
> Several additional comments:
>
> 1. Everything should "just work" if you are prepared to change
> modes/python.py itself.  That is, caching in the colorizer will not be an
> issue.
>
> 2. All colorizer rules, including your new rules, will call
> colorizer.match_* to do the actual matching. The present python rules call
> none of the regex-matching rules, but they certainly are free to do so.  The
> regex rules are: match_compiled_regexp, match_eol_span_regexp,
> match_seq_regexp and match_word_and_regexp.  See their docstrings for
> details.
>
> 3. The colorizer calls only those rules in the list rulesDict1.get(ch),
> where ch is the present character being matched. Thus, each rule must know
> its lead-in characters, and that rule must be present in the appropriate
> lists in the rulesDict1.
>
> HTH.
>
> Edward
>
> --
> You received this message because you are subscribed to the Google Groups
> "leo-editor" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to leo-editor+unsubscr...@googlegroups.com.
> To post to this group, send email to leo-editor@googlegroups.com.
> Visit this group at https://groups.google.com/group/leo-editor.
> For more options, visit https://groups.google.com/d/optout.



-- 
life is pathetic, go Pythonic! 人生苦短, Python当歌!
俺: http://zoomquiet.io
授: http://creativecommons.org/licenses/by-sa/2.5/cn/
怒: 冗余不做,日子甭过!备份不做,十恶不赦!
KM keep growing environment culture which promoting organization learning!

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to leo-editor+unsubscr...@googlegroups.com.
To post to this group, send email to leo-editor@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.