[pmwiki-users] editing pmwiki pages
dausha at gmail.com
Sun May 21 13:07:53 CDT 2006
I am currently writing a new wrapper for Vim using Python. My plan was
to publish yesterday or today. The wrapper _should_ be able to work
with emacs as well. However, since I'm not a fan of emacs (my wife is,
which leads to some interesting discussions), I have not tested that
I would say my application is ready for use, but I upgraded the
(Gentoo) Linux partition of my laptop yesterday and discovered a few
minutes ago that the ACPI was not managing the CPU fan. So, I'm having
to let it cool here in Windows mode. When I'm ready to face a
pissed-off Linux install, I'll post the code. When I was just editing
in Vim and using links on fluxbox I had no problem. When I fired up
Firefox, my install became quite irate. The difference is three hours
of programming verse three minutes of Firefox.
Yesterday I focused on error checking and providing documentation
(i.e. usage). There are presently three features non-operational, and
they all involve file handling. That is, one feature reads a local
file to publish to a PmWiki site. A second feature saves a PmWiki page
locally. The third does the same as the second, but you can edit
before the local save.
The program also prompts for a password via CLI rather than allow the
password to be stored in-application or in the config file. The
application is Authuser submissive by default, so it should work with
default PmWiki security. Naturally, on non-password sites, you can
option away the password.
Since I've taken to journalling more, the program will take a toggle
to append today's date to the end of the page/URL passed to it. So, if
today you were to write to Journal.Journal with the --journal switch,
it would invoke Journal.Journal-2006-05-21 for edit.
There is also the added ability to configure a browser that the app
will invoke after. As there is a way to tell an active Mozilla browser
to reload a page via the command line, then it is possible to edit via
your favorite text editor, then view in a browser.
I originally wrote this application because I wanted to learn more
about Python. As a law student, I also take class notes using Vim, and
I like the redundancy of having it available on the PmWiki site. Also,
having a good stylesheet allows me to print out my aggregate notes in
an easy-to-read format. Using this script this past semester, I was
able to manage my notes during the semester and print them out as an
outline at the end of the semester. When people asked for a copy of my
notes, I sent them a URL.
So, stay tuned.
: Otherwise, the script uses temp files and the local copy is lost
after publication. Naturally, if the system crashes it will try to
post the page. If it fails to post, it is supposed to leave a local
copy. I have not tried that. However, I added the support because I
_have_ lost class notes to a crash.
: Not the "my house has no locks, come right in" security, but the
"just the password, Man" security. I come from a "full-body cavity
search" background, although I tend not to exercise that approach at a
techie or as a host at a party.
: This should theoretically work with any text editor--for those of
you who can't live without nano. I know there's a silent majority out
there. Since it works with vim, it should work with ed, but why?
: I used to do that, but the script is, er, on the Linux partition.
I suppose I should roll that into the documentation?
On 5/21/06, Erich Hoffmann <erichhoffmann at gmx.de> wrote:
> Hello all.
> Using pmwiki for some projects of my own on a local machine (mandriva
> linux 2006) I'm very happy with it.
> Hope I can express what I have in mind. - When editing a page, the
> editor of the browser starts. But this editor has no macro programming
> at all, no search&replace etc etc and as I am used to emacs and vim I
> miss that a lot. I know that there is a pmwiki-mode for emacs, but
> with this mode I still have to open the source code file in wiki.d.
> But in this file the line breaks aren't visible (as character %0a, yes,
> but not as a real line break).
> What I'd like to have or to implement is a function that starts
> an external editor when I edit a page in the browser. My present
> out-of-the-box solution is the system clipboard, I start vim (or
> emacs), cut the contents of the file with <CTRL-A><CTRL-X> into the
> system clipboard, and from here I paste it into vim using '+' register
> (M-x clipboard-yank in emacs). After the job I just insert it back,
> wrote a handful of macros for this purpose. Even so I am _much_
> quicker and more elegant than with the editor of the browser.
> But the best solution were that the external editor is started when I
> open the page editing, after the model of kmail perhaps...I tried to
> find a temp-file that is created, but with no success, and googeling
> and perusing the pmwiki-pages didn't say anything.
> Is there a solution, or what can I do to make a solution myself?
> Thanks in advance,
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
" Mundus vult decipi, ergo decipiatur"
More information about the pmwiki-users